@bhargavvc/sdd-cc 1.30.1 → 1.35.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 (242) hide show
  1. package/README.ja-JP.md +144 -110
  2. package/README.ko-KR.md +143 -107
  3. package/README.md +183 -112
  4. package/README.pt-BR.md +90 -52
  5. package/README.zh-CN.md +141 -101
  6. package/agents/sdd-advisor-researcher.md +23 -0
  7. package/agents/sdd-ai-researcher.md +133 -0
  8. package/agents/sdd-code-fixer.md +516 -0
  9. package/agents/sdd-code-reviewer.md +355 -0
  10. package/agents/sdd-codebase-mapper.md +3 -3
  11. package/agents/sdd-debugger.md +17 -5
  12. package/agents/sdd-doc-verifier.md +201 -0
  13. package/agents/sdd-doc-writer.md +602 -0
  14. package/agents/sdd-domain-researcher.md +153 -0
  15. package/agents/sdd-eval-auditor.md +164 -0
  16. package/agents/sdd-eval-planner.md +154 -0
  17. package/agents/sdd-executor.md +87 -4
  18. package/agents/sdd-framework-selector.md +160 -0
  19. package/agents/sdd-intel-updater.md +314 -0
  20. package/agents/sdd-nyquist-auditor.md +1 -1
  21. package/agents/sdd-phase-researcher.md +71 -4
  22. package/agents/sdd-plan-checker.md +100 -6
  23. package/agents/sdd-planner.md +145 -206
  24. package/agents/sdd-project-researcher.md +25 -2
  25. package/agents/sdd-research-synthesizer.md +3 -3
  26. package/agents/sdd-roadmapper.md +6 -6
  27. package/agents/sdd-security-auditor.md +128 -0
  28. package/agents/sdd-ui-auditor.md +43 -3
  29. package/agents/sdd-ui-checker.md +5 -5
  30. package/agents/sdd-ui-researcher.md +27 -4
  31. package/agents/sdd-user-profiler.md +2 -2
  32. package/agents/sdd-verifier.md +142 -22
  33. package/bin/install.js +2145 -545
  34. package/commands/sdd/add-backlog.md +5 -5
  35. package/commands/sdd/add-tests.md +2 -2
  36. package/commands/sdd/ai-integration-phase.md +36 -0
  37. package/commands/sdd/analyze-dependencies.md +34 -0
  38. package/commands/sdd/audit-fix.md +33 -0
  39. package/commands/sdd/autonomous.md +7 -2
  40. package/commands/sdd/cleanup.md +5 -0
  41. package/commands/sdd/code-review-fix.md +52 -0
  42. package/commands/sdd/code-review.md +55 -0
  43. package/commands/sdd/complete-milestone.md +6 -6
  44. package/commands/sdd/debug.md +22 -9
  45. package/commands/sdd/discuss-phase.md +7 -2
  46. package/commands/sdd/do.md +1 -1
  47. package/commands/sdd/docs-update.md +48 -0
  48. package/commands/sdd/eval-review.md +32 -0
  49. package/commands/sdd/execute-phase.md +4 -0
  50. package/commands/sdd/explore.md +27 -0
  51. package/commands/sdd/fast.md +2 -2
  52. package/commands/sdd/from-sdd2.md +45 -0
  53. package/commands/sdd/help.md +2 -0
  54. package/commands/sdd/import.md +36 -0
  55. package/commands/sdd/intel.md +179 -0
  56. package/commands/sdd/join-discord.md +2 -1
  57. package/commands/sdd/manager.md +1 -0
  58. package/commands/sdd/map-codebase.md +3 -3
  59. package/commands/sdd/new-milestone.md +1 -1
  60. package/commands/sdd/new-project.md +5 -1
  61. package/commands/sdd/new-workspace.md +1 -1
  62. package/commands/sdd/next.md +2 -0
  63. package/commands/sdd/plan-milestone-gaps.md +2 -2
  64. package/commands/sdd/plan-phase.md +6 -1
  65. package/commands/sdd/plant-seed.md +1 -1
  66. package/commands/sdd/profile-user.md +1 -1
  67. package/commands/sdd/quick.md +5 -3
  68. package/commands/sdd/reapply-patches.md +230 -42
  69. package/commands/sdd/research-phase.md +3 -3
  70. package/commands/sdd/review-backlog.md +1 -0
  71. package/commands/sdd/review.md +6 -3
  72. package/commands/sdd/scan.md +26 -0
  73. package/commands/sdd/secure-phase.md +35 -0
  74. package/commands/sdd/ship.md +1 -1
  75. package/commands/sdd/thread.md +5 -5
  76. package/commands/sdd/undo.md +34 -0
  77. package/commands/sdd/verify-work.md +1 -1
  78. package/commands/sdd/workstreams.md +17 -11
  79. package/hooks/dist/sdd-check-update.js +33 -8
  80. package/hooks/dist/sdd-context-monitor.js +17 -8
  81. package/hooks/dist/sdd-phase-boundary.sh +27 -0
  82. package/hooks/dist/sdd-prompt-guard.js +1 -0
  83. package/hooks/dist/sdd-read-guard.js +82 -0
  84. package/hooks/dist/sdd-session-state.sh +33 -0
  85. package/hooks/dist/sdd-statusline.js +137 -15
  86. package/hooks/dist/sdd-validate-commit.sh +47 -0
  87. package/hooks/dist/sdd-workflow-guard.js +4 -4
  88. package/hooks/sdd-check-update.js +139 -0
  89. package/hooks/sdd-context-monitor.js +165 -0
  90. package/hooks/sdd-phase-boundary.sh +27 -0
  91. package/hooks/sdd-prompt-guard.js +97 -0
  92. package/hooks/sdd-read-guard.js +82 -0
  93. package/hooks/sdd-session-state.sh +33 -0
  94. package/hooks/sdd-statusline.js +241 -0
  95. package/hooks/sdd-validate-commit.sh +47 -0
  96. package/hooks/sdd-workflow-guard.js +94 -0
  97. package/package.json +3 -3
  98. package/scripts/build-hooks.js +18 -7
  99. package/scripts/prompt-injection-scan.sh +1 -0
  100. package/scripts/rebrand-gsd-to-sdd.sh +221 -220
  101. package/scripts/run-tests.cjs +5 -1
  102. package/scripts/sync-upstream.sh +1 -1
  103. package/sdd/bin/lib/commands.cjs +79 -17
  104. package/sdd/bin/lib/config.cjs +90 -48
  105. package/sdd/bin/lib/core.cjs +452 -87
  106. package/sdd/bin/lib/docs.cjs +267 -0
  107. package/sdd/bin/lib/frontmatter.cjs +381 -336
  108. package/sdd/bin/lib/init.cjs +110 -16
  109. package/sdd/bin/lib/intel.cjs +660 -0
  110. package/sdd/bin/lib/learnings.cjs +378 -0
  111. package/sdd/bin/lib/milestone.cjs +42 -11
  112. package/sdd/bin/lib/model-profiles.cjs +17 -15
  113. package/sdd/bin/lib/phase.cjs +367 -288
  114. package/sdd/bin/lib/profile-output.cjs +106 -10
  115. package/sdd/bin/lib/roadmap.cjs +146 -115
  116. package/sdd/bin/lib/schema-detect.cjs +238 -0
  117. package/sdd/bin/lib/sdd2-import.cjs +511 -0
  118. package/sdd/bin/lib/security.cjs +124 -3
  119. package/sdd/bin/lib/state.cjs +648 -264
  120. package/sdd/bin/lib/template.cjs +8 -4
  121. package/sdd/bin/lib/verify.cjs +209 -28
  122. package/sdd/bin/lib/workstream.cjs +7 -3
  123. package/sdd/bin/sdd-tools.cjs +184 -12
  124. package/sdd/contexts/dev.md +21 -0
  125. package/sdd/contexts/research.md +22 -0
  126. package/sdd/contexts/review.md +22 -0
  127. package/sdd/references/agent-contracts.md +79 -0
  128. package/sdd/references/ai-evals.md +156 -0
  129. package/sdd/references/ai-frameworks.md +186 -0
  130. package/sdd/references/artifact-types.md +113 -0
  131. package/sdd/references/common-bug-patterns.md +114 -0
  132. package/sdd/references/context-budget.md +49 -0
  133. package/sdd/references/continuation-format.md +25 -25
  134. package/sdd/references/domain-probes.md +125 -0
  135. package/sdd/references/few-shot-examples/plan-checker.md +73 -0
  136. package/sdd/references/few-shot-examples/verifier.md +109 -0
  137. package/sdd/references/gate-prompts.md +100 -0
  138. package/sdd/references/gates.md +70 -0
  139. package/sdd/references/git-integration.md +1 -1
  140. package/sdd/references/ios-scaffold.md +123 -0
  141. package/sdd/references/model-profile-resolution.md +2 -0
  142. package/sdd/references/model-profiles.md +24 -18
  143. package/sdd/references/planner-gap-closure.md +62 -0
  144. package/sdd/references/planner-reviews.md +39 -0
  145. package/sdd/references/planner-revision.md +87 -0
  146. package/sdd/references/planning-config.md +252 -0
  147. package/sdd/references/revision-loop.md +97 -0
  148. package/sdd/references/thinking-models-debug.md +44 -0
  149. package/sdd/references/thinking-models-execution.md +50 -0
  150. package/sdd/references/thinking-models-planning.md +62 -0
  151. package/sdd/references/thinking-models-research.md +50 -0
  152. package/sdd/references/thinking-models-verification.md +55 -0
  153. package/sdd/references/thinking-partner.md +96 -0
  154. package/sdd/references/ui-brand.md +4 -4
  155. package/sdd/references/universal-anti-patterns.md +63 -0
  156. package/sdd/references/verification-overrides.md +227 -0
  157. package/sdd/references/workstream-flag.md +56 -3
  158. package/sdd/templates/AI-SPEC.md +246 -0
  159. package/sdd/templates/DEBUG.md +1 -1
  160. package/sdd/templates/SECURITY.md +61 -0
  161. package/sdd/templates/UAT.md +4 -4
  162. package/sdd/templates/VALIDATION.md +4 -4
  163. package/sdd/templates/claude-md.md +32 -9
  164. package/sdd/templates/config.json +4 -0
  165. package/sdd/templates/debug-subagent-prompt.md +1 -1
  166. package/sdd/templates/dev-preferences.md +1 -1
  167. package/sdd/templates/discovery.md +2 -2
  168. package/sdd/templates/phase-prompt.md +1 -1
  169. package/sdd/templates/planner-subagent-prompt.md +3 -3
  170. package/sdd/templates/project.md +1 -1
  171. package/sdd/templates/research.md +1 -1
  172. package/sdd/templates/state.md +2 -2
  173. package/sdd/workflows/add-phase.md +8 -8
  174. package/sdd/workflows/add-tests.md +12 -9
  175. package/sdd/workflows/add-todo.md +5 -3
  176. package/sdd/workflows/ai-integration-phase.md +284 -0
  177. package/sdd/workflows/analyze-dependencies.md +96 -0
  178. package/sdd/workflows/audit-fix.md +157 -0
  179. package/sdd/workflows/audit-milestone.md +11 -11
  180. package/sdd/workflows/audit-uat.md +2 -2
  181. package/sdd/workflows/autonomous.md +195 -27
  182. package/sdd/workflows/check-todos.md +12 -10
  183. package/sdd/workflows/cleanup.md +2 -0
  184. package/sdd/workflows/code-review-fix.md +497 -0
  185. package/sdd/workflows/code-review.md +515 -0
  186. package/sdd/workflows/complete-milestone.md +56 -22
  187. package/sdd/workflows/diagnose-issues.md +10 -3
  188. package/sdd/workflows/discovery-phase.md +5 -3
  189. package/sdd/workflows/discuss-phase-assumptions.md +24 -6
  190. package/sdd/workflows/discuss-phase-power.md +291 -0
  191. package/sdd/workflows/discuss-phase.md +173 -21
  192. package/sdd/workflows/do.md +23 -21
  193. package/sdd/workflows/docs-update.md +1155 -0
  194. package/sdd/workflows/eval-review.md +155 -0
  195. package/sdd/workflows/execute-phase.md +594 -38
  196. package/sdd/workflows/execute-plan.md +67 -96
  197. package/sdd/workflows/explore.md +139 -0
  198. package/sdd/workflows/fast.md +5 -5
  199. package/sdd/workflows/forensics.md +2 -2
  200. package/sdd/workflows/health.md +4 -4
  201. package/sdd/workflows/help.md +122 -119
  202. package/sdd/workflows/import.md +276 -0
  203. package/sdd/workflows/inbox.md +387 -0
  204. package/sdd/workflows/insert-phase.md +7 -7
  205. package/sdd/workflows/list-phase-assumptions.md +4 -4
  206. package/sdd/workflows/list-workspaces.md +2 -2
  207. package/sdd/workflows/manager.md +35 -32
  208. package/sdd/workflows/map-codebase.md +7 -5
  209. package/sdd/workflows/milestone-summary.md +2 -2
  210. package/sdd/workflows/new-milestone.md +17 -9
  211. package/sdd/workflows/new-project.md +50 -25
  212. package/sdd/workflows/new-workspace.md +7 -5
  213. package/sdd/workflows/next.md +67 -11
  214. package/sdd/workflows/note.md +9 -7
  215. package/sdd/workflows/pause-work.md +75 -12
  216. package/sdd/workflows/plan-milestone-gaps.md +8 -8
  217. package/sdd/workflows/plan-phase.md +294 -42
  218. package/sdd/workflows/plant-seed.md +6 -3
  219. package/sdd/workflows/pr-branch.md +42 -14
  220. package/sdd/workflows/profile-user.md +9 -7
  221. package/sdd/workflows/progress.md +45 -45
  222. package/sdd/workflows/quick.md +195 -47
  223. package/sdd/workflows/remove-phase.md +6 -6
  224. package/sdd/workflows/remove-workspace.md +3 -1
  225. package/sdd/workflows/research-phase.md +2 -2
  226. package/sdd/workflows/resume-project.md +12 -12
  227. package/sdd/workflows/review.md +109 -9
  228. package/sdd/workflows/scan.md +102 -0
  229. package/sdd/workflows/secure-phase.md +166 -0
  230. package/sdd/workflows/session-report.md +2 -2
  231. package/sdd/workflows/settings.md +38 -12
  232. package/sdd/workflows/ship.md +21 -9
  233. package/sdd/workflows/stats.md +1 -1
  234. package/sdd/workflows/transition.md +23 -23
  235. package/sdd/workflows/ui-phase.md +15 -7
  236. package/sdd/workflows/ui-review.md +29 -4
  237. package/sdd/workflows/undo.md +314 -0
  238. package/sdd/workflows/update.md +171 -20
  239. package/sdd/workflows/validate-phase.md +6 -4
  240. package/sdd/workflows/verify-phase.md +210 -6
  241. package/sdd/workflows/verify-work.md +83 -9
  242. package/sdd/commands/sdd/workstreams.md +0 -63
