@bhargavvc/sdd-cc 1.30.0 → 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 +2151 -551
  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
@@ -13,7 +13,7 @@ Parse the command arguments:
13
13
  - First argument: integer phase number to insert after
14
14
  - Remaining arguments: phase description
15
15
 
16
- Example: `/sdd:insert-phase 72 Fix critical auth bug`
16
+ Example: `/sdd-insert-phase 72 Fix critical auth bug`
17
17
  -> after = 72
18
18
  -> description = "Fix critical auth bug"
19
19
 
@@ -21,8 +21,8 @@ If arguments missing:
21
21
 
22
22
  ```
23
23
  ERROR: Both phase number and description required
24
- Usage: /sdd:insert-phase <after> <description>
25
- Example: /sdd:insert-phase 72 Fix critical auth bug
24
+ Usage: /sdd-insert-phase <after> <description>
25
+ Example: /sdd-insert-phase 72 Fix critical auth bug
26
26
  ```
27
27
 
28
28
  Exit.
@@ -93,9 +93,9 @@ Project state updated: .planning/STATE.md
93
93
 
94
94
  **Phase {decimal_phase}: {description}** -- urgent insertion
95
95
 
96
- `/sdd:plan-phase {decimal_phase}`
96
+ `/clear` then:
97
97
 
98
- <sub>`/clear` first -> fresh context window</sub>
98
+ `/sdd-plan-phase {decimal_phase}`
99
99
 
100
100
  ---
101
101
 
@@ -111,11 +111,11 @@ Project state updated: .planning/STATE.md
111
111
 
112
112
  <anti_patterns>
113
113
 
114
- - Don't use this for planned work at end of milestone (use /sdd:add-phase)
114
+ - Don't use this for planned work at end of milestone (use /sdd-add-phase)
115
115
  - Don't insert before Phase 1 (decimal 0.1 makes no sense)
116
116
  - Don't renumber existing phases
117
117
  - Don't modify the target phase content
118
- - Don't create plans yet (that's /sdd:plan-phase)
118
+ - Don't create plans yet (that's /sdd-plan-phase)
119
119
  - Don't commit changes (user decides when to commit)
120
120
  </anti_patterns>
121
121
 
@@ -14,8 +14,8 @@ Phase number: $ARGUMENTS (required)
14
14
  ```
15
15
  Error: Phase number required.
16
16
 
17
- Usage: /sdd:list-phase-assumptions [phase-number]
18
- Example: /sdd:list-phase-assumptions 3
17
+ Usage: /sdd-list-phase-assumptions [phase-number]
18
+ Example: /sdd-list-phase-assumptions 3
19
19
  ```
20
20
 
21
21
  Exit workflow.
@@ -153,8 +153,8 @@ Present next steps:
153
153
 
154
154
  ```
155
155
  What's next?
156
- 1. Discuss context (/sdd:discuss-phase ${PHASE}) - Let me ask you questions to build comprehensive context
157
- 2. Plan this phase (/sdd:plan-phase ${PHASE}) - Create detailed execution plans
156
+ 1. Discuss context (/sdd-discuss-phase ${PHASE}) - Let me ask you questions to build comprehensive context
157
+ 2. Plan this phase (/sdd-plan-phase ${PHASE}) - Create detailed execution plans
158
158
  3. Re-examine assumptions - I'll analyze again with your corrections
159
159
  4. Done for now
160
160
  ```
@@ -25,7 +25,7 @@ Parse JSON for: `workspace_base`, `workspaces`, `workspace_count`.
25
25
  No workspaces found in ~/sdd-workspaces/
26
26
 
27
27
  Create one with:
28
- /sdd:new-workspace --name my-workspace --repos repo1,repo2
28
+ /sdd-new-workspace --name my-workspace --repos repo1,repo2
29
29
  ```
30
30
 
31
31
  Done.
@@ -44,7 +44,7 @@ SDD Workspaces (~/sdd-workspaces/)
44
44
 
45
45
  Manage:
46
46
  cd ~/sdd-workspaces/<name> # Enter a workspace
47
- /sdd:remove-workspace <name> # Remove a workspace
47
+ /sdd-remove-workspace <name> # Remove a workspace
48
48
  ```
49
49
 
50
50
  For each workspace, show:
@@ -23,7 +23,14 @@ INIT=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" init manager)
23
23
  if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
