@bhargavvc/sdd-cc 1.30.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 (227) hide show
  1. package/LICENSE +21 -0
  2. package/README.ja-JP.md +834 -0
  3. package/README.ko-KR.md +823 -0
  4. package/README.md +846 -0
  5. package/README.pt-BR.md +452 -0
  6. package/README.zh-CN.md +800 -0
  7. package/agents/sdd-advisor-researcher.md +104 -0
  8. package/agents/sdd-assumptions-analyzer.md +105 -0
  9. package/agents/sdd-codebase-mapper.md +770 -0
  10. package/agents/sdd-debugger.md +1373 -0
  11. package/agents/sdd-executor.md +509 -0
  12. package/agents/sdd-integration-checker.md +443 -0
  13. package/agents/sdd-nyquist-auditor.md +176 -0
  14. package/agents/sdd-phase-researcher.md +698 -0
  15. package/agents/sdd-plan-checker.md +773 -0
  16. package/agents/sdd-planner.md +1354 -0
  17. package/agents/sdd-project-researcher.md +654 -0
  18. package/agents/sdd-research-synthesizer.md +247 -0
  19. package/agents/sdd-roadmapper.md +679 -0
  20. package/agents/sdd-ui-auditor.md +439 -0
  21. package/agents/sdd-ui-checker.md +300 -0
  22. package/agents/sdd-ui-researcher.md +357 -0
  23. package/agents/sdd-user-profiler.md +171 -0
  24. package/agents/sdd-verifier.md +700 -0
  25. package/bin/install.js +5009 -0
  26. package/commands/sdd/add-backlog.md +76 -0
  27. package/commands/sdd/add-phase.md +43 -0
  28. package/commands/sdd/add-tests.md +41 -0
  29. package/commands/sdd/add-todo.md +47 -0
  30. package/commands/sdd/audit-milestone.md +36 -0
  31. package/commands/sdd/audit-uat.md +24 -0
  32. package/commands/sdd/autonomous.md +41 -0
  33. package/commands/sdd/check-todos.md +45 -0
  34. package/commands/sdd/cleanup.md +18 -0
  35. package/commands/sdd/complete-milestone.md +136 -0
  36. package/commands/sdd/debug.md +173 -0
  37. package/commands/sdd/discuss-phase.md +64 -0
  38. package/commands/sdd/do.md +30 -0
  39. package/commands/sdd/execute-phase.md +59 -0
  40. package/commands/sdd/fast.md +30 -0
  41. package/commands/sdd/forensics.md +56 -0
  42. package/commands/sdd/health.md +22 -0
  43. package/commands/sdd/help.md +22 -0
  44. package/commands/sdd/insert-phase.md +32 -0
  45. package/commands/sdd/join-discord.md +18 -0
  46. package/commands/sdd/list-phase-assumptions.md +46 -0
  47. package/commands/sdd/list-workspaces.md +19 -0
  48. package/commands/sdd/manager.md +39 -0
  49. package/commands/sdd/map-codebase.md +71 -0
  50. package/commands/sdd/milestone-summary.md +51 -0
  51. package/commands/sdd/new-milestone.md +44 -0
  52. package/commands/sdd/new-project.md +42 -0
  53. package/commands/sdd/new-workspace.md +44 -0
  54. package/commands/sdd/next.md +24 -0
  55. package/commands/sdd/note.md +34 -0
  56. package/commands/sdd/pause-work.md +38 -0
  57. package/commands/sdd/plan-milestone-gaps.md +34 -0
  58. package/commands/sdd/plan-phase.md +47 -0
  59. package/commands/sdd/plant-seed.md +28 -0
  60. package/commands/sdd/pr-branch.md +25 -0
  61. package/commands/sdd/profile-user.md +46 -0
  62. package/commands/sdd/progress.md +24 -0
  63. package/commands/sdd/quick.md +47 -0
  64. package/commands/sdd/reapply-patches.md +123 -0
  65. package/commands/sdd/remove-phase.md +31 -0
  66. package/commands/sdd/remove-workspace.md +26 -0
  67. package/commands/sdd/research-phase.md +195 -0
  68. package/commands/sdd/resume-work.md +40 -0
  69. package/commands/sdd/review-backlog.md +61 -0
  70. package/commands/sdd/review.md +37 -0
  71. package/commands/sdd/session-report.md +19 -0
  72. package/commands/sdd/set-profile.md +12 -0
  73. package/commands/sdd/settings.md +36 -0
  74. package/commands/sdd/ship.md +23 -0
  75. package/commands/sdd/stats.md +18 -0
  76. package/commands/sdd/thread.md +127 -0
  77. package/commands/sdd/ui-phase.md +34 -0
  78. package/commands/sdd/ui-review.md +32 -0
  79. package/commands/sdd/update.md +37 -0
  80. package/commands/sdd/validate-phase.md +35 -0
  81. package/commands/sdd/verify-work.md +38 -0
  82. package/commands/sdd/workstreams.md +63 -0
  83. package/hooks/dist/sdd-check-update.js +114 -0
  84. package/hooks/dist/sdd-context-monitor.js +156 -0
  85. package/hooks/dist/sdd-prompt-guard.js +96 -0
  86. package/hooks/dist/sdd-statusline.js +119 -0
  87. package/hooks/dist/sdd-workflow-guard.js +94 -0
  88. package/package.json +55 -0
  89. package/scripts/base64-scan.sh +262 -0
  90. package/scripts/build-hooks.js +82 -0
  91. package/scripts/prompt-injection-scan.sh +198 -0
  92. package/scripts/rebrand-gsd-to-sdd.sh +220 -0
  93. package/scripts/run-tests.cjs +29 -0
  94. package/scripts/secret-scan.sh +227 -0
  95. package/scripts/sync-upstream.sh +56 -0
  96. package/sdd/bin/lib/commands.cjs +959 -0
  97. package/sdd/bin/lib/config.cjs +442 -0
  98. package/sdd/bin/lib/core.cjs +1230 -0
  99. package/sdd/bin/lib/frontmatter.cjs +336 -0
  100. package/sdd/bin/lib/init.cjs +1442 -0
  101. package/sdd/bin/lib/milestone.cjs +252 -0
  102. package/sdd/bin/lib/model-profiles.cjs +68 -0
  103. package/sdd/bin/lib/phase.cjs +888 -0
  104. package/sdd/bin/lib/profile-output.cjs +952 -0
  105. package/sdd/bin/lib/profile-pipeline.cjs +539 -0
  106. package/sdd/bin/lib/roadmap.cjs +329 -0
  107. package/sdd/bin/lib/security.cjs +382 -0
  108. package/sdd/bin/lib/state.cjs +1031 -0
  109. package/sdd/bin/lib/template.cjs +222 -0
  110. package/sdd/bin/lib/uat.cjs +282 -0
  111. package/sdd/bin/lib/verify.cjs +888 -0
  112. package/sdd/bin/lib/workstream.cjs +491 -0
  113. package/sdd/bin/sdd-tools.cjs +918 -0
  114. package/sdd/commands/sdd/workstreams.md +63 -0
  115. package/sdd/references/checkpoints.md +778 -0
  116. package/sdd/references/continuation-format.md +249 -0
  117. package/sdd/references/decimal-phase-calculation.md +64 -0
  118. package/sdd/references/git-integration.md +295 -0
  119. package/sdd/references/git-planning-commit.md +38 -0
  120. package/sdd/references/model-profile-resolution.md +36 -0
  121. package/sdd/references/model-profiles.md +139 -0
  122. package/sdd/references/phase-argument-parsing.md +61 -0
  123. package/sdd/references/planning-config.md +202 -0
  124. package/sdd/references/questioning.md +162 -0
  125. package/sdd/references/tdd.md +263 -0
  126. package/sdd/references/ui-brand.md +160 -0
  127. package/sdd/references/user-profiling.md +681 -0
  128. package/sdd/references/verification-patterns.md +612 -0
  129. package/sdd/references/workstream-flag.md +58 -0
  130. package/sdd/templates/DEBUG.md +164 -0
  131. package/sdd/templates/UAT.md +265 -0
  132. package/sdd/templates/UI-SPEC.md +100 -0
  133. package/sdd/templates/VALIDATION.md +76 -0
  134. package/sdd/templates/claude-md.md +122 -0
  135. package/sdd/templates/codebase/architecture.md +255 -0
  136. package/sdd/templates/codebase/concerns.md +310 -0
  137. package/sdd/templates/codebase/conventions.md +307 -0
  138. package/sdd/templates/codebase/integrations.md +280 -0
  139. package/sdd/templates/codebase/stack.md +186 -0
  140. package/sdd/templates/codebase/structure.md +285 -0
  141. package/sdd/templates/codebase/testing.md +480 -0
  142. package/sdd/templates/config.json +44 -0
  143. package/sdd/templates/context.md +352 -0
  144. package/sdd/templates/continue-here.md +78 -0
  145. package/sdd/templates/copilot-instructions.md +7 -0
  146. package/sdd/templates/debug-subagent-prompt.md +91 -0
  147. package/sdd/templates/dev-preferences.md +21 -0
  148. package/sdd/templates/discovery.md +146 -0
  149. package/sdd/templates/discussion-log.md +63 -0
  150. package/sdd/templates/milestone-archive.md +123 -0
  151. package/sdd/templates/milestone.md +115 -0
  152. package/sdd/templates/phase-prompt.md +610 -0
  153. package/sdd/templates/planner-subagent-prompt.md +117 -0
  154. package/sdd/templates/project.md +186 -0
  155. package/sdd/templates/requirements.md +231 -0
  156. package/sdd/templates/research-project/ARCHITECTURE.md +204 -0
  157. package/sdd/templates/research-project/FEATURES.md +147 -0
  158. package/sdd/templates/research-project/PITFALLS.md +200 -0
  159. package/sdd/templates/research-project/STACK.md +120 -0
  160. package/sdd/templates/research-project/SUMMARY.md +170 -0
  161. package/sdd/templates/research.md +552 -0
  162. package/sdd/templates/retrospective.md +54 -0
  163. package/sdd/templates/roadmap.md +202 -0
  164. package/sdd/templates/state.md +176 -0
  165. package/sdd/templates/summary-complex.md +59 -0
  166. package/sdd/templates/summary-minimal.md +41 -0
  167. package/sdd/templates/summary-standard.md +48 -0
  168. package/sdd/templates/summary.md +248 -0
  169. package/sdd/templates/user-profile.md +146 -0
  170. package/sdd/templates/user-setup.md +311 -0
  171. package/sdd/templates/verification-report.md +322 -0
  172. package/sdd/workflows/add-phase.md +112 -0
  173. package/sdd/workflows/add-tests.md +351 -0
  174. package/sdd/workflows/add-todo.md +158 -0
  175. package/sdd/workflows/audit-milestone.md +340 -0
  176. package/sdd/workflows/audit-uat.md +109 -0
  177. package/sdd/workflows/autonomous.md +891 -0
  178. package/sdd/workflows/check-todos.md +177 -0
  179. package/sdd/workflows/cleanup.md +152 -0
  180. package/sdd/workflows/complete-milestone.md +767 -0
  181. package/sdd/workflows/diagnose-issues.md +231 -0
  182. package/sdd/workflows/discovery-phase.md +289 -0
  183. package/sdd/workflows/discuss-phase-assumptions.md +653 -0
  184. package/sdd/workflows/discuss-phase.md +1049 -0
  185. package/sdd/workflows/do.md +104 -0
  186. package/sdd/workflows/execute-phase.md +846 -0
  187. package/sdd/workflows/execute-plan.md +514 -0
  188. package/sdd/workflows/fast.md +105 -0
  189. package/sdd/workflows/forensics.md +265 -0
  190. package/sdd/workflows/health.md +181 -0
  191. package/sdd/workflows/help.md +606 -0
  192. package/sdd/workflows/insert-phase.md +130 -0
  193. package/sdd/workflows/list-phase-assumptions.md +178 -0
  194. package/sdd/workflows/list-workspaces.md +56 -0
  195. package/sdd/workflows/manager.md +362 -0
  196. package/sdd/workflows/map-codebase.md +377 -0
  197. package/sdd/workflows/milestone-summary.md +223 -0
  198. package/sdd/workflows/new-milestone.md +486 -0
  199. package/sdd/workflows/new-project.md +1250 -0
  200. package/sdd/workflows/new-workspace.md +237 -0
  201. package/sdd/workflows/next.md +97 -0
  202. package/sdd/workflows/node-repair.md +92 -0
  203. package/sdd/workflows/note.md +156 -0
  204. package/sdd/workflows/pause-work.md +176 -0
  205. package/sdd/workflows/plan-milestone-gaps.md +273 -0
  206. package/sdd/workflows/plan-phase.md +859 -0
  207. package/sdd/workflows/plant-seed.md +169 -0
  208. package/sdd/workflows/pr-branch.md +129 -0
  209. package/sdd/workflows/profile-user.md +450 -0
  210. package/sdd/workflows/progress.md +507 -0
  211. package/sdd/workflows/quick.md +757 -0
  212. package/sdd/workflows/remove-phase.md +155 -0
  213. package/sdd/workflows/remove-workspace.md +90 -0
  214. package/sdd/workflows/research-phase.md +82 -0
  215. package/sdd/workflows/resume-project.md +326 -0
  216. package/sdd/workflows/review.md +228 -0
  217. package/sdd/workflows/session-report.md +146 -0
  218. package/sdd/workflows/settings.md +283 -0
  219. package/sdd/workflows/ship.md +228 -0
  220. package/sdd/workflows/stats.md +60 -0
  221. package/sdd/workflows/transition.md +671 -0
  222. package/sdd/workflows/ui-phase.md +302 -0
  223. package/sdd/workflows/ui-review.md +165 -0
  224. package/sdd/workflows/update.md +323 -0
  225. package/sdd/workflows/validate-phase.md +174 -0
  226. package/sdd/workflows/verify-phase.md +254 -0
  227. package/sdd/workflows/verify-work.md +637 -0
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: sdd:add-backlog
3
+ description: Add an idea to the backlog parking lot (999.x numbering)
4
+ argument-hint: <description>
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ ---
10
+
11
+ <objective>
12
+ Add a backlog item to the roadmap using 999.x numbering. Backlog items are
13
+ unsequenced ideas that aren't ready for active planning — they live outside
14
+ the normal phase sequence and accumulate context over time.
15
+ </objective>
16
+
17
+ <process>
18
+
19
+ 1. **Read ROADMAP.md** to find existing backlog entries:
20
+ ```bash
21
+ cat .planning/ROADMAP.md
22
+ ```
23
+
24
+ 2. **Find next backlog number:**
25
+ ```bash
26
+ NEXT=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" phase next-decimal 999 --raw)
27
+ ```
28
+ If no 999.x phases exist, start at 999.1.
29
+
30
+ 3. **Create the phase directory:**
31
+ ```bash
32
+ SLUG=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" generate-slug "$ARGUMENTS")
33
+ mkdir -p ".planning/phases/${NEXT}-${SLUG}"
34
+ touch ".planning/phases/${NEXT}-${SLUG}/.gitkeep"
35
+ ```
36
+
37
+ 4. **Add to ROADMAP.md** under a `## Backlog` section. If the section doesn't exist, create it at the end:
38
+
39
+ ```markdown
40
+ ## Backlog
41
+
42
+ ### Phase {NEXT}: {description} (BACKLOG)
43
+
44
+ **Goal:** [Captured for future planning]
45
+ **Requirements:** TBD
46
+ **Plans:** 0 plans
47
+
48
+ Plans:
49
+ - [ ] TBD (promote with /sdd:review-backlog when ready)
50
+ ```
51
+
52
+ 5. **Commit:**
53
+ ```bash
54
+ node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs: add backlog item ${NEXT} — ${ARGUMENTS}" --files .planning/ROADMAP.md ".planning/phases/${NEXT}-${SLUG}/.gitkeep"
55
+ ```
56
+
57
+ 6. **Report:**
58
+ ```
59
+ ## 📋 Backlog Item Added
60
+
61
+ Phase {NEXT}: {description}
62
+ Directory: .planning/phases/{NEXT}-{slug}/
63
+
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.
67
+ ```
68
+
69
+ </process>
70
+
71
+ <notes>
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
74
+ - No `Depends on:` field — backlog items are unsequenced by definition
75
+ - Sparse numbering is fine (999.1, 999.3) — always uses next-decimal
76
+ </notes>
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: sdd:add-phase
3
+ description: Add phase to end of current milestone in roadmap
4
+ argument-hint: <description>
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ ---
10
+
11
+ <objective>
12
+ Add a new integer phase to the end of the current milestone in the roadmap.
13
+
14
+ Routes to the add-phase workflow which handles:
15
+ - Phase number calculation (next sequential integer)
16
+ - Directory creation with slug generation
17
+ - Roadmap structure updates
18
+ - STATE.md roadmap evolution tracking
19
+ </objective>
20
+
21
+ <execution_context>
22
+ @~/.claude/sdd/workflows/add-phase.md
23
+ </execution_context>
24
+
25
+ <context>
26
+ Arguments: $ARGUMENTS (phase description)
27
+
28
+ Roadmap and state are resolved in-workflow via `init phase-op` and targeted tool calls.
29
+ </context>
30
+
31
+ <process>
32
+ **Follow the add-phase workflow** from `@~/.claude/sdd/workflows/add-phase.md`.
33
+
34
+ The workflow handles all logic including:
35
+ 1. Argument parsing and validation
36
+ 2. Roadmap existence checking
37
+ 3. Current milestone identification
38
+ 4. Next phase number calculation (ignoring decimals)
39
+ 5. Slug generation from description
40
+ 6. Phase directory creation
41
+ 7. Roadmap entry insertion
42
+ 8. STATE.md updates
43
+ </process>
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: sdd:add-tests
3
+ description: Generate tests for a completed phase based on UAT criteria and implementation
4
+ argument-hint: "<phase> [additional instructions]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Task
13
+ - AskUserQuestion
14
+ argument-instructions: |
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
18
+ ---
19
+ <objective>
20
+ Generate unit and E2E tests for a completed phase, using its SUMMARY.md, CONTEXT.md, and VERIFICATION.md as specifications.
21
+
22
+ Analyzes implementation files, classifies them into TDD (unit), E2E (browser), or Skip categories, presents a test plan for user approval, then generates tests following RED-GREEN conventions.
23
+
24
+ Output: Test files committed with message `test(phase-{N}): add unit and E2E tests from add-tests command`
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @~/.claude/sdd/workflows/add-tests.md
29
+ </execution_context>
30
+
31
+ <context>
32
+ Phase: $ARGUMENTS
33
+
34
+ @.planning/STATE.md
35
+ @.planning/ROADMAP.md
36
+ </context>
37
+
38
+ <process>
39
+ Execute the add-tests workflow from @~/.claude/sdd/workflows/add-tests.md end-to-end.
40
+ Preserve all workflow gates (classification approval, test plan approval, RED-GREEN verification, gap reporting).
41
+ </process>
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: sdd:add-todo
3
+ description: Capture idea or task as todo from current conversation context
4
+ argument-hint: [optional description]
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ <objective>
13
+ Capture an idea, task, or issue that surfaces during a SDD session as a structured todo for later work.
14
+
15
+ Routes to the add-todo workflow which handles:
16
+ - Directory structure creation
17
+ - Content extraction from arguments or conversation
18
+ - Area inference from file paths
19
+ - Duplicate detection and resolution
20
+ - Todo file creation with frontmatter
21
+ - STATE.md updates
22
+ - Git commits
23
+ </objective>
24
+
25
+ <execution_context>
26
+ @~/.claude/sdd/workflows/add-todo.md
27
+ </execution_context>
28
+
29
+ <context>
30
+ Arguments: $ARGUMENTS (optional todo description)
31
+
32
+ State is resolved in-workflow via `init todos` and targeted reads.
33
+ </context>
34
+
35
+ <process>
36
+ **Follow the add-todo workflow** from `@~/.claude/sdd/workflows/add-todo.md`.
37
+
38
+ The workflow handles all logic including:
39
+ 1. Directory ensuring
40
+ 2. Existing area checking
41
+ 3. Content extraction (arguments or conversation)
42
+ 4. Area inference
43
+ 5. Duplicate checking
44
+ 6. File creation with slug generation
45
+ 7. STATE.md updates
46
+ 8. Git commits
47
+ </process>
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: sdd:audit-milestone
3
+ description: Audit milestone completion against original intent before archiving
4
+ argument-hint: "[version]"
5
+ allowed-tools:
6
+ - Read
7
+ - Glob
8
+ - Grep
9
+ - Bash
10
+ - Task
11
+ - Write
12
+ ---
13
+ <objective>
14
+ Verify milestone achieved its definition of done. Check requirements coverage, cross-phase integration, and end-to-end flows.
15
+
16
+ **This command IS the orchestrator.** Reads existing VERIFICATION.md files (phases already verified during execute-phase), aggregates tech debt and deferred gaps, then spawns integration checker for cross-phase wiring.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ @~/.claude/sdd/workflows/audit-milestone.md
21
+ </execution_context>
22
+
23
+ <context>
24
+ Version: $ARGUMENTS (optional — defaults to current milestone)
25
+
26
+ Core planning files are resolved in-workflow (`init milestone-op`) and loaded only as needed.
27
+
28
+ **Completed Work:**
29
+ Glob: .planning/phases/*/*-SUMMARY.md
30
+ Glob: .planning/phases/*/*-VERIFICATION.md
31
+ </context>
32
+
33
+ <process>
34
+ Execute the audit-milestone workflow from @~/.claude/sdd/workflows/audit-milestone.md end-to-end.
35
+ Preserve all workflow gates (scope determination, verification reading, integration check, requirements coverage, routing).
36
+ </process>
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: sdd:audit-uat
3
+ description: Cross-phase audit of all outstanding UAT and verification items
4
+ allowed-tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ - Bash
9
+ ---
10
+ <objective>
11
+ Scan all phases for pending, skipped, blocked, and human_needed UAT items. Cross-reference against codebase to detect stale documentation. Produce prioritized human test plan.
12
+ </objective>
13
+
14
+ <execution_context>
15
+ @~/.claude/sdd/workflows/audit-uat.md
16
+ </execution_context>
17
+
18
+ <context>
19
+ Core planning files are loaded in-workflow via CLI.
20
+
21
+ **Scope:**
22
+ Glob: .planning/phases/*/*-UAT.md
23
+ Glob: .planning/phases/*/*-VERIFICATION.md
24
+ </context>
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: sdd:autonomous
3
+ description: Run all remaining phases autonomously — discuss→plan→execute per phase
4
+ argument-hint: "[--from N]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - AskUserQuestion
12
+ - Task
13
+ ---
14
+ <objective>
15
+ Execute all remaining milestone phases autonomously. For each phase: discuss → plan → execute. Pauses only for user decisions (grey area acceptance, blockers, validation requests).
16
+
17
+ Uses ROADMAP.md phase discovery and Skill() flat invocations for each phase command. After all phases complete: milestone audit → complete → cleanup.
18
+
19
+ **Creates/Updates:**
20
+ - `.planning/STATE.md` — updated after each phase
21
+ - `.planning/ROADMAP.md` — progress updated after each phase
22
+ - Phase artifacts — CONTEXT.md, PLANs, SUMMARYs per phase
23
+
24
+ **After:** Milestone is complete and cleaned up.
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @~/.claude/sdd/workflows/autonomous.md
29
+ @~/.claude/sdd/references/ui-brand.md
30
+ </execution_context>
31
+
32
+ <context>
33
+ Optional flag: `--from N` — start from phase N instead of the first incomplete phase.
34
+
35
+ 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
+ </context>
37
+
38
+ <process>
39
+ Execute the autonomous workflow from @~/.claude/sdd/workflows/autonomous.md end-to-end.
40
+ Preserve all workflow gates (phase discovery, per-phase execution, blocker handling, progress display).
41
+ </process>
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: sdd:check-todos
3
+ description: List pending todos and select one to work on
4
+ argument-hint: [area filter]
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ <objective>
13
+ List all pending todos, allow selection, load full context for the selected todo, and route to appropriate action.
14
+
15
+ Routes to the check-todos workflow which handles:
16
+ - Todo counting and listing with area filtering
17
+ - Interactive selection with full context loading
18
+ - Roadmap correlation checking
19
+ - Action routing (work now, add to phase, brainstorm, create phase)
20
+ - STATE.md updates and git commits
21
+ </objective>
22
+
23
+ <execution_context>
24
+ @~/.claude/sdd/workflows/check-todos.md
25
+ </execution_context>
26
+
27
+ <context>
28
+ Arguments: $ARGUMENTS (optional area filter)
29
+
30
+ Todo state and roadmap correlation are loaded in-workflow using `init todos` and targeted reads.
31
+ </context>
32
+
33
+ <process>
34
+ **Follow the check-todos workflow** from `@~/.claude/sdd/workflows/check-todos.md`.
35
+
36
+ The workflow handles all logic including:
37
+ 1. Todo existence checking
38
+ 2. Area filtering
39
+ 3. Interactive listing and selection
40
+ 4. Full context loading with file summaries
41
+ 5. Roadmap correlation checking
42
+ 6. Action offering and execution
43
+ 7. STATE.md updates
44
+ 8. Git commits
45
+ </process>
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: sdd:cleanup
3
+ description: Archive accumulated phase directories from completed milestones
4
+ ---
5
+ <objective>
6
+ Archive phase directories from completed milestones into `.planning/milestones/v{X.Y}-phases/`.
7
+
8
+ Use when `.planning/phases/` has accumulated directories from past milestones.
9
+ </objective>
10
+
11
+ <execution_context>
12
+ @~/.claude/sdd/workflows/cleanup.md
13
+ </execution_context>
14
+
15
+ <process>
16
+ Follow the cleanup workflow at @~/.claude/sdd/workflows/cleanup.md.
17
+ Identify completed milestones, show a dry-run summary, and archive on confirmation.
18
+ </process>
@@ -0,0 +1,136 @@
1
+ ---
2
+ type: prompt
3
+ name: sdd:complete-milestone
4
+ description: Archive completed milestone and prepare for next version
5
+ argument-hint: <version>
6
+ allowed-tools:
7
+ - Read
8
+ - Write
9
+ - Bash
10
+ ---
11
+
12
+ <objective>
13
+ Mark milestone {{version}} complete, archive to milestones/, and update ROADMAP.md and REQUIREMENTS.md.
14
+
15
+ Purpose: Create historical record of shipped version, archive milestone artifacts (roadmap + requirements), and prepare for next milestone.
16
+ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tagged.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ **Load these files NOW (before proceeding):**
21
+
22
+ - @~/.claude/sdd/workflows/complete-milestone.md (main workflow)
23
+ - @~/.claude/sdd/templates/milestone-archive.md (archive template)
24
+ </execution_context>
25
+
26
+ <context>
27
+ **Project files:**
28
+ - `.planning/ROADMAP.md`
29
+ - `.planning/REQUIREMENTS.md`
30
+ - `.planning/STATE.md`
31
+ - `.planning/PROJECT.md`
32
+
33
+ **User input:**
34
+
35
+ - Version: {{version}} (e.g., "1.0", "1.1", "2.0")
36
+ </context>
37
+
38
+ <process>
39
+
40
+ **Follow complete-milestone.md workflow:**
41
+
42
+ 0. **Check for audit:**
43
+
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
47
+ - If audit status is `passed`: proceed to step 1
48
+
49
+ ```markdown
50
+ ## Pre-flight Check
51
+
52
+ {If no v{{version}}-MILESTONE-AUDIT.md:}
53
+ ⚠ No milestone audit found. Run `/sdd:audit-milestone` first to verify
54
+ requirements coverage, cross-phase integration, and E2E flows.
55
+
56
+ {If audit has gaps:}
57
+ ⚠ Milestone audit found gaps. Run `/sdd:plan-milestone-gaps` to create
58
+ phases that close the gaps, or proceed anyway to accept as tech debt.
59
+
60
+ {If audit passed:}
61
+ ✓ Milestone audit passed. Proceeding with completion.
62
+ ```
63
+
64
+ 1. **Verify readiness:**
65
+
66
+ - Check all phases in milestone have completed plans (SUMMARY.md exists)
67
+ - Present milestone scope and stats
68
+ - Wait for confirmation
69
+
70
+ 2. **Gather stats:**
71
+
72
+ - Count phases, plans, tasks
73
+ - Calculate git range, file changes, LOC
74
+ - Extract timeline from git log
75
+ - Present summary, confirm
76
+
77
+ 3. **Extract accomplishments:**
78
+
79
+ - Read all phase SUMMARY.md files in milestone range
80
+ - Extract 4-6 key accomplishments
81
+ - Present for approval
82
+
83
+ 4. **Archive milestone:**
84
+
85
+ - Create `.planning/milestones/v{{version}}-ROADMAP.md`
86
+ - Extract full phase details from ROADMAP.md
87
+ - Fill milestone-archive.md template
88
+ - Update ROADMAP.md to one-line summary with link
89
+
90
+ 5. **Archive requirements:**
91
+
92
+ - Create `.planning/milestones/v{{version}}-REQUIREMENTS.md`
93
+ - Mark all v1 requirements as complete (checkboxes checked)
94
+ - Note requirement outcomes (validated, adjusted, dropped)
95
+ - Delete `.planning/REQUIREMENTS.md` (fresh one created for next milestone)
96
+
97
+ 6. **Update PROJECT.md:**
98
+
99
+ - Add "Current State" section with shipped version
100
+ - Add "Next Milestone Goals" section
101
+ - Archive previous content in `<details>` (if v1.1+)
102
+
103
+ 7. **Commit and tag:**
104
+
105
+ - Stage: MILESTONES.md, PROJECT.md, ROADMAP.md, STATE.md, archive files
106
+ - Commit: `chore: archive v{{version}} milestone`
107
+ - Tag: `git tag -a v{{version}} -m "[milestone summary]"`
108
+ - Ask about pushing tag
109
+
110
+ 8. **Offer next steps:**
111
+ - `/sdd:new-milestone` — start next milestone (questioning → research → requirements → roadmap)
112
+
113
+ </process>
114
+
115
+ <success_criteria>
116
+
117
+ - Milestone archived to `.planning/milestones/v{{version}}-ROADMAP.md`
118
+ - Requirements archived to `.planning/milestones/v{{version}}-REQUIREMENTS.md`
119
+ - `.planning/REQUIREMENTS.md` deleted (fresh for next milestone)
120
+ - ROADMAP.md collapsed to one-line entry
121
+ - PROJECT.md updated with current state
122
+ - Git tag v{{version}} created
123
+ - Commit successful
124
+ - User knows next steps (including need for fresh requirements)
125
+ </success_criteria>
126
+
127
+ <critical_rules>
128
+
129
+ - **Load workflow first:** Read complete-milestone.md before executing
130
+ - **Verify completion:** All phases must have SUMMARY.md files
131
+ - **User confirmation:** Wait for approval at verification gates
132
+ - **Archive before deleting:** Always create archive files before updating/deleting originals
133
+ - **One-line summary:** Collapsed milestone in ROADMAP.md should be single line with link
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
136
+ </critical_rules>
@@ -0,0 +1,173 @@
1
+ ---
2
+ name: sdd:debug
3
+ description: Systematic debugging with persistent state across context resets
4
+ argument-hint: [issue description]
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Task
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ <objective>
13
+ Debug issues using scientific method with subagent isolation.
14
+
15
+ **Orchestrator role:** Gather symptoms, spawn sdd-debugger agent, handle checkpoints, spawn continuations.
16
+
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
+ </objective>
19
+
20
+ <available_agent_types>
21
+ Valid SDD subagent types (use exact names — do not fall back to 'general-purpose'):
22
+ - sdd-debugger — Diagnoses and fixes issues
23
+ </available_agent_types>
24
+
25
+ <context>
26
+ User's issue: $ARGUMENTS
27
+
28
+ Check for active sessions:
29
+ ```bash
30
+ ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
31
+ ```
32
+ </context>
33
+
34
+ <process>
35
+
36
+ ## 0. Initialize Context
37
+
38
+ ```bash
39
+ INIT=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" state load)
40
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
41
+ ```
42
+
43
+ Extract `commit_docs` from init JSON. Resolve debugger model:
44
+ ```bash
45
+ debugger_model=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" resolve-model sdd-debugger --raw)
46
+ ```
47
+
48
+ ## 1. Check Active Sessions
49
+
50
+ If active sessions exist AND no $ARGUMENTS:
51
+ - List sessions with status, hypothesis, next action
52
+ - User picks number to resume OR describes new issue
53
+
54
+ If $ARGUMENTS provided OR user describes new issue:
55
+ - Continue to symptom gathering
56
+
57
+ ## 2. Gather Symptoms (if new issue)
58
+
59
+ Use AskUserQuestion for each:
60
+
61
+ 1. **Expected behavior** - What should happen?
62
+ 2. **Actual behavior** - What happens instead?
63
+ 3. **Error messages** - Any errors? (paste or describe)
64
+ 4. **Timeline** - When did this start? Ever worked?
65
+ 5. **Reproduction** - How do you trigger it?
66
+
67
+ After all gathered, confirm ready to investigate.
68
+
69
+ ## 3. Spawn sdd-debugger Agent
70
+
71
+ Fill prompt and spawn:
72
+
73
+ ```markdown
74
+ <objective>
75
+ Investigate issue: {slug}
76
+
77
+ **Summary:** {trigger}
78
+ </objective>
79
+
80
+ <symptoms>
81
+ expected: {expected}
82
+ actual: {actual}
83
+ errors: {errors}
84
+ reproduction: {reproduction}
85
+ timeline: {timeline}
86
+ </symptoms>
87
+
88
+ <mode>
89
+ symptoms_prefilled: true
90
+ goal: find_and_fix
91
+ </mode>
92
+
93
+ <debug_file>
94
+ Create: .planning/debug/{slug}.md
95
+ </debug_file>
96
+ ```
97
+
98
+ ```
99
+ Task(
100
+ prompt=filled_prompt,
101
+ subagent_type="sdd-debugger",
102
+ model="{debugger_model}",
103
+ description="Debug {slug}"
104
+ )
105
+ ```
106
+
107
+ ## 4. Handle Agent Return
108
+
109
+ **If `## ROOT CAUSE FOUND`:**
110
+ - Display root cause and evidence summary
111
+ - Offer options:
112
+ - "Fix now" - spawn fix subagent
113
+ - "Plan fix" - suggest /sdd:plan-phase --gaps
114
+ - "Manual fix" - done
115
+
116
+ **If `## CHECKPOINT REACHED`:**
117
+ - Present checkpoint details to user
118
+ - Get user response
119
+ - If checkpoint type is `human-verify`:
120
+ - If user confirms fixed: continue so agent can finalize/resolve/archive
121
+ - If user reports issues: continue so agent returns to investigation/fixing
122
+ - Spawn continuation agent (see step 5)
123
+
124
+ **If `## INVESTIGATION INCONCLUSIVE`:**
125
+ - Show what was checked and eliminated
126
+ - Offer options:
127
+ - "Continue investigating" - spawn new agent with additional context
128
+ - "Manual investigation" - done
129
+ - "Add more context" - gather more symptoms, spawn again
130
+
131
+ ## 5. Spawn Continuation Agent (After Checkpoint)
132
+
133
+ When user responds to checkpoint, spawn fresh agent:
134
+
135
+ ```markdown
136
+ <objective>
137
+ Continue debugging {slug}. Evidence is in the debug file.
138
+ </objective>
139
+
140
+ <prior_state>
141
+ <files_to_read>
142
+ - .planning/debug/{slug}.md (Debug session state)
143
+ </files_to_read>
144
+ </prior_state>
145
+
146
+ <checkpoint_response>
147
+ **Type:** {checkpoint_type}
148
+ **Response:** {user_response}
149
+ </checkpoint_response>
150
+
151
+ <mode>
152
+ goal: find_and_fix
153
+ </mode>
154
+ ```
155
+
156
+ ```
157
+ Task(
158
+ prompt=continuation_prompt,
159
+ subagent_type="sdd-debugger",
160
+ model="{debugger_model}",
161
+ description="Continue debug {slug}"
162
+ )
163
+ ```
164
+
165
+ </process>
166
+
167
+ <success_criteria>
168
+ - [ ] Active sessions checked
169
+ - [ ] Symptoms gathered (if new)
170
+ - [ ] sdd-debugger spawned with context
171
+ - [ ] Checkpoints handled correctly
172
+ - [ ] Root cause confirmed before fixing
173
+ </success_criteria>