gsdd-cli 0.18.5 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +609 -608
  3. package/agents/DISTILLATION.md +421 -421
  4. package/agents/README.md +62 -62
  5. package/agents/approach-explorer.md +361 -361
  6. package/agents/debugger.md +82 -82
  7. package/agents/executor.md +394 -394
  8. package/agents/integration-checker.md +318 -318
  9. package/agents/mapper.md +103 -103
  10. package/agents/planner.md +313 -313
  11. package/agents/researcher.md +84 -84
  12. package/agents/roadmapper.md +296 -296
  13. package/agents/synthesizer.md +236 -236
  14. package/agents/verifier.md +337 -337
  15. package/bin/adapters/agents.mjs +34 -34
  16. package/bin/adapters/claude.mjs +191 -191
  17. package/bin/adapters/codex.mjs +85 -85
  18. package/bin/adapters/index.mjs +20 -20
  19. package/bin/adapters/opencode.mjs +278 -278
  20. package/bin/gsdd.mjs +123 -116
  21. package/bin/lib/cli-utils.mjs +28 -28
  22. package/bin/lib/evidence-contract.mjs +112 -112
  23. package/bin/lib/file-ops.mjs +186 -144
  24. package/bin/lib/health-truth.mjs +181 -178
  25. package/bin/lib/health.mjs +246 -226
  26. package/bin/lib/init-flow.mjs +247 -231
  27. package/bin/lib/init-prompts.mjs +248 -247
  28. package/bin/lib/init-runtime.mjs +191 -190
  29. package/bin/lib/init.mjs +17 -17
  30. package/bin/lib/lifecycle-preflight.mjs +347 -325
  31. package/bin/lib/lifecycle-state.mjs +351 -267
  32. package/bin/lib/manifest.mjs +116 -114
  33. package/bin/lib/models.mjs +411 -411
  34. package/bin/lib/phase.mjs +360 -358
  35. package/bin/lib/plan-constants.mjs +30 -30
  36. package/bin/lib/provenance.mjs +109 -106
  37. package/bin/lib/rendering.mjs +115 -83
  38. package/bin/lib/runtime-freshness.mjs +214 -214
  39. package/bin/lib/templates.mjs +225 -224
  40. package/bin/lib/workspace-root.mjs +2 -1
  41. package/distilled/DESIGN.md +2333 -2323
  42. package/distilled/EVIDENCE-INDEX.md +394 -392
  43. package/distilled/README.md +196 -193
  44. package/distilled/SKILL.md +86 -85
  45. package/distilled/templates/agents.block.md +21 -21
  46. package/distilled/templates/agents.md +6 -6
  47. package/distilled/templates/approach.md +232 -232
  48. package/distilled/templates/auth-matrix.md +78 -78
  49. package/distilled/templates/brownfield-change/CHANGE.md +99 -0
  50. package/distilled/templates/brownfield-change/HANDOFF.md +38 -0
  51. package/distilled/templates/brownfield-change/VERIFICATION.md +56 -0
  52. package/distilled/templates/codebase/architecture.md +110 -110
  53. package/distilled/templates/codebase/concerns.md +95 -95
  54. package/distilled/templates/codebase/conventions.md +193 -193
  55. package/distilled/templates/codebase/stack.md +96 -96
  56. package/distilled/templates/delegates/approach-explorer.md +25 -25
  57. package/distilled/templates/delegates/mapper-arch.md +26 -26
  58. package/distilled/templates/delegates/mapper-concerns.md +27 -27
  59. package/distilled/templates/delegates/mapper-quality.md +28 -28
  60. package/distilled/templates/delegates/mapper-tech.md +25 -25
  61. package/distilled/templates/delegates/plan-checker.md +68 -68
  62. package/distilled/templates/delegates/researcher-architecture.md +30 -30
  63. package/distilled/templates/delegates/researcher-features.md +30 -30
  64. package/distilled/templates/delegates/researcher-pitfalls.md +30 -30
  65. package/distilled/templates/delegates/researcher-stack.md +30 -30
  66. package/distilled/templates/delegates/researcher-synthesizer.md +31 -31
  67. package/distilled/templates/research/architecture.md +57 -57
  68. package/distilled/templates/research/features.md +23 -23
  69. package/distilled/templates/research/pitfalls.md +46 -46
  70. package/distilled/templates/research/stack.md +45 -45
  71. package/distilled/templates/research/summary.md +67 -67
  72. package/distilled/templates/roadmap.md +74 -62
  73. package/distilled/templates/spec.md +110 -110
  74. package/distilled/workflows/audit-milestone.md +275 -271
  75. package/distilled/workflows/complete-milestone.md +336 -332
  76. package/distilled/workflows/execute.md +454 -449
  77. package/distilled/workflows/map-codebase.md +253 -253
  78. package/distilled/workflows/new-milestone.md +242 -238
  79. package/distilled/workflows/new-project.md +398 -398
  80. package/distilled/workflows/pause.md +160 -156
  81. package/distilled/workflows/plan-milestone-gaps.md +183 -183
  82. package/distilled/workflows/plan.md +451 -447
  83. package/distilled/workflows/progress.md +227 -223
  84. package/distilled/workflows/quick.md +351 -347
  85. package/distilled/workflows/resume.md +220 -212
  86. package/distilled/workflows/verify-work.md +260 -260
  87. package/distilled/workflows/verify.md +431 -429
  88. package/docs/BROWNFIELD-PROOF.md +95 -95
  89. package/docs/RUNTIME-SUPPORT.md +80 -69
  90. package/docs/USER-GUIDE.md +394 -386
  91. package/docs/VERIFICATION-DISCIPLINE.md +59 -59
  92. package/docs/claude/context-monitor.md +98 -98
  93. package/docs/proof/consumer-node-cli/README.md +37 -37
  94. package/docs/proof/consumer-node-cli/ROADMAP.md +14 -14
  95. package/docs/proof/consumer-node-cli/SPEC.md +17 -17
  96. package/docs/proof/consumer-node-cli/brief.md +9 -9
  97. package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-PLAN.md +34 -34
  98. package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-SUMMARY.md +10 -10
  99. package/docs/proof/consumer-node-cli/phases/01-foundation/01-VERIFICATION.md +30 -30
  100. package/package.json +62 -61
