@ktpartners/dgs-platform 2.6.2

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 (256) hide show
  1. package/LICENSE +38 -0
  2. package/README.md +851 -0
  3. package/agents/dgs-codebase-cross-analyzer.md +183 -0
  4. package/agents/dgs-codebase-mapper.md +782 -0
  5. package/agents/dgs-codebase-synthesizer.md +156 -0
  6. package/agents/dgs-debugger.md +1256 -0
  7. package/agents/dgs-executor.md +550 -0
  8. package/agents/dgs-integration-checker.md +481 -0
  9. package/agents/dgs-nyquist-auditor.md +178 -0
  10. package/agents/dgs-phase-researcher.md +563 -0
  11. package/agents/dgs-phase-verifier.md +450 -0
  12. package/agents/dgs-plan-checker.md +708 -0
  13. package/agents/dgs-planner.md +1324 -0
  14. package/agents/dgs-project-researcher.md +631 -0
  15. package/agents/dgs-research-synthesizer.md +249 -0
  16. package/agents/dgs-roadmapper.md +652 -0
  17. package/agents/dgs-verifier.md +607 -0
  18. package/bin/install.js +2073 -0
  19. package/commands/dgs/add-doc.md +45 -0
  20. package/commands/dgs/add-idea.md +38 -0
  21. package/commands/dgs/add-phase.md +43 -0
  22. package/commands/dgs/add-repo.md +54 -0
  23. package/commands/dgs/add-tests.md +41 -0
  24. package/commands/dgs/add-todo.md +47 -0
  25. package/commands/dgs/approve-spec.md +38 -0
  26. package/commands/dgs/audit-milestone.md +36 -0
  27. package/commands/dgs/audit-phase.md +37 -0
  28. package/commands/dgs/cancel-job.md +23 -0
  29. package/commands/dgs/capture-principle.md +143 -0
  30. package/commands/dgs/check-todos.md +45 -0
  31. package/commands/dgs/cleanup.md +18 -0
  32. package/commands/dgs/complete-milestone.md +136 -0
  33. package/commands/dgs/complete-project.md +70 -0
  34. package/commands/dgs/consolidate-ideas.md +50 -0
  35. package/commands/dgs/create-milestone-job.md +37 -0
  36. package/commands/dgs/debug.md +164 -0
  37. package/commands/dgs/develop-idea.md +53 -0
  38. package/commands/dgs/discuss-idea.md +41 -0
  39. package/commands/dgs/discuss-phase.md +83 -0
  40. package/commands/dgs/execute-phase.md +41 -0
  41. package/commands/dgs/fast.md +38 -0
  42. package/commands/dgs/find-related-ideas.md +43 -0
  43. package/commands/dgs/health.md +28 -0
  44. package/commands/dgs/help.md +22 -0
  45. package/commands/dgs/import-spec.md +36 -0
  46. package/commands/dgs/init-product.md +28 -0
  47. package/commands/dgs/insert-phase.md +32 -0
  48. package/commands/dgs/join-discord.md +18 -0
  49. package/commands/dgs/list-docs.md +40 -0
  50. package/commands/dgs/list-ideas.md +42 -0
  51. package/commands/dgs/list-jobs.md +22 -0
  52. package/commands/dgs/list-phase-assumptions.md +46 -0
  53. package/commands/dgs/list-projects.md +57 -0
  54. package/commands/dgs/list-specs.md +40 -0
  55. package/commands/dgs/map-codebase.md +92 -0
  56. package/commands/dgs/new-milestone.md +44 -0
  57. package/commands/dgs/new-project.md +42 -0
  58. package/commands/dgs/node-repair.md +26 -0
  59. package/commands/dgs/overlap-check.md +20 -0
  60. package/commands/dgs/pause-work.md +38 -0
  61. package/commands/dgs/plan-milestone-gaps.md +34 -0
  62. package/commands/dgs/plan-phase.md +44 -0
  63. package/commands/dgs/progress.md +24 -0
  64. package/commands/dgs/quick.md +41 -0
  65. package/commands/dgs/reactivate-project.md +70 -0
  66. package/commands/dgs/reapply-patches.md +110 -0
  67. package/commands/dgs/refine-spec.md +38 -0
  68. package/commands/dgs/reject-idea.md +43 -0
  69. package/commands/dgs/remove-doc.md +44 -0
  70. package/commands/dgs/remove-phase.md +31 -0
  71. package/commands/dgs/remove-repo.md +69 -0
  72. package/commands/dgs/research-idea.md +43 -0
  73. package/commands/dgs/research-phase.md +189 -0
  74. package/commands/dgs/restore-idea.md +45 -0
  75. package/commands/dgs/resume-work.md +40 -0
  76. package/commands/dgs/rollback-job.md +24 -0
  77. package/commands/dgs/run-job.md +35 -0
  78. package/commands/dgs/search.md +40 -0
  79. package/commands/dgs/set-profile.md +34 -0
  80. package/commands/dgs/settings.md +38 -0
  81. package/commands/dgs/switch-project.md +58 -0
  82. package/commands/dgs/undo-consolidation.md +42 -0
  83. package/commands/dgs/update-idea.md +44 -0
  84. package/commands/dgs/update.md +37 -0
  85. package/commands/dgs/validate-phase.md +35 -0
  86. package/commands/dgs/verify-work.md +39 -0
  87. package/commands/dgs/write-spec.md +49 -0
  88. package/deliver-great-systems/.planning/phases/09-backend-wiring-and-error-handling/09-01-SUMMARY.md +84 -0
  89. package/deliver-great-systems/.planning/phases/09-backend-wiring-and-error-handling/09-02-SUMMARY.md +86 -0
  90. package/deliver-great-systems/.planning/phases/10-v1-to-v2-migration-flow/10-01-SUMMARY.md +85 -0
  91. package/deliver-great-systems/bin/dgs-tools.cjs +1444 -0
  92. package/deliver-great-systems/bin/lib/auto-test.cjs +1365 -0
  93. package/deliver-great-systems/bin/lib/commands.cjs +570 -0
  94. package/deliver-great-systems/bin/lib/config.cjs +417 -0
  95. package/deliver-great-systems/bin/lib/conflict-agent.cjs +1063 -0
  96. package/deliver-great-systems/bin/lib/conflict-agent.test.cjs +554 -0
  97. package/deliver-great-systems/bin/lib/context.cjs +929 -0
  98. package/deliver-great-systems/bin/lib/context.test.cjs +693 -0
  99. package/deliver-great-systems/bin/lib/core.cjs +744 -0
  100. package/deliver-great-systems/bin/lib/core.test.cjs +822 -0
  101. package/deliver-great-systems/bin/lib/docs.cjs +919 -0
  102. package/deliver-great-systems/bin/lib/docs.test.cjs +211 -0
  103. package/deliver-great-systems/bin/lib/execution.cjs +705 -0
  104. package/deliver-great-systems/bin/lib/execution.test.cjs +1472 -0
  105. package/deliver-great-systems/bin/lib/frontmatter.cjs +324 -0
  106. package/deliver-great-systems/bin/lib/ideas.cjs +1406 -0
  107. package/deliver-great-systems/bin/lib/ideas.test.cjs +1417 -0
  108. package/deliver-great-systems/bin/lib/identity.cjs +125 -0
  109. package/deliver-great-systems/bin/lib/init.cjs +1114 -0
  110. package/deliver-great-systems/bin/lib/init.test.cjs +1271 -0
  111. package/deliver-great-systems/bin/lib/jobs.cjs +2015 -0
  112. package/deliver-great-systems/bin/lib/jobs.test.cjs +2619 -0
  113. package/deliver-great-systems/bin/lib/merge-conflicts.cjs +654 -0
  114. package/deliver-great-systems/bin/lib/merge-conflicts.test.cjs +370 -0
  115. package/deliver-great-systems/bin/lib/migration.cjs +352 -0
  116. package/deliver-great-systems/bin/lib/migration.test.cjs +582 -0
  117. package/deliver-great-systems/bin/lib/milestone.cjs +243 -0
  118. package/deliver-great-systems/bin/lib/overlap.cjs +437 -0
  119. package/deliver-great-systems/bin/lib/overlap.test.cjs +747 -0
  120. package/deliver-great-systems/bin/lib/path-audit.test.cjs +384 -0
  121. package/deliver-great-systems/bin/lib/paths.cjs +144 -0
  122. package/deliver-great-systems/bin/lib/paths.test.cjs +486 -0
  123. package/deliver-great-systems/bin/lib/phase.cjs +910 -0
  124. package/deliver-great-systems/bin/lib/projects.cjs +691 -0
  125. package/deliver-great-systems/bin/lib/projects.test.cjs +871 -0
  126. package/deliver-great-systems/bin/lib/repos.cjs +1432 -0
  127. package/deliver-great-systems/bin/lib/repos.test.cjs +1882 -0
  128. package/deliver-great-systems/bin/lib/roadmap.cjs +305 -0
  129. package/deliver-great-systems/bin/lib/search.cjs +570 -0
  130. package/deliver-great-systems/bin/lib/specs.cjs +1303 -0
  131. package/deliver-great-systems/bin/lib/state.cjs +893 -0
  132. package/deliver-great-systems/bin/lib/template.cjs +228 -0
  133. package/deliver-great-systems/bin/lib/test-helpers.cjs +291 -0
  134. package/deliver-great-systems/bin/lib/verify.cjs +796 -0
  135. package/deliver-great-systems/references/checkpoints.md +776 -0
  136. package/deliver-great-systems/references/conflict-resolution.md +66 -0
  137. package/deliver-great-systems/references/context-tiers.md +166 -0
  138. package/deliver-great-systems/references/continuation-format.md +249 -0
  139. package/deliver-great-systems/references/decimal-phase-calculation.md +67 -0
  140. package/deliver-great-systems/references/git-integration.md +250 -0
  141. package/deliver-great-systems/references/git-planning-commit.md +40 -0
  142. package/deliver-great-systems/references/model-profile-resolution.md +36 -0
  143. package/deliver-great-systems/references/model-profiles.md +95 -0
  144. package/deliver-great-systems/references/phase-argument-parsing.md +61 -0
  145. package/deliver-great-systems/references/planning-config.md +224 -0
  146. package/deliver-great-systems/references/questioning.md +162 -0
  147. package/deliver-great-systems/references/spec-review-loop.md +177 -0
  148. package/deliver-great-systems/references/tdd.md +265 -0
  149. package/deliver-great-systems/references/ui-brand.md +160 -0
  150. package/deliver-great-systems/references/verification-patterns.md +612 -0
  151. package/deliver-great-systems/templates/DEBUG.md +166 -0
  152. package/deliver-great-systems/templates/UAT.md +251 -0
  153. package/deliver-great-systems/templates/VALIDATION.md +95 -0
  154. package/deliver-great-systems/templates/claude-md.md +74 -0
  155. package/deliver-great-systems/templates/codebase/architecture.md +257 -0
  156. package/deliver-great-systems/templates/codebase/concerns.md +312 -0
  157. package/deliver-great-systems/templates/codebase/conventions.md +309 -0
  158. package/deliver-great-systems/templates/codebase/integrations.md +282 -0
  159. package/deliver-great-systems/templates/codebase/stack.md +188 -0
  160. package/deliver-great-systems/templates/codebase/structure.md +287 -0
  161. package/deliver-great-systems/templates/codebase/testing.md +482 -0
  162. package/deliver-great-systems/templates/config.json +38 -0
  163. package/deliver-great-systems/templates/context.md +354 -0
  164. package/deliver-great-systems/templates/continue-here.md +80 -0
  165. package/deliver-great-systems/templates/debug-subagent-prompt.md +93 -0
  166. package/deliver-great-systems/templates/discovery.md +148 -0
  167. package/deliver-great-systems/templates/milestone-archive.md +125 -0
  168. package/deliver-great-systems/templates/milestone.md +117 -0
  169. package/deliver-great-systems/templates/phase-prompt.md +615 -0
  170. package/deliver-great-systems/templates/planner-subagent-prompt.md +119 -0
  171. package/deliver-great-systems/templates/project.md +186 -0
  172. package/deliver-great-systems/templates/requirements.md +233 -0
  173. package/deliver-great-systems/templates/research-project/ARCHITECTURE.md +206 -0
  174. package/deliver-great-systems/templates/research-project/FEATURES.md +149 -0
  175. package/deliver-great-systems/templates/research-project/PITFALLS.md +202 -0
  176. package/deliver-great-systems/templates/research-project/STACK.md +122 -0
  177. package/deliver-great-systems/templates/research-project/SUMMARY.md +172 -0
  178. package/deliver-great-systems/templates/research.md +554 -0
  179. package/deliver-great-systems/templates/retrospective.md +54 -0
  180. package/deliver-great-systems/templates/roadmap.md +204 -0
  181. package/deliver-great-systems/templates/state.md +178 -0
  182. package/deliver-great-systems/templates/summary-complex.md +59 -0
  183. package/deliver-great-systems/templates/summary-minimal.md +41 -0
  184. package/deliver-great-systems/templates/summary-standard.md +48 -0
  185. package/deliver-great-systems/templates/summary.md +253 -0
  186. package/deliver-great-systems/templates/user-setup.md +313 -0
  187. package/deliver-great-systems/templates/verification-report.md +324 -0
  188. package/deliver-great-systems/workflows/add-doc.md +151 -0
  189. package/deliver-great-systems/workflows/add-idea.md +96 -0
  190. package/deliver-great-systems/workflows/add-phase.md +120 -0
  191. package/deliver-great-systems/workflows/add-tests.md +359 -0
  192. package/deliver-great-systems/workflows/add-todo.md +162 -0
  193. package/deliver-great-systems/workflows/approve-spec.md +194 -0
  194. package/deliver-great-systems/workflows/audit-milestone.md +364 -0
  195. package/deliver-great-systems/workflows/audit-phase.md +462 -0
  196. package/deliver-great-systems/workflows/cancel-job.md +108 -0
  197. package/deliver-great-systems/workflows/check-todos.md +181 -0
  198. package/deliver-great-systems/workflows/cleanup.md +247 -0
  199. package/deliver-great-systems/workflows/codereview.md +526 -0
  200. package/deliver-great-systems/workflows/complete-milestone.md +1298 -0
  201. package/deliver-great-systems/workflows/consolidate-ideas.md +365 -0
  202. package/deliver-great-systems/workflows/create-milestone-job.md +177 -0
  203. package/deliver-great-systems/workflows/develop-idea.md +544 -0
  204. package/deliver-great-systems/workflows/diagnose-issues.md +231 -0
  205. package/deliver-great-systems/workflows/discovery-phase.md +301 -0
  206. package/deliver-great-systems/workflows/discuss-idea.md +263 -0
  207. package/deliver-great-systems/workflows/discuss-phase.md +733 -0
  208. package/deliver-great-systems/workflows/execute-phase.md +571 -0
  209. package/deliver-great-systems/workflows/execute-plan.md +592 -0
  210. package/deliver-great-systems/workflows/find-related-ideas.md +271 -0
  211. package/deliver-great-systems/workflows/health.md +173 -0
  212. package/deliver-great-systems/workflows/help.md +997 -0
  213. package/deliver-great-systems/workflows/import-spec.md +381 -0
  214. package/deliver-great-systems/workflows/init-product.md +767 -0
  215. package/deliver-great-systems/workflows/insert-phase.md +138 -0
  216. package/deliver-great-systems/workflows/list-docs.md +119 -0
  217. package/deliver-great-systems/workflows/list-ideas.md +154 -0
  218. package/deliver-great-systems/workflows/list-jobs.md +89 -0
  219. package/deliver-great-systems/workflows/list-phase-assumptions.md +192 -0
  220. package/deliver-great-systems/workflows/list-specs.md +101 -0
  221. package/deliver-great-systems/workflows/map-codebase.md +621 -0
  222. package/deliver-great-systems/workflows/new-milestone.md +591 -0
  223. package/deliver-great-systems/workflows/new-project.md +1113 -0
  224. package/deliver-great-systems/workflows/node-repair.md +94 -0
  225. package/deliver-great-systems/workflows/overlap-check.md +86 -0
  226. package/deliver-great-systems/workflows/pause-work.md +134 -0
  227. package/deliver-great-systems/workflows/plan-milestone-gaps.md +306 -0
  228. package/deliver-great-systems/workflows/plan-phase.md +698 -0
  229. package/deliver-great-systems/workflows/progress.md +386 -0
  230. package/deliver-great-systems/workflows/quick.md +845 -0
  231. package/deliver-great-systems/workflows/refine-spec.md +275 -0
  232. package/deliver-great-systems/workflows/reject-idea.md +109 -0
  233. package/deliver-great-systems/workflows/remove-doc.md +117 -0
  234. package/deliver-great-systems/workflows/remove-phase.md +163 -0
  235. package/deliver-great-systems/workflows/research-idea.md +325 -0
  236. package/deliver-great-systems/workflows/research-phase.md +81 -0
  237. package/deliver-great-systems/workflows/restore-idea.md +101 -0
  238. package/deliver-great-systems/workflows/resume-project.md +311 -0
  239. package/deliver-great-systems/workflows/rollback-job.md +130 -0
  240. package/deliver-great-systems/workflows/run-job.md +498 -0
  241. package/deliver-great-systems/workflows/search.md +130 -0
  242. package/deliver-great-systems/workflows/set-profile.md +83 -0
  243. package/deliver-great-systems/workflows/settings.md +470 -0
  244. package/deliver-great-systems/workflows/transition.md +563 -0
  245. package/deliver-great-systems/workflows/undo-consolidation.md +155 -0
  246. package/deliver-great-systems/workflows/update-idea.md +157 -0
  247. package/deliver-great-systems/workflows/update.md +242 -0
  248. package/deliver-great-systems/workflows/validate-phase.md +177 -0
  249. package/deliver-great-systems/workflows/verify-phase.md +253 -0
  250. package/deliver-great-systems/workflows/verify-work.md +671 -0
  251. package/deliver-great-systems/workflows/write-spec.md +450 -0
  252. package/hooks/dist/dgs-check-update.js +62 -0
  253. package/hooks/dist/dgs-context-monitor.js +141 -0
  254. package/hooks/dist/dgs-statusline.js +115 -0
  255. package/package.json +60 -0
  256. package/scripts/build-hooks.js +43 -0
