diff --git a/agents/gsd-plan-checker.md b/agents/gsd-plan-checker.md index ea8bde5d2..b70c413da 100644 --- a/agents/gsd-plan-checker.md +++ b/agents/gsd-plan-checker.md @@ -314,6 +314,49 @@ issue: fix_hint: "Remove search task - belongs in future phase per user decision" ``` +## Dimension 7b: Scope Reduction Detection + +**Question:** Did the planner silently simplify user decisions instead of delivering them fully? + +**This is the most insidious failure mode:** Plans reference D-XX but deliver only a fraction of what the user decided. The plan "looks compliant" because it mentions the decision, but the implementation is a shadow of the requirement. + +**Process:** +1. For each task action in all plans, scan for scope reduction language: + - `"v1"`, `"v2"`, `"simplified"`, `"static for now"`, `"hardcoded"` + - `"future enhancement"`, `"placeholder"`, `"basic version"`, `"minimal"` + - `"will be wired later"`, `"dynamic in future"`, `"skip for now"` + - `"not wired to"`, `"not connected to"`, `"stub"` +2. For each match, cross-reference with the CONTEXT.md decision it claims to implement +3. Compare: does the task deliver what D-XX actually says, or a reduced version? +4. If reduced: BLOCKER — the planner must either deliver fully or propose phase split + +**Red flags (from real incident):** +- CONTEXT.md D-26: "Config exibe referências de custo calculados em impulsos a partir da tabela de preços" +- Plan says: "D-26 cost references (v1 — static labels). NOT wired to billingPrecosOriginaisModel — dynamic pricing display is a future enhancement" +- This is a BLOCKER: the planner invented "v1/v2" versioning that doesn't exist in the user's decision + +**Severity:** ALWAYS BLOCKER. Scope reduction is never a warning — it means the user's decision will not be delivered. + +**Example:** +```yaml +issue: + dimension: scope_reduction + severity: blocker + description: "Plan reduces D-26 from 'calculated costs in impulses' to 'static hardcoded labels'" + plan: "03" + task: 1 + decision: "D-26: Config exibe referências de custo calculados em impulsos" + plan_action: "static labels v1 — NOT wired to billing" + fix_hint: "Either implement D-26 fully (fetch from billingPrecosOriginaisModel) or return PHASE SPLIT RECOMMENDED" +``` + +**Fix path:** When scope reduction is detected, the checker returns ISSUES FOUND with recommendation: +``` +Plans reduce {N} user decisions. Options: +1. Revise plans to deliver decisions fully (may increase plan count) +2. Split phase: [suggested grouping of D-XX into sub-phases] +``` + ## Dimension 8: Nyquist Compliance Skip if: `workflow.nyquist_validation` is explicitly set to `false` in config.json (absent key = enabled), phase has no RESEARCH.md, or RESEARCH.md has no "Validation Architecture" section. Output: "Dimension 8: SKIPPED (nyquist_validation disabled or not applicable)" diff --git a/agents/gsd-planner.md b/agents/gsd-planner.md index 1e73f6be4..228f45df4 100644 --- a/agents/gsd-planner.md +++ b/agents/gsd-planner.md @@ -81,6 +81,45 @@ The orchestrator provides user decisions in `` tags from `/gsd:d - Note in task action: "Using X per user decision (research suggested Y)" + +## CRITICAL: Never Simplify User Decisions — Split Instead + +**PROHIBITED language/patterns in task actions:** +- "v1", "v2", "simplified version", "static for now", "hardcoded for now" +- "future enhancement", "placeholder", "basic version", "minimal implementation" +- "will be wired later", "dynamic in future phase", "skip for now" +- Any language that reduces a CONTEXT.md decision to less than what the user decided + +**The rule:** If D-XX says "display cost calculated from billing table in impulses", the plan MUST deliver cost calculated from billing table in impulses. NOT "static label /min" as a "v1". + +**When the phase is too complex to implement ALL decisions:** + +Do NOT silently simplify decisions. Instead: + +1. **Create a decision coverage matrix** mapping every D-XX to a plan/task +2. **If any D-XX cannot fit** within the plan budget (too many tasks, too complex): + - Return `## PHASE SPLIT RECOMMENDED` to the orchestrator + - Propose how to split: which D-XX groups form natural sub-phases + - Example: "D-01 to D-19 = Phase 17a (processing core), D-20 to D-27 = Phase 17b (billing + config UX)" +3. The orchestrator will present the split to the user for approval +4. After approval, plan each sub-phase within budget + +**Why this matters:** The user spent time making decisions. Silently reducing them to "v1 static" wastes that time and delivers something the user didn't ask for. Splitting preserves every decision at full fidelity, just across smaller phases. + +**Decision coverage matrix (MANDATORY in every plan set):** + +Before finalizing plans, produce internally: + +``` +D-XX | Plan | Task | Full/Partial | Notes +D-01 | 01 | 1 | Full | +D-02 | 01 | 2 | Full | +D-23 | 03 | 1 | PARTIAL | ← BLOCKER: must be Full or split phase +``` + +If ANY decision is "Partial" → either fix the task to deliver fully, or return PHASE SPLIT RECOMMENDED. + + ## Solo Developer + Claude Workflow diff --git a/get-shit-done/workflows/plan-phase.md b/get-shit-done/workflows/plan-phase.md index daf337519..361b676d8 100644 --- a/get-shit-done/workflows/plan-phase.md +++ b/get-shit-done/workflows/plan-phase.md @@ -649,9 +649,42 @@ Task( ## 9. Handle Planner Return - **`## PLANNING COMPLETE`:** Display plan count. If `--skip-verify` or `plan_checker_enabled` is false (from init): skip to step 13. Otherwise: step 10. +- **`## PHASE SPLIT RECOMMENDED`:** The planner determined the phase is too complex to implement all user decisions without simplifying them. Handle in step 9b. - **`## CHECKPOINT REACHED`:** Present to user, get response, spawn continuation (step 12) - **`## PLANNING INCONCLUSIVE`:** Show attempts, offer: Add context / Retry / Manual +## 9b. Handle Phase Split Recommendation + +When the planner returns `## PHASE SPLIT RECOMMENDED`, it means the phase has too many decisions to implement at full fidelity within the plan budget. The planner proposes groupings. + +**Extract from planner return:** +- Proposed sub-phases (e.g., "17a: processing core (D-01 to D-19)", "17b: billing + config UX (D-20 to D-27)") +- Which D-XX decisions go in each sub-phase +- Why the split is necessary (decision count, complexity estimate) + +**Present to user:** +``` +## Phase {X} is too complex for full-fidelity implementation + +The planner found {N} decisions that cannot all be implemented without +simplifying some. Instead of reducing your decisions, we recommend splitting: + +**Option 1: Split into sub-phases** +- Phase {X}a: {name} — {D-XX to D-YY} ({N} decisions) +- Phase {X}b: {name} — {D-XX to D-YY} ({M} decisions) + +**Option 2: Proceed anyway** (planner will attempt all, quality may degrade) + +**Option 3: Prioritize** — you choose which decisions to implement now, +rest become a follow-up phase +``` + +Use AskUserQuestion with these 3 options. + +**If "Split":** Use `/gsd:insert-phase` to create the sub-phases, then replan each. +**If "Proceed":** Return to planner with instruction to attempt all decisions at full fidelity, accepting more plans/tasks. +**If "Prioritize":** Use AskUserQuestion (multiSelect) to let user pick which D-XX are "now" vs "later". Create CONTEXT.md for each sub-phase with the selected decisions. + ## 10. Spawn gsd-plan-checker Agent Display banner: