2.1 KiB
2.1 KiB
Content Refactor Review — Stage 3
Verdict
Approved for Stage 3. Continue to Stage 4.
Gate Results
npm run lint: pass (0 errors, 5 existing warnings)npm run typecheck: passnpm run build: pass
Stage 3 Objective Validation
- Timeline/constellation narrative content is now canonicalized and consumed via selectors:
src/data/timeline.tshydratesdescription,details,outcomes,codedEntriesfromgetTimelineNarrativeEntry(...).src/data/consultations.tsis now a thin compatibility export overtimelineConsultations.
- Search/chat duplicated profile copy migrated to canonical selectors:
src/lib/search.tsusesgetAchievementEntries(),getEducationEntries(),getSearchQuickActions().src/lib/llm.tsusesgetLLMCopy().systemPrompt.
- Canonical schema/content/helpers extended and typed:
src/types/profile-content.tssrc/data/profile-content.tssrc/lib/profile-content.ts
- Contract stability checks in reviewed code paths:
- Timeline entity IDs and mapping exports remain intact.
- Palette item ID formats (
ach-*,edu-*,action-*) and action wiring remain stable. - Chat request body shape and stream handling unchanged.
- Stage tracker reflects Stage 3 completion:
Ralph/PROMPT.mdhas Stage 1–3 checked and Stage 4 unchecked.
Required Next Work (Stage 4)
- Cleanup/hardening:
- Remove or further reduce obsolete compatibility/duplicate structures where no longer needed, keeping only thin adapters with clear purpose.
- Tighten canonical access typing where possible (favor readonly returns and narrow key types for canonical sections).
- One-file editing documentation:
- Add concise docs describing that shared descriptive/profile text should be edited in
src/data/profile-content.ts. - Include where typed selectors live (
src/lib/profile-content.ts) and a brief "edit once, consumed everywhere" workflow.
- Add concise docs describing that shared descriptive/profile text should be edited in
- Success criteria/status closure:
- Update
Ralph/PROMPT.mdsuccess criteria checkboxes and mark Stage 4 complete only when cleanup/docs are done. - Validate that representative shared text edits require changing only the canonical content file.
- Update