@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,166 @@
1
+ # Debug Template
2
+
3
+ Template for `debug/[slug].md` (in planning root) — active debug session tracking.
4
+
5
+ > **Layout-agnostic:** The debug directory lives at `debug/` within the planning root. Workflows resolve the path via `${debug_dir}` from init output.
6
+
7
+ ---
8
+
9
+ ## File Template
10
+
11
+ ```markdown
12
+ ---
13
+ status: gathering | investigating | fixing | verifying | awaiting_human_verify | resolved
14
+ trigger: "[verbatim user input]"
15
+ created: [ISO timestamp]
16
+ updated: [ISO timestamp]
17
+ ---
18
+
19
+ ## Current Focus
20
+ <!-- OVERWRITE on each update - always reflects NOW -->
21
+
22
+ hypothesis: [current theory being tested]
23
+ test: [how testing it]
24
+ expecting: [what result means if true/false]
25
+ next_action: [immediate next step]
26
+
27
+ ## Symptoms
28
+ <!-- Written during gathering, then immutable -->
29
+
30
+ expected: [what should happen]
31
+ actual: [what actually happens]
32
+ errors: [error messages if any]
33
+ reproduction: [how to trigger]
34
+ started: [when it broke / always broken]
35
+
36
+ ## Eliminated
37
+ <!-- APPEND only - prevents re-investigating after /clear -->
38
+
39
+ - hypothesis: [theory that was wrong]
40
+ evidence: [what disproved it]
41
+ timestamp: [when eliminated]
42
+
43
+ ## Evidence
44
+ <!-- APPEND only - facts discovered during investigation -->
45
+
46
+ - timestamp: [when found]
47
+ checked: [what was examined]
48
+ found: [what was observed]
49
+ implication: [what this means]
50
+
51
+ ## Resolution
52
+ <!-- OVERWRITE as understanding evolves -->
53
+
54
+ root_cause: [empty until found]
55
+ fix: [empty until applied]
56
+ verification: [empty until verified]
57
+ files_changed: []
58
+ ```
59
+
60
+ ---
61
+
62
+ <section_rules>
63
+
64
+ **Frontmatter (status, trigger, timestamps):**
65
+ - `status`: OVERWRITE - reflects current phase
66
+ - `trigger`: IMMUTABLE - verbatim user input, never changes
67
+ - `created`: IMMUTABLE - set once
68
+ - `updated`: OVERWRITE - update on every change
69
+
70
+ **Current Focus:**
71
+ - OVERWRITE entirely on each update
72
+ - Always reflects what Claude is doing RIGHT NOW
73
+ - If Claude reads this after /clear, it knows exactly where to resume
74
+ - Fields: hypothesis, test, expecting, next_action
75
+
76
+ **Symptoms:**
77
+ - Written during initial gathering phase
78
+ - IMMUTABLE after gathering complete
79
+ - Reference point for what we're trying to fix
80
+ - Fields: expected, actual, errors, reproduction, started
81
+
82
+ **Eliminated:**
83
+ - APPEND only - never remove entries
84
+ - Prevents re-investigating dead ends after context reset
85
+ - Each entry: hypothesis, evidence that disproved it, timestamp
86
+ - Critical for efficiency across /clear boundaries
87
+
88
+ **Evidence:**
89
+ - APPEND only - never remove entries
90
+ - Facts discovered during investigation
91
+ - Each entry: timestamp, what checked, what found, implication
92
+ - Builds the case for root cause
93
+
94
+ **Resolution:**
95
+ - OVERWRITE as understanding evolves
96
+ - May update multiple times as fixes are tried
97
+ - Final state shows confirmed root cause and verified fix
98
+ - Fields: root_cause, fix, verification, files_changed
99
+
100
+ </section_rules>
101
+
102
+ <lifecycle>
103
+
104
+ **Creation:** Immediately when /dgs:debug is called
105
+ - Create file with trigger from user input
106
+ - Set status to "gathering"
107
+ - Current Focus: next_action = "gather symptoms"
108
+ - Symptoms: empty, to be filled
109
+
110
+ **During symptom gathering:**
111
+ - Update Symptoms section as user answers questions
112
+ - Update Current Focus with each question
113
+ - When complete: status → "investigating"
114
+
115
+ **During investigation:**
116
+ - OVERWRITE Current Focus with each hypothesis
117
+ - APPEND to Evidence with each finding
118
+ - APPEND to Eliminated when hypothesis disproved
119
+ - Update timestamp in frontmatter
120
+
121
+ **During fixing:**
122
+ - status → "fixing"
123
+ - Update Resolution.root_cause when confirmed
124
+ - Update Resolution.fix when applied
125
+ - Update Resolution.files_changed
126
+
127
+ **During verification:**
128
+ - status → "verifying"
129
+ - Update Resolution.verification with results
130
+ - If verification fails: status → "investigating", try again
131
+
132
+ **After self-verification passes:**
133
+ - status -> "awaiting_human_verify"
134
+ - Request explicit user confirmation in a checkpoint
135
+ - Do NOT move file to resolved yet
136
+
137
+ **On resolution:**
138
+ - status → "resolved"
139
+ - Move file to debug/resolved/ (in planning root, only after user confirms fix)
140
+
141
+ </lifecycle>
142
+
143
+ <resume_behavior>
144
+
145
+ When Claude reads this file after /clear:
146
+
147
+ 1. Parse frontmatter → know status
148
+ 2. Read Current Focus → know exactly what was happening
149
+ 3. Read Eliminated → know what NOT to retry
150
+ 4. Read Evidence → know what's been learned
151
+ 5. Continue from next_action
152
+
153
+ The file IS the debugging brain. Claude should be able to resume perfectly from any interruption point.
154
+
155
+ </resume_behavior>
156
+
157
+ <size_constraint>
158
+
159
+ Keep debug files focused:
160
+ - Evidence entries: 1-2 lines each, just the facts
161
+ - Eliminated: brief - hypothesis + why it failed
162
+ - No narrative prose - structured data only
163
+
164
+ If evidence grows very large (10+ entries), consider whether you're going in circles. Check Eliminated to ensure you're not re-treading.
165
+
166
+ </size_constraint>
@@ -0,0 +1,251 @@
1
+ # UAT Template
2
+
3
+ Template for `phases/XX-name/{phase_num}-UAT.md` (in planning root) — persistent UAT session tracking.
4
+
5
+ > **Layout-agnostic:** Workflows resolve the phase directory path via `${phase_dir}` from init output. Works in both standard and root layouts.
6
+
7
+ ---
8
+
9
+ ## File Template
10
+
11
+ ```markdown
12
+ ---
13
+ status: testing | complete | diagnosed
14
+ phase: XX-name
15
+ source: [list of SUMMARY.md files tested]
16
+ started: [ISO timestamp]
17
+ updated: [ISO timestamp]
18
+ tested_by: "" # Author who initiated testing (set from init author)
19
+ ---
20
+
21
+ ## Current Test
22
+ <!-- OVERWRITE each test - shows where we are -->
23
+
24
+ number: [N]
25
+ name: [test name]
26
+ expected: |
27
+ [what user should observe]
28
+ awaiting: user response
29
+
30
+ ## Tests
31
+
32
+ ### 1. [Test Name]
33
+ expected: [observable behavior - what user should see]
34
+ result: [pending]
35
+
36
+ ### 2. [Test Name]
37
+ expected: [observable behavior]
38
+ result: pass
39
+
40
+ ### 3. [Test Name]
41
+ expected: [observable behavior]
42
+ result: issue
43
+ reported: "[verbatim user response]"
44
+ severity: major
45
+
46
+ ### 4. [Test Name]
47
+ expected: [observable behavior]
48
+ result: skipped
49
+ reason: [why skipped]
50
+
51
+ ...
52
+
53
+ ## Summary
54
+
55
+ total: [N]
56
+ passed: [N]
57
+ issues: [N]
58
+ pending: [N]
59
+ skipped: [N]
60
+
61
+ ## Gaps
62
+
63
+ <!-- YAML format for plan-phase --gaps consumption -->
64
+ - truth: "[expected behavior from test]"
65
+ status: failed
66
+ reason: "User reported: [verbatim response]"
67
+ severity: blocker | major | minor | cosmetic
68
+ test: [N]
69
+ root_cause: "" # Filled by diagnosis
70
+ artifacts: [] # Filled by diagnosis
71
+ missing: [] # Filled by diagnosis
72
+ debug_session: "" # Filled by diagnosis
73
+ ```
74
+
75
+ ---
76
+
77
+ <section_rules>
78
+
79
+ **Frontmatter:**
80
+ - `status`: OVERWRITE - "testing" or "complete"
81
+ - `phase`: IMMUTABLE - set on creation
82
+ - `source`: IMMUTABLE - SUMMARY files being tested
83
+ - `started`: IMMUTABLE - set on creation
84
+ - `updated`: OVERWRITE - update on every change
85
+ - `tested_by`: IMMUTABLE - set on creation from init author
86
+
87
+ **Current Test:**
88
+ - OVERWRITE entirely on each test transition
89
+ - Shows which test is active and what's awaited
90
+ - On completion: "[testing complete]"
91
+
92
+ **Tests:**
93
+ - Each test: OVERWRITE result field when user responds
94
+ - `result` values: [pending], pass, issue, skipped
95
+ - If issue: add `reported` (verbatim) and `severity` (inferred)
96
+ - If skipped: add `reason` if provided
97
+
98
+ **Summary:**
99
+ - OVERWRITE counts after each response
100
+ - Tracks: total, passed, issues, pending, skipped
101
+
102
+ **Gaps:**
103
+ - APPEND only when issue found (YAML format)
104
+ - After diagnosis: fill `root_cause`, `artifacts`, `missing`, `debug_session`
105
+ - This section feeds directly into /dgs:plan-phase --gaps
106
+
107
+ </section_rules>
108
+
109
+ <diagnosis_lifecycle>
110
+
111
+ **After testing complete (status: complete), if gaps exist:**
112
+
113
+ 1. User runs diagnosis (from verify-work offer or manually)
114
+ 2. diagnose-issues workflow spawns parallel debug agents
115
+ 3. Each agent investigates one gap, returns root cause
116
+ 4. UAT.md Gaps section updated with diagnosis:
117
+ - Each gap gets `root_cause`, `artifacts`, `missing`, `debug_session` filled
118
+ 5. status → "diagnosed"
119
+ 6. Ready for /dgs:plan-phase --gaps with root causes
120
+
121
+ **After diagnosis:**
122
+ ```yaml
123
+ ## Gaps
124
+
125
+ - truth: "Comment appears immediately after submission"
126
+ status: failed
127
+ reason: "User reported: works but doesn't show until I refresh the page"
128
+ severity: major
129
+ test: 2
130
+ root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
131
+ artifacts:
132
+ - path: "src/components/CommentList.tsx"
133
+ issue: "useEffect missing dependency"
134
+ missing:
135
+ - "Add commentCount to useEffect dependency array"
136
+ debug_session: "debug/comment-not-refreshing.md"
137
+ ```
138
+
139
+ </diagnosis_lifecycle>
140
+
141
+ <lifecycle>
142
+
143
+ **Creation:** When /dgs:verify-work starts new session
144
+ - Extract tests from SUMMARY.md files
145
+ - Set status to "testing"
146
+ - Current Test points to test 1
147
+ - All tests have result: [pending]
148
+
149
+ **During testing:**
150
+ - Present test from Current Test section
151
+ - User responds with pass confirmation or issue description
152
+ - Update test result (pass/issue/skipped)
153
+ - Update Summary counts
154
+ - If issue: append to Gaps section (YAML format), infer severity
155
+ - Move Current Test to next pending test
156
+
157
+ **On completion:**
158
+ - status → "complete"
159
+ - Current Test → "[testing complete]"
160
+ - Commit file
161
+ - Present summary with next steps
162
+
163
+ **Resume after /clear:**
164
+ 1. Read frontmatter → know phase and status
165
+ 2. Read Current Test → know where we are
166
+ 3. Find first [pending] result → continue from there
167
+ 4. Summary shows progress so far
168
+
169
+ </lifecycle>
170
+
171
+ <severity_guide>
172
+
173
+ Severity is INFERRED from user's natural language, never asked.
174
+
175
+ | User describes | Infer |
176
+ |----------------|-------|
177
+ | Crash, error, exception, fails completely, unusable | blocker |
178
+ | Doesn't work, nothing happens, wrong behavior, missing | major |
179
+ | Works but..., slow, weird, minor, small issue | minor |
180
+ | Color, font, spacing, alignment, visual, looks off | cosmetic |
181
+
182
+ Default: **major** (safe default, user can clarify if wrong)
183
+
184
+ </severity_guide>
185
+
186
+ <good_example>
187
+ ```markdown
188
+ ---
189
+ status: diagnosed
190
+ phase: 04-comments
191
+ source: 04-01-SUMMARY.md, 04-02-SUMMARY.md
192
+ started: 2025-01-15T10:30:00Z
193
+ updated: 2025-01-15T10:45:00Z
194
+ ---
195
+
196
+ ## Current Test
197
+
198
+ [testing complete]
199
+
200
+ ## Tests
201
+
202
+ ### 1. View Comments on Post
203
+ expected: Comments section expands, shows count and comment list
204
+ result: pass
205
+
206
+ ### 2. Create Top-Level Comment
207
+ expected: Submit comment via rich text editor, appears in list with author info
208
+ result: issue
209
+ reported: "works but doesn't show until I refresh the page"
210
+ severity: major
211
+
212
+ ### 3. Reply to a Comment
213
+ expected: Click Reply, inline composer appears, submit shows nested reply
214
+ result: pass
215
+
216
+ ### 4. Visual Nesting
217
+ expected: 3+ level thread shows indentation, left borders, caps at reasonable depth
218
+ result: pass
219
+
220
+ ### 5. Delete Own Comment
221
+ expected: Click delete on own comment, removed or shows [deleted] if has replies
222
+ result: pass
223
+
224
+ ### 6. Comment Count
225
+ expected: Post shows accurate count, increments when adding comment
226
+ result: pass
227
+
228
+ ## Summary
229
+
230
+ total: 6
231
+ passed: 5
232
+ issues: 1
233
+ pending: 0
234
+ skipped: 0
235
+
236
+ ## Gaps
237
+
238
+ - truth: "Comment appears immediately after submission in list"
239
+ status: failed
240
+ reason: "User reported: works but doesn't show until I refresh the page"
241
+ severity: major
242
+ test: 2
243
+ root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
244
+ artifacts:
245
+ - path: "src/components/CommentList.tsx"
246
+ issue: "useEffect missing dependency"
247
+ missing:
248
+ - "Add commentCount to useEffect dependency array"
249
+ debug_session: "debug/comment-not-refreshing.md"
250
+ ```
251
+ </good_example>
@@ -0,0 +1,95 @@
1
+ ---
2
+ phase: {N}
3
+ slug: {phase-slug}
4
+ status: draft
5
+ nyquist_compliant: false
6
+ wave_0_complete: false
7
+ created: {date}
8
+ verified_by: "" # Author who initiated verification (set from init author)
9
+ ---
10
+
11
+ # Phase {N} — Validation Strategy
12
+
13
+ > Per-phase validation contract for feedback sampling during execution.
14
+
15
+ ---
16
+
17
+ ## Test Infrastructure
18
+
19
+ | Property | Value |
20
+ |----------|-------|
21
+ | **Framework** | {pytest 7.x / jest 29.x / vitest / go test / other} |
22
+ | **Config file** | {path or "none — Wave 0 installs"} |
23
+ | **Quick run command** | `{quick command}` |
24
+ | **Full suite command** | `{full command}` |
25
+ | **Type check command** | `{e.g., npx tsc --noEmit}` |
26
+ | **Estimated runtime** | ~{N} seconds |
27
+ | **CI pipeline** | {.github/workflows/test.yml — exists / needs creation} |
28
+
29
+ ---
30
+
31
+ ## Sampling Rate
32
+
33
+ - **After every task commit:** Run `{quick run command}`
34
+ - **After every task commit (type check):** Run `{type check command}` (if not N/A)
35
+ - **After every plan wave:** Run `{full suite command}`
36
+ - **Before `/dgs:verify-work`:** Full suite must be green
37
+ - **Max feedback latency:** {N} seconds
38
+
39
+ ---
40
+
41
+ ## Per-Task Verification Map
42
+
43
+ | Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
44
+ |---------|------|------|-------------|-----------|-------------------|-------------|--------|
45
+ | {N}-01-01 | 01 | 1 | REQ-{XX} | unit | `{command}` | ✅ / ❌ W0 | ⬜ pending |
46
+
47
+ *Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
48
+
49
+ ---
50
+
51
+ ## Wave 0 Requirements
52
+
53
+ - [ ] `{tests/test_file.py}` — stubs for REQ-{XX}
54
+ - [ ] `{tests/conftest.py}` — shared fixtures
55
+ - [ ] `{framework install}` — if no framework detected
56
+
57
+ *If none: "Existing infrastructure covers all phase requirements."*
58
+
59
+ ---
60
+
61
+ ## Manual-Only Verifications
62
+
63
+ | Behavior | Requirement | Why Manual | Test Instructions |
64
+ |----------|-------------|------------|-------------------|
65
+ | {behavior} | REQ-{XX} | {reason} | {steps} |
66
+
67
+ *If none: "All phase behaviors have automated verification."*
68
+
69
+ ---
70
+
71
+ ## Validation Sign-Off
72
+
73
+ - [ ] All tasks have `<automated>` verify or Wave 0 dependencies
74
+ - [ ] Sampling continuity: no 3 consecutive tasks without automated verify
75
+ - [ ] Wave 0 covers all MISSING references
76
+ - [ ] Type check command populated (or marked N/A for non-typed languages)
77
+ - [ ] No watch-mode flags
78
+ - [ ] Feedback latency < {N}s
79
+ - [ ] `nyquist_compliant: true` set in frontmatter
80
+
81
+ **Approval:** {pending / approved YYYY-MM-DD}
82
+
83
+ ---
84
+
85
+ ## Execution Tracking
86
+
87
+ Updated during `/dgs:execute-phase {N}`:
88
+
89
+ | Wave | Tasks | Tests Run | Pass | Fail | Sampling Status |
90
+ |------|-------|-----------|------|------|-----------------|
91
+ | 0 | {N} | — | — | — | scaffold |
92
+ | 1 | {N} | {command} | {N} | {N} | ✅ sampled |
93
+ | 2 | {N} | {command} | {N} | {N} | ✅ sampled |
94
+
95
+ **Phase validation complete:** {pending / YYYY-MM-DD HH:MM}
@@ -0,0 +1,74 @@
1
+ # Workflow Discipline
2
+
3
+ All code modifications go through `/dgs:*` commands. This ensures traceability, atomic commits, and state tracking for every change.
4
+
5
+ ## 1. Identify the Request
6
+
7
+ When processing a request, classify it as one of:
8
+ - **Read-only operation** -- proceed freely (Section 2)
9
+ - **Code change** -- route through DGS (Section 3)
10
+ - **Override requested** -- acknowledge and proceed (Section 4)
11
+ - **Future work** -- capture it (Section 5)
12
+
13
+ ## 2. Read-Only? Proceed Freely
14
+
15
+ These operations are always allowed without a `/dgs:*` command:
16
+
17
+ - Reading files, searching code, exploring the codebase
18
+ - Running tests, checking test output
19
+ - Git log, git status, git diff (read-only git operations)
20
+ - Answering questions about the code
21
+ - Explaining architecture, patterns, or decisions
22
+
23
+ No routing needed. Just do it.
24
+
25
+ ## 3. Code Change? Route Through DGS
26
+
27
+ When the request involves creating, modifying, or deleting code or configuration, use this decision tree:
28
+
29
+ **Is it a trivial change?** (up to ~10-15 lines, 1-2 files: renames, config tweaks, typo fixes)
30
+ - Route through `/dgs:fast`
31
+ - Example: "Fix the typo in config.json"
32
+
33
+ **Is it a small, well-defined change?** (contained scope, clear outcome)
34
+ - Route through `/dgs:quick`
35
+ - Example: "Add input validation to the signup form"
36
+
37
+ **Is it a well-defined issue needing 2-3 tasks?** (broader but still contained)
38
+ - Route through `/dgs:quick --full`
39
+ - Example: "Refactor the auth module to use JWT refresh tokens"
40
+
41
+ **Is it multi-file planned work, a new feature, or an architectural change?**
42
+ - Route through `/dgs:execute-phase`
43
+ - Example: "Build the notification system"
44
+
45
+ **Is it a bug with unclear cause?** (failing tests, error traces, "it broke", unclear root cause)
46
+ - Route through `/dgs:debug`
47
+ - Example: "The tests started failing after yesterday's merge"
48
+
49
+ **When ambiguous, default to the smaller command.** Prefer `/dgs:fast` or `/dgs:quick` over `/dgs:execute-phase`.
50
+
51
+ Before invoking, mention briefly: "Small fix, routing through `/dgs:fast`." -- command name and short reason.
52
+
53
+ These routing rules apply whether the change is user-initiated or discovered by Claude during other work.
54
+
55
+ ## 4. Override Requested? Acknowledge and Proceed
56
+
57
+ The user can bypass DGS routing by including one of these phrases in their request:
58
+ - "skip DGS"
59
+ - "without DGS"
60
+
61
+ When override is used, acknowledge once: "Skipping DGS." Then proceed directly.
62
+
63
+ **Important:**
64
+ - Casual phrases like "just do it" or "go ahead" do NOT trigger an override -- still route through DGS.
65
+ - Override applies to the current request only. It does not persist to subsequent requests.
66
+
67
+ ## 5. Future Work? Capture It
68
+
69
+ When the user mentions work for later (not for immediate execution):
70
+
71
+ - Ideas for the future: `/dgs:add-idea`
72
+ - Specific tasks to remember: `/dgs:add-todo`
73
+
74
+ These capture without executing.