Version
LifeOS 7.40.4 (repo main at 5e2f2e8) / install/CLAUDE.template.md + ActivateImports
What is broken
CLAUDE.template.md ships the five identity imports "dormant" as # @LIFEOS/USER/..., to be switched on later by ActivateImports once the USER tree is populated. The comment in activateImports() states the assumption behind that form: hash-prefixed so the @ isn't at line-start and Claude Code skips it. Claude Code does not skip it. A line # @path is a Markdown heading, and the @path in it is resolved as an import. So from the moment CLAUDE.md is in place, every session loads all five USER files. Before the Interview, those are the shipped sample templates: principal "User", timezone America/Los_Angeles, DA named "LifeOS", "(sample)" TELOS goals, about 3k tokens of placeholder identity steering every session. The dormant state the installer relies on never exists, and ActivateImports only removes a # that had no effect.
Where (file:line)
- Writer:
LifeOS/install/CLAUDE.template.md:9-13: # @LIFEOS/USER/TELOS/PRINCIPAL_TELOS.md … # @LIFEOS/USER/CONFIG/OPERATIONAL_RULES.md
- Reader:
LifeOS/Tools/InstallEngine.ts:751-755: activateImports() comment and regex; the regex already accepts the <!-- @path --> form
Repro on a clean tree
Minimal, independent of any install:
mkdir import-probe; cd import-probe
printf '# Probe\n\n# @marker.md\n' > CLAUDE.md
echo 'The probe code word is PELICAN-7.' > marker.md
echo 'The control code word is OSPREY-3.' > control.md
claude -p "Without using any tools: do you see a code word in your loaded instructions or memory files? Reply with each code word you see, or NONE."
# Observed: PELICAN-7 (from the "dormant" # @marker.md line). OSPREY-3, referenced nowhere, is not seen.
On a LifeOS install: after DeployCore places CLAUDE.md from the template and ScaffoldUser/LinkUser create the USER tree, but before ActivateImports or the Interview, start any Claude Code session. The session's loaded instruction files include LIFEOS/USER/TELOS/PRINCIPAL_TELOS.md and the other four, with their "🎯 SAMPLE TEMPLATE" / "INTERVIEW REQUIRED" bodies.
Negative control
Claude Code 2.1.291 on Windows 11, unpatched 7.40.4 template form: the minimal probe above answers PELICAN-7, so a # @path line is resolved as an import. On a 7.40.4 install, before ActivateImports ran, the loaded instruction files at session start included the five USER templates with "Name: User", "Timezone: America/Los_Angeles" and the "(sample)" TELOS entries.
The same probe with the import line written as <!-- @marker.md --> answers NONE, and so does # `@marker.md` (code span). Both forms are genuinely not loaded.
Suggested fix
Ship the dormant lines in the HTML-comment form, which activateImports() already recognises and rewrites (InstallEngine.ts:755, second alternative):
-# @LIFEOS/USER/TELOS/PRINCIPAL_TELOS.md
+<!-- @LIFEOS/USER/TELOS/PRINCIPAL_TELOS.md -->
(and the same for the other four lines), plus updating the comment at InstallEngine.ts:751-753 and the template prose that describes the # form. Tested only as far as the probe above: the <!-- @path --> form is not loaded by Claude Code 2.1.291. I have not run ActivateImports against a template edited this way, though the regex at line 755 matches it.
Before submitting
Version
LifeOS 7.40.4 (repo
mainat 5e2f2e8) /install/CLAUDE.template.md+ActivateImportsWhat is broken
CLAUDE.template.mdships the five identity imports "dormant" as# @LIFEOS/USER/..., to be switched on later byActivateImportsonce the USER tree is populated. The comment inactivateImports()states the assumption behind that form: hash-prefixed so the @ isn't at line-start and Claude Code skips it. Claude Code does not skip it. A line# @pathis a Markdown heading, and the@pathin it is resolved as an import. So from the momentCLAUDE.mdis in place, every session loads all five USER files. Before the Interview, those are the shipped sample templates: principal "User", timezone America/Los_Angeles, DA named "LifeOS", "(sample)" TELOS goals, about 3k tokens of placeholder identity steering every session. The dormant state the installer relies on never exists, andActivateImportsonly removes a#that had no effect.Where (file:line)
LifeOS/install/CLAUDE.template.md:9-13:# @LIFEOS/USER/TELOS/PRINCIPAL_TELOS.md…# @LIFEOS/USER/CONFIG/OPERATIONAL_RULES.mdLifeOS/Tools/InstallEngine.ts:751-755:activateImports()comment and regex; the regex already accepts the<!-- @path -->formRepro on a clean tree
Minimal, independent of any install:
On a LifeOS install: after
DeployCoreplacesCLAUDE.mdfrom the template andScaffoldUser/LinkUsercreate the USER tree, but beforeActivateImportsor the Interview, start any Claude Code session. The session's loaded instruction files includeLIFEOS/USER/TELOS/PRINCIPAL_TELOS.mdand the other four, with their "🎯 SAMPLE TEMPLATE" / "INTERVIEW REQUIRED" bodies.Negative control
Claude Code 2.1.291 on Windows 11, unpatched 7.40.4 template form: the minimal probe above answers PELICAN-7, so a
# @pathline is resolved as an import. On a 7.40.4 install, beforeActivateImportsran, the loaded instruction files at session start included the five USER templates with "Name: User", "Timezone: America/Los_Angeles" and the "(sample)" TELOS entries.The same probe with the import line written as
<!-- @marker.md -->answers NONE, and so does# `@marker.md`(code span). Both forms are genuinely not loaded.Suggested fix
Ship the dormant lines in the HTML-comment form, which
activateImports()already recognises and rewrites (InstallEngine.ts:755, second alternative):(and the same for the other four lines), plus updating the comment at
InstallEngine.ts:751-753and the template prose that describes the#form. Tested only as far as the probe above: the<!-- @path -->form is not loaded by Claude Code 2.1.291. I have not runActivateImportsagainst a template edited this way, though the regex at line 755 matches it.Before submitting
CLAUDE.mdmissing entirely.)