@@ -1,38 +1,42 @@
1
- <role>
2
- You are the QUICK TASK ORCHESTRATOR. Your job is to plan and execute a small, self-contained task outside the full phase cycle.
3
-
4
- Quick tasks are for sub-hour work: bug fixes, small features, config changes, one-off tasks.
5
- They reuse the same planner, executor, and verifier roles but skip research and synthesizer.
6
- </role>
7
-
8
- <anti_patterns>
9
- - Do not execute before the user sees the plan preview (Step 3.7 must complete before Step 4)
10
- - Do not proceed past file verification gates if the expected file does not exist on disk — a plan that exists only in conversation context will be lost on compaction
11
- - Do not ask more than 2 approach clarification questions — if the bounded change is still undefined, recommend `/gsdd-new-project`; if the change is defined but 3+ grey areas remain, recommend `/gsdd-plan` instead
12
- - Do not create APPROACH.md for quick tasks — use inline $APPROACH_CONTEXT only
13
- - Do not update ROADMAP.md or SPEC.md from quick tasks — these are phase-level artifacts
14
- - Do not skip config.json reads — workflow toggles (discuss, planCheck, verifier) control flow
15
- - Do not expand scope mid-execution — if the plan reveals architectural work, surface the scope signal (Step 3.6) and let the user decide
16
- </anti_patterns>
17
-
18
- <prerequisites>
19
- `.planning/` must exist (from `gsdd init`). ROADMAP.md is NOT required -- quick tasks work during any project phase.
20
-
21
- If `.planning/` does not exist, stop and tell the user to run `gsdd init` first.
22
- </prerequisites>
23
-
24
- <process>
25
-
26
- ## Step 1: Get task description
27
-
28
- Ask the user: "What do you want to do?"
29
-
30
- Store the response as `$DESCRIPTION`. If empty, re-prompt.
31
-
32
- ---
33
-
34
- ## Step 2: Initialize
35
-
1
+ <role>
2
+ You are the QUICK TASK ORCHESTRATOR. Your job is to plan and execute a small, self-contained task outside the full phase cycle.
3
+
4
+ Quick tasks are for sub-hour work: bug fixes, small features, config changes, one-off tasks.
5
+ They reuse the same planner, executor, and verifier roles but skip research and synthesizer.
6
+ </role>
7
+
8
+ <anti_patterns>
9
+ - Do not execute before the user sees the plan preview (Step 3.7 must complete before Step 4)
10
+ - Do not proceed past file verification gates if the expected file does not exist on disk — a plan that exists only in conversation context will be lost on compaction
11
+ - Do not ask more than 2 approach clarification questions — if the bounded change is still undefined, recommend `/gsdd-new-project`; if the change is defined but 3+ grey areas remain, recommend `/gsdd-plan` instead
12
+ - Do not create APPROACH.md for quick tasks — use inline $APPROACH_CONTEXT only
13
+ - Do not update ROADMAP.md or SPEC.md from quick tasks — these are phase-level artifacts
14
+ - Do not skip config.json reads — workflow toggles (discuss, planCheck, verifier) control flow
15
+ - Do not expand scope mid-execution — if the plan reveals architectural work, surface the scope signal (Step 3.6) and let the user decide
16
+ </anti_patterns>
17
+
18
+ <prerequisites>
19
+ `.planning/` must exist (from `npx -y gsdd-cli init`, or `gsdd init` when globally installed). ROADMAP.md is NOT required -- quick tasks work during any project phase.
20
+
21
+ If `.planning/` does not exist, stop and tell the user to run `npx -y gsdd-cli init` first.
22
+ </prerequisites>
23
+
24
+ <repo_root_helper_contract>
25
+ All `node .planning/bin/gsdd.mjs ...` helper commands below assume the current working directory is the repo root. If the runtime launched from a subdirectory, change to the repo root before running them.
26
+ </repo_root_helper_contract>
27
+
28
+ <process>
29
+
30
+ ## Step 1: Get task description
31
+
32
+ Ask the user: "What do you want to do?"
33
+
34
+ Store the response as `$DESCRIPTION`. If empty, re-prompt.
35
+
36
+ ---
37
+
38
+ ## Step 2: Initialize
39
+
36
40
  1. Read `.planning/config.json` for workflow toggles and git protocol.
37
41
  2. Scan `.planning/quick/` for existing task directories. Calculate `$NEXT_NUM` as the next 3-digit number (001, 002, ...).
38
42
  3. Generate `$SLUG` from `$DESCRIPTION` (lowercase, hyphens, max 40 chars).