24
24
  ```
25
25
 
26
- Parse JSON for: `milestone_version`, `milestone_name`, `phase_count`, `completed_count`, `in_progress_count`, `phases`, `recommended_actions`, `all_complete`, `waiting_signal`.
26
+ Parse JSON for: `milestone_version`, `milestone_name`, `phase_count`, `completed_count`, `in_progress_count`, `phases`, `recommended_actions`, `all_complete`, `waiting_signal`, `manager_flags`.
27
+
28
+ `manager_flags` contains per-step passthrough flags from config:
29
+ - `manager_flags.discuss` — appended to `/sdd-discuss-phase` args (e.g. `"--auto --analyze"`)
30
+ - `manager_flags.plan` — appended to plan agent init command
31
+ - `manager_flags.execute` — appended to execute agent init command
32
+
33
+ These are empty strings by default. Set via: `sdd-tools config-set manager.flags.discuss "--auto --analyze"`
27
34
 
28
35
  **If error:** Display the error message and exit.
29
36
 
@@ -106,17 +113,19 @@ If `all_complete` is true:
106
113
  ╚══════════════════════════════════════════════════════════════╝
107
114
 
108
115
  All {phase_count} phases done. Ready for final steps:
109
- → /sdd:verify-work — run acceptance testing
110
- → /sdd:complete-milestone — archive and wrap up
116
+ → /sdd-verify-work — run acceptance testing
117
+ → /sdd-complete-milestone — archive and wrap up
111
118
  ```
112
119
 
120
+
121
+ **Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
113
122
  Ask user via AskUserQuestion:
114
123
  - **question:** "All phases complete. What next?"
115
124
  - **options:** "Verify work" / "Complete milestone" / "Exit manager"
116
125
 
117
126
  Handle responses:
118
- - "Verify work": `Skill(skill="sdd:verify-work")` then loop to dashboard.
119
- - "Complete milestone": `Skill(skill="sdd:complete-milestone")` then exit.
127
+ - "Verify work": `Skill(skill="sdd-verify-work")` then loop to dashboard.
128
+ - "Complete milestone": `Skill(skill="sdd-complete-milestone")` then exit.
120
129
  - "Exit manager": Go to exit step.
121
130
 
122
131
  **If NOT all_complete**, build compound options from `recommended_actions`:
@@ -193,24 +202,24 @@ When the user selects a compound option:
193
202
  2. **Then run the inline discuss:**
194
203
 
195
204
  ```
196
- Skill(skill="sdd:discuss-phase", args="{PHASE_NUM}")
205
+ Skill(skill="sdd-discuss-phase", args="{PHASE_NUM} {manager_flags.discuss}")
197
206
  ```
198
207
 
199
208
  After discuss completes, loop back to dashboard step (background agents continue running).
200
209
 
201
210
  ### Discuss Phase N
202
211
 
203
- Discussion is interactive — needs user input. Run inline:
212
+ Discussion is interactive — needs user input. Run inline with any configured flags:
204
213
 
205
214
  ```
206
- Skill(skill="sdd:discuss-phase", args="{PHASE_NUM}")
215
+ Skill(skill="sdd-discuss-phase", args="{PHASE_NUM} {manager_flags.discuss}")
207
216
  ```
208
217
 
209
218
  After discuss completes, loop back to dashboard step.
210
219
 
211
220
  ### Plan Phase N
212
221
 
213
- Planning runs autonomously. Spawn a background agent:
222
+ Planning runs autonomously. Spawn a background agent that delegates to the Skill pipeline with any configured flags:
214
223
 
215
224
  ```
216
225
  Task(
@@ -221,17 +230,14 @@ Task(
221
230
  Working directory: {cwd}
222
231
  Phase: {N} — {phase_name}
223
232
  Goal: {goal}
233
+ Manager flags: {manager_flags.plan}
224
234
 
225
- Steps:
226
- 1. Read the plan-phase workflow: cat ~/.claude/sdd/workflows/plan-phase.md
227
- 2. Run: node \"$HOME/.claude/sdd/bin/sdd-tools.cjs\" init plan-phase {N}
228
- 3. Follow the workflow steps to produce PLAN.md files for this phase.
229
- 4. If research is enabled in config, run the research step first.
230
- 5. Spawn a sdd-planner subagent via Task() to create the plans.
231
- 6. If plan-checker is enabled, spawn a sdd-plan-checker subagent to verify.
232
- 7. Commit plan files when complete.
235
+ Run the plan-phase Skill with any configured manager flags:
236
+ Skill(skill=\"sdd-plan-phase\", args=\"{N} --auto {manager_flags.plan}\")
233
237
 
234
- Important: You are running in the background. Do NOT use AskUserQuestion make autonomous decisions based on project context. If you hit a blocker, write it to STATE.md as a blocker and stop. Do NOT silently work around permission or file access errors — let them fail so the manager can surface them with resolution hints."
238
+ This delegates to the full plan-phase pipeline including local patches, research, plan-checker, and all quality gates.
239
+
240
+ Important: You are running in the background. Do NOT use AskUserQuestion — make autonomous decisions based on project context. If you hit a blocker, write it to STATE.md as a blocker and stop. Do NOT silently work around permission or file access errors — let them fail so the manager can surface them with resolution hints. Do NOT use --no-verify on git commits."
235
241
  )
236
242
  ```
