@ktpartners/dgs-platform 2.7.4 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/agents/dgs-executor.md +0 -52
  3. package/deliver-great-systems/bin/dgs-tools.cjs +66 -10
  4. package/deliver-great-systems/bin/lib/commands.cjs +1 -8
  5. package/deliver-great-systems/bin/lib/config.cjs +9 -90
  6. package/deliver-great-systems/bin/lib/context.cjs +2 -2
  7. package/deliver-great-systems/bin/lib/context.test.cjs +100 -100
  8. package/deliver-great-systems/bin/lib/core.cjs +17 -57
  9. package/deliver-great-systems/bin/lib/core.test.cjs +166 -170
  10. package/deliver-great-systems/bin/lib/docs.cjs +3 -3
  11. package/deliver-great-systems/bin/lib/docs.test.cjs +14 -7
  12. package/deliver-great-systems/bin/lib/execution.cjs +2 -2
  13. package/deliver-great-systems/bin/lib/execution.test.cjs +65 -67
  14. package/deliver-great-systems/bin/lib/ideas.cjs +4 -4
  15. package/deliver-great-systems/bin/lib/ideas.test.cjs +45 -44
  16. package/deliver-great-systems/bin/lib/init.cjs +9 -4
  17. package/deliver-great-systems/bin/lib/init.test.cjs +242 -175
  18. package/deliver-great-systems/bin/lib/jobs.cjs +1 -1
  19. package/deliver-great-systems/bin/lib/jobs.test.cjs +203 -202
  20. package/deliver-great-systems/bin/lib/migration.cjs +256 -281
  21. package/deliver-great-systems/bin/lib/migration.test.cjs +385 -440
  22. package/deliver-great-systems/bin/lib/milestone.cjs +1 -1
  23. package/deliver-great-systems/bin/lib/overlap.cjs +4 -4
  24. package/deliver-great-systems/bin/lib/overlap.test.cjs +45 -44
  25. package/deliver-great-systems/bin/lib/path-audit.test.cjs +16 -22
  26. package/deliver-great-systems/bin/lib/paths.cjs +60 -59
  27. package/deliver-great-systems/bin/lib/paths.test.cjs +192 -225
  28. package/deliver-great-systems/bin/lib/phase.cjs +5 -4
  29. package/deliver-great-systems/bin/lib/projects.cjs +8 -8
  30. package/deliver-great-systems/bin/lib/projects.test.cjs +75 -74
  31. package/deliver-great-systems/bin/lib/repos.cjs +94 -230
  32. package/deliver-great-systems/bin/lib/repos.test.cjs +84 -75
  33. package/deliver-great-systems/bin/lib/search.cjs +4 -4
  34. package/deliver-great-systems/bin/lib/specs.cjs +2 -2
  35. package/deliver-great-systems/bin/lib/sync.cjs +1 -1
  36. package/deliver-great-systems/bin/lib/template.cjs +3 -3
  37. package/deliver-great-systems/bin/lib/test-helpers.cjs +59 -162
  38. package/deliver-great-systems/bin/lib/verify.cjs +3 -3
  39. package/deliver-great-systems/references/planning-config.md +7 -8
  40. package/deliver-great-systems/workflows/add-tests.md +1 -1
  41. package/deliver-great-systems/workflows/approve-spec.md +1 -11
  42. package/deliver-great-systems/workflows/complete-milestone.md +2 -2
  43. package/deliver-great-systems/workflows/consolidate-ideas.md +1 -1
  44. package/deliver-great-systems/workflows/create-milestone-job.md +2 -2
  45. package/deliver-great-systems/workflows/discuss-phase.md +2 -2
  46. package/deliver-great-systems/workflows/execute-phase.md +63 -4
  47. package/deliver-great-systems/workflows/execute-plan.md +0 -51
  48. package/deliver-great-systems/workflows/find-related-ideas.md +1 -1
  49. package/deliver-great-systems/workflows/help.md +25 -58
  50. package/deliver-great-systems/workflows/init-product.md +14 -451
  51. package/deliver-great-systems/workflows/map-codebase.md +109 -0
  52. package/deliver-great-systems/workflows/new-project.md +0 -1
  53. package/deliver-great-systems/workflows/quick.md +6 -7
  54. package/deliver-great-systems/workflows/run-job.md +56 -0
  55. package/deliver-great-systems/workflows/settings.md +30 -0
  56. package/package.json +5 -1
@@ -208,8 +208,7 @@ Commit message is NOT shown to user before committing — just commit silently.
208
208
  **F5. Commit**
209
209
 
210
210
  ```bash
211
- git add -A
212
- git commit -m "${commit_message}"
211
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "${commit_message}" --push
213
212
  ```
214
213
 
215
214
  Get the short hash:
@@ -257,18 +256,18 @@ After adding the row, trigger archival to keep the table within 20 rows:
257
256
  ARCHIVE_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" state archive-quick-tasks --raw 2>/dev/null)
