Vertical-slice plan with five slices across four phases, each with acceptance criteria, manual verification, and human-review checkpoints between phases. Surfaces and orders the inconsistencies between the current code and the per-task loop language. Flat todo.md mirrors the plan as a checkable task list.
5.1 KiB
5.1 KiB
Todo — Per-Task Feedback Loop alignment
Flat task list for execution. Detailed acceptance criteria, files, and verification steps live in plan.md. Tick items as you complete them; pause at each Checkpoint for review before continuing.
Phase 1 — Foundation
Slice 1 — Initial Plan capture
- Add
initialPlan: Stepable[] | nulltoRecordableinterface - Round-trip
initialPlaninTaskRecord.fromRecordable - In
startStepRecord, snapshottask.stepsintorecord.initialPlanwhenstepRecordsis empty andinitialPlanis not yet set - Add fallback to
task.stepHistory[0]whenrecord.initialPlanis missing (legacy data) - Replace
step.value.estimationwith Initial Plan lookup inStepRecord.vue"off by 10%" computation - Update
RecordResume.vuetotal comparison to sum Initial Plan estimations - Add unit tests: snapshot occurs on first Step Record; re-estimation does not mutate
initialPlan; legacy fallback works pnpm testgreen- Manual verification per
plan.mdSlice 1
Slice 2 — Preserve records on re-planning
- Audit consumers of
record.stepRecordsfor "step is in current Plan" assumptions - Replace
cleanCurrentStepIdwith non-destructive reconciliation: never delete records, only set the newcurrentStepId - Replace destructive
syncTaskRecordbody with the same non-destructive reconciliation - Add unit tests for reorder, delete-completed, delete-in-progress, insert-at-start
pnpm testgreen- Manual verification per
plan.mdSlice 2
✋ Checkpoint 1 — Foundation review
- Full test suite green
- Manual smoke: full Task lifecycle with re-estimation and re-planning
- Reviewer (human) confirms Foundation matches
CONTEXT.mdsemantics
Phase 2 — Closing the loop
Slice 3 — Closing Ceremony view
- Implement pure
computeFailureModes({ initialPlan, finalPlan, stepRecords })service - Unit tests for all three modes in isolation and combined
- Decide: orphan record handling (default: hidden, time still totalled)
- Decide: auto-navigate to ceremony on Task completion (default: CTA-only)
- Rename
TaskHistory.vue→TaskClosingCeremony.vue; replace body - Update router: route name →
task-closing-ceremony; path preserved - Add "Close the loop" CTA in
TaskRecord.vuewhenrecord.endis set - Trim
RecordResume.vueto a one-line tease - Bind ceremony Notes textarea to the same Pinia field as during-Execution Notes
- Component smoke test on
TaskClosingCeremony pnpm testgreen- Manual verification: each of the three modes per
plan.mdSlice 3
✋ Checkpoint 2 — Closing Ceremony review
- Full test suite green
- End-to-end loop demo: create → start → re-plan mid-flight → finish → open Ceremony → three modes correct
- Reviewer (human) confirms Ceremony surface matches intent
Phase 3 — UX split
Slice 4 — Re-estimation inline / Re-planning modal
- Add
reEstimateStep({ taskId, stepId, newEstimationMinutes })action to task store - Push a new
stepHistoryentry on re-estimation (Plan structure unchanged, only the number) - Confirm via unit test that
record.initialPlanis unaffected by re-estimation - Extend inline-edit pattern in
StepRecord.vueto cover theestimationcell on any Step - Inline editor commits on Enter, cancels on Esc
- Rename modal heading to "Re-plan steps" (or similar); update explanatory text
- Relabel the "+" button in
RecordControls.vueto "Re-plan" - Component test for inline estimation editor
- Decide where the Step-Back Signal renders (default: deferred, see Out-of-Scope in plan)
pnpm testgreen- Manual verification per
plan.mdSlice 4
✋ Checkpoint 3 — UX review
- Full test suite green
- Re-estimation is one-click + Enter, no modal
- Re-planning opens modal with deliberate framing
- Reviewer (human) confirms UX matches intent
Phase 4 — Cleanup
Slice 5 — Model and naming hygiene
- Grep for
updateSteps, remove method (identical tonewSteps), update tests - Rename
newSteps→rePlanonTask - Grep for
editSteps(append semantics): remove if unused, keep otherwise - Drop
readonlyfrom thestepHistoryconstructor parameter onTask - Re-examine
wasUpdated: rename tohasStepsor remove if unused - Rename
cleanCurrentStepId→reconcileWithReplannedPlan(or similar) - Tighten
TaskRecord.starttype toISODate | null; initialize asnull - Update all consumers of
TaskRecord.startto handlenull(until first Step Record) - Update
CONTEXT.md: defineTask DateandTask Link pnpm test:typesafter renamespnpm testgreenpnpm buildsucceeds
✋ Checkpoint 4 — Final review
- Full test suite green
pnpm buildsucceeds- Fresh-localStorage smoke (incognito) — no migration footgun
- Plan considered complete
Out of scope (parked)
breakTimesingle-pause model- Cross-Task pattern analytics
- Step-Back Signal rendering (decided per-slice; default deferred)