@@ -29,7 +29,7 @@ the normal phase sequence and accumulate context over time.
29
29
 
30
30
  3. **Create the phase directory:**
31
31
  ```bash
32
- SLUG=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" generate-slug "$ARGUMENTS")
32
+ SLUG=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" generate-slug "$ARGUMENTS" --raw)
33
33
  mkdir -p ".planning/phases/${NEXT}-${SLUG}"
34
34
  touch ".planning/phases/${NEXT}-${SLUG}/.gitkeep"
35
35
  ```
@@ -46,7 +46,7 @@ the normal phase sequence and accumulate context over time.
46
46
  **Plans:** 0 plans
47
47
 
48
48
  Plans:
49
- - [ ] TBD (promote with /sdd:review-backlog when ready)
49
+ - [ ] TBD (promote with /sdd-review-backlog when ready)
50
50
  ```
51
51
 
52
52
  5. **Commit:**
@@ -62,15 +62,15 @@ the normal phase sequence and accumulate context over time.
62
62
  Directory: .planning/phases/{NEXT}-{slug}/
63
63
 
64
64
  This item lives in the backlog parking lot.
65
- Use /sdd:discuss-phase {NEXT} to explore it further.
66
- Use /sdd:review-backlog to promote items to active milestone.
65
+ Use /sdd-discuss-phase {NEXT} to explore it further.
66
+ Use /sdd-review-backlog to promote items to active milestone.
67
67
  ```
