feat(telos): parse status/dims/work tokens in PROJECTS.md#1251
Open
brycemagera wants to merge 4 commits into
Open
feat(telos): parse status/dims/work tokens in PROJECTS.md#1251brycemagera wants to merge 4 commits into
brycemagera wants to merge 4 commits into
Conversation
sections.tsx: missions[1] fallback → missions[0] + explicit null guard
horizon.tsx: missions[1] fallback → missions[0]
app.tsx: initial mission state "M1" → "M0"; useEffect to reset to
first available id when live data loads
Complements danielmiessler#1147 (data plumbing). Crash affects any user with < 2
missions: TypeError: Cannot read properties of undefined (reading 'horizon').
The TELOS schema uses '- **ID:** text' bullet lists for missions,
problems, strategies, and challenges. handleTelosOverview previously
piped these through parseSections → parseSourceHeadings, which expects
'## ID: title' section headings — so all four fields returned [].
Fix: add parseBulletIds(content, prefix) — generalises the existing
parseGoals bullet regex to any prefix — and call it directly from
handleTelosOverview with the correct type shapes:
- missions: {id, title, horizon: 'lifetime'}
- problems: {id, title, note, severity: 'med', affects: []}
- strategies: {id, title, overcomes: [], implements: []}
- challenges: {id, title, note, blocks: []}
goals continue to use the existing handleLifeGoals → parseGoals path
which already supports the bullet format.
Also wire up use-telos-data.ts: replace the FALLBACK-only stub with a
real useQuery fetch from /api/telos/overview, merged over FALLBACK so
unset fields degrade gracefully.
Rebuilt Observability/out/ to ship the updated static export.
Complements danielmiessler#1127 (standalone telos page) and danielmiessler#1147 (data plumbing).
Closes the remaining gap where the dashboard showed sample data despite
the endpoint and data plumbing being in place.
Extends the Telos v7 dashboard to populate fields that previously returned null. Builds on the bullet-format parsing and crash guards in this branch. ## New parser functions (observability.ts) - parseOwner() — reads PRINCIPAL_IDENTITY.md for display name + today's date - parseDimensionsFile() — parses DIMENSIONS.md pipe-delimited bullets - parseTelosMetrics() — parses METRICS.md id-prefixed bullets (MT/MH/MF etc.) - parseTelosProjects() — parses PROJECTS.md via parseBulletIds (PR prefix) - parseTelosTeam() — parses TEAM.md pipe-delimited bullets (T0, T1...) - parseTelosBudget() — parses BUDGET.md pipe-delimited bullets (B0, B1...) - parsePreferences() — reads USER/Books.md, Movies.md, Authors.md, Wisdom.md, Sparks.md with ★-filter for favorites; section headings for hobbies ## handleTelosOverview wired fields owner, idealState, dimensions, metrics, projects, team, budget, subtabs (derived from dimensions), preferences Remaining null (needs sensor data or generation): snapshot, recommendations, stranded, narrativeSeed ## use-telos-data.ts Expanded LiveTelos interface with 11 new optional fields; added matching conditional spreads to the telos merge object so live data overrides FALLBACK field-by-field. ## Template files (new) TELOS/DIMENSIONS.md — 6 life dimensions with cur/ideal/velo/color format TELOS/METRICS.md — starter KPI template TELOS/TEAM.md — team roster template (DA entry pre-populated) TELOS/BUDGET.md — resource budget template (money/time/attention) Depends on: fix/pulse-telos-dashboard (bullet parsers + crash guards)
Extends parseTelosProjects() to populate the Strategy / Feeds / Work in
flight columns in the /telos dashboard. Previously the parser only read
the title and hardcoded the other fields, so 3 of 4 columns in what.tsx
rendered empty.
Inline-token format on the project bullet:
- **PR1:** Title — description | status:green | dims:money,freedom (ties S0, G2)
- **W1:** Work item | strategy:S0 | eta:30d | status:amber | owner:Name
Tokens supported on project lines:
- status:green|amber|red (default amber)
- dims:id1,id2,... (validated against DIMENSIONS.md)
- (ties Sx, Gy) existing syntax; first S-id becomes strategy
Sub-bullets matching W\d+ become work items with their own status,
strategy, eta, and owner tokens. Strategy on a work item defaults to
the parent project's strategy when not specified.
Format-incompatible PROJECTS.md files (no tokens, no sub-bullets) still
parse as before — projects get title only, with empty dims/work and
amber status.
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.
Stacked on #1245 — that PR adds the
parseTelosProjects()stub; this one fills it out so the dashboard'sProjects and Worktable actually renders all four columns. Will rebase to a single commit after #1245 lands.Problem
what.tsxrenders a 4-columnProjects and Worktable: Project / Strategy / Feeds / Work in flight. In #1245parseTelosProjects()was added as a stub that returns only the title —strategy,dims, andworkare hardcoded empty, andstatusis hardcodedamber. The result is 3 of 4 columns render empty for every project.Change
Extends
parseTelosProjects()to accept three additions inPROJECTS.md:status:,dims:(pipe-delimited)(ties Sx, Gy)syntax — firstS-prefixed id becomes the strategy badgeW\d+ids and their own inline tokensExample
```markdown
```
Tokens
status(project + work)green|amber|redamberdims(project only)DIMENSIONS.mdids[]strategy(work only)Sx; falls back to parent project's strategyeta(work only)\"\"owner(work only)\"\"Compatibility
Format-incompatible
PROJECTS.mdfiles (no tokens, no sub-bullets) still parse correctly — projects get title only, with emptydims/workandamberstatus. This is the same shape #1245's stub produced.Files
Releases/v5.0.0/.claude/PAI/PULSE/Observability/observability.ts—parseTelosProjects()rewrite (+51 / -9)Verification
/api/telos/overviewreturns the new shape for projects with inline tokensPROJECTS.mduses the formatPROJECTS.mdstill parses (title only)