258
257
  ```
259
258
 
260
- If archival occurred (result contains `"archived": true`), `.planning/quick/HISTORY.md` was created or updated. Both STATE.md and HISTORY.md will be committed together in the next step.
259
+ If archival occurred (result contains `"archived": true`), `quick/HISTORY.md` was created or updated. Both STATE.md and HISTORY.md will be committed together in the next step.
261
260
 
262
261
  **F6c. Commit tracking (fast path only)**
263
262
 
264
263
  Commit STATE.md and HISTORY.md together so archival data is persisted:
265
264
 
266
265
  ```bash
267
- git add "${state_path}"
266
+ FILE_LIST="${state_path}"
268
267
  if [ -f "${project_root}/quick/HISTORY.md" ]; then
269
- git add "${project_root}/quick/HISTORY.md"
268
+ FILE_LIST="${FILE_LIST} ${project_root}/quick/HISTORY.md"
270
269
  fi
271
- git commit -m "docs(quick-${quick_id}): track fast task" 2>/dev/null || true
270
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(quick-${quick_id}): track fast task" --push --files ${FILE_LIST} 2>/dev/null || true
272
271
  ```
273
272
 
274
273
  The `|| true` handles the case where nothing changed (e.g., STATE.md wasn't modified).
@@ -750,7 +749,7 @@ After adding the row, trigger archival to keep the table within 20 rows:
750
749
  node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" state archive-quick-tasks 2>/dev/null
751
750
  ```
752
751
 
753
- If archival occurred, `.planning/quick/HISTORY.md` was created or updated. Include it in Step 8's commit file list.
752
+ If archival occurred, `quick/HISTORY.md` was created or updated. Include it in Step 8's commit file list.
754
753
 
755
754
  **7d. Update "Last activity" line:**
756
755
 
@@ -144,6 +144,13 @@ if ! grep -q '^\*\*StartShas:\*\*' "$JOB_PATH"; then
144
144
  fi
145
145
  ```
146
146
 
147
+ **Commit and push job status:**
148
+
149
+ ```bash
150
+ git add -A "$(dirname "$JOB_PATH")/../"
151
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(job): start ${VERSION}" --push
152
+ ```
153
+
147
154
  This captures the current HEAD of every registered code repo and the planning repo before any execution begins. The SHAs are written into the job file header as `**StartShas:**` and used by `/dgs:rollback-job` to reset repos if the job produces unwanted results.
148
155
  </step>
149
156
 
@@ -248,6 +255,12 @@ Loop through steps starting from `nextStepIndex`.
248
255
  node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs jobs update-step "$JOB_PATH" $INDEX in-progress --timestamp "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
249
256
  ```
250
257
 
258
+ **Commit and push job status:**
259
+
260
+ ```bash
261
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(job): step $((INDEX+1)) in-progress" --files "$JOB_PATH" --push
262
+ ```
263
+
251
264
  3. **Spawn subagent** via Task tool:
252
265
  ```
253
266
  Task(
@@ -266,6 +279,13 @@ Loop through steps starting from `nextStepIndex`.
266
279
  ```bash
267
280
  node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs jobs update-step "$JOB_PATH" $INDEX completed --timestamp "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
268
281
  ```
282
+
283
+ **Commit and push job status:**
284
+
285
+ ```bash
286
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(job): step $((INDEX+1)) completed" --files "$JOB_PATH" --push
287
+ ```
288
+
269
289
  Display one-line result:
270
290
  ```
271
291
  OK {command} {args_display} ({duration})
@@ -293,6 +313,13 @@ Loop through steps starting from `nextStepIndex`.
293
313
  ```bash
294
314
  node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs jobs update-header "$JOB_PATH" Status failed
295
315
  ```
316
+
317
+ **Commit and push job status:**
318
+
319
+ ```bash
320
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(job): step $((INDEX+1)) failed" --files "$JOB_PATH" --push
321
+ ```
322
+
296
323
  Display error summary and restart hint:
297
324
  ```
298
325
  FAILED {command} {args_display} ({duration})
@@ -308,6 +335,12 @@ Loop through steps starting from `nextStepIndex`.
308
335
  Parse the result. If `found: true`, write the `content` field to `${jobs_root}/in-progress/job-{version}-SUMMARY.md` using the Write tool (job stays in in-progress/ on failure).
309
336
  Display: `Job summary written to ${jobs_root}/in-progress/job-{version}-SUMMARY.md`
310
337
 
338
+ **Commit and push failure summary:**
339
+
340
+ ```bash
341
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(job): ${VERSION} failure summary" --files "${jobs_root}/in-progress/job-${VERSION}-SUMMARY.md" --push
342
+ ```
343
+
311
344
  **HALT immediately.** Do not proceed to the next step.
312
345
 
313
346
  6. **After an audit-milestone step completes successfully:** Execute the `handle_audit_result` logic (see below).
@@ -375,6 +408,10 @@ deferring complete-milestone. This is correct -- complete-milestone only runs af
375
408
  ```bash
376
409
  node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs jobs update-header "$JOB_PATH" Status failed