237
243
 
@@ -245,7 +251,7 @@ Loop back to dashboard step.
245
251
 
246
252
  ### Execute Phase N
247
253
 
248
- Execution runs autonomously. Spawn a background agent:
254
+ Execution runs autonomously. Spawn a background agent that delegates to the Skill pipeline with any configured flags:
249
255
 
250
256
  ```
251
257
  Task(
@@ -256,17 +262,14 @@ Task(
256
262
  Working directory: {cwd}
257
263
  Phase: {N} — {phase_name}
258
264
  Goal: {goal}
265
+ Manager flags: {manager_flags.execute}
266
+
267
+ Run the execute-phase Skill with any configured manager flags:
268
+ Skill(skill=\"sdd-execute-phase\", args=\"{N} {manager_flags.execute}\")
259
269
 
260
- Steps:
261
- 1. Read the execute-phase workflow: cat ~/.claude/sdd/workflows/execute-phase.md
262
- 2. Run: node \"$HOME/.claude/sdd/bin/sdd-tools.cjs\" init execute-phase {N}
263
- 3. Follow the workflow steps: discover plans, analyze dependencies, group into waves.
264
- 4. For each wave, spawn sdd-executor subagents via Task() to execute plans in parallel.
265
- 5. After all waves complete, spawn a sdd-verifier subagent if verifier is enabled.
266
- 6. Update ROADMAP.md and STATE.md with progress.
267
- 7. Commit all changes.
270
+ This delegates to the full execute-phase pipeline including local patches, branching, wave-based execution, verification, and all quality gates.
268
271
 
269
- Important: You are running in the background. Do NOT use AskUserQuestion — make autonomous decisions. Use --no-verify on git commits. If you hit a permission error, file lock, or any access issue, do NOT work around it — let it fail and write the error to STATE.md as a blocker so the manager can surface it with resolution guidance."
272
+ Important: You are running in the background. Do NOT use AskUserQuestion — make autonomous decisions. Do NOT use --no-verify on git commits — let pre-commit hooks run normally. If you hit a permission error, file lock, or any access issue, do NOT work around it — let it fail and write the error to STATE.md as a blocker so the manager can surface it with resolution guidance."
270
273
  )
271
274
  ```
272
275
 
@@ -306,7 +309,7 @@ Classify the error:
306
309
  - **question:** "Phase {N} failed — permission denied for `{tool_or_command}`. Want me to add it to settings.local.json so it's allowed?"
307
310
  - **options:** "Add permission and retry" / "Run this phase inline instead" / "Skip and continue"
308
311
  - "Add permission and retry": Use `Skill(skill="update-config")` to add the permission to `settings.local.json`, then re-spawn the background agent. Loop to dashboard.
309
- - "Run this phase inline instead": Dispatch the same action (plan/execute) inline via `Skill()` instead of a background Task. Loop to dashboard after.
312
+ - "Run this phase inline instead": Dispatch the same action inline via the appropriate Skill — use `Skill(skill="sdd-plan-phase", args="{N}")` if the failed action was planning, or `Skill(skill="sdd-execute-phase", args="{N}")` if the failed action was execution. Loop to dashboard after.
310
313
  - "Skip and continue": Loop to dashboard (phase stays in current state).
311
314
 
312
315
  **Other errors** (git lock, file conflict, logic error, etc.):
@@ -314,7 +317,7 @@ Classify the error:
314
317
  - **question:** "Background agent for Phase {N} encountered an issue: {error}. What next?"
315
318
  - **options:** "Retry" / "Run inline instead" / "Skip and continue" / "View details"
316
319
  - "Retry": Re-spawn the same background agent. Loop to dashboard.
317
- - "Run inline instead": Dispatch the action inline via `Skill()`. Loop to dashboard after.
320
+ - "Run inline instead": Dispatch the action inline via the appropriate Skill — use `Skill(skill="sdd-plan-phase", args="{N}")` if the failed action was planning, or `Skill(skill="sdd-execute-phase", args="{N}")` if the failed action was execution. Loop to dashboard after.
318
321
  - "Skip and continue": Loop to dashboard (phase stays in current state).
