fix(telos): align v5 templates and parsers on bullet format#1114
Open
wojteksbt wants to merge 2 commits intodanielmiessler:mainfrom
Open
fix(telos): align v5 templates and parsers on bullet format#1114wojteksbt wants to merge 2 commits intodanielmiessler:mainfrom
wojteksbt wants to merge 2 commits intodanielmiessler:mainfrom
Conversation
added 2 commits
April 30, 2026 20:46
The TELOS bootstrap templates use `- **ID:**` (colon inside bold), but
the regex in GenerateTelosSummary.ts:53 expects `- **ID**:` (colon
outside bold):
/^-\s+\*?\*?(\w+)\*?\*?:\s*(.+)/
When the parser reads the as-shipped template, it captures the trailing
`**` as part of the value, so PRINCIPAL_TELOS.md ends up with garbage
prefixes like:
- **M0**: ** (sample) Help one million people...
Fixing the templates is the smaller change (18 lines, no code) and keeps
the parser logic untouched.
Affected files:
- MISSION.md, GOALS.md, PROBLEMS.md, STRATEGIES.md, CHALLENGES.md, NARRATIVES.md
The shipped v5 templates use bullets (`- **S0**: text`), but `parseStrategies` matched only H2/H3 headers and `parseProblems` matched headers first with a bullet fallback. Result: STRATEGIES section silently empty in PRINCIPAL_TELOS.md; PROBLEMS path was unnecessarily forked. Standardize both on `parseItems` with an ID-prefix filter, mirroring how `parseMissions`, `parseGoals`, `parseNarratives`, and `parseChallenges` already work. Single convention across all ID-bearing TELOS files. Breaking change: existing user STRATEGIES.md / PROBLEMS.md files that relied on H2/H3 header parsing (`## S0: title`) need to migrate to bullet format (`- **S0**: title`) to render. The shipped v5.0.0 templates already use bullets, so users who never customized are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1113.
What
Aligns v5 TELOS templates and the
GenerateTelosSummary.tsparsers on a single bullet-based convention- **ID**: textfor all six ID-bearing files (MISSION, GOALS, PROBLEMS, STRATEGIES, CHALLENGES, NARRATIVES).Two coordinated changes:
Templates (18 lines, 6 files):
- **ID:**→- **ID**:(colon outside the bold span). Required soparseItemsregex captures the value cleanly. Full rationale in TELOS template/parser mismatch breaksPRINCIPAL_TELOS.mdrendering #1113.Parsers (
Releases/v5.0.0/.claude/PAI/TOOLS/GenerateTelosSummary.ts):parseStrategies— was header-only (## S0:/### S0:), now reads bullets viaparseItemswith anS\d+ID filter. Without this change, the shipped STRATEGIES template never renders intoPRINCIPAL_TELOS.mdbecause the template is bullet-based and the parser only matched headers.parseProblems— was header-first with bullet fallback. Drops the header path, becomes bullet-only with aP\d+ID filter. Same rationale: shipped template is bullets; the dual-format complexity wasn't earning its keep.After this PR, every ID-bearing TELOS file uses the same shape (bullets with
**ID**:) and every parser reads the same shape viaparseItems.Why
Without the parser change, the template fix alone is incomplete. Anyone running the bootstrap renderer would get:
PRINCIPAL_TELOS.md## Strategies→ empty (parser ignores template bullets entirely)PRINCIPAL_TELOS.md## Problems Being Solved→ renders, but via a fallback path that only existed to paper over the template/parser mismatchFixing both at once gives the maintainer one clean "templates and parsers are now consistent" merge, instead of a follow-up PR to make the first one actually work.
Files changed
Templates:
Releases/v5.0.0/.claude/PAI/USER/TELOS/MISSION.mdReleases/v5.0.0/.claude/PAI/USER/TELOS/GOALS.mdReleases/v5.0.0/.claude/PAI/USER/TELOS/PROBLEMS.mdReleases/v5.0.0/.claude/PAI/USER/TELOS/STRATEGIES.mdReleases/v5.0.0/.claude/PAI/USER/TELOS/CHALLENGES.mdReleases/v5.0.0/.claude/PAI/USER/TELOS/NARRATIVES.mdParser:
Releases/v5.0.0/.claude/PAI/TOOLS/GenerateTelosSummary.ts—parseStrategies,parseProblemsBreaking change — migration note
Users whose existing
STRATEGIES.mdorPROBLEMS.mdfiles use H2/H3 headers (## S0: titleor### P0: title) will stop rendering after this merge. Migrate to bullet format- **S0**: titleto match the unified convention.The shipped v5.0.0 templates already use bullets, so users who never customized their files are not affected.
Out of scope
parseGoalsID-classification heuristic (G9+and[0, 1]→ active) — that's a separate concern tracked in GenerateTelosSummary: G2 misclassified as deferred;Deferred / OngoingandCompleted This Yearsections silently dropped #1115.parseNarrativessimilar[0, 1, 7]→ primary heuristic — same shape of issue as GenerateTelosSummary: G2 misclassified as deferred;Deferred / OngoingandCompleted This Yearsections silently dropped #1115, not part of this PR.Verification
After merge, running the renderer against the as-shipped v5.0.0 templates produces clean, complete output:
All six sections render with no
**artifact, no silent drops.