68
68
 
69
69
  </process>
70
70
 
71
71
  <notes>
72
72
  - 999.x numbering keeps backlog items out of the active phase sequence
73
- - Phase directories are created immediately, so /sdd:discuss-phase and /sdd:plan-phase work on them
73
+ - Phase directories are created immediately, so /sdd-discuss-phase and /sdd-plan-phase work on them
74
74
  - No `Depends on:` field — backlog items are unsequenced by definition
75
75
  - Sparse numbering is fine (999.1, 999.3) — always uses next-decimal
76
76
  </notes>
@@ -13,8 +13,8 @@ allowed-tools:
13
13
  - AskUserQuestion
14
14
  argument-instructions: |
15
15
  Parse the argument as a phase number (integer, decimal, or letter-suffix), plus optional free-text instructions.
16
- Example: /sdd:add-tests 12
17
- Example: /sdd:add-tests 12 focus on edge cases in the pricing module
16
+ Example: /sdd-add-tests 12
17
+ Example: /sdd-add-tests 12 focus on edge cases in the pricing module
18
18
  ---
19
19
  <objective>
20
20
  Generate unit and E2E tests for a completed phase, using its SUMMARY.md, CONTEXT.md, and VERIFICATION.md as specifications.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: sdd:ai-integration-phase