319
322
  - "View details": Read STATE.md blockers section, display, then re-present options.
320
323
 
@@ -334,11 +337,11 @@ Display final status with progress bar:
334
337
  {milestone_version} — {milestone_name}
335
338
  {PROGRESS_BAR} {progress_pct}% ({completed_count}/{phase_count} phases)
336
339
 
337
- Resume anytime: /sdd:manager
340
+ Resume anytime: /sdd-manager
338
341
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
339
342
  ```
340
343
 
341
- **Note:** Any background agents still running will continue to completion. Their results will be visible on next `/sdd:manager` or `/sdd:progress` invocation.
344
+ **Note:** Any background agents still running will continue to completion. Their results will be visible on next `/sdd-manager` or `/sdd-progress` invocation.
342
345
 
343
346
  </step>
344
347
 
@@ -36,7 +36,7 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
36
36
  AGENT_SKILLS_MAPPER=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" agent-skills sdd-codebase-mapper 2>/dev/null)
37
37
  ```
38
38
 
39
- Extract from init JSON: `mapper_model`, `commit_docs`, `codebase_dir`, `existing_maps`, `has_maps`, `codebase_dir_exists`.
39
+ Extract from init JSON: `mapper_model`, `commit_docs`, `codebase_dir`, `existing_maps`, `has_maps`, `codebase_dir_exists`, `subagent_timeout`.
40
40
  </step>
41
41
 
42
42
  <step name="check_existing">
@@ -199,9 +199,11 @@ Wait for all 4 agents to complete using TaskOutput tool.
199
199
  TaskOutput tool:
200
200
  task_id: "{task_id from Agent result}"
201
201
  block: true
202
- timeout: 300000
202
+ timeout: {subagent_timeout from init context, default 300000}
203
203
  ```
204
204
 
205
+ > The timeout is configurable via `workflow.subagent_timeout` in `.planning/config.json` (milliseconds). Default: 300000 (5 minutes). Increase for large codebases or slower models.
206
+
205
207
  Call TaskOutput for all 4 agents in parallel (single message with 4 TaskOutput calls).
206
208
 
207
209
  Once all TaskOutput calls return, read each agent's output file to collect confirmations.
@@ -347,14 +349,14 @@ Created .planning/codebase/:
347
349
 
348
350
  **Initialize project** — use codebase context for planning
349
351
 
350
- `/sdd:new-project`
352
+ `/clear` then:
351
353
 
352
- <sub>`/clear` first → fresh context window</sub>
354
+ `/sdd-new-project`
353
355
 
354
356
  ---
355
357
 
356
358
  **Also available:**
357
- - Re-run mapping: `/sdd:map-codebase`
359
+ - Re-run mapping: `/sdd-map-codebase`
358
360
  - Review specific file: `cat .planning/codebase/STACK.md`
359
361
  - Edit any document before proceeding
360
362
 
@@ -15,7 +15,7 @@ If `$ARGUMENTS` is empty:
15
15
  1. Check `.planning/STATE.md` for current milestone version
16
16
  2. Check `.planning/milestones/` for the latest archived version
17
17
  3. If neither found, check if `.planning/ROADMAP.md` exists (project may be mid-milestone)
18
- 4. If nothing found: error "No milestone found. Run /sdd:new-project or /sdd:new-milestone first."
18
+ 4. If nothing found: error "No milestone found. Run /sdd-new-project or /sdd-new-milestone first."
19
19
 
20
20
  Set `VERSION` to the resolved version (e.g., "1.0").
21
21
 
@@ -212,7 +212,7 @@ If the user asks questions:
212
212
  - Stay grounded in what was actually built (not speculation)
213
213
 
214
214
  If the user is done:
215
- - Suggest next steps: `/sdd:new-milestone`, `/sdd:progress`, or sharing the summary with the team
215
+ - Suggest next steps: `/sdd-new-milestone`, `/sdd-progress`, or sharing the summary with the team
216
216
 
217
217
  ## Step 9: Update STATE.md
218
218
 
@@ -30,7 +30,7 @@ If the flag is absent, keep the current behavior of continuing phase numbering f
30
30
  - Read PROJECT.md (existing project, validated requirements, decisions)
31
31
  - Read MILESTONES.md (what shipped previously)
32
32
  - Read STATE.md (pending todos, blockers)
33
- - Check for MILESTONE-CONTEXT.md (from /sdd:discuss-milestone)
33
+ - Check for MILESTONE-CONTEXT.md (from /sdd-discuss-milestone)
34
34
 
35
35
  ## 2. Gather Milestone Goals
36
36
 
@@ -40,6 +40,8 @@ If the flag is absent, keep the current behavior of continuing phase numbering f
40
40
 
41
41
  **If no context file:**
42
42
  - Present what shipped in last milestone
43
+
44
+ **Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
43
45
  - Ask inline (freeform, NOT AskUserQuestion): "What do you want to build next?"
44
46
  - Wait for their response, then use AskUserQuestion to probe specifics
45
47
  - If user selects "Other" at any point to provide freeform input, ask follow-up as plain text — not another AskUserQuestion
@@ -106,14 +108,14 @@ Ensure the `## Evolution` section exists in PROJECT.md. If missing (projects cre
106
108
 
