Skip to content

Pulse: text after the last ## section of TELOS.md lands in that section, so the scaffold's closing note becomes a Wisdom entry #2278

Description

@rain77-work

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

  • I searched open and closed issues for this defect.
  • The repro runs against a clean tree of the version above, not against my modified install.
  • I removed personal data from the pasted output — real names, absolute home paths, tokens, my own content.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions