@ktpartners/dgs-platform 2.8.0 → 3.0.4

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 (94) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +41 -13
  3. package/agents/dgs-plan-checker.md +29 -3
  4. package/agents/dgs-planner.md +10 -0
  5. package/commands/dgs/abandon-quick.md +28 -0
  6. package/commands/dgs/add-tests.md +2 -2
  7. package/commands/dgs/audit-milestone.md +2 -2
  8. package/commands/dgs/capture-principle.md +11 -11
  9. package/commands/dgs/cleanup.md +2 -2
  10. package/commands/dgs/complete-milestone.md +11 -11
  11. package/commands/dgs/complete-quick.md +28 -0
  12. package/commands/dgs/create-milestone-job.md +2 -2
  13. package/commands/dgs/debug.md +3 -3
  14. package/commands/dgs/develop-idea.md +1 -1
  15. package/commands/dgs/fast.md +3 -1
  16. package/commands/dgs/health.md +1 -1
  17. package/commands/dgs/map-codebase.md +6 -6
  18. package/commands/dgs/new-milestone.md +5 -5
  19. package/commands/dgs/new-project.md +6 -6
  20. package/commands/dgs/plan-milestone-gaps.md +1 -1
  21. package/commands/dgs/progress.md +3 -3
  22. package/commands/dgs/quick-abandon.md +8 -0
  23. package/commands/dgs/quick-complete.md +8 -0
  24. package/commands/dgs/quick.md +10 -3
  25. package/commands/dgs/research-idea.md +2 -2
  26. package/commands/dgs/research-phase.md +3 -3
  27. package/commands/dgs/switch-project.md +1 -1
  28. package/commands/dgs/write-spec.md +3 -3
  29. package/deliver-great-systems/bin/dgs-tools.cjs +284 -30
  30. package/deliver-great-systems/bin/lib/commands.cjs +316 -31
  31. package/deliver-great-systems/bin/lib/commands.test.cjs +336 -0
  32. package/deliver-great-systems/bin/lib/config.cjs +39 -6
  33. package/deliver-great-systems/bin/lib/context.cjs +120 -0
  34. package/deliver-great-systems/bin/lib/core.cjs +28 -11
  35. package/deliver-great-systems/bin/lib/execution.cjs +49 -17
  36. package/deliver-great-systems/bin/lib/flat-migration.test.cjs +396 -0
  37. package/deliver-great-systems/bin/lib/ideas.cjs +206 -91
  38. package/deliver-great-systems/bin/lib/ideas.test.cjs +244 -1
  39. package/deliver-great-systems/bin/lib/init.cjs +306 -39
  40. package/deliver-great-systems/bin/lib/init.test.cjs +416 -6
  41. package/deliver-great-systems/bin/lib/jobs.cjs +124 -21
  42. package/deliver-great-systems/bin/lib/jobs.test.cjs +193 -74
  43. package/deliver-great-systems/bin/lib/migration.cjs +409 -1
  44. package/deliver-great-systems/bin/lib/migration.test.cjs +158 -1
  45. package/deliver-great-systems/bin/lib/milestone.cjs +54 -29
  46. package/deliver-great-systems/bin/lib/phase.cjs +128 -2
  47. package/deliver-great-systems/bin/lib/phase.test.cjs +420 -0
  48. package/deliver-great-systems/bin/lib/projects.cjs +28 -8
  49. package/deliver-great-systems/bin/lib/projects.test.cjs +86 -0
  50. package/deliver-great-systems/bin/lib/quick.cjs +584 -0
  51. package/deliver-great-systems/bin/lib/quick.test.cjs +596 -0
  52. package/deliver-great-systems/bin/lib/repos.cjs +25 -1
  53. package/deliver-great-systems/bin/lib/roadmap.cjs +34 -13
  54. package/deliver-great-systems/bin/lib/specs.cjs +3 -81
  55. package/deliver-great-systems/bin/lib/state-transition-gate.test.cjs +160 -0
  56. package/deliver-great-systems/bin/lib/state.cjs +142 -54
  57. package/deliver-great-systems/bin/lib/sync.cjs +75 -0
  58. package/deliver-great-systems/bin/lib/verify.cjs +80 -1
  59. package/deliver-great-systems/bin/lib/worktrees.cjs +764 -0
  60. package/deliver-great-systems/bin/lib/worktrees.test.cjs +887 -0
  61. package/deliver-great-systems/templates/claude-md.md +16 -0
  62. package/deliver-great-systems/workflows/abandon-quick.md +89 -0
  63. package/deliver-great-systems/workflows/add-idea.md +3 -3
  64. package/deliver-great-systems/workflows/add-tests.md +14 -0
  65. package/deliver-great-systems/workflows/add-todo.md +1 -0
  66. package/deliver-great-systems/workflows/approve-spec.md +25 -4
  67. package/deliver-great-systems/workflows/audit-phase.md +15 -5
  68. package/deliver-great-systems/workflows/cancel-job.md +1 -1
  69. package/deliver-great-systems/workflows/check-todos.md +2 -3
  70. package/deliver-great-systems/workflows/complete-milestone.md +197 -22
  71. package/deliver-great-systems/workflows/complete-quick.md +68 -0
  72. package/deliver-great-systems/workflows/consolidate-ideas.md +1 -1
  73. package/deliver-great-systems/workflows/create-milestone-job.md +4 -4
  74. package/deliver-great-systems/workflows/develop-idea.md +11 -11
  75. package/deliver-great-systems/workflows/diagnose-issues.md +14 -0
  76. package/deliver-great-systems/workflows/discuss-idea.md +1 -1
  77. package/deliver-great-systems/workflows/execute-phase.md +121 -32
  78. package/deliver-great-systems/workflows/execute-plan.md +12 -21
  79. package/deliver-great-systems/workflows/help.md +33 -29
  80. package/deliver-great-systems/workflows/init-product.md +2 -18
  81. package/deliver-great-systems/workflows/new-milestone.md +40 -24
  82. package/deliver-great-systems/workflows/new-project.md +22 -680
  83. package/deliver-great-systems/workflows/progress-all.md +133 -0
  84. package/deliver-great-systems/workflows/quick-abandon.md +89 -0
  85. package/deliver-great-systems/workflows/quick-complete.md +68 -0
  86. package/deliver-great-systems/workflows/quick.md +152 -23
  87. package/deliver-great-systems/workflows/refine-spec.md +1 -1
  88. package/deliver-great-systems/workflows/research-idea.md +8 -8
  89. package/deliver-great-systems/workflows/resume-project.md +2 -2
  90. package/deliver-great-systems/workflows/run-job.md +8 -8
  91. package/deliver-great-systems/workflows/validate-phase.md +39 -1
  92. package/deliver-great-systems/workflows/verify-work.md +14 -0
  93. package/deliver-great-systems/workflows/write-spec.md +2 -2
  94. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  <purpose>