3
+ description: Generate AI design contract (AI-SPEC.md) for phases that involve building AI systems — framework selection, implementation guidance from official docs, and evaluation strategy
4
+ argument-hint: "[phase number]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Task
12
+ - WebFetch
13
+ - WebSearch
14
+ - AskUserQuestion
15
+ - mcp__context7__*
16
+ ---
17
+ <objective>
18
+ Create an AI design contract (AI-SPEC.md) for a phase involving AI system development.
19
+ Orchestrates sdd-framework-selector → sdd-ai-researcher → sdd-domain-researcher → sdd-eval-planner.
20
+ Flow: Select Framework → Research Docs → Research Domain → Design Eval Strategy → Done
21
+ </objective>
22
+
23
+ <execution_context>
24
+ @~/.claude/sdd/workflows/ai-integration-phase.md
25
+ @~/.claude/sdd/references/ai-frameworks.md
26
+ @~/.claude/sdd/references/ai-evals.md
27
+ </execution_context>
28
+
29
+ <context>
30
+ Phase number: $ARGUMENTS — optional, auto-detects next unplanned phase if omitted.
31
+ </context>
32
+
33
+ <process>
34
+ Execute @~/.claude/sdd/workflows/ai-integration-phase.md end-to-end.
35
+ Preserve all workflow gates.
36
+ </process>
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: sdd:analyze-dependencies
3
+ description: Analyze phase dependencies and suggest Depends on entries for ROADMAP.md
4
+ allowed-tools:
5
+ - Read
6
+ - Write
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - AskUserQuestion
11
+ ---
12
+ <objective>
13
+ Analyze the phase dependency graph for the current milestone. For each phase pair, determine if there is a dependency relationship based on:
14
+ - File overlap (phases that modify the same files must be ordered)
15
+ - Semantic dependencies (a phase that uses an API built by another phase)
16
+ - Data flow (a phase that consumes output from another phase)
17
+
18
+ Then suggest `Depends on` updates to ROADMAP.md.
19
+ </objective>
20
+
21
+ <execution_context>
22
+ @~/.claude/sdd/workflows/analyze-dependencies.md
23
+ </execution_context>
24
+
25
+ <context>
26
+ No arguments required. Requires an active milestone with ROADMAP.md.
27
+
28
+ Run this command BEFORE `/sdd-manager` to fill in missing `Depends on` fields and prevent merge conflicts from unordered parallel execution.
29
+ </context>
30
+
31
+ <process>
32
+ Execute the analyze-dependencies workflow from @~/.claude/sdd/workflows/analyze-dependencies.md end-to-end.
33
+ Present dependency suggestions clearly and apply confirmed updates to ROADMAP.md.
34
+ </process>
@@ -0,0 +1,33 @@
1
+ ---
2
+ type: prompt
3
+ name: sdd:audit-fix
4
+ description: Autonomous audit-to-fix pipeline — find issues, classify, fix, test, commit
5
+ argument-hint: "--source <audit-uat> [--severity <medium|high|all>] [--max N] [--dry-run]"
6
+ allowed-tools:
7
+ - Read
8
+ - Write
9
+ - Edit
10
+ - Bash
11
+ - Grep
12
+ - Glob
13
+ - Agent
14
+ - AskUserQuestion
15
+ ---
16
+ <objective>
17
+ Run an audit, classify findings as auto-fixable vs manual-only, then autonomously fix
18
+ auto-fixable issues with test verification and atomic commits.
19
+
20
+ Flags:
21
+ - `--max N` — maximum findings to fix (default: 5)
22
+ - `--severity high|medium|all` — minimum severity to process (default: medium)
23
+ - `--dry-run` — classify findings without fixing (shows classification table)
24
+ - `--source <audit>` — which audit to run (default: audit-uat)
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @~/.claude/sdd/workflows/audit-fix.md
29
+ </execution_context>
30
+
31
+ <process>
32
+ Execute the audit-fix workflow from @~/.claude/sdd/workflows/audit-fix.md end-to-end.
33
+ </process>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: sdd:autonomous
3
3
  description: Run all remaining phases autonomously — discuss→plan→execute per phase
4
- argument-hint: "[--from N]"
4
+ argument-hint: "[--from N] [--to N] [--only N] [--interactive]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -10,6 +10,7 @@ allowed-tools:
10
10
  - Grep
11
11
  - AskUserQuestion
12
12
  - Task
13
+ - Agent
13
14
  ---
