Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

CLAUDE.md @-import points at legacy DA_IDENTITY.md, ignoring registry-based identity

Open brycemagera opened this issue 6 months ago • 1 comments

Summary

Releases/v5.0.0/.claude/CLAUDE.md line 7 hardcodes the legacy DA identity import path:

@PAI/USER/DA_IDENTITY.md

But the v5.0.0 design (DOCUMENTATION/Pulse/DaSubsystem.md Sections 1, 9) moved the DA identity into the registry-based structure:

PAI/USER/DA/
  _registry.yaml
  <primary>/
    DA_IDENTITY.yaml    ← source of truth
    DA_IDENTITY.md      ← auto-generated readable form, intended @-import target

The CLAUDE.md template still points at the legacy path. After running the migration described in DaSubsystem.md (or even after running bun PAI/Tools/DAIdentityGenerator.ts to produce <primary>/DA_IDENTITY.md), the @-import keeps loading the old flat file.

Why it matters

  • Anyone who follows the migration plan ends up with the new generated DA_IDENTITY.md ignored, while the legacy file remains the load source.
  • The system has two parallel sources of truth indefinitely: the legacy MD (loaded into context every session) and the new YAML/MD (read by the Assistant module). They drift silently.
  • The legacy MD is documented as the file users edit by hand pre-migration; the new YAML is supposed to be the file users edit post-migration. Without updating the import, edits to the YAML never reach Kai's session context.

Reproduction

  1. Fresh v5.0.0 install
  2. Run /interview to create PAI/USER/DA/<name>/DA_IDENTITY.yaml
  3. Run bun PAI/Tools/DAIdentityGenerator.ts to produce PAI/USER/DA/<name>/DA_IDENTITY.md
  4. Edit a behavioral rule in the new YAML, regenerate the MD
  5. Start a session: the change is not visible to Claude — CLAUDE.md @-imports the legacy PAI/USER/DA_IDENTITY.md instead

Suggested fix

Two possible approaches:

  1. Template variable. The rest of CLAUDE.md uses {DA_IDENTITY.NAME} placeholders for DA name. Extend the substitution to include the DA path:

    @PAI/USER/DA/{DA_IDENTITY.PRIMARY}/DA_IDENTITY.md
    

    This requires the (currently-absent — see #1204) ConfigRenderer to resolve {DA_IDENTITY.PRIMARY} from _registry.yaml.

  2. Hardcode but document. If the design assumes the primary DA is always kai/pai/<chosen-name> and the user manually edits CLAUDE.md after running /interview, document that step. Currently it's not in the migration plan.

Option 1 is the cleaner long-term fix and dovetails with #1204. Option 2 is a one-line CLAUDE.md edit + one paragraph in DaSubsystem.md Section 9.

Context

Found while migrating my own primary DA. Filed alongside #1202 (MigrateDAIdentity.ts), #1203 (multi-DA delegation), #1204 (ConfigRenderer) — all DA-subsystem completeness gaps surfaced during a local audit.

brycemagera avatar May 07 '26 19:05 brycemagera

Hey @brycemagera, thank you for the PR and the work that went into it.

We're changing how LifeOS ships: from a full ~/.claude directory you run as-is, to a skill installed by an agentic installer that has your own AI integrate the pieces into your setup. That reworks the parts of the codebase this change touches, so it won't apply cleanly to where we're headed.

We're closing it for that reason, not because the idea was wrong. If the need still stands against the new model, we'd love a fresh PR once it lands. Thanks again for contributing.

danielmiessler avatar Jun 21 '26 03:06 danielmiessler