2
2
 
3
- Start a new milestone cycle for an existing project. Loads project context, gathers milestone goals (from MILESTONE-CONTEXT.md, conversation, or a finalized spec via --auto), updates PROJECT.md and STATE.md, optionally runs parallel research, defines scoped requirements with REQ-IDs, spawns the roadmapper to create phased execution plan, and commits all artifacts. Brownfield equivalent of new-project. In --auto mode, derives everything from a finalized spec without interactive questioning.
3
+ Start a new milestone cycle for an existing project, or the first milestone after /dgs:new-project. Loads project context, gathers milestone goals (from MILESTONE-CONTEXT.md, conversation, or a finalized spec via --auto), updates PROJECT.md and STATE.md, optionally runs parallel research, defines scoped requirements with REQ-IDs, spawns the roadmapper to create phased execution plan, and commits all artifacts. In --auto mode, derives everything from a finalized spec without interactive questioning.
4
4
 
5
5
  </purpose>
6
6
 
@@ -44,12 +44,28 @@ The spec must have status: final.
44
44
 
45
45
  <process>
46
46
 
47
+ ## 0. Resolve Paths and Models
48
+
49
+ ```bash
50
+ INIT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs init new-milestone)
51
+ ```
52
+
53
+ Extract from init JSON: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `research_enabled`, `current_milestone`, `current_milestone_name`, `project_exists`, `roadmap_exists`, `state_exists`, `project_path`, `roadmap_path`, `state_path`, `current_project`, `project_root`.
54
+
55
+ Load planning-tier context files:
56
+
57
+ ```bash
58
+ TIER_FILES=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" context load-tier planning --raw 2>/dev/null)
59
+ ```
60
+
61
+ All subsequent steps use these resolved paths. Never reference PROJECT.md, STATE.md, etc. by bare name — always use `${project_path}`, `${state_path}`, `${project_root}`, etc.
62
+
47
63
  ## 1. Load Context
48
64
 
49
- - Read PROJECT.md (existing project, validated requirements, decisions)
50
- - Read MILESTONES.md (what shipped previously)
51
- - Read STATE.md (pending todos, blockers)
52
- - Check for MILESTONE-CONTEXT.md (from /dgs:discuss-milestone)
65
+ - Read `${project_path}` (existing project, validated requirements, decisions)
66
+ - Read `${project_root}/MILESTONES.md` (what shipped previously) — if file does not exist, this is the first milestone; skip and use defaults
67
+ - Read `${state_path}` (pending todos, blockers) — if file does not exist, will be created in Step 5
68
+ - Check for `${project_root}/MILESTONE-CONTEXT.md` (from /dgs:discuss-milestone)
53
69
 
54
70
  ## 1b. Spec-Driven Milestone (auto mode only)
55
71
 
@@ -67,7 +83,7 @@ Read the spec file and extract:
67
83
 
68
84
  ### Determine Milestone Version
69
85
 
70
- Parse MILESTONES.md for last version. Suggest next version automatically (e.g., v1.0 → v1.1, or v2.0 for major). In auto mode, use the minor bump without asking.
86
+ Parse `${project_root}/MILESTONES.md` for last version. If no MILESTONES.md exists (first milestone): default to v1.0 (auto mode: use v1.0 without asking). Suggest next version automatically (e.g., v1.0 → v1.1, or v2.0 for major). In auto mode, use the minor bump without asking.
71
87
 
