@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,136 @@
1
+ ---
2
+ type: prompt
3
+ name: dgs:complete-milestone
4
+ description: Archive completed milestone and prepare for next version
5
+ argument-hint: <version>
6
+ allowed-tools:
7
+ - Read
8
+ - Write
9
+ - Bash
10
+ ---
11
+
12
+ <objective>
13
+ Mark milestone {{version}} complete, archive to milestones/, and update ROADMAP.md and REQUIREMENTS.md.
14
+
15
+ Purpose: Create historical record of shipped version, archive milestone artifacts (roadmap + requirements), and prepare for next milestone.
16
+ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tagged.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ **Load these files NOW (before proceeding):**
21
+
22
+ - @~/.claude/deliver-great-systems/workflows/complete-milestone.md (main workflow)
23
+ - @~/.claude/deliver-great-systems/templates/milestone-archive.md (archive template)
24
+ </execution_context>
25
+
26
+ <context>
27
+ **Project files:**
28
+ - `.planning/ROADMAP.md`
29
+ - `.planning/REQUIREMENTS.md`
30
+ - `.planning/STATE.md`
31
+ - `.planning/PROJECT.md`
32
+
33
+ **User input:**
34
+
35
+ - Version: {{version}} (e.g., "1.0", "1.1", "2.0")
36
+ </context>
37
+
38
+ <process>
39
+
40
+ **Follow complete-milestone.md workflow:**
41
+
42
+ 0. **Check for audit:**
43
+
44
+ - Look for `.planning/v{{version}}-MILESTONE-AUDIT.md`
45
+ - If missing or stale: recommend `/dgs:audit-milestone` first
46
+ - If audit status is `gaps_found`: recommend `/dgs:plan-milestone-gaps` first
47
+ - If audit status is `passed`: proceed to step 1
48
+
49
+ ```markdown
50
+ ## Pre-flight Check
51
+
52
+ {If no v{{version}}-MILESTONE-AUDIT.md:}
53
+ ⚠ No milestone audit found. Run `/dgs:audit-milestone` first to verify
54
+ requirements coverage, cross-phase integration, and E2E flows.
55
+
56
+ {If audit has gaps:}
57
+ ⚠ Milestone audit found gaps. Run `/dgs:plan-milestone-gaps` to create
58
+ phases that close the gaps, or proceed anyway to accept as tech debt.
59
+
60
+ {If audit passed:}
61
+ ✓ Milestone audit passed. Proceeding with completion.
62
+ ```
63
+
64
+ 1. **Verify readiness:**
65
+
66
+ - Check all phases in milestone have completed plans (SUMMARY.md exists)
67
+ - Present milestone scope and stats
68
+ - Wait for confirmation
69
+
70
+ 2. **Gather stats:**
71
+
72
+ - Count phases, plans, tasks
73
+ - Calculate git range, file changes, LOC
74
+ - Extract timeline from git log
75
+ - Present summary, confirm
76
+
77
+ 3. **Extract accomplishments:**
78
+
79
+ - Read all phase SUMMARY.md files in milestone range
80
+ - Extract 4-6 key accomplishments
81
+ - Present for approval
82
+
83
+ 4. **Archive milestone:**
84
+
85
+ - Create `.planning/milestones/v{{version}}-ROADMAP.md`
86
+ - Extract full phase details from ROADMAP.md
87
+ - Fill milestone-archive.md template
88
+ - Update ROADMAP.md to one-line summary with link
89
+
90
+ 5. **Archive requirements:**
91
+
92
+ - Create `.planning/milestones/v{{version}}-REQUIREMENTS.md`
93
+ - Mark all v1 requirements as complete (checkboxes checked)
94
+ - Note requirement outcomes (validated, adjusted, dropped)
95
+ - Delete `.planning/REQUIREMENTS.md` (fresh one created for next milestone)
96
+
97
+ 6. **Update PROJECT.md:**
98
+
99
+ - Add "Current State" section with shipped version
100
+ - Add "Next Milestone Goals" section
101
+ - Archive previous content in `<details>` (if v1.1+)
102
+
103
+ 7. **Commit and tag:**
104
+
105
+ - Stage: MILESTONES.md, PROJECT.md, ROADMAP.md, STATE.md, archive files
106
+ - Commit: `chore: archive v{{version}} milestone`
107
+ - Tag: `git tag -a v{{version}} -m "[milestone summary]"`
108
+ - Ask about pushing tag
109
+
110
+ 8. **Offer next steps:**
111
+ - `/dgs:new-milestone` — start next milestone (questioning → research → requirements → roadmap)
112
+
113
+ </process>
114
+
115
+ <success_criteria>
116
+
117
+ - Milestone archived to `.planning/milestones/v{{version}}-ROADMAP.md`
118
+ - Requirements archived to `.planning/milestones/v{{version}}-REQUIREMENTS.md`
119
+ - `.planning/REQUIREMENTS.md` deleted (fresh for next milestone)
120
+ - ROADMAP.md collapsed to one-line entry
121
+ - PROJECT.md updated with current state
122
+ - Git tag v{{version}} created
123
+ - Commit successful
124
+ - User knows next steps (including need for fresh requirements)
125
+ </success_criteria>
126
+
127
+ <critical_rules>
128
+
129
+ - **Load workflow first:** Read complete-milestone.md before executing
130
+ - **Verify completion:** All phases must have SUMMARY.md files
131
+ - **User confirmation:** Wait for approval at verification gates
132
+ - **Archive before deleting:** Always create archive files before updating/deleting originals
133
+ - **One-line summary:** Collapsed milestone in ROADMAP.md should be single line with link
134
+ - **Context efficiency:** Archive keeps ROADMAP.md and REQUIREMENTS.md constant size per milestone
135
+ - **Fresh requirements:** Next milestone starts with `/dgs:new-milestone` which includes requirements definition
136
+ </critical_rules>
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: dgs:complete-project
3
+ description: Mark the current project as completed
4
+ argument-hint: "[--slug name]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - AskUserQuestion
9
+ ---
10
+ <objective>
11
+ Mark a project as completed. Moves it to the Completed section in PROJECTS.md and clears current_project if it was active.
12
+
13
+ Requires confirmation before acting. Shows project status first so the user can verify before completing.
14
+ </objective>
15
+
16
+ <process>
17
+
18
+ ## 1. Show Current Status
19
+
20
+ ```bash
21
+ LIST=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs projects list --raw)
22
+ ```
23
+
24
+ Parse JSON. Identify the target project:
25
+ - If `$ARGUMENTS` contains `--slug <name>`, use that slug.
26
+ - Otherwise, use the current active project from the list.
27
+
28
+ If no target project can be identified, display "No active project found. Use `--slug <name>` to specify one, or run `/dgs:switch-project` first." and exit.
29
+
30
+ Display the target project's current status (name, phase, progress, repos touched).
31
+
32
+ ## 2. Confirm Completion
33
+
34
+ Use AskUserQuestion:
35
+ ```
36
+ Mark project "{name}" as completed? This will:
37
+ - Move it to Completed in PROJECTS.md
38
+ - Clear it as the active project (if current)
39
+ - This cannot be undone
40
+
41
+ Type "yes" to confirm or "no" to cancel.
42
+ ```
43
+
44
+ If user does not confirm, display "Cancelled." and exit.
45
+
46
+ ## 3. Complete Project
47
+
48
+ ```bash
49
+ RESULT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs projects complete $SLUG_FLAG --raw)
50
+ ```
51
+
52
+ Where `$SLUG_FLAG` is `--slug <name>` if specified, or omitted to use current project.
53
+
54
+ Parse JSON response.
55
+
56
+ **If `completed: true`:**
57
+ ```
58
+ DGS > PROJECT COMPLETED
59
+
60
+ Project "{slug}" marked as completed on {date}.
61
+
62
+ Remaining active projects: {remaining_active count}
63
+ ```
64
+
65
+ If remaining active projects exist, list them. If none remain, suggest `/dgs:new-project` or `/dgs:init-product`.
66
+
67
+ **If error:**
68
+ Display the error message from the response.
69
+
70
+ </process>
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: dgs:consolidate-ideas
3
+ description: Merge related pending ideas into a single AI-synthesised idea
4
+ argument-hint: "<id1> <id2> [id3...] [--title \"...\"]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Grep
10
+ - Glob
11
+ - AskUserQuestion
12
+ ---
13
+
14
+ <objective>
15
+ Merge two or more related pending ideas into a single AI-synthesised idea with full lineage tracking and history preservation.
16
+
17
+ **Two modes:**
18
+ - **With idea IDs** (`/dgs:consolidate-ideas 1 3 17`): Consolidates those specific ideas
19
+ - **Without idea IDs** (`/dgs:consolidate-ideas`): Lists pending ideas for selection
20
+
21
+ The workflow reads all source ideas in full (body, notes, discussion logs, research logs), synthesises a coherent new idea body, merges logs with source attribution, and presents the result for user review before committing. The user can approve, request changes, or cancel.
22
+
23
+ After approval, the underlying CLI creates the new idea in `pending/`, moves sources to `consolidated/`, and commits atomically.
24
+ </objective>
25
+
26
+ <execution_context>
27
+ @~/.claude/deliver-great-systems/workflows/consolidate-ideas.md
28
+ </execution_context>
29
+
30
+ <context>
31
+ Arguments: $ARGUMENTS (idea IDs and optional --title flag)
32
+ </context>
33
+
34
+ <process>
35
+ **Follow the consolidate-ideas workflow** from `@~/.claude/deliver-great-systems/workflows/consolidate-ideas.md`.
36
+
37
+ The workflow handles all logic including:
38
+ 1. Argument parsing (idea IDs, --title flag)
39
+ 2. Validation that all IDs exist and are in pending state
40
+ 3. Loading full content of each source idea (body, notes, discussion log, research log)
41
+ 4. AI synthesis of a coherent merged body
42
+ 5. Merging discussion logs with `[from #ID]` attribution, chronologically ordered
43
+ 6. Merging research logs with `[from #ID]` attribution, chronologically ordered
44
+ 7. Merging notes with source attribution
45
+ 8. Tag union with deduplication
46
+ 9. Title generation (from --title flag or AI-generated)
47
+ 10. Presenting synthesised idea for user review and approval
48
+ 11. Calling dgs-tools.cjs ideas consolidate for atomic commit
49
+ 12. Confirmation output
50
+ </process>
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: dgs:create-milestone-job
3
+ description: Generate a milestone build job from the current roadmap
4
+ argument-hint: "[version] [--no-check]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ ---
12
+ <objective>
13
+ Generate a milestone build job that plans and executes all remaining phases, with optional audit/close cycle.
14
+
15
+ Purpose: Reads the roadmap, determines which phases still need work, generates the step sequence, shows it for approval, and writes the job file on confirmation.
16
+
17
+ Output: Job file at `.planning/jobs/pending/milestone-{version}.md` ready for `/dgs:run-job`.
18
+ </objective>
19
+
20
+ <execution_context>
21
+ @~/.claude/deliver-great-systems/workflows/create-milestone-job.md
22
+ </execution_context>
23
+
24
+ <context>
25
+ Arguments: $ARGUMENTS
26
+
27
+ Flags:
28
+ - `version` (optional): Milestone version (e.g., `v6`). Auto-detects from ROADMAP.md if omitted.
29
+ - `--no-check`: Skip audit-milestone and complete-milestone steps in the generated job.
30
+
31
+ State is resolved in-workflow via `dgs-tools.cjs jobs milestone-preview` and `jobs create-milestone`.
32
+ </context>
33
+
34
+ <process>
35
+ Execute the create-milestone-job workflow from @~/.claude/deliver-great-systems/workflows/create-milestone-job.md end-to-end.
36
+ Preserve all workflow gates (argument parsing, preview generation, step display, approval handling).
37
+ </process>
@@ -0,0 +1,164 @@
1
+ ---
2
+ name: dgs:debug
3
+ description: Systematic debugging with persistent state across context resets
4
+ argument-hint: [issue description]
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Task
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ <objective>
13
+ Debug issues using scientific method with subagent isolation.
14
+
15
+ **Orchestrator role:** Gather symptoms, spawn dgs-debugger agent, handle checkpoints, spawn continuations.
16
+
17
+ **Why subagent:** Investigation burns context fast (reading files, forming hypotheses, testing). Fresh 200k context per investigation. Main context stays lean for user interaction.
18
+ </objective>
19
+
20
+ <context>
21
+ User's issue: $ARGUMENTS
22
+
23
+ Check for active sessions:
24
+ ```bash
25
+ ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
26
+ ```
27
+ </context>
28
+
29
+ <process>
30
+
31
+ ## 0. Initialize Context
32
+
33
+ ```bash
34
+ INIT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs state load)
35
+ ```
36
+
37
+ Extract `commit_docs` from init JSON. Resolve debugger model:
38
+ ```bash
39
+ DEBUGGER_MODEL=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs resolve-model dgs-debugger --raw)
40
+ ```
41
+
42
+ ## 1. Check Active Sessions
43
+
44
+ If active sessions exist AND no $ARGUMENTS:
45
+ - List sessions with status, hypothesis, next action
46
+ - User picks number to resume OR describes new issue
47
+
48
+ If $ARGUMENTS provided OR user describes new issue:
49
+ - Continue to symptom gathering
50
+
51
+ ## 2. Gather Symptoms (if new issue)
52
+
53
+ Use AskUserQuestion for each:
54
+
55
+ 1. **Expected behavior** - What should happen?
56
+ 2. **Actual behavior** - What happens instead?
57
+ 3. **Error messages** - Any errors? (paste or describe)
58
+ 4. **Timeline** - When did this start? Ever worked?
59
+ 5. **Reproduction** - How do you trigger it?
60
+
61
+ After all gathered, confirm ready to investigate.
62
+
63
+ ## 3. Spawn dgs-debugger Agent
64
+
65
+ Fill prompt and spawn:
66
+
67
+ ```markdown
68
+ <objective>
69
+ Investigate issue: {slug}
70
+
71
+ **Summary:** {trigger}
72
+ </objective>
73
+
74
+ <symptoms>
75
+ expected: {expected}
76
+ actual: {actual}
77
+ errors: {errors}
78
+ reproduction: {reproduction}
79
+ timeline: {timeline}
80
+ </symptoms>
81
+
82
+ <mode>
83
+ symptoms_prefilled: true
84
+ goal: find_and_fix
85
+ </mode>
86
+
87
+ <debug_file>
88
+ Create: .planning/debug/{slug}.md
89
+ </debug_file>
90
+ ```
91
+
92
+ ```
93
+ Task(
94
+ prompt=filled_prompt,
95
+ subagent_type="dgs-debugger",
96
+ model="{debugger_model}",
97
+ description="Debug {slug}"
98
+ )
99
+ ```
100
+
101
+ ## 4. Handle Agent Return
102
+
103
+ **If `## ROOT CAUSE FOUND`:**
104
+ - Display root cause and evidence summary
105
+ - Offer options:
106
+ - "Fix now" - spawn fix subagent
107
+ - "Plan fix" - suggest /dgs:plan-phase --gaps
108
+ - "Manual fix" - done
109
+
110
+ **If `## CHECKPOINT REACHED`:**
111
+ - Present checkpoint details to user
112
+ - Get user response
113
+ - Spawn continuation agent (see step 5)
114
+
115
+ **If `## INVESTIGATION INCONCLUSIVE`:**
116
+ - Show what was checked and eliminated
117
+ - Offer options:
118
+ - "Continue investigating" - spawn new agent with additional context
119
+ - "Manual investigation" - done
120
+ - "Add more context" - gather more symptoms, spawn again
121
+
122
+ ## 5. Spawn Continuation Agent (After Checkpoint)
123
+
124
+ When user responds to checkpoint, spawn fresh agent:
125
+
126
+ ```markdown
127
+ <objective>
128
+ Continue debugging {slug}. Evidence is in the debug file.
129
+ </objective>
130
+
131
+ <prior_state>
132
+ <files_to_read>
133
+ - .planning/debug/{slug}.md (Debug session state)
134
+ </files_to_read>
135
+ </prior_state>
136
+
137
+ <checkpoint_response>
138
+ **Type:** {checkpoint_type}
139
+ **Response:** {user_response}
140
+ </checkpoint_response>
141
+
142
+ <mode>
143
+ goal: find_and_fix
144
+ </mode>
145
+ ```
146
+
147
+ ```
148
+ Task(
149
+ prompt=continuation_prompt,
150
+ subagent_type="dgs-debugger",
151
+ model="{debugger_model}",
152
+ description="Continue debug {slug}"
153
+ )
154
+ ```
155
+
156
+ </process>
157
+
158
+ <success_criteria>
159
+ - [ ] Active sessions checked
160
+ - [ ] Symptoms gathered (if new)
161
+ - [ ] dgs-debugger spawned with context
162
+ - [ ] Checkpoints handled correctly
163
+ - [ ] Root cause confirmed before fixing
164
+ </success_criteria>
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: dgs:develop-idea
3
+ description: Develop an idea through discussion then research in one continuous flow
4
+ argument-hint: "[idea-id]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - WebSearch
12
+ - WebFetch
13
+ - AskUserQuestion
14
+ ---
15
+
16
+ <objective>
17
+ Develop an idea through structured discussion followed by research as a single continuous creative session. Discussion flows naturally into research -- the two phases feel like one conversation, not two separate tasks bolted together.
18
+
19
+ **Two modes:**
20
+ - **With an idea ID** (`/dgs:develop-idea 5`): Develops that specific idea directly
21
+ - **Without an idea ID** (`/dgs:develop-idea`): Lists pending ideas for selection
22
+
23
+ The discussion phase walks through Understanding, Exploration, and Refinement as a thinking partner. Once discussion concludes and is committed, the research phase investigates feasibility and technical landscape across five adaptive dimensions. Discussion commits before research begins so research reads the freshly-updated idea context.
24
+
25
+ If discussion concludes that the idea is not viable, research is skipped entirely. If the user exits mid-discussion, partial progress is saved and research does not run.
26
+
27
+ When re-running on an idea with prior history, the user is offered a choice: re-do both, just discuss, or just research.
28
+
29
+ The output is a Discussion Log entry in the idea file, a research document at `.planning/docs/ideas/pending/{slug}-research.md`, and a Research Log entry in the idea file -- all committed at appropriate stages.
30
+ </objective>
31
+
32
+ <execution_context>
33
+ @~/.claude/deliver-great-systems/workflows/develop-idea.md
34
+ </execution_context>
35
+
36
+ <context>
37
+ Arguments: $ARGUMENTS (optional idea ID)
38
+ </context>
39
+
40
+ <process>
41
+ **Follow the develop-idea workflow** from `@~/.claude/deliver-great-systems/workflows/develop-idea.md`.
42
+
43
+ The workflow handles all logic including:
44
+ 1. Argument parsing and idea selection (with or without ID)
45
+ 2. Loading idea context with prior history detection
46
+ 3. History assessment and re-run choice offering
47
+ 4. Discussion phase (Understanding, Exploration, Refinement) inline
48
+ 5. Discussion commit before research starts
49
+ 6. Decision-based routing (skip research on negative decisions)
50
+ 7. Research phase (five adaptive dimensions) inline
51
+ 8. Research commit with document and idea file
52
+ 9. Unified completion summary with context-aware next step
53
+ </process>
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: dgs:discuss-idea
3
+ description: Develop and refine an idea through structured discussion with Claude
4
+ argument-hint: "[idea-id]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - AskUserQuestion
12
+ ---
13
+
14
+ <objective>
15
+ Develop and refine an idea through structured, inline conversation. Claude walks through three discussion phases -- Understanding, Exploration, and Refinement -- to help shape a raw idea into something actionable.
16
+
17
+ **Two modes:**
18
+ - **With an idea ID** (`/dgs:discuss-idea 5`): Starts discussion for that specific idea
19
+ - **Without an idea ID** (`/dgs:discuss-idea`): Lists pending ideas for selection
20
+
21
+ The output is a Discussion Log entry appended to the idea file and committed. When a prior discussion log exists, the conversation builds on it rather than starting fresh -- jumping straight to unresolved Open Questions from the last session.
22
+ </objective>
23
+
24
+ <execution_context>
25
+ @~/.claude/deliver-great-systems/workflows/discuss-idea.md
26
+ </execution_context>
27
+
28
+ <context>
29
+ Arguments: $ARGUMENTS (optional idea ID)
30
+ </context>
31
+
32
+ <process>
33
+ **Follow the discuss-idea workflow** from `@~/.claude/deliver-great-systems/workflows/discuss-idea.md`.
34
+
35
+ The workflow handles all logic including:
36
+ 1. Argument parsing and idea selection (with or without ID)
37
+ 2. Loading idea context and prior discussion history
38
+ 3. Three-phase structured discussion (Understanding, Exploration, Refinement)
39
+ 4. Discussion summary generation and file save via `dgs-tools.cjs ideas discuss-save`
40
+ 5. Git commit and next-step suggestion based on Decision tag
41
+ </process>
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: dgs:discuss-phase
3
+ description: Gather phase context through adaptive questioning before planning
4
+ argument-hint: "<phase> [--auto]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - AskUserQuestion
12
+ - Task
13
+ ---
14
+
15
+ <objective>
16
+ Extract implementation decisions that downstream agents need — researcher and planner will use CONTEXT.md to know what to investigate and what choices are locked.
17
+
18
+ **How it works:**
19
+ 1. Analyze the phase to identify gray areas (UI, UX, behavior, etc.)
20
+ 2. Present gray areas — user selects which to discuss
21
+ 3. Deep-dive each selected area until satisfied
22
+ 4. Create CONTEXT.md with decisions that guide research and planning
23
+
24
+ **Output:** `{phase_num}-CONTEXT.md` — decisions clear enough that downstream agents can act without asking the user again
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @~/.claude/deliver-great-systems/workflows/discuss-phase.md
29
+ @~/.claude/deliver-great-systems/templates/context.md
30
+ </execution_context>
31
+
32
+ <context>
33
+ Phase number: $ARGUMENTS (required)
34
+
35
+ Context files are resolved in-workflow using `init phase-op` and roadmap/state tool calls.
36
+ </context>
37
+
38
+ <process>
39
+ 1. Validate phase number (error if missing or not in roadmap)
40
+ 2. Check if CONTEXT.md exists (offer update/view/skip if yes)
41
+ 3. **Analyze phase** — Identify domain and generate phase-specific gray areas
42
+ 4. **Present gray areas** — Multi-select: which to discuss? (NO skip option)
43
+ 5. **Deep-dive each area** — 4 questions per area, then offer more/next
44
+ 6. **Write CONTEXT.md** — Sections match areas discussed
45
+ 7. Offer next steps (research or plan)
46
+
47
+ **CRITICAL: Scope guardrail**
48
+ - Phase boundary from ROADMAP.md is FIXED
49
+ - Discussion clarifies HOW to implement, not WHETHER to add more
50
+ - If user suggests new capabilities: "That's its own phase. I'll note it for later."
51
+ - Capture deferred ideas — don't lose them, don't act on them
52
+
53
+ **Domain-aware gray areas:**
54
+ Gray areas depend on what's being built. Analyze the phase goal:
55
+ - Something users SEE → layout, density, interactions, states
56
+ - Something users CALL → responses, errors, auth, versioning
57
+ - Something users RUN → output format, flags, modes, error handling
58
+ - Something users READ → structure, tone, depth, flow
59
+ - Something being ORGANIZED → criteria, grouping, naming, exceptions
60
+
61
+ Generate 3-4 **phase-specific** gray areas, not generic categories.
62
+
63
+ **Probing depth:**
64
+ - Ask 4 questions per area before checking
65
+ - "More questions about [area], or move to next?"
66
+ - If more → ask 4 more, check again
67
+ - After all areas → "Ready to create context?"
68
+
69
+ **Do NOT ask about (Claude handles these):**
70
+ - Technical implementation
71
+ - Architecture choices
72
+ - Performance concerns
73
+ - Scope expansion
74
+ </process>
75
+
76
+ <success_criteria>
77
+ - Gray areas identified through intelligent analysis
78
+ - User chose which areas to discuss
79
+ - Each selected area explored until satisfied
80
+ - Scope creep redirected to deferred ideas
81
+ - CONTEXT.md captures decisions, not vague vision
82
+ - User knows next steps
83
+ </success_criteria>
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: dgs:execute-phase
3
+ description: Execute all plans in a phase with wave-based parallelization
4
+ argument-hint: "<phase-number> [--gaps-only]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - Task
13
+ - TodoWrite
14
+ - AskUserQuestion
15
+ ---
16
+ <objective>
17
+ Execute all plans in a phase using wave-based parallel execution.
18
+
19
+ Orchestrator stays lean: discover plans, analyze dependencies, group into waves, spawn subagents, collect results. Each subagent loads the full execute-plan context and handles its own plan.
20
+
21
+ Context budget: ~15% orchestrator, 100% fresh per subagent.
22
+ </objective>
23
+
24
+ <execution_context>
25
+ @~/.claude/deliver-great-systems/workflows/execute-phase.md
26
+ @~/.claude/deliver-great-systems/references/ui-brand.md
27
+ </execution_context>
28
+
29
+ <context>
30
+ Phase: $ARGUMENTS
31
+
32
+ **Flags:**
33
+ - `--gaps-only` — Execute only gap closure plans (plans with `gap_closure: true` in frontmatter). Use after verify-work creates fix plans.
34
+
35
+ Context files are resolved inside the workflow via `dgs-tools init execute-phase` and per-subagent `<files_to_read>` blocks.
36
+ </context>
37
+
38
+ <process>
39
+ Execute the execute-phase workflow from @~/.claude/deliver-great-systems/workflows/execute-phase.md end-to-end.
40
+ Preserve all workflow gates (wave execution, checkpoint handling, verification, state updates, routing).
41
+ </process>