@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.
- package/CHANGELOG.md +96 -0
- package/README.md +41 -13
- package/agents/dgs-plan-checker.md +29 -3
- package/agents/dgs-planner.md +10 -0
- package/commands/dgs/abandon-quick.md +28 -0
- package/commands/dgs/add-tests.md +2 -2
- package/commands/dgs/audit-milestone.md +2 -2
- package/commands/dgs/capture-principle.md +11 -11
- package/commands/dgs/cleanup.md +2 -2
- package/commands/dgs/complete-milestone.md +11 -11
- package/commands/dgs/complete-quick.md +28 -0
- package/commands/dgs/create-milestone-job.md +2 -2
- package/commands/dgs/debug.md +3 -3
- package/commands/dgs/develop-idea.md +1 -1
- package/commands/dgs/fast.md +3 -1
- package/commands/dgs/health.md +1 -1
- package/commands/dgs/map-codebase.md +6 -6
- package/commands/dgs/new-milestone.md +5 -5
- package/commands/dgs/new-project.md +6 -6
- package/commands/dgs/plan-milestone-gaps.md +1 -1
- package/commands/dgs/progress.md +3 -3
- package/commands/dgs/quick-abandon.md +8 -0
- package/commands/dgs/quick-complete.md +8 -0
- package/commands/dgs/quick.md +10 -3
- package/commands/dgs/research-idea.md +2 -2
- package/commands/dgs/research-phase.md +3 -3
- package/commands/dgs/switch-project.md +1 -1
- package/commands/dgs/write-spec.md +3 -3
- package/deliver-great-systems/bin/dgs-tools.cjs +284 -30
- package/deliver-great-systems/bin/lib/commands.cjs +316 -31
- package/deliver-great-systems/bin/lib/commands.test.cjs +336 -0
- package/deliver-great-systems/bin/lib/config.cjs +39 -6
- package/deliver-great-systems/bin/lib/context.cjs +120 -0
- package/deliver-great-systems/bin/lib/core.cjs +28 -11
- package/deliver-great-systems/bin/lib/execution.cjs +49 -17
- package/deliver-great-systems/bin/lib/flat-migration.test.cjs +396 -0
- package/deliver-great-systems/bin/lib/ideas.cjs +206 -91
- package/deliver-great-systems/bin/lib/ideas.test.cjs +244 -1
- package/deliver-great-systems/bin/lib/init.cjs +306 -39
- package/deliver-great-systems/bin/lib/init.test.cjs +416 -6
- package/deliver-great-systems/bin/lib/jobs.cjs +124 -21
- package/deliver-great-systems/bin/lib/jobs.test.cjs +193 -74
- package/deliver-great-systems/bin/lib/migration.cjs +409 -1
- package/deliver-great-systems/bin/lib/migration.test.cjs +158 -1
- package/deliver-great-systems/bin/lib/milestone.cjs +54 -29
- package/deliver-great-systems/bin/lib/phase.cjs +128 -2
- package/deliver-great-systems/bin/lib/phase.test.cjs +420 -0
- package/deliver-great-systems/bin/lib/projects.cjs +28 -8
- package/deliver-great-systems/bin/lib/projects.test.cjs +86 -0
- package/deliver-great-systems/bin/lib/quick.cjs +584 -0
- package/deliver-great-systems/bin/lib/quick.test.cjs +596 -0
- package/deliver-great-systems/bin/lib/repos.cjs +25 -1
- package/deliver-great-systems/bin/lib/roadmap.cjs +34 -13
- package/deliver-great-systems/bin/lib/specs.cjs +3 -81
- package/deliver-great-systems/bin/lib/state-transition-gate.test.cjs +160 -0
- package/deliver-great-systems/bin/lib/state.cjs +142 -54
- package/deliver-great-systems/bin/lib/sync.cjs +75 -0
- package/deliver-great-systems/bin/lib/verify.cjs +80 -1
- package/deliver-great-systems/bin/lib/worktrees.cjs +764 -0
- package/deliver-great-systems/bin/lib/worktrees.test.cjs +887 -0
- package/deliver-great-systems/templates/claude-md.md +16 -0
- package/deliver-great-systems/workflows/abandon-quick.md +89 -0
- package/deliver-great-systems/workflows/add-idea.md +3 -3
- package/deliver-great-systems/workflows/add-tests.md +14 -0
- package/deliver-great-systems/workflows/add-todo.md +1 -0
- package/deliver-great-systems/workflows/approve-spec.md +25 -4
- package/deliver-great-systems/workflows/audit-phase.md +15 -5
- package/deliver-great-systems/workflows/cancel-job.md +1 -1
- package/deliver-great-systems/workflows/check-todos.md +2 -3
- package/deliver-great-systems/workflows/complete-milestone.md +197 -22
- package/deliver-great-systems/workflows/complete-quick.md +68 -0
- package/deliver-great-systems/workflows/consolidate-ideas.md +1 -1
- package/deliver-great-systems/workflows/create-milestone-job.md +4 -4
- package/deliver-great-systems/workflows/develop-idea.md +11 -11
- package/deliver-great-systems/workflows/diagnose-issues.md +14 -0
- package/deliver-great-systems/workflows/discuss-idea.md +1 -1
- package/deliver-great-systems/workflows/execute-phase.md +121 -32
- package/deliver-great-systems/workflows/execute-plan.md +12 -21
- package/deliver-great-systems/workflows/help.md +33 -29
- package/deliver-great-systems/workflows/init-product.md +2 -18
- package/deliver-great-systems/workflows/new-milestone.md +40 -24
- package/deliver-great-systems/workflows/new-project.md +22 -680
- package/deliver-great-systems/workflows/progress-all.md +133 -0
- package/deliver-great-systems/workflows/quick-abandon.md +89 -0
- package/deliver-great-systems/workflows/quick-complete.md +68 -0
- package/deliver-great-systems/workflows/quick.md +152 -23
- package/deliver-great-systems/workflows/refine-spec.md +1 -1
- package/deliver-great-systems/workflows/research-idea.md +8 -8
- package/deliver-great-systems/workflows/resume-project.md +2 -2
- package/deliver-great-systems/workflows/run-job.md +8 -8
- package/deliver-great-systems/workflows/validate-phase.md +39 -1
- package/deliver-great-systems/workflows/verify-work.md +14 -0
- package/deliver-great-systems/workflows/write-spec.md +2 -2
- package/package.json +1 -1
|
@@ -293,7 +293,7 @@ Loop through steps starting from `nextStepIndex`.
|
|
|
293
293
|
|
|
294
294
|
**Mid-workflow push (after phase-completing steps):**
|
|
295
295
|
|
|
296
|
-
After a step completes successfully, check if the step's command is a phase-completing workflow: `execute-phase`, `verify-work`, `audit-phase`, `audit-milestone`, `plan-phase`, `plan-milestone-gaps`, or `complete-milestone`.
|
|
296
|
+
After a step completes successfully, check if the step's command is a phase-completing workflow: `execute-phase`, `verify-work`, `audit-phase`, `audit-milestone`, `plan-phase`, `plan-milestone-gaps`, `validate-phase`, or `complete-milestone`.
|
|
297
297
|
|
|
298
298
|
If so, and `sync_push` is not `"off"` and `cadence_push` is true:
|
|
299
299
|
```bash
|
|
@@ -359,11 +359,11 @@ After an `audit-milestone` step completes successfully, check the audit outcome.
|
|
|
359
359
|
|
|
360
360
|
Note: --no-check jobs never trigger this code path because they have no audit-milestone step. The `check: false` header means no `audit-milestone` step is generated by `generateMilestoneSteps`, so handle_audit_result is never reached.
|
|
361
361
|
|
|
362
|
-
Note:
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
362
|
+
Note: audit-milestone is the last step of milestone jobs. complete-milestone is never
|
|
363
|
+
auto-run because it requires manual intervention (branch review, tag push, merge conflict
|
|
364
|
+
resolution). After audit passes, the job ends and the user runs /dgs:complete-milestone
|
|
365
|
+
manually. Gap-fix steps are inserted after the original audit step; when a re-audit passes,
|
|
366
|
+
the job completes and the user still runs complete-milestone manually.
|
|
367
367
|
|
|
368
368
|
1. **Read audit status:**
|
|
369
369
|
```bash
|
|
@@ -378,9 +378,9 @@ deferring complete-milestone. This is correct -- complete-milestone only runs af
|
|
|
378
378
|
```
|
|
379
379
|
- If `GAP_FIX_CYCLE == 0` (audit passed first time): Display clean banner:
|
|
380
380
|
```
|
|
381
|
-
Audit passed -- no gaps found.
|
|
381
|
+
Audit passed -- no gaps found. Run /dgs:complete-milestone manually to archive.
|
|
382
382
|
```
|
|
383
|
-
-
|
|
383
|
+
- Job completes after this step. User runs /dgs:complete-milestone manually when ready.
|
|
384
384
|
|
|
385
385
|
3. **If `gaps_found`:**
|
|
386
386
|
|
|
@@ -12,6 +12,14 @@ Audit Nyquist validation gaps for a completed phase. Generate missing tests. Upd
|
|
|
12
12
|
|
|
13
13
|
## 0. Initialize
|
|
14
14
|
|
|
15
|
+
**Parse `--scaffold` flag:**
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Parse `--scaffold` flag from PHASE_ARG (e.g., `/dgs:validate-phase 16 --scaffold`).
|
|
19
|
+
Set `SCAFFOLD_MODE = true` if `--scaffold` is present, `false` otherwise.
|
|
20
|
+
Strip `--scaffold` from PHASE_ARG before passing to `init phase-op`.
|
|
21
|
+
```
|
|
22
|
+
|
|
15
23
|
```bash
|
|
16
24
|
INIT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" init phase-op "${PHASE_ARG}")
|
|
17
25
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
@@ -83,10 +91,14 @@ Classify each requirement:
|
|
|
83
91
|
|
|
84
92
|
Build: `{ task_id, requirement, gap_type, suggested_test_path, suggested_command }`
|
|
85
93
|
|
|
86
|
-
|
|
94
|
+
**Scaffold mode:** If `SCAFFOLD_MODE` is true, override all gap statuses to `PENDING_REVIEW` (not MISSING, not manual-only -- a distinct scaffold status meaning "gap identified but not yet triaged").
|
|
95
|
+
|
|
96
|
+
No gaps → skip to Step 6, set `nyquist_compliant: true`. In scaffold mode, this still produces a VALIDATION.md (with all requirements COVERED or PENDING_REVIEW).
|
|
87
97
|
|
|
88
98
|
## 4. Present Gap Plan
|
|
89
99
|
|
|
100
|
+
**Scaffold mode:** If `SCAFFOLD_MODE` is true, skip this step entirely (do not call AskUserQuestion). Proceed directly to Step 6.
|
|
101
|
+
|
|
90
102
|
Call AskUserQuestion with gap table and options:
|
|
91
103
|
1. "Fix all gaps" → Step 5
|
|
92
104
|
2. "Skip — mark manual-only" → add to Manual-Only, Step 6
|
|
@@ -94,6 +106,8 @@ Call AskUserQuestion with gap table and options:
|
|
|
94
106
|
|
|
95
107
|
## 5. Spawn dgs-nyquist-auditor
|
|
96
108
|
|
|
109
|
+
**Scaffold mode:** If `SCAFFOLD_MODE` is true, skip this step entirely (do not spawn auditor). Proceed directly to Step 6.
|
|
110
|
+
|
|
97
111
|
```
|
|
98
112
|
Task(
|
|
99
113
|
prompt="Read ~/.claude/agents/dgs-nyquist-auditor.md for instructions.\n\n" +
|
|
@@ -114,6 +128,8 @@ Handle return:
|
|
|
114
128
|
|
|
115
129
|
## 6. Generate/Update VALIDATION.md
|
|
116
130
|
|
|
131
|
+
**Scaffold mode:** If `SCAFFOLD_MODE` is true, always use the State B (create) flow regardless of existing VALIDATION.md state. Gaps are marked as `PENDING_REVIEW` in the Per-Task Map.
|
|
132
|
+
|
|
117
133
|
**State B (create):**
|
|
118
134
|
1. Read template from `~/.claude/deliver-great-systems/templates/VALIDATION.md`
|
|
119
135
|
2. Fill: frontmatter, Test Infrastructure, Per-Task Map, Manual-Only, Sign-Off
|
|
@@ -134,6 +150,15 @@ Handle return:
|
|
|
134
150
|
|
|
135
151
|
## 7. Commit
|
|
136
152
|
|
|
153
|
+
**Scaffold mode:** If `SCAFFOLD_MODE` is true:
|
|
154
|
+
- Only commit VALIDATION.md (no test files -- none were generated)
|
|
155
|
+
- Commit message: `docs(phase-${PHASE}): scaffold Nyquist validation`
|
|
156
|
+
- Use: `node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit-docs "docs(phase-${PHASE}): scaffold Nyquist validation"`
|
|
157
|
+
- Do NOT run the `git add {test_files}` / `git commit -m "test(..."` block
|
|
158
|
+
- Skip to Step 8
|
|
159
|
+
|
|
160
|
+
**Non-scaffold mode:**
|
|
161
|
+
|
|
137
162
|
```bash
|
|
138
163
|
git add {test_files}
|
|
139
164
|
git commit -m "test(phase-${PHASE}): add Nyquist validation tests"
|
|
@@ -143,6 +168,14 @@ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit-docs "docs(p
|
|
|
143
168
|
|
|
144
169
|
## 8. Results + Routing
|
|
145
170
|
|
|
171
|
+
**Scaffold mode:** If `SCAFFOLD_MODE` is true, display scaffold-specific output and exit:
|
|
172
|
+
```
|
|
173
|
+
DGS > PHASE {N} VALIDATION SCAFFOLDED
|
|
174
|
+
{M} requirements mapped, {K} gaps pending review.
|
|
175
|
+
> Fill gaps: /dgs:validate-phase {N}
|
|
176
|
+
```
|
|
177
|
+
Display `/clear` reminder. Skip the Compliant/Partial output below.
|
|
178
|
+
|
|
146
179
|
**Compliant:**
|
|
147
180
|
```
|
|
148
181
|
DGS > PHASE {N} IS NYQUIST-COMPLIANT
|
|
@@ -174,4 +207,9 @@ Display `/clear` reminder.
|
|
|
174
207
|
- [ ] VALIDATION.md created or updated
|
|
175
208
|
- [ ] Test files committed separately
|
|
176
209
|
- [ ] Results with routing presented
|
|
210
|
+
- [ ] --scaffold flag parsed and controls Steps 4-8
|
|
211
|
+
- [ ] Scaffold mode skips interactive gap plan (Step 4) and auditor (Step 5)
|
|
212
|
+
- [ ] Scaffold mode marks gaps as PENDING_REVIEW
|
|
213
|
+
- [ ] Scaffold mode commits docs-only with scaffold commit message
|
|
214
|
+
- [ ] Scaffold mode displays scaffold-specific results banner
|
|
177
215
|
</success_criteria>
|
|
@@ -63,6 +63,20 @@ REPOS_MD=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" repos li
|
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
Parse JSON for the list of registered repos with paths.
|
|
66
|
+
|
|
67
|
+
**Worktree-aware code directory resolution (resolveCodeContext):**
|
|
68
|
+
|
|
69
|
+
For each registered code repo, resolve the correct working directory. When a milestone or quick worktree is active, code operations must target the worktree directory, not the main checkout.
|
|
70
|
+
|
|
71
|
+
```javascript
|
|
72
|
+
// In the agent's execution context, use resolveCodeContext to determine the code directory:
|
|
73
|
+
const { resolveCodeContext } = require('./bin/lib/context.cjs');
|
|
74
|
+
const ctx = resolveCodeContext(planningRoot, repoName);
|
|
75
|
+
// ctx.type: 'main' | 'milestone' | 'quick'
|
|
76
|
+
// ctx.directory: absolute path to the correct working directory
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Use `ctx.directory` (or the repo's main checkout path when no worktree is active) for all file reading, test execution, and code verification operations. Do NOT hardcode repo paths from REPOS.md when a worktree may be active.
|
|
66
80
|
</step>
|
|
67
81
|
|
|
68
82
|
<step name="check_active_session">
|
|
@@ -103,8 +103,8 @@ Then proceed normally. Only show this tip when ALL selected ideas lack enrichmen
|
|
|
103
103
|
**Load supporting documents** from each selected idea's `docs/` directory:
|
|
104
104
|
|
|
105
105
|
For each selected idea:
|
|
106
|
-
a. Derive the idea's docs path: `${project_root}/ideas/
|
|
107
|
-
Alternative path: check
|
|
106
|
+
a. Derive the idea's docs path: `${project_root}/docs/ideas/{idea_slug}/` where `idea_slug` is derived from the idea filename (strip numeric prefix and .md suffix, e.g., `005-retry-logic.md` -> `retry-logic`).
|
|
107
|
+
Alternative path: check for research docs at `${project_root}/docs/ideas/{slug}-*.md`.
|
|
108
108
|
b. If the docs/ directory exists, list all files in it:
|
|
109
109
|
```bash
|
|
110
110
|
ls "${IDEA_DOCS_DIR}/" 2>/dev/null
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"bugs": {
|
|
9
9
|
"url": "https://github.com/KT-Partners-Ltd/dgs-platform-docs/issues"
|
|
10
10
|
},
|
|
11
|
-
"version": "
|
|
11
|
+
"version": "3.0.4",
|
|
12
12
|
"description": "Deliver Great Systems Platform — A meta-prompting, context engineering and spec-driven development system for Claude Code and Gemini by KT Partners.",
|
|
13
13
|
"bin": {
|
|
14
14
|
"dgs": "bin/install.js"
|