# Sprint 278: Structured Planning Artifact As Post-Intake Source Of Truth ## Goal Make Whetstone treat markdown specs as pre-code truth, but treat a structured planning artifact as the source of truth for task decomposition after intake. This sprint exists to close the remaining architectural gap behind GR-035: `architect_intake` and `RequirementsParser` do produce useful structure, but `generate_taskitems` still depends too heavily on raw markdown-shaped heuristics. The result is that explicit work items like `W1`/`W2`/`W3` are partially recognized but still get merged back into broad plan tasks. The target architecture is: 1. Markdown spec is the source of truth before code exists. 2. Intake produces a structured planning artifact that becomes the planning source of truth. 3. Task decomposition and queue shaping consume that artifact rather than re-inferring everything from raw prose. 4. Once code exists, AST remains the source of truth for code structure/editing. ## Steps | Step | File | What | |------|------|------| | 1990 | `RequirementsParser.h` | Preserve subsection/work-item context in parsed requirements so `### W1...` blocks survive intake as structured planning inputs. | | 1991 | `ArchitectIntakeProcessor.h` | Emit explicit planning-artifact structure for bounded work items and subsection-scoped requirement groups instead of only a flat normalized requirement list. | | 1992 | `ScopeMilestoneDecomposer.h` | Prefer structured work-item groups as decomposition roots; broad project/context goals must not dominate explicit `W1`/`W2`/`W3` slices. | | 1993 | `TaskitemGeneratorV2.h` / `RegisterArchitectIntakeTools.h` | Generate taskitems from the structured planning artifact with file/language/verification hints attached to each work item, not reconstructed from global prose. | | 1994 | Sprint 278 integration | Run the `whimpwm` Sprint 002 recomposition spec through the pipeline and verify that generated taskitems align to bounded work items, scoped file ownership, and Rust-only verification. | ## Dependencies - Builds on: `RequirementsParser.h`, `ArchitectIntakeProcessor.h`, `ScopeMilestoneDecomposer.h`, `TaskitemGeneratorV2.h`, `RegisterArchitectIntakeTools.h` - Regression target: GR-035 in `docs/generator_readiness_gap_registry_2026-02-26.md` - Validation artifact: `whimpwm` sprint spec at `/home/bill/Documents/whimpwm/docs/sprints/sprint_002_policy_driven_recomposition_execution_spec.md` ## Constraints - Do not treat raw markdown text as the long-lived planning source of truth after intake has already structured it. - Do not weaken AST-first execution principles; this sprint is about the pre-code planning layer, not replacing AST as code truth. - Do not regress the existing Rust-only contract improvements for GR-035: no `go test ./...`, no malformed file paths, no Whetstone-workspace fallback leakage into external project taskitems. - Keep any new planning artifact deterministic and serializable so it can be used for LoRA/SLM training data capture later. ## Acceptance Criteria - Intake preserves bounded work-item structure from markdown specs in a structured planning artifact. - Decomposition consumes that structure directly and splits `W1`/`W2`/`W3` style work items into distinct task roots. - `generate_taskitems` for the `whimpwm` Sprint 002 spec produces bounded, work-item-shaped tasks rather than broad plan bundles. - Generated taskitems retain Rust-only verification and real `whimpwm` file/test grounding. - Regression tests pass for parser, decomposition, and taskitem generation.