docs: add Plan 4 (lifecycle state machine + inspections + estimate versions)

This commit is contained in:
Satyam Rastogi
2026-05-29 17:07:30 +05:30
parent 8e75aa15c9
commit bf796e83ea
2 changed files with 259 additions and 1 deletions
+2 -1
View File
@@ -509,7 +509,8 @@ Each plan = one phase, produces working/verifiable software on its own, and is e
### Plan 4 — Project lifecycle + inspections + estimates
- **What:** make the existing PROJECT PROGRESSION bar an **interactive state machine** with progress % tied to the stage (§9); the two-touchpoint **inspection model** with an issues/rework loop + session photo/note uploads (§11, A.5); the **claimed-vs-verified scope-variance** badge; and the **estimate-versions** section (v1 claim → v2 verified → signed; full document view).
- **Why:** the static progression bar already disagrees with completion % (a visible defect); interactivity + the inspection loop + scope-variance is the core sales narrative (a professional inspection turns a $200 self-report into an insurance-backed job).
- **How:** add the lifecycle/inspection/estimate fields to projects in `mockStore.jsx` (sequential) per Appendix A; add store mutators (advance stage, add inspection/issue, upload photo→object URL, add estimate version); build the UI in `OwnerProjectDetail.jsx` (progression control, inspection panel + issues list, scope-variance badge, estimate-versions tab) — these UI pieces in the one file run sequentially, but are independent of the data tasks. Verify: advancing a stage updates %, logging an issue loops to rework then re-inspection, estimate versions render.
- **How:** add the lifecycle/inspection/estimate fields to projects in `mockStore.jsx` (sequential) per Appendix A; add store mutators (advance stage, add inspection/issue, upload photo→object URL, add estimate version); build the UI in `OwnerProjectDetail.jsx` (progression control, inspection panel + issues list, scope-variance badge, estimate-versions tab) — these UI pieces in the one file run sequentially, but are independent of the data tasks. A new pure `src/data/lifecycle.js` (stage set, stage→% map, next/prev helpers) is the one parallel-safe carve-out; everything else is concentrated in `mockStore.jsx` + `OwnerProjectDetail.jsx`, so Plan 4 is mostly sequential. Verify: advancing a stage updates %, logging an issue loops to rework then re-inspection, estimate versions render.
- **Plan file:** `docs/superpowers/plans/2026-05-29-plan4-lifecycle-inspections-estimates.md`.
### Plan 5 — Subcontractor task state machine
- **What:** the §10 stage machine (Not Assigned → Assigned → Pre-Work Inspection → Work In Progress → On Hold ↔ → Post-Work Review → Pass→Completed / Fail→Rework), per-transition notes + actor + timestamp, pre/post-inspection attribution; owner table gains Task Category + Assigned Date; richer task modal (stage timeline + issues with photos).