107
109
  This document evolves at phase transitions and milestone boundaries.
108
110
 
109
- **After each phase transition** (via `/sdd:transition`):
111
+ **After each phase transition** (via `/sdd-transition`):
110
112
  1. Requirements invalidated? → Move to Out of Scope with reason
111
113
  2. Requirements validated? → Move to Validated with phase reference
112
114
  3. New requirements emerged? → Add to Active
113
115
  4. Decisions to log? → Add to Key Decisions
114
116
  5. "What This Is" still accurate? → Update if drifted
115
117
 
116
- **After each milestone** (via `/sdd:complete-milestone`):
118
+ **After each milestone** (via `/sdd-complete-milestone`):
117
119
  1. Full review of all sections
118
120
  2. Core Value check — still the right priority?
119
121
  3. Audit Out of Scope — reasons still valid?
@@ -137,6 +139,12 @@ Keep Accumulated Context section from previous milestone.
137
139
 
138
140
  Delete MILESTONE-CONTEXT.md if exists (consumed).
139
141
 
142
+ Clear leftover phase directories from the previous milestone:
143
+
144
+ ```bash
145
+ node "$HOME/.claude/sdd/bin/sdd-tools.cjs" phases clear --confirm
146
+ ```
147
+
140
148
  ```bash
141
149
  node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs: start milestone v[X.Y] [Name]" --files .planning/PROJECT.md .planning/STATE.md
142
150
  ```
@@ -171,7 +179,7 @@ Then verify `.planning/phases/` no longer contains old milestone directories bef
171
179
 
172
180
  If `phase_dir_count > 0` but `phase_archive_path` is missing:
173
181
  - Stop and explain that reset numbering is unsafe without a completed milestone archive target.
174
- - Tell the user to complete/archive the previous milestone first, then rerun `/sdd:new-milestone --reset-phase-numbers ${SDD_WS}`.
182
+ - Tell the user to complete/archive the previous milestone first, then rerun `/sdd-new-milestone --reset-phase-numbers ${SDD_WS}`.
175
183
 
176
184
  ## 8. Research Decision
177
185
 
@@ -189,7 +197,7 @@ AskUserQuestion: "Research the domain ecosystem for new features before defining
189
197
  - "Skip research (current default)" — Go straight to requirements
190
198
  - "Research first" — Discover patterns, features, architecture for NEW capabilities
191
199
 
192
- **IMPORTANT:** Do NOT persist this choice to config.json. The `workflow.research` setting is a persistent user preference that controls plan-phase behavior across the project. Changing it here would silently alter future `/sdd:plan-phase` behavior. To change the default, use `/sdd:settings`.
200
+ **IMPORTANT:** Do NOT persist this choice to config.json. The `workflow.research` setting is a persistent user preference that controls plan-phase behavior across the project. Changing it here would silently alter future `/sdd-plan-phase` behavior. To change the default, use `/sdd-settings`.
193
201
 
194
202
  **If user chose "Research first":**
195
203
 
@@ -459,11 +467,11 @@ node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs: create milestone v[X.Y]
459
467
 
460
468
  **Phase [N]: [Phase Name]** — [Goal]
461
469
 
462
- `/sdd:discuss-phase [N] ${SDD_WS}` — gather context and clarify approach
470
+ `/clear` then:
463
471
 
464
- <sub>`/clear` first fresh context window</sub>
472
+ `/sdd-discuss-phase [N] ${SDD_WS}` gather context and clarify approach
465
473
 
