From 0993eb613ff64ac0cd591bf877c025284c857435 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Fri, 20 Mar 2026 10:54:42 -0400 Subject: [PATCH] enhancement(workflow): add decision IDs for discuss-to-plan traceability (#1243) Decisions in CONTEXT.md are now numbered (D-01, D-02, etc.) so downstream agents can reference them and the plan-checker can verify 100% coverage. Changes: - templates/context.md: Decisions use **D-XX:** prefix format - workflows/discuss-phase.md: write_context step numbers decisions - agents/gsd-planner.md: Self-check verifies decision ID references in task actions; tasks reference D-XX IDs for traceability - agents/gsd-plan-checker.md: Dimension 7 (Context Compliance) extracts D-XX IDs and verifies every decision has a task --- agents/gsd-plan-checker.md | 8 +++++--- agents/gsd-planner.md | 4 +++- get-shit-done/templates/context.md | 8 ++++---- get-shit-done/workflows/discuss-phase.md | 6 +++--- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/agents/gsd-plan-checker.md b/agents/gsd-plan-checker.md index 7ffc04eb1..25b6c6bb8 100644 --- a/agents/gsd-plan-checker.md +++ b/agents/gsd-plan-checker.md @@ -277,9 +277,11 @@ issue: **Process:** 1. Parse CONTEXT.md sections: Decisions, Claude's Discretion, Deferred Ideas -2. For each locked Decision, find implementing task(s) -3. Verify no tasks implement Deferred Ideas (scope creep) -4. Verify Discretion areas are handled (planner's choice is valid) +2. Extract all numbered decisions (D-01, D-02, etc.) from the `` section +3. For each locked Decision, find implementing task(s) — check task actions for D-XX references +4. Verify 100% decision coverage: every D-XX must appear in at least one task's action or rationale +5. Verify no tasks implement Deferred Ideas (scope creep) +6. Verify Discretion areas are handled (planner's choice is valid) **Red flags:** - Locked decision has no implementing task diff --git a/agents/gsd-planner.md b/agents/gsd-planner.md index 005d236d3..ae38de9dd 100644 --- a/agents/gsd-planner.md +++ b/agents/gsd-planner.md @@ -60,6 +60,7 @@ The orchestrator provides user decisions in `` tags from `/gsd:d - If user said "use library X" → task MUST use library X, not an alternative - If user said "card layout" → task MUST implement cards, not tables - If user said "no animations" → task MUST NOT include animations + - Reference the decision ID (D-01, D-02, etc.) in task actions for traceability 2. **Deferred Ideas (from `## Deferred Ideas`)** — MUST NOT appear in plans - If user deferred "search functionality" → NO search tasks allowed @@ -69,7 +70,8 @@ The orchestrator provides user decisions in `` tags from `/gsd:d - Make reasonable choices and document in task actions **Self-check before returning:** For each plan, verify: -- [ ] Every locked decision has a task implementing it +- [ ] Every locked decision (D-01, D-02, etc.) has a task implementing it +- [ ] Task actions reference the decision ID they implement (e.g., "per D-03") - [ ] No task implements a deferred idea - [ ] Discretion areas are handled reasonably diff --git a/get-shit-done/templates/context.md b/get-shit-done/templates/context.md index 9ec7eac5e..36673346d 100644 --- a/get-shit-done/templates/context.md +++ b/get-shit-done/templates/context.md @@ -31,14 +31,14 @@ Template for `.planning/phases/XX-name/{phase_num}-CONTEXT.md` - captures implem ## Implementation Decisions ### [Area 1 that was discussed] -- [Specific decision made] -- [Another decision if applicable] +- **D-01:** [Specific decision made] +- **D-02:** [Another decision if applicable] ### [Area 2 that was discussed] -- [Specific decision made] +- **D-03:** [Specific decision made] ### [Area 3 that was discussed] -- [Specific decision made] +- **D-04:** [Specific decision made] ### Claude's Discretion [Areas where user explicitly said "you decide" — Claude has flexibility here during planning/implementation] diff --git a/get-shit-done/workflows/discuss-phase.md b/get-shit-done/workflows/discuss-phase.md index be37d214f..9b1c520ca 100644 --- a/get-shit-done/workflows/discuss-phase.md +++ b/get-shit-done/workflows/discuss-phase.md @@ -650,11 +650,11 @@ mkdir -p ".planning/phases/${padded_phase}-${phase_slug}" ## Implementation Decisions ### [Category 1 that was discussed] -- [Decision or preference captured] -- [Another decision if applicable] +- **D-01:** [Decision or preference captured] +- **D-02:** [Another decision if applicable] ### [Category 2 that was discussed] -- [Decision or preference captured] +- **D-03:** [Decision or preference captured] ### Claude's Discretion [Areas where user said "you decide" — note that Claude has flexibility here]