
Momentum
Momentum starts from a specific claim: procrastination is usually a response to a task being vague or big, not a lack of motivation, so the core loop is built to shrink the gap between 'I have a project' and 'I know what to do right now.' Adding a vague task ('write my thesis') and asking for a breakdown calls Fable 5 with a constrained prompt (fixed action count, concrete-verb requirement, required time estimate) and defensively parses the response — extracting the JSON array even through prose or code fences, dropping individually malformed entries rather than failing the whole batch. Without ANTHROPIC_API_KEY configured, or if the live call throws or returns something unparseable, it falls back to a deterministic heuristic split instead of erroring out, so the entire app — including its core differentiator — is fully demoable with zero keys. XP, streak, and per-project 'health' (which visibly decays after two weeks of inactivity) are all derived from task and focus-session history at read time rather than stored as separate counters, so there's nothing to drift out of sync. Built with a planning-first process: a PRD, roadmap, backlog with prioritized user stories, and a risk register were written before any feature code, then one feature landed per commit in dependency order, closing with an honest retrospective. One thing that almost shipped wrong: an isAiGenerated flag from the first schema commit was on track to conflate 'the breakdown feature made this' with 'Fable 5 specifically (not the heuristic) made this' — caught mid-build and split into a dedicated breakdownSource column so the UI can honestly label which mode produced a given result. Separately, Prisma 7's requirement for an explicit driver adapter (new PrismaClient() with no arguments no longer compiles) surfaced immediately via typecheck rather than at runtime. Covered by 18 Vitest unit tests on the derived XP/streak/health logic and the AI-response parsing/heuristic fallback — the two places most exposed to a silent logic bug or a misbehaving model response.