466
- Also: `/sdd:plan-phase [N] ${SDD_WS}` — skip discussion, plan directly
474
+ Also: `/sdd-plan-phase [N] ${SDD_WS}` — skip discussion, plan directly
467
475
  ```
468
476
 
469
477
  </process>
@@ -480,7 +488,7 @@ Also: `/sdd:plan-phase [N] ${SDD_WS}` — skip discussion, plan directly
480
488
  - [ ] User feedback incorporated (if any)
481
489
  - [ ] Phase numbering mode respected (continued or reset)
482
490
  - [ ] All commits made (if planning docs committed)
483
- - [ ] User knows next step: `/sdd:discuss-phase [N] ${SDD_WS}`
491
+ - [ ] User knows next step: `/sdd-discuss-phase [N] ${SDD_WS}`
484
492
 
485
493
  **Atomic commits:** Each phase commits its artifacts immediately.
486
494
  </success_criteria>
@@ -33,7 +33,7 @@ Check if `--auto` flag is present in $ARGUMENTS.
33
33
  **Document requirement:**
34
34
  Auto mode requires an idea document — either:
35
35
 
36
- - File reference: `/sdd:new-project --auto @prd.md`
36
+ - File reference: `/sdd-new-project --auto @prd.md`
37
37
  - Pasted/written text in the prompt
38
38
 
39
39
  If no document content provided, error:
@@ -42,8 +42,8 @@ If no document content provided, error:
42
42
  Error: --auto requires an idea document.
43
43
 
44
44
  Usage:
45
- /sdd:new-project --auto @your-idea.md
46
- /sdd:new-project --auto [paste or write your idea here]
45
+ /sdd-new-project --auto @your-idea.md
46
+ /sdd-new-project --auto [paste or write your idea here]
47
47
 
48
48
  The document should describe what you want to build.
49
49
  ```
@@ -66,7 +66,30 @@ AGENT_SKILLS_ROADMAPPER=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" agent-skill
66
66
 
67
67
  Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`.
68
68
 
69
- **If `project_exists` is true:** Error project already initialized. Use `/sdd:progress`.
69
+ **Detect runtime and set instruction file name:**
70
+
71
+ Derive `RUNTIME` from the invoking prompt's `execution_context` path:
72
+ - Path contains `/.codex/` → `RUNTIME=codex`
73
+ - Path contains `/.gemini/` → `RUNTIME=gemini`
74
+ - Path contains `/.config/opencode/` or `/.opencode/` → `RUNTIME=opencode`
75
+ - Otherwise → `RUNTIME=claude`
76
+
77
+ If `execution_context` path is not available, fall back to env vars:
78
+ ```bash
79
+ if [ -n "$CODEX_HOME" ]; then RUNTIME="codex"
80
+ elif [ -n "$GEMINI_CONFIG_DIR" ]; then RUNTIME="gemini"
81
+ elif [ -n "$OPENCODE_CONFIG_DIR" ] || [ -n "$OPENCODE_CONFIG" ]; then RUNTIME="opencode"
82
+ else RUNTIME="claude"; fi
83
+ ```
84
+
85
+ Set the instruction file variable:
86
+ ```bash
87
+ if [ "$RUNTIME" = "codex" ]; then INSTRUCTION_FILE="AGENTS.md"; else INSTRUCTION_FILE="CLAUDE.md"; fi
88
+ ```
89
+
90
+ All subsequent references to the project instruction file use `$INSTRUCTION_FILE`.
91
+
92
+ **If `project_exists` is true:** Error — project already initialized. Use `/sdd-progress`.
70
93
 
71
94
  **If `has_git` is false:** Initialize git:
72
95
 
@@ -80,18 +103,20 @@ git init
80
103
 
81
104
  **If `needs_codebase_map` is true** (from init — existing code detected but no codebase map):
82
105
 
106
+
107
+ **Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
83
108
  Use AskUserQuestion:
84
109
 
85
110
  - header: "Codebase"
86
111
  - question: "I detected existing code in this directory. Would you like to map the codebase first?"
87
112
  - options:
88
- - "Map codebase first" — Run /sdd:map-codebase to understand existing architecture (Recommended)
113
+ - "Map codebase first" — Run /sdd-map-codebase to understand existing architecture (Recommended)
89
114
  - "Skip mapping" — Proceed with project initialization
90
115
 
91
116
  **If "Map codebase first":**
92
117
 
93
118
  ```
