docs: add DB + reconciliation implementation plan (30 tasks, 7 phases)
Implements the spec at docs/superpowers/specs/2026-06-19-cyclone-db-reconciliation-design.md. Phase 1 — Backend foundation (T1-T3): SQLAlchemy dep, db.py skeleton, PRAGMA user_version migration runner, 0001_initial.sql with 6 tables. Phase 2 — ORM models (T4-T6): Batch, Claim, Remittance, CasAdjustment, Match, ActivityEvent + ClaimState enum. Phase 3 — Reconciliation pure functions (T7-T8): match() with date window + multi-claim fallback, apply_payment/apply_reversal, split_unmatched. Phase 4 — Store facade refactor (T9-T12): CycloneStore replaces InMemoryStore with same public API + list_unmatched / manual_match / manual_unmatch; reconcile.run orchestrator wired into store.add(). Phase 5 — API additions (T13-T17): db.init() in startup, GET /api/reconciliation/unmatched, POST /match, POST /unmatch, parse-835 response includes reconciliation summary; TODO marker removal verification. Phase 6 — Frontend (T18-T26): ClaimState types, api.listUnmatched/ matchRemit/unmatchClaim, useReconciliation hook, ClaimStateBadge primitive (7 states, same palette), Reconciliation page, sidebar nav entry, vitest worktree exclude. Phase 7 — Docs + smoke (T27-T30): README persistence section + DB URL docs, tick off sub-project 1 plan boxes, full end-to-end smoke procedure, merge to main. Total: 30 tasks across 7 phases. TDD discipline per task with ~32 new backend tests + ~4 new frontend tests. Target after completion: 210 backend + 7 frontend tests passing.
This commit is contained in: