feat: add canonical profile content schema and access helpers

This commit is contained in:
2026-02-16 23:32:25 +00:00
parent 8178d03cb2
commit 6605966fab
6 changed files with 338 additions and 0 deletions
+12
View File
@@ -2,6 +2,10 @@
## Patterns
### mem-1771284742-cc7f
> Stage 1 canonical descriptive text foundation now exists in src/data/profile-content.ts with strict schema in src/types/profile-content.ts and typed selectors in src/lib/profile-content.ts; this is additive and preserves existing consumer behavior until migration checkpoints.
<!-- tags: data, content, refactor | created: 2026-02-16 -->
### mem-1771245168-48e8
> Canonical timeline data now lives in src/data/timeline.ts and legacy consultations/constellation exports are compatibility layers derived from it, removing duplicated date/year maintenance.
<!-- tags: data, timeline, consistency | created: 2026-02-16 -->
@@ -30,6 +34,14 @@
## Fixes
### mem-1771284167-9e36
> failure: cmd=sed -n '1,260p' ralph/prompt.md, exit=2, error=No such file or directory, next=locate actual prompt path with rg --files and use correct casing/location
<!-- tags: tooling, error-handling, ralph | created: 2026-02-16 -->
### mem-1771284072-053c
> failure: cmd=sed -n '1,260p' Ralph/PROMPT.md, exit=2, error=No such file or directory (path case mismatch), next=use lowercase path ralph/prompt.md
<!-- tags: tooling, error-handling, ralph | created: 2026-02-16 -->
### mem-1771246458-9388
> failure: cmd=rg -n "--font-mono\b|font-mono-dashboard|font-geist-mono|timeline-intervention|chronology|pathway" src/index.css, exit=2, error=pattern beginning with -- parsed as flag, next=use rg -n -- '<pattern>' <file>
<!-- tags: tooling, error-handling, search | created: 2026-02-16 -->
+18
View File
@@ -0,0 +1,18 @@
# Scratchpad
## 2026-02-16T23:27:00Z — Planner Stage 1 framing
- Confirmed next unchecked rollout stage is Stage 1 in `Ralph/PROMPT.md`.
- Inventory completed across `src/data`, `src/components`, and search/chat builders. Major duplication centers are component literals (`PatientSummaryTile`, `Sidebar`) and builder-layer hardcoded text (`search.ts`, `llm.ts`) versus existing canonical domain data.
- Planned Stage 1 as schema + canonical module + typed access helpers + thin adapters only, with no component migration yet, to minimize regression risk.
- Confidence: 92/100. High confidence because scope is additive and preserves existing export contracts while preparing Stage 2/3 migrations.
## 2026-02-16T23:33:00Z — Builder Stage 1 Checkpoint A complete
- Implemented additive canonical text foundation only (no consumer rewires):
- `src/types/profile-content.ts` defines typed schema for profile, sidebar copy, results, education entries, quick actions, and LLM prompt content.
- `src/data/profile-content.ts` is now the single editable canonical module seeded with current descriptive literals from `PatientSummaryTile`, `Sidebar`, `search.ts`, and `llm.ts`.
- `src/lib/profile-content.ts` adds typed selectors (`getProfileContent`, `getProfileSummaryText`, `getSidebarCopy`, `getSearchQuickActions`, `getLLMCopy`).
- Quality gates passed:
- `npm run lint` (warnings only, no errors)
- `npm run typecheck`
- `npm run build`
- Confidence: 91/100. Safe additive checkpoint with no runtime behavior changes.
+2
View File
@@ -33,3 +33,5 @@
{"id":"task-1771251477-81a2","title":"Visual: Entry animation reveal effects","description":"Role nodes scale from 0 with ease-out-back. New skill nodes scale from 0 with ease-out. Links draw on via stroke-dashoffset. Year indicator top-left monospace. Replace Phase 2 entry animation with timeline-driven animation.","status":"closed","priority":2,"blocked_by":[],"loop_id":"primary-20260216-135722","created":"2026-02-16T14:17:57.098724221+00:00","closed":"2026-02-16T14:31:18.740781337+00:00"}
{"id":"task-1771251479-1473","title":"Integration: Wire animation to highlight system (Phase 4)","description":"Multiplicative opacity: animation(0/target) × highlight(1.0/0.15). Hover/tap pauses animation. Highlight only on revealed nodes. Resume 800ms after interaction ends. Explicit pause via button stays paused. Play/pause toggle bottom-right. Mobile accordion + keyboard nav + detail panel work during pause. prefers-reduced-motion shows final state.","status":"closed","priority":2,"blocked_by":[],"loop_id":"primary-20260216-135722","created":"2026-02-16T14:17:59.857204916+00:00","closed":"2026-02-16T14:31:18.838001047+00:00"}
{"id":"task-1771251482-f0e9","title":"Accessibility: reduced-motion + play/pause button","description":"prefers-reduced-motion skips animation entirely, shows final state. Play/pause button with aria-label, subtle styling, larger touch target on mobile.","status":"closed","priority":2,"blocked_by":[],"loop_id":"primary-20260216-135722","created":"2026-02-16T14:18:02.061675075+00:00","closed":"2026-02-16T14:31:18.930889962+00:00"}
{"id":"task-1771284229-34e9","title":"Plan Stage 1 canonical content schema","description":"Planner hat: identify next unchecked stage and update .ralph/plan.md with scoped file-level migration plan","status":"closed","priority":1,"blocked_by":[],"loop_id":"primary-20260216-232330","created":"2026-02-16T23:23:49.734442590+00:00","closed":"2026-02-16T23:29:43.798920375+00:00"}
{"id":"task-1771284608-2942","title":"Stage1 Checkpoint A: add canonical profile content schema/module/helpers","description":"Create src/types/profile-content.ts, src/data/profile-content.ts, and src/lib/profile-content.ts with typed, centralized descriptive text and selectors; no consumer migration in this task.","status":"closed","priority":1,"blocked_by":[],"loop_id":"primary-20260216-232330","created":"2026-02-16T23:30:08.665923960+00:00","closed":"2026-02-16T23:32:25.469667619+00:00"}