14
15
  <objective>
15
16
  Execute all remaining milestone phases autonomously. For each phase: discuss → plan → execute. Pauses only for user decisions (grey area acceptance, blockers, validation requests).
@@ -30,7 +31,11 @@ Uses ROADMAP.md phase discovery and Skill() flat invocations for each phase comm
30
31
  </execution_context>
31
32
 
32
33
  <context>
33
- Optional flag: `--from N` — start from phase N instead of the first incomplete phase.
34
+ Optional flags:
35
+ - `--from N` — start from phase N instead of the first incomplete phase.
36
+ - `--to N` — stop after phase N completes (halt instead of advancing to next phase).
37
+ - `--only N` — execute only phase N (single-phase mode).
38
+ - `--interactive` — run discuss inline with questions (not auto-answered), then dispatch plan→execute as background agents. Keeps the main context lean while preserving user input on decisions.
34
39
 
35
40
  Project context, phase list, and state are resolved inside the workflow using init commands (`sdd-tools.cjs init milestone-op`, `sdd-tools.cjs roadmap analyze`). No upfront context loading needed.
36
41
  </context>
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  name: sdd:cleanup
3
3
  description: Archive accumulated phase directories from completed milestones
4
+ allowed-tools:
5
+ - Read
6
+ - Write
7
+ - Bash
8
+ - AskUserQuestion
4
9
  ---
5
10
  <objective>
6
11
  Archive phase directories from completed milestones into `.planning/milestones/v{X.Y}-phases/`.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: sdd:code-review-fix
3
+ description: Auto-fix issues found by code review in REVIEW.md. Spawns fixer agent, commits each fix atomically, produces REVIEW-FIX.md summary.
4
+ argument-hint: "<phase-number> [--all] [--auto]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Edit
12
+ - Task
13
+ ---
14
+ <objective>
15
+ Auto-fix issues found by code review. Reads REVIEW.md from the specified phase, spawns sdd-code-fixer agent to apply fixes, and produces REVIEW-FIX.md summary.
16
+
17
+ Arguments:
18
+ - Phase number (required) — which phase's REVIEW.md to fix (e.g., "2" or "02")
19
+ - `--all` (optional) — include Info findings in fix scope (default: Critical + Warning only)
20
+ - `--auto` (optional) — enable fix + re-review iteration loop, capped at 3 iterations
21
+
22
+ Output: {padded_phase}-REVIEW-FIX.md in phase directory + inline summary of fixes applied
23
+ </objective>
24
+
25
+ <execution_context>
26
+ @~/.claude/sdd/workflows/code-review-fix.md
27
+ </execution_context>
28
+
29
+ <context>
30
+ Phase: $ARGUMENTS (first positional argument is phase number)
31
+
32
+ Optional flags parsed from $ARGUMENTS:
33
+ - `--all` — Include Info findings in fix scope. Default behavior fixes Critical + Warning only.
34
+ - `--auto` — Enable fix + re-review iteration loop. After applying fixes, re-run code-review at same depth. If new issues found, iterate. Cap at 3 iterations total. Without this flag, single fix pass only.
35
+
36
+ Context files (CLAUDE.md, REVIEW.md, phase state) are resolved inside the workflow via `sdd-tools init phase-op` and delegated to agent via config blocks.
37
+ </context>
38
+
39
+ <process>
40
+ This command is a thin dispatch layer. It parses arguments and delegates to the workflow.
41
+
42
+ Execute the code-review-fix workflow from @~/.claude/sdd/workflows/code-review-fix.md end-to-end.
43
+
44
+ The workflow (not this command) enforces these gates:
45
+ - Phase validation (before config gate)
46
+ - Config gate check (workflow.code_review)
47
+ - REVIEW.md existence check (error if missing)
48
+ - REVIEW.md status check (skip if clean/skipped)
49
+ - Agent spawning (sdd-code-fixer)
50
+ - Iteration loop (if --auto, capped at 3 iterations)
51
+ - Result presentation (inline summary + next steps)
52
+ </process>
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: sdd:code-review
3
+ description: Review source files changed during a phase for bugs, security issues, and code quality problems
4
+ argument-hint: "<phase-number> [--depth=quick|standard|deep] [--files file1,file2,...]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Task
12
+ ---
13
+ <objective>
14
+ Review source files changed during a phase for bugs, security vulnerabilities, and code quality problems.
15
+
16
+ Spawns the sdd-code-reviewer agent to analyze code at the specified depth level. Produces REVIEW.md artifact in the phase directory with severity-classified findings.
17
+
18
+ Arguments:
19
+ - Phase number (required) — which phase's changes to review (e.g., "2" or "02")
20
+ - `--depth=quick|standard|deep` (optional) — review depth level, overrides workflow.code_review_depth config
21
+ - quick: Pattern-matching only (~2 min)
22
+ - standard: Per-file analysis with language-specific checks (~5-15 min, default)
23
+ - deep: Cross-file analysis including import graphs and call chains (~15-30 min)
24
+ - `--files file1,file2,...` (optional) — explicit comma-separated file list, skips SUMMARY/git scoping (highest precedence for scoping)
25
+
26
+ Output: {padded_phase}-REVIEW.md in phase directory + inline summary of findings
27
+ </objective>
28
+
29
+ <execution_context>
30
+ @~/.claude/sdd/workflows/code-review.md
31
+ </execution_context>
32
+
33
+ <context>
34
+ Phase: $ARGUMENTS (first positional argument is phase number)
35
+
36
+ Optional flags parsed from $ARGUMENTS:
37
+ - `--depth=VALUE` — Depth override (quick|standard|deep). If provided, overrides workflow.code_review_depth config.
38
+ - `--files=file1,file2,...` — Explicit file list override. Has highest precedence for file scoping per D-08. When provided, workflow skips SUMMARY.md extraction and git diff fallback entirely.
39
+
40
+ Context files (CLAUDE.md, SUMMARY.md, phase state) are resolved inside the workflow via `sdd-tools init phase-op` and delegated to agent via `<files_to_read>` blocks.
41
+ </context>
42
+
43
+ <process>
44
+ This command is a thin dispatch layer. It parses arguments and delegates to the workflow.
45
+
46
+ Execute the code-review workflow from @~/.claude/sdd/workflows/code-review.md end-to-end.
47
+
48
+ The workflow (not this command) enforces these gates:
49
+ - Phase validation (before config gate)
50
+ - Config gate check (workflow.code_review)
51
+ - File scoping (--files override > SUMMARY.md > git diff fallback)
52
+ - Empty scope check (skip if no files)
53
+ - Agent spawning (sdd-code-reviewer)
54
+ - Result presentation (inline summary + next steps)
55
+ </process>
@@ -42,19 +42,19 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
42
42
  0. **Check for audit:**
