Repository navigation
fix(install): ship dormant identity imports as HTML comments so they stop loading before ActivateImports - #2298
Simonvm9114 wants to merge 1 commit into
Conversation
…2296) CLAUDE.template.md shipped its five identity imports "dormant" as `# @LIFEOS/USER/...`, on the assumption that Claude Code skips an @path that is not at line start. It does not: `# @path` is a heading, and the @path in it is resolved. Every session therefore loaded the USER sample templates (principal "User", timezone America/Los_Angeles, DA "LifeOS", "(sample)" TELOS goals) from the moment CLAUDE.md was placed, before the Interview or ActivateImports ran. - CLAUDE.template.md (both shipped copies): the five lines now ship as `<!-- @LIFEOS/USER/... -->`, the form activateImports() already accepts. - InstallEngine.ts (both copies): the comment above the dormant-import regex now says why the HTML form is used. The `# @` form is still matched so CLAUDE.md files from older installs keep activating. - Setup.md (both copies): step 4 describes the new dormant form. Verified end to end with Claude Code 2.1.291 on Windows 11: a project CLAUDE.md copied from the new template, with code words in LIFEOS/USER/TELOS/PRINCIPAL_TELOS.md and LIFEOS/USER/PROJECTS.md, loads neither word; after activateImports() rewrites the two lines (the other three are skipped because their files do not exist), Claude sees both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Same file, one line this PR leaves alone. Line 19 of Repro on a clean v7.40.4 clone. Copy Negative control: before the Small stakes, but real. A model that reads that line can decide identity isn't loaded and suggest re-running setup. Two cheap fixes: word the sentence so it covers both states ("ship commented out, ActivateImports enables each one once its target exists"), or have ActivateImports rewrite it. Since this PR already edits the template and InstallEngine, it fits here if you'd rather keep it in one place. |
Fixes #2296.
CLAUDE.template.mdshipped the five identity imports "dormant" as# @LIFEOS/USER/..., on the assumption (stated inactivateImports()) that Claude Code skips an@paththat is not at line start. It does not:# @pathis a heading and the@pathin it is resolved. So every session loaded the USER sample templates (principal "User", timezone America/Los_Angeles, DA "LifeOS", "(sample)" TELOS goals) from the momentCLAUDE.mdwas placed, before the Interview orActivateImportsran.Change
install/CLAUDE.template.md(and its copy ininstall/skills/LifeOS/install/): the five lines ship as<!-- @LIFEOS/USER/... -->.activateImports()already accepts that form, so activation needs no code change.Tools/InstallEngine.ts(both copies): the comment above the dormant-import regex now explains why the HTML form is used. The# @form is still matched, soCLAUDE.mdfiles from existing installs keep activating.Workflows/Setup.md(both copies): step 4 describes the new dormant form.Verification (Claude Code 2.1.291, Windows 11)
A project folder with
CLAUDE.mdcopied from the new template, plus code words inLIFEOS/USER/TELOS/PRINCIPAL_TELOS.mdandLIFEOS/USER/PROJECTS.md:claude -pasked to list code words in its loaded instructions answers NONE. With the old# @form the same probe returns the word (see the issue).activateImports(<CLAUDE.md>, <folder>)returnsactivated: [PRINCIPAL_TELOS, PROJECTS], with the other three skipped because their files do not exist.🤖 Generated with Claude Code