BOHICA-LABS / BOHICA-LABS/vsdd-factory
bug(state-manager+story-writer): derived summary fields (BC count, VP count, story totals) go stale on primary content add
- Dominant language
- Rust
- Stars
- 2
- Forks
- 1
- Avg merge
- 6h 43m
- Merged PRs (30d)
- 29
Description
## Summary
In switchboard-blue Wave 3 planning, two distinct burst-side stale-field defects surfaced within 24h of each other:
**Defect A (Wave 3 spec burst):** PO minted `BC-2.05.008` (43rd BC) and `VP-058` (58th VP). STATE.md frontmatter still claimed `l3_bc_count: 42` and `l4_vp_count: 57` post-burst. Consistency-validator caught it.
**Defect B (Wave 3 story burst):** story-writer split S-3.01 into S-3.01a + S-3.01b, created S-3.04, and repointed S-3.03 (5→8 pts). STORY-INDEX summary still claimed `Total stories: 23` and `Total points: 140` post-burst (should be 24/143). Consistency-validator caught it.
## Pattern
Agents that add or modify PRIMARY content (BCs, VPs, stories) do not consistently recompute SUMMARY/DERIVED fields elsewhere. The fields drift until a separate consistency-validator pass surfaces it, requiring a third agent dispatch (state-manager) to recompute.
## Impact
- Burst tasks accumulate downstream work (every primary-content add → separate summary-fix burst).
- Drift is a soft failure: nothing breaks at runtime, but reports/metrics become unreliable.
- Reviewers and humans reading STATE.md make decisions based on stale counts.
## Mitigation suggestions
1. **Agent responsibility:** PO/story-writer prompts should explicitly require recomputing the relevant summary fields when they add primary content. Add to system prompt: "After adding a BC, increment l3_bc_count in STATE.md. After adding a story, recompute STORY-INDEX totals."
2. **Pre-commit hook:** on factory-artifacts, hook that recomputes summary fields from primary file counts. Fails commit if claimed values diverge from computed values.
3. **Skill:** a dedicated `/vsdd-factory:recompute-summaries` skill that any agent can invoke at end of burst.
## Reproduction
Switchboard-blue session `b8690230-7b5d-4e57-b71c-8b9ffeee3d9a`. Wave 3 planning.
- Defect A: caught by `F-W3-M-003` in `.factory/cycles/cycle-1/wave-3/pre-impl-consistency-report.md`.
- Defect B: caught by `NEW-M-001` in `.factory/cycles/cycle-1/wave-3/post-fix-consistency-report.md`.
## Related (this batch)
- drbothen/vsdd-factory#272 — P19: architect hallucinated internal/ packages
- drbothen/vsdd-factory#273 — P20: parallel agent burst commit co-mingling
- drbothen/vsdd-factory#274 — P21: ADR amendment + code update drift across revisions
- drbothen/vsdd-factory#275 — P22: parallel agents make contradictory architectural decisions
- drbothen/vsdd-factory#276 — P23: spec-reviewer cross-eye should be mandatory post-spec-burst
Contributor guide
Assessment
This issue has not been assessed yet.