94
- Run `/sdd:map-codebase` first, then return to `/sdd:new-project`
119
+ Run `/sdd-map-codebase` first, then return to `/sdd-new-project`
95
120
  ```
96
121
 
97
122
  Exit command.
@@ -358,14 +383,14 @@ Initialize with any decisions made during questioning:
358
383
 
359
384
  This document evolves at phase transitions and milestone boundaries.
360
385
 
361
- **After each phase transition** (via `/sdd:transition`):
386
+ **After each phase transition** (via `/sdd-transition`):
362
387
  1. Requirements invalidated? → Move to Out of Scope with reason
363
388
  2. Requirements validated? → Move to Validated with phase reference
364
389
  3. New requirements emerged? → Add to Active
365
390
  4. Decisions to log? → Add to Key Decisions
366
391
  5. "What This Is" still accurate? → Update if drifted
367
392
 
368
- **After each milestone** (via `/sdd:complete-milestone`):
393
+ **After each milestone** (via `/sdd-complete-milestone`):
369
394
  1. Full review of all sections
370
395
  2. Core Value check — still the right priority?
371
396
  3. Audit Out of Scope — reasons still valid?
@@ -511,7 +536,7 @@ mkdir -p .planning
511
536
  node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-new-project '{"mode":"[yolo|interactive]","granularity":"[selected]","parallelization":true|false,"commit_docs":true|false,"model_profile":"quality|balanced|budget|inherit","workflow":{"research":true|false,"plan_check":true|false,"verifier":true|false,"nyquist_validation":[false if granularity=coarse, true otherwise]}}'
512
537
  ```
513
538
 
514
- **Note:** Run `/sdd:settings` anytime to update model profile, workflow agents, branching strategy, and other preferences.
539
+ **Note:** Run `/sdd-settings` anytime to update model profile, workflow agents, branching strategy, and other preferences.
515
540
 
516
541
  **If commit_docs = No:**
517
542
 
@@ -1106,18 +1131,18 @@ Use AskUserQuestion:
1106
1131
 
1107
1132
  **If "Review full file":** Display raw `cat .planning/ROADMAP.md`, then re-ask.
1108
1133
 
1109
- **Generate or refresh project CLAUDE.md before final commit:**
1134
+ **Generate or refresh project instruction file before final commit:**
1110
1135
 
1111
1136
  ```bash
1112
- node "$HOME/.claude/sdd/bin/sdd-tools.cjs" generate-claude-md
1137
+ node "$HOME/.claude/sdd/bin/sdd-tools.cjs" generate-claude-md --output "$INSTRUCTION_FILE"
1113
1138
  ```
1114
1139
 
1115
- This ensures new projects get the default SDD workflow-enforcement guidance and current project context in `CLAUDE.md`.
1140
+ This ensures new projects get the default SDD workflow-enforcement guidance and current project context in `$INSTRUCTION_FILE`.
1116
1141
 
1117
1142
  **Commit roadmap (after approval or auto mode):**
1118
1143
 
1119
1144
  ```bash
1120
- node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md CLAUDE.md
1145
+ node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md "$INSTRUCTION_FILE"
1121
1146
  ```
1122
1147
 
1123
1148
  ## 9. Done
@@ -1138,7 +1163,7 @@ Present completion summary:
1138
1163
  | Research | `.planning/research/` |
1139
1164
  | Requirements | `.planning/REQUIREMENTS.md` |
1140
1165
  | Roadmap | `.planning/ROADMAP.md` |
1141
- | Project guide | `CLAUDE.md` |
1166
+ | Project guide | `$INSTRUCTION_FILE` |
1142
1167
 
1143
1168
  **[N] phases** | **[X] requirements** | Ready to build ✓
1144
1169
  ```
@@ -1151,7 +1176,7 @@ Present completion summary:
1151
1176
  ╚══════════════════════════════════════════╝
1152
1177
  ```
1153
1178
 
1154
- Exit skill and invoke SlashCommand("/sdd:discuss-phase 1 --auto")
1179
+ Exit skill and invoke SlashCommand("/sdd-discuss-phase 1 --auto")
1155
1180
 
1156
1181
  **If interactive mode:**
1157
1182
 
@@ -1171,15 +1196,15 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1171
1196
 
1172
1197
  **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1173
1198
 
1174
- /sdd:discuss-phase 1 — gather context and clarify approach
1199
+ /clear then:
1175
1200
 
1176
- <sub>/clear first fresh context window</sub>
1201
+ /sdd-discuss-phase 1 gather context and clarify approach
1177
1202
 
1178
1203
  ---
1179
1204
 
1180
1205
  **Also available:**
1181
- - /sdd:ui-phase 1 — generate UI design contract (recommended for frontend phases)
1182
- - /sdd:plan-phase 1 — skip discussion, plan directly
1206
+ - /sdd-ui-phase 1 — generate UI design contract (recommended for frontend phases)
1207
+ - /sdd-plan-phase 1 — skip discussion, plan directly
1183
1208
 