@@ -42,317 +46,317 @@ Store the response as `$DESCRIPTION`. If empty, re-prompt.
42
46
  7. If `.planning/codebase/` does not exist, build a just-enough inline brownfield baseline instead of stopping. Read the repo root guidance that is cheap and stable (`README.md`, root manifest such as `package.json` / `pyproject.toml` / `Cargo.toml` when present, top-level app entrypoints, and any obviously relevant config or module files surfaced by `$DESCRIPTION`). Summarize the findings in <=500 words as `$CODEBASE_CONTEXT`, explicitly labeling it as a provisional baseline and calling out unknowns. Emphasize: likely implementation surface, likely dependency boundaries, conventions already visible, risky areas to avoid touching blindly, and what must be re-verified after the change. If the repo is still too unclear after this pass, keep that uncertainty explicit so Step 3.6 can recommend `/gsdd-map-codebase`.
43
47
  8. **Session-boundary fallback:** If `.planning/.continue-here.bak` exists, read its `<judgment>` section. Use `<active_constraints>` and `<anti_regression>` rules as task-scoping context (do not violate active constraints; do not regress on listed invariants). After reading, run `node .planning/bin/gsdd.mjs file-op delete .planning/.continue-here.bak --missing ok` (auto-clean).
44
48
  9. Inspect the live branch/worktree surface separately from checkpoint or planning artifacts. If the current branch appears stale/spent, PR-less with overlapping write scope, or otherwise like the wrong execution surface, warn before proceeding. This is advisory for quick tasks unless the mismatch makes the task description materially misleading.