377
410
  ```
411
+ - **Commit and push job status:**
412
+ ```bash
413
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(job): ${VERSION} audit failed (cycle limit)" --files "$JOB_PATH" --push
414
+ ```
378
415
  - **HALT immediately.**
379
416
 
380
417
  **3b. Auto-approve gap-fix insertion:**
@@ -468,6 +505,10 @@ After an `audit-phase` step completes successfully, check the phase audit outcom
468
505
  ```bash
469
506
  node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs jobs update-header "$JOB_PATH" Status failed
470
507
  ```
508
+ - **Commit and push job status:**
509
+ ```bash
510
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(job): ${VERSION} phase ${PHASE_NUMBER} audit failed (cycle limit)" --files "$JOB_PATH" --push
511
+ ```
471
512
  - **HALT immediately.**
472
513
 
473
514
  **4b. Insert gap-fix steps:**
@@ -505,6 +546,15 @@ When all steps are completed (`nextStepIndex` is null after the loop):
505
546
  node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs jobs move "$JOB_PATH" "${jobs_root}/completed"
506
547
  ```
507
548
 
549
+ Update `JOB_PATH` to reflect the new location under `completed/`.
550
+
551
+ **Commit and push job status:**
552
+
553
+ ```bash
554
+ git add -A "$(dirname "$JOB_PATH")/../"
555
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(job): ${VERSION} completed" --push
556
+ ```
557
+
508
558
  3. **Generate job summary:**
509
559
  ```bash
510
560
  SUMMARY=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs jobs generate-summary "$VERSION")
@@ -512,6 +562,12 @@ When all steps are completed (`nextStepIndex` is null after the loop):
512
562
  Parse the result. If `found: true`, write the `content` field to `${jobs_root}/completed/job-{version}-SUMMARY.md` using the Write tool.
513
563
  Display: `Job summary written to ${jobs_root}/completed/job-{version}-SUMMARY.md`
514
564
 
565
+ **Commit and push completion summary:**
566
+
567
+ ```bash
568
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(job): ${VERSION} completion summary" --files "${jobs_root}/completed/job-${VERSION}-SUMMARY.md" --push
569
+ ```
570
+
515
571
  4. **Post-workflow push (sync_after):**
516
572
 
517
573
  Follow the sync-hooks post-workflow push pattern with `WORKFLOW_NAME = "run-job"`:
@@ -276,6 +276,11 @@ Set config:
276
276
  node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" config-set workflow.discipline true
277
277
  ```
278
278
 
279
+ Track CLAUDE.md as modified:
280
+ ```bash
281
+ MODIFIED_FILES="${MODIFIED_FILES} ./CLAUDE.md"
282
+ ```
283
+
279
284
  Display: `Workflow discipline: On`
280
285
 
281
286
  **If user selects "Off" (toggle off):**
@@ -314,6 +319,11 @@ Set config:
314
319
  node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" config-set workflow.discipline false
315
320
  ```
316
321
 
322
+ Track CLAUDE.md as modified:
323
+ ```bash
324
+ MODIFIED_FILES="${MODIFIED_FILES} ./CLAUDE.md"
325
+ ```
326
+
317
327
  Display: `Workflow discipline: Off`
318
328
 
319
329
  **If "Cancel":**
@@ -421,6 +431,12 @@ Do NOT use AskUserQuestion for any review settings.
421
431
  </step>
422
432
 
423
433
  <step name="update_config">
434
+ Track which files will be modified for the commit step:
435
+
436
+ ```bash
437
+ MODIFIED_FILES="${config_path}"
438
+ ```
439
+
424
440
  Merge new settings into existing config:
425
441
 
426
442
  ```json
@@ -497,6 +513,20 @@ Write `~/.dgs/defaults.json` with:
497
513
  ```
498
514
  </step>
499
515
 
516
+ <step name="commit_and_push">
517
+ Commit the config changes and push if sync_push is enabled:
518
+
519
+ ```bash
520
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "chore: update DGS settings" --push --files ${MODIFIED_FILES}
521
+ ```
522
+
523
+ This uses dgs-tools commit which:
524
+ - Stages only the specified files
525
+ - Creates the commit
526
+ - With --push, reads sync_push from config and pushes when mode is "auto" (silently) or "prompt" (asks first)
527
+ - If sync_push is "off", no push occurs (commit-only)
528
+ </step>
529
+
500
530
  <step name="confirm">
501
531
  Display:
502
532
 
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "@ktpartners/dgs-platform",
3
3
  "homepage": "https://kt-partners-ltd.github.io/dgs-platform-docs/",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/KT-Partners-Ltd/deliver-great-systems.git"
7
+ },
4
8
  "bugs": {
5
9
  "url": "https://github.com/KT-Partners-Ltd/dgs-platform-docs/issues"
6
10
  },
7
- "version": "2.7.4",
11
+ "version": "2.8.0",
8
12
  "description": "Deliver Great Systems Platform — A meta-prompting, context engineering and spec-driven development system for Claude Code and Gemini by KT Partners.",
9
13
  "bin": {
10
14
  "dgs": "bin/install.js"