Version
LifeOS 7.40.4 / Pulse
What is broken
Text after the last ## section of TELOS.md is parsed into that section.
The shipped scaffold ends with a horizontal rule and an italic closing note ("This file is the canonical TELOS. …") after the Wisdom section. parseTelosUnified closes a section only at the next ## heading, so the rule and the note become part of Wisdom. parseSections removes the rule and keeps the note. /api/life/goals then returns the note as a second wisdom item, next to the user's own lessons.
Where (file:line)
Reader: LIFEOS/PULSE/Observability/observability.ts:3484-3503 (parseTelosUnified: a section ends only at a ## line) and :2295 (parseSections: strips --- lines and HTML comments, keeps other text).
Writer: the scaffold USER/TELOS/TELOS.md, last two lines.
Repro on a clean tree
cd ~/.claude && F=LIFEOS/PULSE/Observability/observability.ts
{ sed -n '2291,2361p' "$F"; cat <<'EOF'
import { readFileSync } from "node:fs";
const t = readFileSync("skills/LifeOS/install/USER/TELOS/TELOS.md", "utf8");
// parseTelosUnified ends a section only at the next "## " heading,
// so the last section's body runs to the end of the file:
const wisdom = t.split(/^## Wisdom[^\n]*\n/m)[1];
console.log(JSON.stringify(parseSections(wisdom).map(s => s.heading), null, 1));
EOF
} > /tmp/wisdom-repro.ts && bun /tmp/wisdom-repro.ts
The script copies parseSections out of the shipped file by line range and runs it on the scaffold's Wisdom section, taken the way parseTelosUnified takes it.
Live form on a fresh install: curl -s localhost:31337/api/life/goals | jq '.wisdom'.
Negative control
On unpatched 7.40.4:
[
"(sample) A lesson you've learned that guides you.",
"*This file is the canonical TELOS. The DA and Pulse read it directly; the spl..."
]
Two items come back. The second is the scaffold's closing note.
Suggested fix
Untested. Put the closing note inside an HTML comment in the scaffold (parseSections already strips comments), or end the last section at a trailing horizontal rule.
Before submitting
Version
LifeOS 7.40.4 / Pulse
What is broken
Text after the last
##section ofTELOS.mdis parsed into that section.The shipped scaffold ends with a horizontal rule and an italic closing note ("This file is the canonical TELOS. …") after the Wisdom section.
parseTelosUnifiedcloses a section only at the next##heading, so the rule and the note become part of Wisdom.parseSectionsremoves the rule and keeps the note./api/life/goalsthen returns the note as a secondwisdomitem, next to the user's own lessons.Where (file:line)
Reader:
LIFEOS/PULSE/Observability/observability.ts:3484-3503(parseTelosUnified: a section ends only at a##line) and:2295(parseSections: strips---lines and HTML comments, keeps other text).Writer: the scaffold
USER/TELOS/TELOS.md, last two lines.Repro on a clean tree
The script copies
parseSectionsout of the shipped file by line range and runs it on the scaffold's Wisdom section, taken the wayparseTelosUnifiedtakes it.Live form on a fresh install:
curl -s localhost:31337/api/life/goals | jq '.wisdom'.Negative control
On unpatched 7.40.4:
Two items come back. The second is the scaffold's closing note.
Suggested fix
Untested. Put the closing note inside an HTML comment in the scaffold (
parseSectionsalready strips comments), or end the last section at a trailing horizontal rule.Before submitting