@@ -0,0 +1,997 @@
1
+ <purpose>
2
+ Display the complete DGS command reference. Output ONLY the reference content. Do NOT add project-specific analysis, git status, next-step suggestions, or any commentary beyond the reference.
3
+ </purpose>
4
+
5
+ <context_tier>none</context_tier>
6
+
7
+ <reference>
8
+ # DGS Command Reference
9
+
10
+ **DGS** (Deliver Great Systems) creates hierarchical project plans optimized for solo agentic development with Claude Code.
11
+
12
+ ## Quick Start
13
+
14
+ **Single-project (v1):**
15
+ 1. `/dgs:new-project` - Initialize project (includes research, requirements, roadmap)
16
+ 2. `/dgs:plan-phase 1` - Create detailed plan for first phase
17
+ 3. `/dgs:execute-phase 1` - Execute the phase
18
+
19
+ **Multi-project / multi-repo (v2):**
20
+ 1. `/dgs:init-product` - Set up product folder and register repos
21
+ 2. `/dgs:new-project` - Create a project (prompts for name and repos)
22
+ 3. `/dgs:plan-phase 1` - Plan first phase (repos tracked per task)
23
+ 4. `/dgs:execute-phase 1` - Execute (commits per-repo automatically)
24
+
25
+ ## Layout Detection
26
+
27
+ DGS supports two directory layouts:
28
+
29
+ - **`.planning/` layout (default):** Planning artifacts live in a `.planning/` subdirectory. Standard for repos that also contain source code.
30
+ - **Root layout:** Planning artifacts live at the repo root. For dedicated planning repos where DGS owns the entire directory.
31
+
32
+ Choose your layout during `/dgs:init-product`. DGS detects the active layout from `dgs.config.json` and resolves all paths automatically.
33
+
34
+ ### v1 vs v2 Detection
35
+
36
+ Within either layout, DGS detects single-project or multi-project mode:
37
+
38
+ - **v1 (single-project):** Standard setup. The planning root contains PROJECT.md, ROADMAP.md, STATE.md, phases/ directly. All existing commands work as before.
39
+ - **v2 (multi-project):** Detected when `PROJECTS.md` or `REPOS.md` exists in the planning root. Project artifacts live under `<planning-root>/<project-slug>/`. New commands available for repo management and project switching.
40
+
41
+ No migration required. v1 installations continue working unchanged. Run `/dgs:init-product` when you want to adopt v2 features.
42
+
43
+ ## Staying Updated
44
+
45
+ DGS evolves fast. Update periodically:
46
+
47
+ ```bash
48
+ npx @ktpartners/dgs-platform@latest
49
+ ```
50
+
51
+ ## Context Tiers
52
+
53
+ Each command loads a specific tier of project context. Higher tiers include all lower-tier files.
54
+
55
+ | Tier | Name | What it loads |
56
+ |------|------|---------------|
57
+ | 0 | none | No project context |
58
+ | 1 | lite | PROJECT.md, STATE.md, config.json |
59
+ | 2 | planning | + ROADMAP.md, REQUIREMENTS.md, REPOS.md, codebase docs |
60
+ | 3 | execution | + Phase files (CONTEXT.md, RESEARCH.md, PLANs, SUMMARYs) |
61
+ | 4 | verification | + VERIFICATION.md, UAT artifacts |
62
+
63
+ ## Core Workflow
64
+
65
+ ```
66
+ /dgs:new-project → /dgs:plan-phase → /dgs:execute-phase → repeat
67
+ ```
68
+
69
+ ### Product Setup (v2)
70
+
71
+ **`/dgs:init-product`**
72
+ One-time setup of the product folder for multi-project, multi-repo work. *(Tier 1: lite)*
73
+
74
+ - Creates `REPOS.md` and `PROJECTS.md` in the planning root
75
+ - Scans for git repos in subdirectories and registers them
76
+ - Offers migration from existing v1 setup (moves artifacts into project subfolder)
77
+ - Initializes product-level git if not already a repo
78
+
79
+ Usage: `/dgs:init-product`
80
+
81
+ ### Project Initialization
82
+
83
+ **`/dgs:new-project`**
84
+ Initialize new project through unified flow. *(Tier 2: planning)*
85
+
86
+ One command takes you from idea to ready-for-planning:
87
+ - Deep questioning to understand what you're building
88
+ - Optional domain research (spawns 4 parallel researcher agents)
89
+ - Requirements definition with v1/v2/out-of-scope scoping
90
+ - Roadmap creation with phase breakdown and success criteria
91
+
92
+ Creates project artifacts:
93
+ - `PROJECT.md` — vision and requirements
94
+ - `config.json` — workflow mode (interactive/yolo)
95
+ - `research/` — domain research (if selected)
96
+ - `REQUIREMENTS.md` — scoped requirements with REQ-IDs
97
+ - `ROADMAP.md` — phases mapped to requirements
98
+ - `STATE.md` — project memory
99
+
100
+ **v2 additions:** Prompts for project name (used as folder slug), prompts for which repos this project touches (from REPOS.md), checks for overlap with other active projects. Artifacts are created under `<planning-root>/<project-slug>/`.
101
+
102
+ Usage: `/dgs:new-project`
103
+
104
+ **`/dgs:map-codebase [<repo-name>]`**
105
+ Map registered repos with parallel agents to produce structured codebase documentation. *(Tier 2: planning)*
106
+
107
+ - Reads REPOS.md to discover registered repos and their paths
108
+ - Spawns 4 parallel mapper agents per repo (Stack, Architecture, Quality, Concerns)
109
+ - Creates `codebase/<repo-name>/` subdirectory per repo with 7 documents: STACK.md, ARCHITECTURE.md, STRUCTURE.md, CONVENTIONS.md, TESTING.md, INTEGRATIONS.md, CONCERNS.md
110
+ - Synthesizes 7 unified top-level files from per-repo content (labeled repo sections + cross-repo summary)
111
+ - Generates CROSS-REPO.md with comparison tables for shared dependencies, API boundaries, common/divergent patterns (2+ repos only)
112
+ - Runs secret scanning across all per-repo and unified files
113
+ - Use before `/dgs:new-project` on existing codebases
114
+
115
+ **Modes:**
116
+ - **Refresh** (default, no args): Clears all codebase maps and remaps everything from scratch
117
+ - **Update** (`/dgs:map-codebase <repo-name>` or `--only <name>`): Re-maps only the specified repo, regenerates unified files from all repos
118
+
119
+ **Directory structure:**
120
+ ```
121
+ codebase/
122
+ ├── <repo-name>/ # Per-repo maps (one per registered repo)
123
+ │ ├── STACK.md
124
+ │ ├── ARCHITECTURE.md
125
+ │ ├── STRUCTURE.md
126
+ │ ├── CONVENTIONS.md
127
+ │ ├── TESTING.md
128
+ │ ├── INTEGRATIONS.md
129
+ │ └── CONCERNS.md
130
+ ├── ARCHITECTURE.md # Unified (synthesized from all repos)
131
+ ├── STACK.md # Unified
132
+ ├── STRUCTURE.md # Unified
133
+ └── CROSS-REPO.md # Cross-repo analysis (2+ repos)
134
+ ```
135
+
136
+ Usage: `/dgs:map-codebase` (refresh all repos)
137
+ Usage: `/dgs:map-codebase api-service` (update specific repo)
138
+ Usage: `/dgs:map-codebase --only api-service` (same, explicit flag)
139
+
140
+ ### Project Management (v2)
141
+
142
+ **`/dgs:switch-project [name]`**
143
+ Switch active project context. *(Tier 1: lite)*
144
+
145
+ - If no name given, shows picker with all active projects
146
+ - Sets `current_project` in `dgs.config.json`
147
+ - All subsequent DGS commands operate on the selected project
148
+ - Shows brief status of the switched-to project
149
+
150
+ Usage: `/dgs:switch-project auth-overhaul`
151
+ Usage: `/dgs:switch-project` (shows picker)
152
+
153
+ **`/dgs:list-projects`**
154
+ Show all projects and their status. *(Tier 1: lite)*
155
+
156
+ - Reads PROJECTS.md and each project's STATE.md
157
+ - Shows active and completed projects with progress bars
158
+ - Displays which repos each project touches
159
+
160
+ Usage: `/dgs:list-projects`
161
+
162
+ **`/dgs:complete-project`**
163
+ Mark the current project as done. *(Tier 1: lite)*
164
+
165
+ - Verifies all phases complete (or prompts for early completion)
166
+ - Sets `status: completed` in project's STATE.md
167
+ - Moves project from Active to Completed in PROJECTS.md
168
+ - Clears `current_project` and prompts to switch if other projects exist
169
+
170
+ Usage: `/dgs:complete-project`
171
+
172
+ ### Repo Management (v2)
173
+
174
+ **`/dgs:add-repo [path]`**
175
+ Register a new repo with the product. *(Tier 1: lite)*
176
+
177
+ - Verifies path exists and contains a git repo
178
+ - Extracts GitHub URL from git remote
179
+ - Adds to REPOS.md
180
+ - Optionally runs `/dgs:map-codebase` for the new repo
181
+
182
+ Usage: `/dgs:add-repo ./services/api`
183
+
184
+ **`/dgs:remove-repo [name]`**
185
+ Unregister a repo from the product. *(Tier 1: lite)*
186
+
187
+ - Checks if active projects reference this repo
188
+ - Warns before removal if references found
189
+ - Removes from REPOS.md
190
+
191
+ Usage: `/dgs:remove-repo legacy-service`
192
+
193
+ **`/dgs:overlap-check`**
194
+ Show which repos are touched by multiple active projects. *(Tier 1: lite)*
195
+
196
+ - Scans plan files across all active projects for repo references
197
+ - Highlights specific file-level overlaps
198
+ - Runs automatically during `/dgs:new-project` and `/dgs:new-milestone`
199
+
200
+ Usage: `/dgs:overlap-check`
201
+
202
+ ### Phase Planning
203
+
204
+ **`/dgs:discuss-phase <number>`**
205
+ Help articulate your vision for a phase before planning. *(Tier 2: planning)*
206
+
207
+ - Captures how you imagine this phase working
208
+ - Creates CONTEXT.md with your vision, essentials, and boundaries
209
+ - Use when you have ideas about how something should look/feel
210
+ - Optional `--batch` asks 2-5 related questions at a time instead of one-by-one
211
+
212
+ Usage: `/dgs:discuss-phase 2`
213
+ Usage: `/dgs:discuss-phase 2 --batch`
214
+ Usage: `/dgs:discuss-phase 2 --batch=3`
215
+
216
+ **`/dgs:research-phase <number>`**
217
+ Comprehensive ecosystem research for niche/complex domains. *(Tier 2: planning)*
218
+
219
+ - Discovers standard stack, architecture patterns, pitfalls
220
+ - Creates RESEARCH.md with "how experts build this" knowledge
221
+ - Use for 3D, games, audio, shaders, ML, and other specialized domains
222
+ - Goes beyond "which library" to ecosystem knowledge
223
+
224
+ Usage: `/dgs:research-phase 3`
225
+
226
+ **`/dgs:list-phase-assumptions <number>`**
227
+ See what Claude is planning to do before it starts. *(Tier 2: planning)*
228
+
229
+ - Shows Claude's intended approach for a phase
230
+ - Lets you course-correct if Claude misunderstood your vision
231
+ - No files created - conversational output only
232
+
233
+ Usage: `/dgs:list-phase-assumptions 3`
234
+
235
+ **`/dgs:plan-phase <number>`**
236
+ Create detailed execution plan for a specific phase. *(Tier 2: planning)*
237
+
238
+ - Generates PLAN.md files in the phase directory
239
+ - Breaks phase into concrete, actionable tasks
240
+ - Includes verification criteria and success measures
241
+ - Multiple plans per phase supported (XX-01, XX-02, etc.)
242
+ - `--non-interactive`: Skip interactive prompts (auto-resolve confirmation gates) without auto-advancing to execute-phase
243
+ - `--auto`: Auto-advance through plan-phase into execute-phase (implies `--non-interactive`)
244
+
245
+ **v2 additions:** Each task includes a `<repos>` field identifying which repos it touches. Planner auto-detects repos from file paths against REPOS.md.
246
+
247
+ Usage: `/dgs:plan-phase 1`
248
+ Usage: `/dgs:plan-phase 1 --non-interactive` (skip prompts, stop after planning)
249
+ Usage: `/dgs:plan-phase 1 --auto` (skip prompts and auto-advance to execution)
250
+
251
+ ### Execution
252
+
253
+ **`/dgs:execute-phase <phase-number>`**
254
+ Execute all plans in a phase. *(Tier 3: execution)*
255
+
256
+ - Groups plans by wave (from frontmatter), executes waves sequentially
257
+ - Plans within each wave run in parallel via Task tool
258
+ - Verifies phase goal after all plans complete
259
+ - Updates REQUIREMENTS.md, ROADMAP.md, STATE.md
260
+ - `--non-interactive`: Auto-approve checkpoints and verification without auto-advancing to next phase
261
+ - `--auto`: Auto-advance to next phase via transition.md (implies `--non-interactive`)
262
+ - `--gaps-only`: Execute only gap-closure plans
263
+
264
+ **v2 additions:** Pre-flight check for uncommitted changes in touched repos. Git commits are scoped per-repo automatically (changes to `server/` and `web-app/` produce separate commits). Commit messages include project context: `feat(auth-overhaul/02-01): add OAuth callback`.
265
+
266
+ Usage: `/dgs:execute-phase 5`
267
+ Usage: `/dgs:execute-phase 5 --non-interactive` (auto-approve without auto-advancing)
268
+ Usage: `/dgs:execute-phase 5 --auto` (auto-approve and advance to next phase)
269
+
270
+ ### Quick Mode
271
+
272
+ **`/dgs:quick`**
273
+ Execute small, ad-hoc tasks with DGS guarantees but skip optional agents. *(Tier 2: planning)*
274
+
275
+ Quick mode uses the same system with a shorter path:
276
+ - Spawns planner + executor (skips researcher, checker, verifier)
277
+ - Quick tasks live in the project's `quick/` directory
278
+ - Updates STATE.md tracking (not ROADMAP.md)
279
+
280
+ Use when you know exactly what to do and the task is small enough to not need research or verification.
281
+
282
+ Usage: `/dgs:quick`
283
+
284
+ ### Roadmap Management
285
+
286
+ **`/dgs:add-phase <description>`**
287
+ Add new phase to end of current milestone. *(Tier 2: planning)*
288
+
289
+ - Appends to ROADMAP.md
290
+ - Uses next sequential number
291
+ - Updates phase directory structure
292
+
293
+ Usage: `/dgs:add-phase "Add admin dashboard"`
294
+
295
+ **`/dgs:insert-phase <after> <description>`**
296
+ Insert urgent work as decimal phase between existing phases. *(Tier 2: planning)*
297
+
298
+ - Creates intermediate phase (e.g., 7.1 between 7 and 8)
299
+ - Useful for discovered work that must happen mid-milestone
300
+ - Maintains phase ordering
301
+
302
+ Usage: `/dgs:insert-phase 7 "Fix critical auth bug"`
303
+ Result: Creates Phase 7.1
304
+
305
+ **`/dgs:remove-phase <number>`**
306
+ Remove a future phase and renumber subsequent phases. *(Tier 2: planning)*
307
+
308
+ - Deletes phase directory and all references
309
+ - Renumbers all subsequent phases to close the gap
310
+ - Only works on future (unstarted) phases
311
+ - Git commit preserves historical record
312
+
313
+ Usage: `/dgs:remove-phase 17`
314
+ Result: Phase 17 deleted, phases 18-20 become 17-19
315
+
316
+ ### Milestone Management
317
+
318
+ **`/dgs:new-milestone <name>`**
319
+ Start a new milestone through unified flow. *(Tier 2: planning)*
320
+
321
+ - Deep questioning to understand what you're building next
322
+ - Optional domain research (spawns 4 parallel researcher agents)
323
+ - Requirements definition with scoping
324
+ - Roadmap creation with phase breakdown
325
+
326
+ Mirrors `/dgs:new-project` flow for brownfield projects (existing PROJECT.md).
327
+
328
+ Usage: `/dgs:new-milestone "v2.0 Features"`
329
+
330
+ **`/dgs:complete-milestone <version>`**
331
+ Archive completed milestone and prepare for next version. *(Tier 4: verification)*
332
+
333
+ - Creates MILESTONES.md entry with stats
334
+ - Archives full details to milestones/ directory
335
+ - Creates git tag for the release
336
+ - Prepares workspace for next version
337
+
338
+ When invoked from a milestone job (`<job-mode>silent</job-mode>`), all interactive gates are auto-resolved: scope confirmation, incomplete requirements acknowledgment, phase archival (skipped), branch handling (kept for manual review), and tag push (skipped for safety).
339
+
340
+ Usage: `/dgs:complete-milestone 1.0.0`
341
+
342
+ ### Progress Tracking
343
+
344
+ **`/dgs:progress`**
345
+ Check project status and intelligently route to next action. *(Tier 1: lite)*
346
+
347
+ - Shows visual progress bar and completion percentage
348
+ - Summarizes recent work from SUMMARY files
349
+ - Displays current position and what's next
350
+ - Lists key decisions and open issues
351
+ - Offers to execute next plan or create it if missing
352
+ - Detects 100% milestone completion
353
+
354
+ **v2 additions:** Shows current project context and which repos it touches. Notes if other active projects overlap on the same repos.
355
+
356
+ Usage: `/dgs:progress`
357
+
358
+ ### Session Management
359
+
360
+ **`/dgs:resume-work`**
361
+ Resume work from previous session with full context restoration. *(Tier 1: lite)*
362
+
363
+ - Reads STATE.md for project context
364
+ - Shows current position and recent progress
365
+ - Offers next actions based on project state
366
+
367
+ Usage: `/dgs:resume-work`
368
+
369
+ **`/dgs:pause-work`**
370
+ Create context handoff when pausing work mid-phase. *(Tier 1: lite)*
371
+
372
+ - Creates .continue-here file with current state
373
+ - Updates STATE.md session continuity section
374
+ - Captures in-progress work context
375
+
376
+ Usage: `/dgs:pause-work`
377
+
378
+ ### Debugging
379
+
380
+ **`/dgs:debug [issue description]`**
381
+ Systematic debugging with persistent state across context resets. *(Tier 2: planning)*
382
+
383
+ - Gathers symptoms through adaptive questioning
384
+ - Creates debug tracking file in the debug directory
385
+ - Investigates using scientific method (evidence -> hypothesis -> test)
386
+ - Survives `/clear` -- run `/dgs:debug` with no args to resume
387
+ - Archives resolved issues to debug/resolved/
388
+
389
+ Usage: `/dgs:debug "login button doesn't work"`
390
+ Usage: `/dgs:debug` (resume active session)
391
+
392
+ ### Todo Management
393
+
394
+ **`/dgs:add-todo [description]`**
395
+ Capture idea or task as todo from current conversation. *(Tier 1: lite)*
396
+
397
+ - Extracts context from conversation (or uses provided description)
398
+ - Creates structured todo file in the project's todos/pending/ directory
399
+ - Infers area from file paths for grouping
400
+ - Checks for duplicates before creating
401
+ - Updates STATE.md todo count
402
+
403
+ Usage: `/dgs:add-todo` (infers from conversation)
404
+ Usage: `/dgs:add-todo Add auth token refresh`
405
+
406
+ **`/dgs:check-todos [area]`**
407
+ List pending todos and select one to work on. *(Tier 1: lite)*
408
+
409
+ - Lists all pending todos with title, area, age
410
+ - Optional area filter (e.g., `/dgs:check-todos api`)
411
+ - Loads full context for selected todo
412
+ - Routes to appropriate action (work now, add to phase, brainstorm)
413
+ - Moves todo to done/ when work begins
414
+
415
+ Usage: `/dgs:check-todos`
416
+ Usage: `/dgs:check-todos api`
417
+
418
+ ### Ideas & Specs
419
+
420
+ `capture ideas → develop idea → write spec → new-project --auto`
421
+
422
+ #### Ideas
423
+
424
+ **`/dgs:add-idea [description]`**
425
+ Capture a new idea with title, problem statement, and optional tags. *(Tier 1: lite)*
426
+
427
+ - Interactive mode: guided prompts for title, problem, rough idea, tags
428
+ - Auto mode: `/dgs:add-idea --auto "freeform text"` extracts structure automatically
429
+
430
+ Usage: `/dgs:add-idea`
431
+ Usage: `/dgs:add-idea --auto "Let users export data as CSV"`
432
+
433
+ **`/dgs:update-idea <id>`**
434
+ Update an existing idea's content or append notes. *(Tier 1: lite)*
435
+
436
+ - Edit title, problem, rough idea, or tags
437
+ - Append timestamped notes: `/dgs:update-idea 3 --note "Talked to users, they want this"`
438
+
439
+ Usage: `/dgs:update-idea 3`
440
+ Usage: `/dgs:update-idea 3 --note "Priority increased"`
441
+
442
+ **`/dgs:list-ideas`**
443
+ View all ideas grouped by state (pending, done, rejected). *(Tier 1: lite)*
444
+
445
+ - Filter by tag: `--tag api`
446
+ - Warns about orphaned done ideas with no spec reference
447
+
448
+ Usage: `/dgs:list-ideas`
449
+ Usage: `/dgs:list-ideas --tag backend`
450
+
451
+ **`/dgs:reject-idea <id>`**
452
+ Mark an idea as rejected with optional reason. *(Tier 1: lite)*
453
+
454
+ - Requires confirmation before rejecting
455
+ - Preserves git history via `git mv`
456
+
457
+ Usage: `/dgs:reject-idea 5`
458
+
459
+ **`/dgs:restore-idea <id>`**
460
+ Restore a rejected or done idea back to pending. *(Tier 1: lite)*
461
+
462
+ - Requires confirmation before restoring
463
+ - Preserves git history via `git mv`
464
+
465
+ Usage: `/dgs:restore-idea 5`
466
+
467
+ **`/dgs:discuss-idea [id]`**
468
+ Develop and refine an idea through structured discussion. *(Tier 2: planning)*
469
+
470
+ - Three phases: Understanding, Exploration, Refinement
471
+ - Appends Discussion Log to idea file (Key Insights, Refined Problem, Refined Approach, Open Questions, Decision)
472
+ - Builds on prior discussions when re-running
473
+ - User can exit mid-discussion; partial progress saved
474
+
475
+ Usage: `/dgs:discuss-idea 5`
476
+ Usage: `/dgs:discuss-idea` (shows picker)
477
+
478
+ **`/dgs:research-idea [id]`**
479
+ Research an idea's feasibility and technical landscape. *(Tier 2: planning)*
480
+
481
+ - Five dimensions: web search, codebase analysis, landscape survey, approaches, feasibility
482
+ - Creates research document at `docs/ideas/pending/{slug}-research.md` (relative to planning root)
483
+ - Appends Research Log to idea file (Summary, Document link, Key Finding, Recommendation)
484
+ - Can run multiple times; each run appends a new entry
485
+
486
+ Usage: `/dgs:research-idea 5`
487
+ Usage: `/dgs:research-idea` (shows picker)
488
+
489
+ **`/dgs:develop-idea [id]`**
490
+ Combined discussion then research in one continuous flow. *(Tier 2: planning)*
491
+
492
+ - Runs discussion first, commits, then research
493
+ - Skips research if discussion concludes idea is not viable
494
+ - Offers re-run choices when prior history exists (re-do both, just discuss, just research)
495
+
496
+ Usage: `/dgs:develop-idea 5`
497
+ Usage: `/dgs:develop-idea` (shows picker)
498
+
499
+ **`/dgs:consolidate-ideas [id...] [--title "..."]`**
500
+ Merge two or more related pending ideas into a single AI-synthesised idea. *(Tier 2: planning)*
501
+
502
+ - Without IDs: lists pending ideas for interactive selection (minimum 2 required)
503
+ - AI synthesises a coherent body capturing the combined intent of all source ideas (not mechanical concatenation)
504
+ - Tags are the deduplicated union of all source idea tags
505
+ - Discussion and research logs are merged with `[from #ID]` attribution, ordered chronologically
506
+ - User reviews a diff-style preview comparing source ideas with the synthesised result before committing
507
+ - User can approve, request edits, or cancel
508
+ - After approval, source ideas move to `consolidated/` with lineage references, new idea created in `pending/`
509
+ - Single atomic git commit: `ideas: consolidate #id1, #id2 -> #new-id - title`
510
+ - `--title "..."`: Provide an explicit title instead of AI-generated one
511
+
512
+ Usage: `/dgs:consolidate-ideas 1 3 17` (consolidate ideas 1, 3, and 17)
513
+ Usage: `/dgs:consolidate-ideas` (interactive selection)
514
+ Usage: `/dgs:consolidate-ideas 1 3 --title "Unified API resilience"` (with explicit title)
515
+
516
+ **`/dgs:find-related-ideas [id] [--threshold high|medium|low]`**
517
+ Find pending ideas related to a selected idea using multi-signal scoring. *(Tier 2: planning)*
518
+
519
+ - Without ID: lists pending ideas for interactive selection
520
+ - Three scoring signals: tag overlap (algorithmic), semantic similarity (AI), implementation overlap (AI)
521
+ - Project context files (codebase/, docs/product/) inform implementation overlap scoring when available
522
+ - Results grouped by match level (HIGH/MEDIUM/LOW) with per-idea reasoning
523
+ - User can select ideas from results and flow directly into consolidation without a separate command
524
+ - `--threshold`: Filter by minimum match level (default: `medium`)
525
+ - `high`: Only high-confidence matches
526
+ - `medium`: High and medium matches
527
+ - `low`: All matches including low-confidence
528
+
529
+ Usage: `/dgs:find-related-ideas 42` (find ideas related to #42)
530
+ Usage: `/dgs:find-related-ideas` (interactive selection)
531
+ Usage: `/dgs:find-related-ideas 42 --threshold low` (show all matches including low)
532
+
533
+ **`/dgs:undo-consolidation [id]`**
534
+ Undo a previous consolidation -- restore source ideas to pending and delete the consolidated idea. *(Tier 1: lite)*
535
+
536
+ - Without ID: lists pending ideas that have `consolidated_from` for interactive selection
537
+ - Validates the target idea is a consolidated result (has `consolidated_from` field)
538
+ - Shows affected ideas and asks for confirmation before proceeding
539
+ - Restores all source ideas from `consolidated/` back to `pending/`, removes their `consolidated_into` references
540
+ - Deletes the consolidated result idea
541
+ - Single atomic git commit: `ideas: undo consolidation #id - title`
542
+
543
+ Usage: `/dgs:undo-consolidation 5` (undo consolidation of idea #5)
544
+ Usage: `/dgs:undo-consolidation` (interactive selection)
545
+
546
+ #### Specs
547
+
548
+ **`/dgs:write-spec`**
549
+ Write a structured PRD spec from selected pending ideas. *(Tier 2: planning)*
550
+
551
+ - Generates Problem, Goals, Non-Goals, User Stories, Requirements, Success Metrics
552
+ - Cross-LLM review loop with OpenAI and Gemini (if configured)
553
+ - Auto-searches for related prior art before drafting
554
+ - `--auto` mode: runs full flow without user review step
555
+
556
+ Usage: `/dgs:write-spec`
557
+ Usage: `/dgs:write-spec --auto 1 3 7`
558
+
559
+ **`/dgs:import-spec <path> [--ideas <id...>]`**
560
+ Import an external document (PDF, markdown, image) and convert it into a structured 9-section PRD spec. *(Tier 2: planning)*
561
+
562
+ - Reads the source file and restructures its content into DGS spec format
563
+ - Presents converted spec for review with options to save, edit, discard, or restart
564
+ - Saves as draft spec with original document preserved as attachment
565
+ - `--ideas <id...>`: Link to existing idea IDs (sets source_ideas in spec frontmatter)
566
+
567
+ Usage: `/dgs:import-spec ./requirements.pdf`
568
+ Usage: `/dgs:import-spec ./mobile-app-redesign.md --ideas 3 7`
569
+
570
+ **`/dgs:list-specs`**
571
+ View all specs grouped by status (Draft, Final) with version and implementation tracking. *(Tier 1: lite)*
572
+
573
+ - `--draft`: Show only draft specs
574
+ - `--final`: Show only finalized specs
575
+ - Output includes Version and Implementation columns showing spec version and linked milestone status
576
+
577
+ Usage: `/dgs:list-specs`
578
+ Usage: `/dgs:list-specs --final`
579
+
580
+ **`/dgs:refine-spec <slug> [--section <N>]`**
581
+ Refine a spec through conversational editing with Claude as a collaborative thinking partner. *(Tier 2: planning)*
582
+
583
+ - `--section <N>`: Focus on a specific section by number or heading name
584
+ - Version increments by 0.1 on each refinement
585
+ - All changes saved atomically at end of session
586
+ - Warns when refining a final-status spec (moves back to draft)
587
+
588
+ Usage: `/dgs:refine-spec spec-lifecycle-management`
589
+ Usage: `/dgs:refine-spec spec-lifecycle-management --section 5`
590
+ Usage: `/dgs:refine-spec spec-lifecycle-management --section "requirements"`
591
+
592
+ **`/dgs:approve-spec <slug>`**
593
+ Approve a draft spec after completeness validation, transitioning to final status. *(Tier 2: planning)*
594
+
595
+ - Validates required sections (Problem Statement, Goals, Requirements) and P0 requirements
596
+ - Blocks on errors (missing required sections, blocking open questions)
597
+ - Warns on missing optional sections (Success Metrics, Implementation Notes) -- user confirms to proceed
598
+ - Already-final specs show informational message with no changes
599
+
600
+ Usage: `/dgs:approve-spec spec-lifecycle-management`
601
+
602
+ #### Documents
603
+
604
+ **`/dgs:add-doc <file>`**
605
+ Add a supporting document (PDF, image, spreadsheet) to a scope. *(Tier 1: lite)*
606
+
607
+ - Scopes: product, idea, or spec
608
+ - Auto-extracts text from PDF, XLSX, CSV, DOCX
609
+ - Generates INDEX.md and SHA-256 checksums
610
+
611
+ Usage: `/dgs:add-doc research.pdf --scope product`
612
+
613
+ **`/dgs:list-docs`**
614
+ View all documents grouped by scope with optional filters. *(Tier 1: lite)*
615
+
616
+ Usage: `/dgs:list-docs`
617
+
618
+ **`/dgs:remove-doc`**
619
+ Remove a document with confirmation, or move between scopes with `--move`. *(Tier 1: lite)*
620
+
621
+ Usage: `/dgs:remove-doc research.pdf --scope product`
622
+
623
+ #### Search
624
+
625
+ **`/dgs:search <query>`**
626
+ Keyword search across ideas, specs, docs, and projects. *(Tier 1: lite)*
627
+
628
+ - Results grouped by type with context snippets
629
+ - Filters: `--ideas-only`, `--specs-only`, `--docs-only`, `--include-rejected`, `--tags`
630
+
631
+ Usage: `/dgs:search "authentication"`
632
+ Usage: `/dgs:search "api" --specs-only`
633
+
634
+ ### User Acceptance Testing
635
+
636
+ **`/dgs:verify-work [phase]`**
637
+ Validate built features through conversational UAT. *(Tier 4: verification)*
638
+
639
+ - Extracts testable deliverables from SUMMARY.md files
640
+ - Presents tests one at a time (yes/no responses)
641
+ - Automatically diagnoses failures and creates fix plans
642
+ - Ready for re-execution if issues found
643
+
644
+ **v2 additions:** Verification runs holistically across all repos for a phase. Verifier detects repo tech stacks to run verification steps correctly.
645
+
646
+ Usage: `/dgs:verify-work 3`
647
+
648
+ ### Milestone Auditing
649
+
650
+ **`/dgs:audit-milestone [version]`**
651
+ Audit milestone completion against original intent. *(Tier 4: verification)*
652
+
653
+ - Reads all phase VERIFICATION.md files
654
+ - Checks requirements coverage
655
+ - Spawns integration checker for cross-phase wiring
656
+ - Creates MILESTONE-AUDIT.md with gaps and tech debt
657
+
658
+ Usage: `/dgs:audit-milestone`
659
+
660
+ **`/dgs:plan-milestone-gaps`**
661
+ Create phases to close gaps identified by audit. *(Tier 2: planning)*
662
+
663
+ - Reads MILESTONE-AUDIT.md and groups gaps into phases
664
+ - Prioritizes by requirement priority (must/should/nice)
665
+ - Adds gap closure phases to ROADMAP.md
666
+ - Ready for `/dgs:plan-phase` on new phases
667
+ - `--auto`: Non-interactive mode -- auto-approve gap closure phases without user confirmation
668
+
669
+ Usage: `/dgs:plan-milestone-gaps`
670
+ Usage: `/dgs:plan-milestone-gaps --auto` (non-interactive gap closure)
671
+
672
+ ### Milestone Jobs
673
+
674
+ | Command | What it does | When to use |
675
+ |---------|--------------|-------------|
676
+ | `/dgs:create-milestone-job [version] [--no-check]` | Generate a build job from roadmap | Start automated milestone build |
677
+ | `/dgs:run-job <version> [--dry-run]` | Execute a milestone job end-to-end | Run or resume a milestone job |
678
+ | `/dgs:list-jobs` | List all jobs grouped by status | See job pipeline |
679
+ | `/dgs:cancel-job <version>` | Cancel an in-progress job | Abort a running job |
680
+ | `/dgs:rollback-job <version>` | Roll back code changes to pre-job state | Undo a completed or failed job |
681
+
682
+ **`/dgs:rollback-job <version>`**
683
+ Roll back all code changes made by a milestone job to pre-job commit SHAs. *(Tier 1: lite)*
684
+
685
+ - Reads starting SHAs recorded by run-job
686
+ - Shows preview of repos and phases affected
687
+ - Requires explicit "rollback" confirmation (destructive)
688
+ - Resets CODE repos only (planning repo preserved)
689
+ - Deletes SUMMARY.md files for executed phases
690
+ - Marks job status as "rolled_back"
691
+
692
+ Usage: `/dgs:rollback-job v6`
693
+
694
+ ### Configuration
695
+
696
+ **`/dgs:settings`**
697
+ Configure workflow toggles and model profile interactively. *(Tier 1: lite)*
698
+
699
+ - Toggle researcher, plan checker, verifier agents
700
+ - Select model profile (quality/balanced/budget)
701
+ - Updates `dgs.config.json`
702
+
703
+ Usage: `/dgs:settings`
704
+
705
+ **`/dgs:set-profile <profile>`**
706
+ Quick switch model profile for DGS agents. *(Tier 0: none)*
707
+
708
+ - `quality` -- Opus everywhere except verification
709
+ - `balanced` -- Opus for planning, Sonnet for execution (default)
710
+ - `budget` -- Sonnet for writing, Haiku for research/verification
711
+
712
+ Usage: `/dgs:set-profile budget`
713
+
714
+ ### Utility Commands
715
+
716
+ **`/dgs:cleanup`**
717
+ Archive accumulated phase directories from completed milestones. *(Tier 1: lite)*
718
+
719
+ - Identifies phases from completed milestones still in the phases directory
720
+ - Shows dry-run summary before moving anything
721
+ - Moves phase dirs to the milestones archive
722
+ - Use after multiple milestones to reduce phases/ clutter
723
+
724
+ Usage: `/dgs:cleanup`
725
+
726
+ **`/dgs:capture-principle [description]`**
727
+ Capture a design principle from conversation context. *(Tier 1: lite)*
728
+
729
+ - Distills actionable rule from debugging sessions, root cause analysis, or architectural discussions
730
+ - Presents proposed principle for user confirmation/editing
731
+ - Saves to `.agents/skills/design-principles/SKILL.md` in the project repo
732
+ - Checks for duplicate/overlapping principles before appending
733
+ - Principles are automatically loaded by DGS planner and executor during skill discovery
734
+
735
+ Usage: `/dgs:capture-principle` (infers from conversation)
736
+ Usage: `/dgs:capture-principle "Always validate at boundaries"`
737
+
738
+ **`/dgs:help`**
739
+ Show this command reference. *(Tier 0: none)*
740
+
741
+ **`/dgs:update`**
742
+ Update DGS to latest version with changelog preview. *(Tier 0: none)*
743
+
744
+ - Shows installed vs latest version comparison
745
+ - Displays changelog entries for versions you've missed
746
+ - Highlights breaking changes
747
+ - Confirms before running install
748
+ - Better than raw `npx @ktpartners/dgs-platform`
749
+
750
+ Usage: `/dgs:update`
751
+
752
+ **`/dgs:join-discord`**
753
+ Join the DGS Discord community. *(Tier 0: none)*
754
+
755
+ - Get help, share what you're building, stay updated
756
+ - Connect with other DGS users
757
+
758
+ Usage: `/dgs:join-discord`
759
+
760
+ ## Files & Structure
761
+
762
+ DGS supports two directory layouts. Choose during `/dgs:init-product`:
763
+
764
+ ### .planning/ Layout (Default)
765
+
766
+ Standard layout for repos that also contain source code:
767
+
768
+ ```
769
+ my-repo/
770
+ ├── .planning/ # Planning root
771
+ │ ├── dgs.config.json # Workflow mode & gates
772
+ │ ├── PROJECT.md # Project vision
773
+ │ ├── ROADMAP.md # Current phase breakdown
774
+ │ ├── STATE.md # Project memory & context
775
+ │ ├── REQUIREMENTS.md # Scoped requirements
776
+ │ ├── todos/ # Captured ideas and tasks
777
+ │ ├── debug/ # Active debug sessions
778
+ │ ├── milestones/ # Archived milestone snapshots
779
+ │ ├── codebase/ # Codebase map (brownfield projects)
780
+ │ └── phases/ # Phase directories
781
+ │ ├── 01-foundation/
782
+ │ │ ├── 01-01-PLAN.md
783
+ │ │ └── 01-01-SUMMARY.md
784
+ │ └── 02-core-features/
785
+ │ ├── 02-01-PLAN.md
786
+ │ └── 02-01-SUMMARY.md
787
+ └── src/ # Your source code
788
+ ```
789
+
790
+ ### Root Layout
791
+
792
+ For dedicated planning repos where DGS owns the entire directory:
793
+
794
+ ```
795
+ my-planning-repo/
796
+ ├── dgs.config.json # Workflow mode & gates
797
+ ├── PROJECT.md # Project vision
798
+ ├── ROADMAP.md # Current phase breakdown
799
+ ├── STATE.md # Project memory & context
800
+ ├── REQUIREMENTS.md # Scoped requirements
801
+ ├── todos/ # Captured ideas and tasks
802
+ ├── debug/ # Active debug sessions
803
+ ├── milestones/ # Archived milestone snapshots
804
+ ├── codebase/ # Codebase map (brownfield projects)
805
+ └── phases/ # Phase directories
806
+ ├── 01-foundation/
807
+ └── 02-core-features/
808
+ ```
809
+
810
+ ### v2 (Multi-Project, Multi-Repo)
811
+
812
+ Multi-project mode works with either layout. Planning root contains project subfolders:
813
+
814
+ ```
815
+ my-product/ # Product folder (git repo)
816
+ ├── <planning-root>/ # .planning/ or repo root
817
+ │ ├── REPOS.md # Repo registry (names, paths, URLs)
818
+ │ ├── PROJECTS.md # Project index (auto-generated)
819
+ │ ├── dgs.config.json # Product-level config
820
+ │ ├── codebase/ # Shared codebase map
821
+ │ │ └── <repo-name>/ # Per-repo codebase maps
822
+ │ ├── auth-overhaul/ # Project: auth-overhaul
823
+ │ │ ├── PROJECT.md
824
+ │ │ ├── REQUIREMENTS.md
825
+ │ │ ├── ROADMAP.md
826
+ │ │ ├── STATE.md
827
+ │ │ ├── research/
828
+ │ │ ├── phases/
829
+ │ │ ├── todos/
830
+ │ │ ├── quick/
831
+ │ │ └── debug/
832
+ │ └── dashboard-v2/ # Project: dashboard-v2
833
+ │ ├── PROJECT.md
834
+ │ └── ...
835
+ ├── CLAUDE.md # Product-level Claude context
836
+ ├── web-app/ # Repo: web frontend (own git repo)
837
+ ├── server/ # Repo: API server (own git repo)
838
+ └── shared-lib/ # Repo: shared utilities (own git repo)
839
+ ```
840
+
841
+ **Key concepts:**
842
+ - **Product** = top-level container with its own git repo for planning changes
843
+ - **Project** = a unit of work (feature, initiative). Lives in `<planning-root>/<project-slug>/`. Multiple can be active.
844
+ - **Repo** = a source code repository. Registered in REPOS.md. Projects can touch multiple repos.
845
+
846
+ ## Workflow Modes
847
+
848
+ Set during `/dgs:new-project`:
849
+
850
+ **Interactive Mode**
851
+
852
+ - Confirms each major decision
853
+ - Pauses at checkpoints for approval
854
+ - More guidance throughout
855
+
856
+ **YOLO Mode**
857
+
858
+ - Auto-approves most decisions
859
+ - Executes plans without confirmation
860
+ - Only stops for critical checkpoints
861
+
862
+ Change anytime by editing `dgs.config.json`
863
+
864
+ ## Planning Configuration
865
+
866
+ Configure how planning artifacts are managed in `dgs.config.json`:
867
+
868
+ **`planning.commit_docs`** (default: `true`)
869
+ - `true`: Planning artifacts committed to git (standard workflow)
870
+ - `false`: Planning artifacts kept local-only, not committed
871
+
872
+ When `commit_docs: false`:
873
+ - Add the planning root to your `.gitignore`
874
+ - Useful for OSS contributions, client projects, or keeping planning private
875
+ - All planning files still work normally, just not tracked in git
876
+
877
+ **`planning.search_gitignored`** (default: `false`)
878
+ - `true`: Add `--no-ignore` to broad ripgrep searches
879
+ - Only needed when the planning root is gitignored and you want project-wide searches to include it
880
+
881
+ **`git.branching_strategy`** (default: `"none"`)
882
+ - `"none"`: All work commits to current branch
883
+ - `"phase"`: Creates branch per phase (e.g., `dgs/phase-03-authentication`)
884
+ - `"milestone"`: Creates branch per milestone (e.g., `dgs/v1.0-mvp`)
885
+
886
+ Example config:
887
+ ```json
888
+ {
889
+ "planning": {
890
+ "commit_docs": false,
891
+ "search_gitignored": true
892
+ },
893
+ "git": {
894
+ "branching_strategy": "phase"
895
+ }
896
+ }
897
+ ```
898
+
899
+ ## Common Workflows
900
+
901
+ **Starting a new project (v1):**
902
+
903
+ ```
904
+ /dgs:new-project # Unified flow: questioning -> research -> requirements -> roadmap
905
+ /clear
906
+ /dgs:plan-phase 1 # Create plans for first phase
907
+ /clear
908
+ /dgs:execute-phase 1 # Execute all plans in phase
909
+ ```
910
+
911
+ **Starting with multi-repo (v2):**
912
+
913
+ ```
914
+ /dgs:init-product # One-time: register repos, create product structure
915
+ /dgs:new-project # Create project (picks name, selects repos)
916
+ /clear
917
+ /dgs:plan-phase 1 # Plan with per-repo task tracking
918
+ /clear
919
+ /dgs:execute-phase 1 # Execute with per-repo commits
920
+ ```
921
+
922
+ **Switching between projects (v2):**
923
+
924
+ ```
925
+ /dgs:list-projects # See all active projects
926
+ /dgs:switch-project dashboard-v2 # Switch context
927
+ /dgs:progress # See where this project is at
928
+ ```
929
+
930
+ **Resuming work after a break:**
931
+
932
+ ```
933
+ /dgs:progress # See where you left off and continue
934
+ ```
935
+
936
+ **Adding urgent mid-milestone work:**
937
+
938
+ ```
939
+ /dgs:insert-phase 5 "Critical security fix"
940
+ /dgs:plan-phase 5.1
941
+ /dgs:execute-phase 5.1
942
+ ```
943
+
944
+ **Completing a milestone:**
945
+
946
+ ```
947
+ /dgs:complete-milestone 1.0.0
948
+ /clear
949
+ /dgs:new-milestone # Start next milestone (questioning -> research -> requirements -> roadmap)
950
+ ```
951
+
952
+ **Completing a project (v2):**
953
+
954
+ ```
955
+ /dgs:complete-project # Mark project done, switch to another
956
+ ```
957
+
958
+ **Capturing ideas during work:**
959
+
960
+ ```
961
+ /dgs:add-todo # Capture from conversation context
962
+ /dgs:add-todo Fix modal z-index # Capture with explicit description
963
+ /dgs:check-todos # Review and work on todos
964
+ /dgs:check-todos api # Filter by area
965
+ ```
966
+
967
+ **Turning ideas into projects:**
968
+
969
+ ```
970
+ /dgs:add-idea # Capture ideas as they come
971
+ /dgs:list-ideas # Review when ready
972
+ /dgs:develop-idea # Optional: discuss + research in one flow
973
+ # or separately:
974
+ # /dgs:discuss-idea # Refine through conversation
975
+ # /dgs:research-idea # Investigate feasibility
976
+ /dgs:write-spec # Turn ideas into structured spec
977
+ /clear
978
+ /dgs:new-project --auto @spec.md # Create project directly from spec
979
+ ```
980
+
981
+ **Debugging an issue:**
982
+
983
+ ```
984
+ /dgs:debug "form submission fails silently" # Start debug session
985
+ # ... investigation happens, context fills up ...
986
+ /clear
987
+ /dgs:debug # Resume from where you left off
988
+ ```
989
+
990
+ ## Getting Help
991
+
992
+ - Read PROJECT.md for project vision
993
+ - Read STATE.md for current context
994
+ - Check ROADMAP.md for phase status
995
+ - Run `/dgs:progress` to check where you're up to
996
+ - Run `/dgs:list-projects` to see all projects (v2)
997
+ </reference>