1184
1209
  ───────────────────────────────────────────────────────────────
1185
1210
  ```
@@ -1193,14 +1218,14 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1193
1218
 
1194
1219
  **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1195
1220
 
1196
- /sdd:discuss-phase 1 — gather context and clarify approach
1221
+ /clear then:
1197
1222
 
1198
- <sub>/clear first fresh context window</sub>
1223
+ /sdd-discuss-phase 1 gather context and clarify approach
1199
1224
 
1200
1225
  ---
1201
1226
 
1202
1227
  **Also available:**
1203
- - /sdd:plan-phase 1 — skip discussion, plan directly
1228
+ - /sdd-plan-phase 1 — skip discussion, plan directly
1204
1229
 
1205
1230
  ───────────────────────────────────────────────────────────────
1206
1231
  ```
@@ -1220,7 +1245,7 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1220
1245
  - `.planning/REQUIREMENTS.md`
1221
1246
  - `.planning/ROADMAP.md`
1222
1247
  - `.planning/STATE.md`
1223
- - `CLAUDE.md`
1248
+ - `$INSTRUCTION_FILE` (`AGENTS.md` for Codex, `CLAUDE.md` for all other runtimes)
1224
1249
 
1225
1250
  </output>
1226
1251
 
@@ -1242,8 +1267,8 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1242
1267
  - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
1243
1268
  - [ ] STATE.md initialized
1244
1269
  - [ ] REQUIREMENTS.md traceability updated
1245
- - [ ] CLAUDE.md generated with SDD workflow guidance
1246
- - [ ] User knows next step is `/sdd:discuss-phase 1`
1270
+ - [ ] `$INSTRUCTION_FILE` generated with SDD workflow guidance (AGENTS.md for Codex, CLAUDE.md otherwise)
1271
+ - [ ] User knows next step is `/sdd-discuss-phase 1`
1247
1272
 
1248
1273
  **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
1249
1274
 
@@ -31,6 +31,8 @@ Extract from $ARGUMENTS:
31
31
 
32
32
  **If `--name` is missing and not `--auto`:**
33
33
 
34
+
35
+ **Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
34
36
  Use AskUserQuestion:
35
37
  - header: "Workspace Name"
36
38
  - question: "What should this workspace be called?"
@@ -71,7 +73,7 @@ Error:
71
73
  No git repos found in the current directory and this is not a git repo.
72
74
 
73
75
  Run this command from a directory containing git repos, or specify repos explicitly:
74
- /sdd:new-workspace --name my-workspace --repos /path/to/repo1,/path/to/repo2
76
+ /sdd-new-workspace --name my-workspace --repos /path/to/repo1,/path/to/repo2
75
77
  ```
76
78
  Exit.
77
79
 
@@ -82,7 +84,7 @@ Error:
82
84
  Error: --auto requires --repos to specify which repos to include.
83
85
 
84
86
  Usage:
85
- /sdd:new-workspace --name my-workspace --repos repo1,repo2 --auto
87
+ /sdd-new-workspace --name my-workspace --repos repo1,repo2 --auto
86
88
  ```
87
89
  Exit.
88
90
 
@@ -201,7 +203,7 @@ Workspace created: $TARGET_PATH
201
203
 
202
204
  Next steps:
203
205
  cd $TARGET_PATH
204
- /sdd:new-project # Initialize SDD in the workspace
206
+ /sdd-new-project # Initialize SDD in the workspace
205
207
  ```
206
208
 
207
209
  **If some repos failed:**
@@ -214,7 +216,7 @@ Workspace created with $SUCCESS_COUNT of $TOTAL_COUNT repos: $TARGET_PATH
214
216
 
215
217
  Next steps:
216
218
  cd $TARGET_PATH
217
- /sdd:new-project # Initialize SDD in the workspace
219
+ /sdd-new-project # Initialize SDD in the workspace
218
220
  ```
219
221
 
220
222
  **Offer to initialize SDD (if not `--auto`):**
@@ -223,7 +225,7 @@ Use AskUserQuestion:
223
225
  - header: "Initialize SDD"
224
226
  - question: "Would you like to initialize a SDD project in the new workspace?"
225
227
  - options:
226
- - "Yes — run /sdd:new-project" → tell user to `cd $TARGET_PATH` first, then run `/sdd:new-project`
228
+ - "Yes — run /sdd-new-project" → tell user to `cd $TARGET_PATH` first, then run `/sdd-new-project`
227
229
  - "No — I'll set it up later" → done
228
230
 
229
231
  </process>