43
43
 
44
44
  - Look for `.planning/v{{version}}-MILESTONE-AUDIT.md`
45
- - If missing or stale: recommend `/sdd:audit-milestone` first
46
- - If audit status is `gaps_found`: recommend `/sdd:plan-milestone-gaps` first
45
+ - If missing or stale: recommend `/sdd-audit-milestone` first
46
+ - If audit status is `gaps_found`: recommend `/sdd-plan-milestone-gaps` first
47
47
  - If audit status is `passed`: proceed to step 1
48
48
 
49
49
  ```markdown
50
50
  ## Pre-flight Check
51
51
 
52
52
  {If no v{{version}}-MILESTONE-AUDIT.md:}
53
- ⚠ No milestone audit found. Run `/sdd:audit-milestone` first to verify
53
+ ⚠ No milestone audit found. Run `/sdd-audit-milestone` first to verify
54
54
  requirements coverage, cross-phase integration, and E2E flows.
55
55
 
56
56
  {If audit has gaps:}
57
- ⚠ Milestone audit found gaps. Run `/sdd:plan-milestone-gaps` to create
57
+ ⚠ Milestone audit found gaps. Run `/sdd-plan-milestone-gaps` to create
58
58
  phases that close the gaps, or proceed anyway to accept as tech debt.
59
59
 
60
60
  {If audit passed:}
@@ -108,7 +108,7 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
108
108
  - Ask about pushing tag
109
109
 
110
110
  8. **Offer next steps:**
111
- - `/sdd:new-milestone` — start next milestone (questioning → research → requirements → roadmap)
111
+ - `/sdd-new-milestone` — start next milestone (questioning → research → requirements → roadmap)
112
112
 
113
113
  </process>
114
114
 
@@ -132,5 +132,5 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
132
132
  - **Archive before deleting:** Always create archive files before updating/deleting originals
133
133
  - **One-line summary:** Collapsed milestone in ROADMAP.md should be single line with link
134
134
  - **Context efficiency:** Archive keeps ROADMAP.md and REQUIREMENTS.md constant size per milestone
135
- - **Fresh requirements:** Next milestone starts with `/sdd:new-milestone` which includes requirements definition
135
+ - **Fresh requirements:** Next milestone starts with `/sdd-new-milestone` which includes requirements definition
136
136
  </critical_rules>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: sdd:debug
3
3
  description: Systematic debugging with persistent state across context resets
4
- argument-hint: [issue description]
4
+ argument-hint: [--diagnose] [issue description]
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Bash
@@ -15,6 +15,9 @@ Debug issues using scientific method with subagent isolation.
15
15
  **Orchestrator role:** Gather symptoms, spawn sdd-debugger agent, handle checkpoints, spawn continuations.
16
16
 
17
17
  **Why subagent:** Investigation burns context fast (reading files, forming hypotheses, testing). Fresh 200k context per investigation. Main context stays lean for user interaction.
18
+
19
+ **Flags:**
20
+ - `--diagnose` — Diagnose only. Find root cause without applying a fix. Returns a structured Root Cause Report. Use when you want to validate the diagnosis before committing to a fix.
18
21
  </objective>
19
22
 
20
23
  <available_agent_types>
@@ -25,6 +28,10 @@ Valid SDD subagent types (use exact names — do not fall back to 'general-purpo
25
28
  <context>
26
29
  User's issue: $ARGUMENTS
27
30
 
31
+ Parse flags from $ARGUMENTS:
32
+ - If `--diagnose` is present, set `diagnose_only=true` and remove the flag from the issue description.
33
+ - Otherwise, `diagnose_only=false`.
34
+
28
35
  Check for active sessions:
29
36
  ```bash
30
37
  ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
@@ -87,7 +94,7 @@ timeline: {timeline}
87
94
 
88
95
  <mode>
89
96
  symptoms_prefilled: true
90
- goal: find_and_fix
97
+ goal: {if diagnose_only: "find_root_cause_only", else: "find_and_fix"}
91
98
  </mode>
92
99
 
93
100
  <debug_file>