45
-
46
- If `.planning/quick/` does not exist, create it along with an empty `LOG.md`:
47
-
48
- ```markdown
49
- # Quick Task Log
50
-
51
- | # | Description | Date | Status | Directory |
52
- |---|-------------|------|--------|-----------|
53
- ```
54
-
55
- ---
56
-
57
- ## Step 2.5: Approach clarification (conditional)
58
-
59
- Read `.planning/config.json`.
60
- - If `workflow.discuss` is `false` (or key missing): set `$APPROACH_CONTEXT` to empty, skip to Step 3.
61
- - If `workflow.discuss` is `true`: evaluate `$DESCRIPTION` for ambiguity signals.
62
-
63
- ### Ambiguity signals
64
-
65
- | Signal | Detection | Example |
66
- |--------|-----------|---------|
67
- | Multiple valid approaches | Description could be solved via distinct patterns | "add caching" (Redis? in-memory? HTTP headers?) |
68
- | Destructive operations | Contains: `delete`, `remove`, `migrate`, `rename`, `replace`, `rewrite`, `drop` | "remove the old auth middleware" |
69
- | Vague scope | Contains: `improve`, `fix`, `update`, `refactor`, `clean up`, `optimize` without specifying target | "improve error handling" |
70
- | Trade-off present | Description implies competing goals (performance vs simplicity, DRY vs explicit) | "make it faster" |
71
-
72
- If **no signals fire**: set `$APPROACH_CONTEXT` to empty, skip to Step 3 silently.
73
-
74
- If **any signal fires**: identify 1-2 grey areas and ask targeted questions.
75
-
76
- ### Question format
77
-
78
- For each grey area, present 2-3 concrete options with a recommended default:
79
-
80
- "I'd approach this with **{recommendation}** because {reason}. Want me to proceed, or do you prefer {alternative}?"
81
-
82
- - If user says "go ahead" / "your call" / presses Enter → use the recommendation.
83
- - If user specifies a preference → record it.
84
- - Maximum 2 questions. If the bounded change is still undefined after clarification, recommend `/gsdd-new-project`. If the change is defined but the task still has 3+ grey areas, it's not a quick task — recommend `/gsdd-plan`.
85
-
86
- ### Output
87
-
88
- Store confirmed decisions as `$APPROACH_CONTEXT` — a short string of user-validated choices.
89
- Example: "User confirmed: use in-memory LRU cache, not Redis. Keep existing error format."
90
-
91
- No APPROACH.md file is created. This is inline context only.
92
-
93
- ---
94
-
95
- ## Step 3: Plan
96
-
97
- Delegate to the planner role in quick mode.
98
-
99
- <delegate>
100
- **Identity:** Planner (quick mode)
101
- **Instruction:** Read `.planning/templates/roles/planner.md` for your role contract, then create a plan for this quick task.
102
-
103
- **Context to provide:**
104
- - Task description: `$DESCRIPTION`
105
- - Approach context: `$APPROACH_CONTEXT` (user-confirmed decisions from Step 2.5 — treat as locked constraints, do not revisit)
106
- - Codebase context: `$CODEBASE_CONTEXT` (existing brownfield codebase summary from codebase maps when they exist, otherwise the inline brownfield baseline from Step 2 — use for orientation and risk awareness, not as hard constraints)
107
- - Mode: quick (single plan, 1-3 tasks, no research phase)
108
- - Output path: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
109
-
110
- **Constraints:**
111
- - If `$APPROACH_CONTEXT` is non-empty, implement the user's confirmed choices — do not substitute alternatives
112
- - Create a SINGLE plan with 1-3 focused tasks
113
- - Quick tasks are atomic and self-contained
114
- - No research phase, no ROADMAP requirements
115
- - Do NOT extract phase requirement IDs — there is no active phase
116
- - Derive must-haves directly from the task description
117
- - Ignore <planning_process> Step 1 requirement extraction; use inline goal-backward planning only
118
- - Target minimal context usage
119
-
120
- **Output:** `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
121
- **Return:** Plan file path and task count.
122
- </delegate>
123
-
124
- After the planner returns:
125
-
126
- **STOP. Verify that `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md` exists on disk before proceeding to execution. If the file does not exist, report the error to the user and do NOT proceed. A plan that exists only in conversation context will be lost.**
127
-
128
- ### Quick Plan Self-Check
129
-
130
- Before proceeding to execution, verify the plan meets minimum quality:
131
- - [ ] Plan has at least 1 task with `<action>` and `<verify>` sections
132
- - [ ] Each task's `<verify>` has at least one runnable command
133
- - [ ] Plan tasks do not exceed 3 (quick scope constraint)
134
-
135
- This is a self-check, not an independent plan-check. Failures are noted but do NOT block execution — report `reduced_assurance` in the completion summary.
136
-
137
- ---
138
-
139
- ## Step 3.5: Independent plan check (conditional)
140
-
141
- Read `.planning/config.json`.
142
- - If `workflow.planCheck` is `false` (or key missing): skip to Step 3.6.
143
- - If `workflow.planCheck` is `true`: delegate to the plan-checker with quick-scoped dimensions.
144
-
145
- <delegate>
146
- **Identity:** Plan Checker (quick mode)
147
- **Instruction:** Read `.planning/templates/delegates/plan-checker.md` for your role contract, then check this quick task plan.
148
-
149
- **Context to provide:**
150
- - Task description: `$DESCRIPTION` (treat as the phase goal equivalent)
151
- - Plan: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
152
- - Mode: quick
153
-
154
- **Constraints:**
155
- - Check 5 dimensions only: `requirement_coverage`, `task_completeness`, `dependency_correctness`, `scope_sanity`, `must_have_quality`
156
- - Skip: `key_link_completeness`, `context_compliance`, `goal_achievement`, `approach_alignment`
157
- - Maximum 1 revision cycle (if blockers found, send back to planner once, then accept result)
158
- - Blocker threshold: only block on `task_completeness` or `scope_sanity` violations
159
- - Warnings for other dimensions are noted but do not block
160
-
161
- **Output:** Checker response (passed | issues_found) with issue details.
162
- **Return:** Status and issue summary.
163
- </delegate>
164
-
165
- If the checker returns `issues_found` with blockers and this is the first cycle:
166
- 1. Send the issue list back to the planner for targeted revision of the plan file.
167
- 2. Re-run the checker once more.
168
- 3. If blockers remain after 1 revision cycle, store `$CHECKER_ISSUES` for display in the plan preview. Do NOT block — the user decides in Step 3.7.
169
-
170
- If the checker returns `passed`, or `workflow.planCheck` is false, `$CHECKER_ISSUES` is empty.
171
-
172
- ---
173
-
174
- ## Step 3.6: Scope signal evaluation
175
-
176
- Evaluate the plan against quick-scope boundaries. Read the plan file and check:
177
-
178
- | Signal | Threshold | `$SCOPE_WARNING` text |
179
- |--------|-----------|----------------------|
180
- | Files modified | >8 distinct files in plan | "This task touches {N} files — consider `/gsdd-plan` for full ceremony." |
181
- | Architecture keywords in `$DESCRIPTION` | contains: `refactor`, `migration`, `security`, `auth`, `API design`, `schema`, `database` | "This looks like architectural work — consider `/gsdd-plan` for approach exploration." |
182
- | New public APIs | Plan tasks create new route files, API endpoints, or exported interfaces | "New public surface area detected — consider `/gsdd-plan` for approach exploration." |
183
- | Orientation gap | No `.planning/codebase/` exists AND the inline brownfield baseline still cannot name a clear implementation surface, dependency boundary, or safe-to-touch module | "This repo still needs deeper orientation — consider `/gsdd-map-codebase` before changing code." |
49
+
50
+ If `.planning/quick/` does not exist, create it along with an empty `LOG.md`:
51
+
52
+ ```markdown
53
+ # Quick Task Log
54
+
55
+ | # | Description | Date | Status | Directory |
56
+ |---|-------------|------|--------|-----------|
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Step 2.5: Approach clarification (conditional)
62
+
63
+ Read `.planning/config.json`.
64
+ - If `workflow.discuss` is `false` (or key missing): set `$APPROACH_CONTEXT` to empty, skip to Step 3.
65
+ - If `workflow.discuss` is `true`: evaluate `$DESCRIPTION` for ambiguity signals.
66
+
67
+ ### Ambiguity signals
68
+
69
+ | Signal | Detection | Example |
70
+ |--------|-----------|---------|
71
+ | Multiple valid approaches | Description could be solved via distinct patterns | "add caching" (Redis? in-memory? HTTP headers?) |
72
+ | Destructive operations | Contains: `delete`, `remove`, `migrate`, `rename`, `replace`, `rewrite`, `drop` | "remove the old auth middleware" |
73
+ | Vague scope | Contains: `improve`, `fix`, `update`, `refactor`, `clean up`, `optimize` without specifying target | "improve error handling" |
74
+ | Trade-off present | Description implies competing goals (performance vs simplicity, DRY vs explicit) | "make it faster" |
75
+
76
+ If **no signals fire**: set `$APPROACH_CONTEXT` to empty, skip to Step 3 silently.
77
+
78
+ If **any signal fires**: identify 1-2 grey areas and ask targeted questions.
79
+
80
+ ### Question format
81
+
82
+ For each grey area, present 2-3 concrete options with a recommended default:
83
+
84
+ "I'd approach this with **{recommendation}** because {reason}. Want me to proceed, or do you prefer {alternative}?"
85
+
86
+ - If user says "go ahead" / "your call" / presses Enter → use the recommendation.
87
+ - If user specifies a preference → record it.
88
+ - Maximum 2 questions. If the bounded change is still undefined after clarification, recommend `/gsdd-new-project`. If the change is defined but the task still has 3+ grey areas, it's not a quick task — recommend `/gsdd-plan`.
89
+
90
+ ### Output
91
+
92
+ Store confirmed decisions as `$APPROACH_CONTEXT` — a short string of user-validated choices.
93
+ Example: "User confirmed: use in-memory LRU cache, not Redis. Keep existing error format."
94
+
95
+ No APPROACH.md file is created. This is inline context only.
96
+
97
+ ---
98
+
99
+ ## Step 3: Plan
100
+
101
+ Delegate to the planner role in quick mode.
102
+
103
+ <delegate>
104
+ **Identity:** Planner (quick mode)
105
+ **Instruction:** Read `.planning/templates/roles/planner.md` for your role contract, then create a plan for this quick task.
106
+
107
+ **Context to provide:**
108
+ - Task description: `$DESCRIPTION`
109
+ - Approach context: `$APPROACH_CONTEXT` (user-confirmed decisions from Step 2.5 — treat as locked constraints, do not revisit)
110
+ - Codebase context: `$CODEBASE_CONTEXT` (existing brownfield codebase summary from codebase maps when they exist, otherwise the inline brownfield baseline from Step 2 — use for orientation and risk awareness, not as hard constraints)
111
+ - Mode: quick (single plan, 1-3 tasks, no research phase)
112
+ - Output path: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
113
+
114
+ **Constraints:**
115
+ - If `$APPROACH_CONTEXT` is non-empty, implement the user's confirmed choices — do not substitute alternatives
116
+ - Create a SINGLE plan with 1-3 focused tasks
117
+ - Quick tasks are atomic and self-contained
118
+ - No research phase, no ROADMAP requirements
119
+ - Do NOT extract phase requirement IDs — there is no active phase
120
+ - Derive must-haves directly from the task description
121
+ - Ignore <planning_process> Step 1 requirement extraction; use inline goal-backward planning only
122
+ - Target minimal context usage
123
+
124
+ **Output:** `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
125
+ **Return:** Plan file path and task count.
126
+ </delegate>
127
+
128
+ After the planner returns:
129
+
130
+ **STOP. Verify that `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md` exists on disk before proceeding to execution. If the file does not exist, report the error to the user and do NOT proceed. A plan that exists only in conversation context will be lost.**
131
+
132
+ ### Quick Plan Self-Check
133
+
134
+ Before proceeding to execution, verify the plan meets minimum quality:
135
+ - [ ] Plan has at least 1 task with `<action>` and `<verify>` sections
136
+ - [ ] Each task's `<verify>` has at least one runnable command
137
+ - [ ] Plan tasks do not exceed 3 (quick scope constraint)
138
+
139
+ This is a self-check, not an independent plan-check. Failures are noted but do NOT block execution — report `reduced_assurance` in the completion summary.
140
+
141
+ ---
142
+
143
+ ## Step 3.5: Independent plan check (conditional)
144
+
145
+ Read `.planning/config.json`.
146
+ - If `workflow.planCheck` is `false` (or key missing): skip to Step 3.6.
147
+ - If `workflow.planCheck` is `true`: delegate to the plan-checker with quick-scoped dimensions.
148
+
149
+ <delegate>
150
+ **Identity:** Plan Checker (quick mode)
151
+ **Instruction:** Read `.planning/templates/delegates/plan-checker.md` for your role contract, then check this quick task plan.
152
+
153
+ **Context to provide:**
154
+ - Task description: `$DESCRIPTION` (treat as the phase goal equivalent)
155
+ - Plan: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
156
+ - Mode: quick
157
+
158
+ **Constraints:**
159
+ - Check 5 dimensions only: `requirement_coverage`, `task_completeness`, `dependency_correctness`, `scope_sanity`, `must_have_quality`
160
+ - Skip: `key_link_completeness`, `context_compliance`, `goal_achievement`, `approach_alignment`
161
+ - Maximum 1 revision cycle (if blockers found, send back to planner once, then accept result)
162
+ - Blocker threshold: only block on `task_completeness` or `scope_sanity` violations
163
+ - Warnings for other dimensions are noted but do not block
164
+
165
+ **Output:** Checker response (passed | issues_found) with issue details.
166
+ **Return:** Status and issue summary.
167
+ </delegate>
168
+
169
+ If the checker returns `issues_found` with blockers and this is the first cycle:
170
+ 1. Send the issue list back to the planner for targeted revision of the plan file.
171
+ 2. Re-run the checker once more.
172
+ 3. If blockers remain after 1 revision cycle, store `$CHECKER_ISSUES` for display in the plan preview. Do NOT block — the user decides in Step 3.7.
173
+
174
+ If the checker returns `passed`, or `workflow.planCheck` is false, `$CHECKER_ISSUES` is empty.
175
+
176
+ ---
177
+
178
+ ## Step 3.6: Scope signal evaluation
179
+
180
+ Evaluate the plan against quick-scope boundaries. Read the plan file and check:
181
+
182
+ | Signal | Threshold | `$SCOPE_WARNING` text |
183
+ |--------|-----------|----------------------|
184
+ | Files modified | >8 distinct files in plan | "This task touches {N} files — consider `/gsdd-plan` for full ceremony." |
185
+ | Architecture keywords in `$DESCRIPTION` | contains: `refactor`, `migration`, `security`, `auth`, `API design`, `schema`, `database` | "This looks like architectural work — consider `/gsdd-plan` for approach exploration." |
186
+ | New public APIs | Plan tasks create new route files, API endpoints, or exported interfaces | "New public surface area detected — consider `/gsdd-plan` for approach exploration." |
187
+ | Orientation gap | No `.planning/codebase/` exists AND the inline brownfield baseline still cannot name a clear implementation surface, dependency boundary, or safe-to-touch module | "This repo still needs deeper orientation — consider `/gsdd-map-codebase` before changing code." |
184
188
  | Undefined bounded change | `$DESCRIPTION` still does not identify a concrete bug, feature, target surface, or observable outcome after clarification | "This does not yet describe a bounded change — use `/gsdd-new-project` to define the work first. If `.planning/brownfield-change/CHANGE.md` already defines a concrete bounded lane, treat `/gsdd-new-project` as an intentional widen path rather than the default fallback." |
185
-
186
- If any signals fire, concatenate the matching advisory text in the listed order as `$SCOPE_WARNING`. If the undefined bounded change signal fires, keep that advisory first so the routing recommendation stays explicit.
187
- If no signals fire, `$SCOPE_WARNING` is empty.
188
-
189
- This is advisory only — it does NOT block execution.
190
-
191
- ---
192
-
193
- ## Step 3.7: Plan preview
194
-
195
- Present the plan summary to the user before execution begins.
196
-
197
- Read the plan file and extract:
198
- - Task count and task names
199
- - List of files to be modified/created (from plan task `<files>` sections)
200
- - A 1-sentence approach summary (first sentence of the plan's objective or goal)
201
-
202
- Display:
203
-
204
- ```
205
- Quick Task Plan Preview:
206
- - Tasks: {count} ({task_names})
207
- - Files: {file_list}
208
- - Approach: {1-sentence summary}
209
- ```
210
-
211
- If `$SCOPE_WARNING` is non-empty, append:
212
- ```
213
- Scope signal: {$SCOPE_WARNING}
214
- ```
215
-
216
- If `$CHECKER_ISSUES` is non-empty, append:
217
- ```
218
- Plan check issues: {$CHECKER_ISSUES}
219
- ```
220
-
221
- Present options (default-yes — pressing Enter proceeds):
222
- - If `$SCOPE_WARNING` is empty: `[Enter to proceed / edit description / abort]`
223
- - If `$SCOPE_WARNING` contains `/gsdd-new-project`: `[Enter to proceed / switch to /gsdd-new-project / edit description / abort]`
224
- - Otherwise if `$SCOPE_WARNING` contains `/gsdd-map-codebase`: `[Enter to proceed / switch to /gsdd-map-codebase / edit description / abort]`
225
- - Otherwise if `$SCOPE_WARNING` is non-empty: `[Enter to proceed / switch to /gsdd-plan / edit description / abort]`
226
-
227
- Handle response:
228
- - **Enter (or "yes"):** proceed to Step 4.
229
- - **"edit description":** clean up the task directory, then return to Step 1 with `$DESCRIPTION` pre-filled as the starting point.
189
+
190
+ If any signals fire, concatenate the matching advisory text in the listed order as `$SCOPE_WARNING`. If the undefined bounded change signal fires, keep that advisory first so the routing recommendation stays explicit.
191
+ If no signals fire, `$SCOPE_WARNING` is empty.
192
+
193
+ This is advisory only — it does NOT block execution.
194
+
195
+ ---
196
+
197
+ ## Step 3.7: Plan preview
198
+
199
+ Present the plan summary to the user before execution begins.
200
+
201
+ Read the plan file and extract:
202
+ - Task count and task names
203
+ - List of files to be modified/created (from plan task `<files>` sections)
204
+ - A 1-sentence approach summary (first sentence of the plan's objective or goal)
205
+
206
+ Display:
207
+
208
+ ```
209
+ Quick Task Plan Preview:
210
+ - Tasks: {count} ({task_names})
211
+ - Files: {file_list}
212
+ - Approach: {1-sentence summary}
213
+ ```
214
+
215
+ If `$SCOPE_WARNING` is non-empty, append:
216
+ ```
217
+ Scope signal: {$SCOPE_WARNING}
218
+ ```
219
+
220
+ If `$CHECKER_ISSUES` is non-empty, append:
221
+ ```
222
+ Plan check issues: {$CHECKER_ISSUES}
223
+ ```
224
+
225
+ Present options (default-yes — pressing Enter proceeds):
226
+ - If `$SCOPE_WARNING` is empty: `[Enter to proceed / edit description / abort]`
227
+ - If `$SCOPE_WARNING` contains `/gsdd-new-project`: `[Enter to proceed / switch to /gsdd-new-project / edit description / abort]`
228
+ - Otherwise if `$SCOPE_WARNING` contains `/gsdd-map-codebase`: `[Enter to proceed / switch to /gsdd-map-codebase / edit description / abort]`
229
+ - Otherwise if `$SCOPE_WARNING` is non-empty: `[Enter to proceed / switch to /gsdd-plan / edit description / abort]`
230
+
231
+ Handle response:
232
+ - **Enter (or "yes"):** proceed to Step 4.
233
+ - **"edit description":** clean up the task directory, then return to Step 1 with `$DESCRIPTION` pre-filled as the starting point.
230
234
  - **"switch to /gsdd-new-project":** clean up the task directory, then stop quick workflow and report: "Use `/gsdd-new-project` to define or intentionally widen the work into full lifecycle planning. Task description: {$DESCRIPTION}"
231
- - **"switch to /gsdd-map-codebase":** clean up the task directory, then stop quick workflow and report: "Use `/gsdd-map-codebase` for a deeper brownfield baseline before quick work. Task description: {$DESCRIPTION}"
232
- - **"switch to /gsdd-plan":** clean up the task directory, then stop quick workflow and report: "Use `/gsdd-plan` for full ceremony with approach exploration. Task description: {$DESCRIPTION}"
233
- - **"abort":** clean up the task directory, report cancellation, stop.
234
-
235
- ---
236
-
237
- ## Step 4: Execute
238
-
239
- **Only reached after the user has seen the plan preview in Step 3.7.**
240
-
241
- Delegate to the executor role.
242
-
243
- <delegate>
244
- **Identity:** Executor
245
- **Instruction:** Read `.planning/templates/roles/executor.md` for your role contract, then execute the quick task plan.
246
-
247
- **Context to provide:**
248
- - Plan file: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
249
- - Project conventions: `.planning/config.json` (git protocol section)
250
- - Quick task -- do NOT update ROADMAP.md
251
-
252
- **Constraints:**
253
- - Execute all tasks in the plan
254
- - Follow advisory git protocol from config.json
255
- - Skip the <state_updates> section of your role contract entirely
256
- - Do NOT update ROADMAP.md phase status or SPEC.md current state
257
- - Create summary at: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-SUMMARY.md`
258
-
259
- **Output:** `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-SUMMARY.md`
260
- **Return:** Summary file path and completion status.
261
- </delegate>
262
-
263
- After the executor returns:
264
-
265
- **STOP. Verify the SUMMARY file exists at `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-SUMMARY.md` on disk. If it does not exist, report the write failure. Do NOT proceed to verification or LOG.md update without a persisted summary.**
266
-
267
- ---
268
-
269
- ## Step 5: Verify (conditional)
270
-
271
- Read `.planning/config.json`.
272
- - If `workflow.verifier` is `false`, skip to Step 6.
273
- - If `workflow.verifier` is `true`, delegate to the verifier role:
274
-
275
- <delegate>
276
- **Identity:** Verifier (quick mode)
277
- **Instruction:** Read `.planning/templates/roles/verifier.md` for your role contract, then verify the quick task.
278
-
279
- **Context to provide:**
280
- - Task description: `$DESCRIPTION`
281
- - Plan: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
282
- - Summary: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-SUMMARY.md`
283
-
284
- **Constraints:**
285
- - Verify goal achievement against the task description
286
- - Quick scope -- do not check ROADMAP alignment or cross-phase integration
287
- - Write report to: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-VERIFICATION.md`
288
-
289
- **Output:** `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-VERIFICATION.md`
290
- **Return:** Verification status (passed | gaps_found | human_needed).
291
- </delegate>
292
-
293
- **STOP. Verify the VERIFICATION file exists at `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-VERIFICATION.md` on disk (when verifier ran). If it does not exist, report the write failure. Do NOT proceed to LOG.md update without a persisted verification report.**
294
-
295
- ---
296
-
297
- ## Step 6: Update LOG.md
298
-
299
- Append a row to `.planning/quick/LOG.md`:
300
-
301
- ```markdown
302
- | $NEXT_NUM | $DESCRIPTION | $DATE | $STATUS | [$NEXT_NUM-$SLUG](./$NEXT_NUM-$SLUG/) |
303
- ```
304
-
305
- Where:
306
- - `$DATE` is today's date (YYYY-MM-DD)
307
- - `$STATUS` is `done` (no verifier), or the verifier's status (passed/gaps_found/human_needed)
308
-
309
- ---
310
-
311
- ## Step 7: Report completion
312
-
313
- Report to the user:
314
- - Quick task number and description
315
- - Plan path
316
- - Summary path
317
- - Verification path (if verifier ran)
318
- - Status
319
-
320
- </process>
321
-
322
- <success_criteria>
323
- - [ ] User provided a task description
324
- - [ ] Approach clarification ran (only if workflow.discuss is true AND ambiguity detected)
325
- - [ ] `.planning/quick/` directory exists (created if needed)
326
- - [ ] Task directory created at `.planning/quick/NNN-slug/`
327
- - [ ] `NNN-PLAN.md` created by planner (1-3 tasks)
328
- - [ ] Independent plan check ran (only if workflow.planCheck is true)
329
- - [ ] Plan preview presented to user before execution
330
- - [ ] User confirmed (or pressed Enter) before execution proceeded
331
- - [ ] `NNN-SUMMARY.md` created by executor
332
- - [ ] `NNN-VERIFICATION.md` created by verifier (only if workflow.verifier is true)
333
- - [ ] `LOG.md` updated with task row
334
- - [ ] User informed of completion status
335
- </success_criteria>
336
-
337
- <completion>
338
- Report to the user what was accomplished, then present the next step:
339
-
340
- ---
341
- **Completed:** Quick task #{next_num} — {description}
342
-
343
- Created:
344
- - `.planning/quick/{next_num}-{slug}/{next_num}-PLAN.md`
345
- - `.planning/quick/{next_num}-{slug}/{next_num}-SUMMARY.md`
346
- - `.planning/quick/{next_num}-{slug}/{next_num}-VERIFICATION.md` (if verifier enabled)
347
- - Updated `.planning/quick/LOG.md`
348
-
349
- **Next step:** `/gsdd-progress` — check project status and continue phase work
350
-
351
- Also available:
352
- - `/gsdd-quick` — run another quick task
353
- - `/gsdd-plan` — plan the next phase
354
- - `/gsdd-pause` — save context for later if stopping work
355
-
356
- Consider clearing context before starting the next workflow for best results.
357
- ---
358
- </completion>
235
+ - **"switch to /gsdd-map-codebase":** clean up the task directory, then stop quick workflow and report: "Use `/gsdd-map-codebase` for a deeper brownfield baseline before quick work. Task description: {$DESCRIPTION}"
236
+ - **"switch to /gsdd-plan":** clean up the task directory, then stop quick workflow and report: "Use `/gsdd-plan` for full ceremony with approach exploration. Task description: {$DESCRIPTION}"
237
+ - **"abort":** clean up the task directory, report cancellation, stop.
238
+
239
+ ---
240
+
241
+ ## Step 4: Execute
242
+
243
+ **Only reached after the user has seen the plan preview in Step 3.7.**
244
+
245
+ Delegate to the executor role.
246
+
247
+ <delegate>
248
+ **Identity:** Executor
249
+ **Instruction:** Read `.planning/templates/roles/executor.md` for your role contract, then execute the quick task plan.
250
+
251
+ **Context to provide:**
252
+ - Plan file: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
253
+ - Project conventions: `.planning/config.json` (git protocol section)
254
+ - Quick task -- do NOT update ROADMAP.md
255
+
256
+ **Constraints:**
257
+ - Execute all tasks in the plan
258
+ - Follow advisory git protocol from config.json
259
+ - Skip the <state_updates> section of your role contract entirely
260
+ - Do NOT update ROADMAP.md phase status or SPEC.md current state
261
+ - Create summary at: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-SUMMARY.md`
262
+
263
+ **Output:** `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-SUMMARY.md`
264
+ **Return:** Summary file path and completion status.
265
+ </delegate>
266
+
267
+ After the executor returns:
268
+
269
+ **STOP. Verify the SUMMARY file exists at `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-SUMMARY.md` on disk. If it does not exist, report the write failure. Do NOT proceed to verification or LOG.md update without a persisted summary.**
270
+
271
+ ---
272
+
273
+ ## Step 5: Verify (conditional)
274
+
275
+ Read `.planning/config.json`.
276
+ - If `workflow.verifier` is `false`, skip to Step 6.
277
+ - If `workflow.verifier` is `true`, delegate to the verifier role:
278
+
279
+ <delegate>
280
+ **Identity:** Verifier (quick mode)
281
+ **Instruction:** Read `.planning/templates/roles/verifier.md` for your role contract, then verify the quick task.
282
+
283
+ **Context to provide:**
284
+ - Task description: `$DESCRIPTION`
285
+ - Plan: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
286
+ - Summary: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-SUMMARY.md`
287
+
288
+ **Constraints:**
289
+ - Verify goal achievement against the task description
290
+ - Quick scope -- do not check ROADMAP alignment or cross-phase integration
291
+ - Write report to: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-VERIFICATION.md`
292
+
293
+ **Output:** `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-VERIFICATION.md`
294
+ **Return:** Verification status (passed | gaps_found | human_needed).
295
+ </delegate>
296
+
297
+ **STOP. Verify the VERIFICATION file exists at `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-VERIFICATION.md` on disk (when verifier ran). If it does not exist, report the write failure. Do NOT proceed to LOG.md update without a persisted verification report.**
298
+
299
+ ---
300
+
301
+ ## Step 6: Update LOG.md
302
+
303
+ Append a row to `.planning/quick/LOG.md`:
304
+
305
+ ```markdown
306
+ | $NEXT_NUM | $DESCRIPTION | $DATE | $STATUS | [$NEXT_NUM-$SLUG](./$NEXT_NUM-$SLUG/) |
307
+ ```
308
+
309
+ Where:
310
+ - `$DATE` is today's date (YYYY-MM-DD)
311
+ - `$STATUS` is `done` (no verifier), or the verifier's status (passed/gaps_found/human_needed)
312
+
313
+ ---
314
+
315
+ ## Step 7: Report completion
316
+
317
+ Report to the user:
318
+ - Quick task number and description
319
+ - Plan path
320
+ - Summary path
321
+ - Verification path (if verifier ran)
322
+ - Status
323
+
324
+ </process>
325
+
326
+ <success_criteria>
327
+ - [ ] User provided a task description
328
+ - [ ] Approach clarification ran (only if workflow.discuss is true AND ambiguity detected)
329
+ - [ ] `.planning/quick/` directory exists (created if needed)
330
+ - [ ] Task directory created at `.planning/quick/NNN-slug/`
331
+ - [ ] `NNN-PLAN.md` created by planner (1-3 tasks)
332
+ - [ ] Independent plan check ran (only if workflow.planCheck is true)
333
+ - [ ] Plan preview presented to user before execution
334
+ - [ ] User confirmed (or pressed Enter) before execution proceeded
335
+ - [ ] `NNN-SUMMARY.md` created by executor
336
+ - [ ] `NNN-VERIFICATION.md` created by verifier (only if workflow.verifier is true)
337
+ - [ ] `LOG.md` updated with task row
338
+ - [ ] User informed of completion status
339
+ </success_criteria>
340
+
341
+ <completion>
342
+ Report to the user what was accomplished, then present the next step:
343
+
344
+ ---
345
+ **Completed:** Quick task #{next_num} — {description}
346
+
347
+ Created:
348
+ - `.planning/quick/{next_num}-{slug}/{next_num}-PLAN.md`
349
+ - `.planning/quick/{next_num}-{slug}/{next_num}-SUMMARY.md`
350
+ - `.planning/quick/{next_num}-{slug}/{next_num}-VERIFICATION.md` (if verifier enabled)
351
+ - Updated `.planning/quick/LOG.md`
352
+
353
+ **Next step:** `/gsdd-progress` — check project status and continue phase work
354
+
355
+ Also available:
356
+ - `/gsdd-quick` — run another quick task
357
+ - `/gsdd-plan` — plan the next phase
358
+ - `/gsdd-pause` — save context for later if stopping work
359
+
360
+ Consider clearing context before starting the next workflow for best results.
361
+ ---
362
+ </completion>