72
88
  ### Repo Cross-Check (v2 only)
73
89
 
@@ -148,7 +164,7 @@ node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "specs: link $SPEC
148
164
 
149
165
  ### Continue to Step 7
150
166
 
151
- Skip Steps 2-6 (questioning, version determination, update, cleanup, context loading) — they're replaced by spec-driven derivation. Proceed to Step 7 (Load Context and Resolve Models), then:
167
+ Skip Steps 2-6 (questioning, version determination, update, cleanup) — they're replaced by spec-driven derivation. Proceed to Step 8 (Research Decision), then:
152
168
 
153
169
  - Step 8 (Research Decision): Default to "Research first" in auto mode
154
170
  - Step 9 (Define Requirements): Generate from spec instead of interactive scoping:
@@ -166,7 +182,7 @@ Skip Steps 2-6 (questioning, version determination, update, cleanup, context loa
166
182
 
167
183
  ## 2. Gather Milestone Goals
168
184
 
169
- **If MILESTONE-CONTEXT.md exists:**
185
+ **If `${project_root}/MILESTONE-CONTEXT.md` exists:**
170
186
  - Use features and scope from discuss-milestone
171
187
  - Present summary for confirmation
172
188
 
@@ -177,7 +193,8 @@ Skip Steps 2-6 (questioning, version determination, update, cleanup, context loa
177
193
 
178
194
  ## 3. Determine Milestone Version
179
195
 
180
- - Parse last version from MILESTONES.md
196
+ - Parse last version from `${project_root}/MILESTONES.md`
197
+ - If no MILESTONES.md exists (first milestone): default to v1.0 and suggest it to user
181
198
  - Suggest next version (v1.0 → v1.1, or v2.0 for major)
182
199
  - Confirm with user
183
200
 
@@ -200,6 +217,9 @@ Update Active requirements section and "Last updated" footer.
200
217
 
201
218
  ## 5. Update STATE.md
202
219
 
220
+ **If `${state_path}` does not exist (first milestone):** Create it with the structure below.
221
+ **If it exists:** Update the Current Position section.
222
+
203
223
  ```markdown
204
224
  ## Current Position
205
225
 
@@ -213,25 +233,15 @@ Keep Accumulated Context section from previous milestone.
213
233
 
214
234
  ## 6. Cleanup and Commit
215
235
 
216
- Delete MILESTONE-CONTEXT.md if exists (consumed).
236
+ Delete `${project_root}/MILESTONE-CONTEXT.md` if exists (consumed).
217
237
 
218
238
  ```bash
219
239
  node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: start milestone v[X.Y] [Name]" --push --files ${project_path} ${state_path}
220
240
  ```
221
241
 
222
- ## 7. Load Context and Resolve Models
223
-
224
- ```bash
225
- INIT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs init new-milestone)
226
- ```
227
-
228
- Extract from init JSON: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `research_enabled`, `current_milestone`, `project_exists`, `roadmap_exists`.
242
+ ## 7. Research Decision Gate
229
243
 
230
- Load planning-tier context files:
231
-
232
- ```bash
233
- TIER_FILES=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" context load-tier planning --raw 2>/dev/null)
234
- ```
244
+ Paths and models already resolved in Step 0.
235
245
 
236
246
  ## 8. Research Decision
237
247
 
@@ -264,6 +274,12 @@ node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs config-set workflow.resea
264
274
  mkdir -p ${project_root}/research
265
275
  ```
266
276
 
277
+ **Determine milestone context for researchers:**
278
+ - If MILESTONES.md does not exist (first milestone): Use greenfield framing:
279
+ `NEW PROJECT — Building [target features] from scratch.`
280
+ - If MILESTONES.md exists (subsequent milestone): Use existing framing:
281
+ `SUBSEQUENT MILESTONE — Adding [target features] to existing app.`
282
+
267
283
  Spawn 4 parallel dgs-project-researcher agents. Each uses this template with dimension-specific fields:
268
284
 
269
285
  **Common structure for all 4 researchers:**
@@ -272,7 +288,7 @@ Task(prompt="
272
288
  <research_type>Project Research — {DIMENSION} for [new features].</research_type>
273
289
 
274
290
  <milestone_context>
275
- SUBSEQUENT MILESTONE — Adding [target features] to existing app.
291
+ {MILESTONE_FRAMING}
276
292
  {EXISTING_CONTEXT}
277
293
  Focus ONLY on what's needed for the NEW features.
278
294
  </milestone_context>
@@ -419,7 +435,7 @@ node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: define mile
419
435
  ◆ Spawning roadmapper...
420
436
  ```
421
437
 
422
- **Starting phase number:** Read MILESTONES.md for last phase number. Continue from there (v1.0 ended at phase 5 → v1.1 starts at phase 6).
438
+ **Starting phase number:** Read `${project_root}/MILESTONES.md` for last phase number. Continue from there (v1.0 ended at phase 5 → v1.1 starts at phase 6). If no MILESTONES.md exists (first milestone): start phase numbering at 1.
423
439
 
424
440
  ```
425
441
  Task(prompt="