@@ -106,12 +113,18 @@ Task(
106
113
 
107
114
  ## 4. Handle Agent Return
108
115
 
109
- **If `## ROOT CAUSE FOUND`:**
110
- - Display root cause and evidence summary
116
+ **If `## ROOT CAUSE FOUND` (diagnose-only mode):**
117
+ - Display root cause, confidence level, files involved, and suggested fix strategies
118
+ - Offer options:
119
+ - "Fix now" — spawn a continuation agent with `goal: find_and_fix` to apply the fix (see step 5)
120
+ - "Plan fix" — suggest `/sdd-plan-phase --gaps`
121
+ - "Manual fix" — done
122
+
123
+ **If `## DEBUG COMPLETE` (find_and_fix mode):**
124
+ - Display root cause and fix summary
111
125
  - Offer options:
112
- - "Fix now" - spawn fix subagent
113
- - "Plan fix" - suggest /sdd:plan-phase --gaps
114
- - "Manual fix" - done
126
+ - "Plan fix" — suggest `/sdd-plan-phase --gaps` if further work needed
127
+ - "Done" mark resolved
115
128
 
116
129
  **If `## CHECKPOINT REACHED`:**
117
130
  - Present checkpoint details to user
@@ -128,9 +141,9 @@ Task(
128
141
  - "Manual investigation" - done
129
142
  - "Add more context" - gather more symptoms, spawn again
130
143
 
131
- ## 5. Spawn Continuation Agent (After Checkpoint)
144
+ ## 5. Spawn Continuation Agent (After Checkpoint or "Fix now")
132
145
 
133
- When user responds to checkpoint, spawn fresh agent:
146
+ When user responds to checkpoint OR selects "Fix now" from diagnose-only results, spawn fresh agent:
134
147
 
135
148
  ```markdown
136
149
  <objective>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: sdd:discuss-phase
3
- description: Gather phase context through adaptive questioning before planning. Use --auto to skip interactive questions (Claude picks recommended defaults).
4
- argument-hint: "<phase> [--auto] [--batch] [--analyze] [--text]"
3
+ description: Gather phase context through adaptive questioning before planning. Use --auto to skip interactive questions (Claude picks recommended defaults). Use --chain for interactive discuss followed by automatic plan+execute. Use --power for bulk question generation into a file-based UI (answer at your own pace).
4
+ argument-hint: "<phase> [--auto] [--chain] [--batch] [--analyze] [--text] [--power]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -31,9 +31,14 @@ Extract implementation decisions that downstream agents need — researcher and
31
31
  <execution_context>
32
32
  @~/.claude/sdd/workflows/discuss-phase.md
33
33
  @~/.claude/sdd/workflows/discuss-phase-assumptions.md
34
+ @~/.claude/sdd/workflows/discuss-phase-power.md
34
35
  @~/.claude/sdd/templates/context.md
35
36
  </execution_context>
36
37
 
38
+ <runtime_note>
39
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `AskUserQuestion`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API.
40
+ </runtime_note>
41
+
37
42
  <context>
38
43
  Phase number: $ARGUMENTS (required)
39
44
 
@@ -12,7 +12,7 @@ Analyze freeform natural language input and dispatch to the most appropriate SDD
12
12
 
13
13
  Acts as a smart dispatcher — never does the work itself. Matches intent to the best SDD command using routing rules, confirms the match, then hands off.
14
14
 
15
- Use when you know what you want but don't know which `/sdd:*` command to run.
15
+ Use when you know what you want but don't know which `/sdd-*` command to run.
16
16
  </objective>
17
17
 
18
18
  <execution_context>
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: sdd:docs-update
3
+ description: Generate or update project documentation verified against the codebase
4
+ argument-hint: "[--force] [--verify-only]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Task
13
+ - AskUserQuestion
14
+ ---
15
+ <objective>
16
+ Generate and update up to 9 documentation files for the current project. Each doc type is written by a sdd-doc-writer subagent that explores the codebase directly — no hallucinated paths, phantom endpoints, or stale signatures.
17
+
18
+ Flag handling rule:
19
+ - The optional flags documented below are available behaviors, not implied active behaviors
20
+ - A flag is active only when its literal token appears in `$ARGUMENTS`
21
+ - If a documented flag is absent from `$ARGUMENTS`, treat it as inactive
22
+ - `--force`: skip preservation prompts, regenerate all docs regardless of existing content or SDD markers
23
+ - `--verify-only`: check existing docs for accuracy against codebase, no generation (full verification requires Phase 4 verifier)
24
+ - If `--force` and `--verify-only` both appear in `$ARGUMENTS`, `--force` takes precedence
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @~/.claude/sdd/workflows/docs-update.md
29
+ </execution_context>
30
+
31
+ <context>
32
+ Arguments: $ARGUMENTS
33
+
34
+ **Available optional flags (documentation only — not automatically active):**
35
+ - `--force` — Regenerate all docs. Overwrites hand-written and SDD docs alike. No preservation prompts.
36
+ - `--verify-only` — Check existing docs for accuracy against the codebase. No files are written. Reports VERIFY marker count. Full codebase fact-checking requires the sdd-doc-verifier agent (Phase 4).
37
+
38
+ **Active flags must be derived from `$ARGUMENTS`:**
39
+ - `--force` is active only if the literal `--force` token is present in `$ARGUMENTS`
40
+ - `--verify-only` is active only if the literal `--verify-only` token is present in `$ARGUMENTS`
41
+ - If neither token appears, run the standard full-phase generation flow
42
+ - Do not infer that a flag is active just because it is documented in this prompt
43
+ </context>
44
+
45
+ <process>
46
+ Execute the docs-update workflow from @~/.claude/sdd/workflows/docs-update.md end-to-end.
47
+ Preserve all workflow gates (preservation_check, flag handling, wave execution, monorepo dispatch, commit, reporting).
48
+ </process>
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: sdd:eval-review
3
+ description: Retroactively audit an executed AI phase's evaluation coverage — scores each eval dimension as COVERED/PARTIAL/MISSING and produces an actionable EVAL-REVIEW.md with remediation plan
4
+ argument-hint: "[phase number]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Task
12
+ - AskUserQuestion
13
+ ---
14
+ <objective>
15
+ Conduct a retroactive evaluation coverage audit of a completed AI phase.
16
+ Checks whether the evaluation strategy from AI-SPEC.md was implemented.
17
+ Produces EVAL-REVIEW.md with score, verdict, gaps, and remediation plan.
18
+ </objective>
19
+
20
+ <execution_context>
21
+ @~/.claude/sdd/workflows/eval-review.md
22
+ @~/.claude/sdd/references/ai-evals.md
23
+ </execution_context>
24
+
25
+ <context>
26
+ Phase: $ARGUMENTS — optional, defaults to last completed phase.
27
+ </context>
28
+
29
+ <process>
30
+ Execute @~/.claude/sdd/workflows/eval-review.md end-to-end.
31
+ Preserve all workflow gates.
32
+ </process>
@@ -35,6 +35,10 @@ Context budget: ~15% orchestrator, 100% fresh per subagent.
35
35
  @~/.claude/sdd/references/ui-brand.md
36
36
  </execution_context>
37
37
 
38
+ <runtime_note>
39
+ **Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `AskUserQuestion`. They are equivalent — `vscode_askquestions` is the VS Code Copilot implementation of the same interactive question API.
40
+ </runtime_note>
41
+
38
42
  <context>
39
43
  Phase: $ARGUMENTS
40
44
 
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: sdd:explore
3
+ description: Socratic ideation and idea routing — think through ideas before committing to plans
4
+ allowed-tools:
5
+ - Read
6
+ - Write
7
+ - Bash
8
+ - Grep
9
+ - Glob
10
+ - Task
11
+ - AskUserQuestion
12
+ ---
13
+ <objective>
14
+ Open-ended Socratic ideation session. Guides the developer through exploring an idea via
15
+ probing questions, optionally spawns research, then routes outputs to the appropriate SDD
16
+ artifacts (notes, todos, seeds, research questions, requirements, or new phases).
17
+
18
+ Accepts an optional topic argument: `/sdd-explore authentication strategy`
19
+ </objective>
20
+
21
+ <execution_context>
22
+ @~/.claude/sdd/workflows/explore.md
23
+ </execution_context>
24
+
25
+ <process>
26
+ Execute the explore workflow from @~/.claude/sdd/workflows/explore.md end-to-end.
27
+ </process>
@@ -16,8 +16,8 @@ Execute a trivial task directly in the current context without spawning subagent
16
16
  or generating PLAN.md files. For tasks too small to justify planning overhead:
17
17
  typo fixes, config changes, small refactors, forgotten commits, simple additions.
18
18
 
19
- This is NOT a replacement for /sdd:quick — use /sdd:quick for anything that
20
- needs research, multi-step planning, or verification. /sdd:fast is for tasks
19
+ This is NOT a replacement for /sdd-quick — use /sdd-quick for anything that
20
+ needs research, multi-step planning, or verification. /sdd-fast is for tasks
21
21
  you could describe in one sentence and execute in under 2 minutes.
22
22
  </objective>
23
23
 
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: sdd:from-sdd2
3
+ description: Import a SDD-2 (.sdd/) project back to SDD v1 (.planning/) format
4
+ argument-hint: "[--path <dir>] [--force]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ type: prompt
10
+ ---
11
+
12
+ <objective>
13
+ Reverse-migrate a SDD-2 project (`.sdd/` directory) back to SDD v1 (`.planning/`) format.
14
+
15
+ Maps the SDD-2 hierarchy (Milestone → Slice → Task) to the SDD v1 hierarchy (Milestone sections in ROADMAP.md → Phase → Plan), preserving completion state, research files, and summaries.
16
+ </objective>
17
+
18
+ <process>
19
+
20
+ 1. **Locate the .sdd/ directory** — check the current working directory (or `--path` argument):
21
+ ```bash
22
+ node "$HOME/.claude/sdd/bin/sdd-tools.cjs" from-sdd2 --dry-run
23
+ ```
24
+ If no `.sdd/` is found, report the error and stop.
25
+
26
+ 2. **Show the dry-run preview** — present the full file list and migration statistics to the user. Ask for confirmation before writing anything.
27
+
28
+ 3. **Run the migration** after confirmation:
29
+ ```bash
30
+ node "$HOME/.claude/sdd/bin/sdd-tools.cjs" from-sdd2
31
+ ```
32
+ Use `--force` if `.planning/` already exists and the user has confirmed overwrite.
33
+
34
+ 4. **Report the result** — show the `filesWritten` count, `planningDir` path, and the preview summary.
35
+
36
+ </process>
37
+
38
+ <notes>
39
+ - The migration is non-destructive: `.sdd/` is never modified or removed.
40
+ - Pass `--path <dir>` to migrate a project at a different path than the current directory.
41
+ - Slices are numbered sequentially across all milestones (M001/S01 → phase 01, M001/S02 → phase 02, M002/S01 → phase 03, etc.).
42
+ - Tasks within each slice become plans (T01 → plan 01, T02 → plan 02, etc.).
43
+ - Completed slices and tasks carry their done state into ROADMAP.md checkboxes and SUMMARY.md files.
44
+ - SDD-2 cost/token ledger, database state, and VS Code extension state cannot be migrated.
45
+ </notes>
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: sdd:help
3
3
  description: Show available SDD commands and usage guide
4
+ allowed-tools:
5
+ - Read
4
6
  ---
5
7
  <objective>
6
8
  Display the complete SDD command reference.