@ktpartners/dgs-platform 2.6.3 → 2.7.1
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/agents/dgs-executor.md +51 -0
- package/commands/dgs/sync.md +70 -0
- package/deliver-great-systems/bin/dgs-tools.cjs +290 -4
- package/deliver-great-systems/bin/lib/config.cjs +259 -67
- package/deliver-great-systems/bin/lib/core.cjs +49 -8
- package/deliver-great-systems/bin/lib/core.test.cjs +35 -14
- package/deliver-great-systems/bin/lib/init.cjs +61 -6
- package/deliver-great-systems/bin/lib/init.test.cjs +9 -9
- package/deliver-great-systems/bin/lib/migration.cjs +1 -1
- package/deliver-great-systems/bin/lib/migration.test.cjs +7 -9
- package/deliver-great-systems/bin/lib/path-audit.test.cjs +1 -1
- package/deliver-great-systems/bin/lib/paths.cjs +32 -22
- package/deliver-great-systems/bin/lib/paths.test.cjs +16 -6
- package/deliver-great-systems/bin/lib/projects.cjs +1 -1
- package/deliver-great-systems/bin/lib/projects.test.cjs +1 -1
- package/deliver-great-systems/bin/lib/repos.cjs +29 -10
- package/deliver-great-systems/bin/lib/state.cjs +2 -2
- package/deliver-great-systems/bin/lib/sync.cjs +878 -0
- package/deliver-great-systems/bin/lib/test-helpers.cjs +44 -12
- package/deliver-great-systems/references/git-integration.md +81 -0
- package/deliver-great-systems/references/planning-config.md +154 -31
- package/deliver-great-systems/references/sync-cadence.md +191 -0
- package/deliver-great-systems/references/sync-hooks.md +96 -0
- package/deliver-great-systems/test/cadence.test.cjs +160 -0
- package/deliver-great-systems/test/sync-workflow.test.cjs +562 -0
- package/deliver-great-systems/workflows/execute-phase.md +111 -4
- package/deliver-great-systems/workflows/init-product.md +6 -2
- package/deliver-great-systems/workflows/run-job.md +77 -2
- package/deliver-great-systems/workflows/settings.md +82 -1
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ Orchestrator coordinates, not executes. Each subagent loads the full execute-pla
|
|
|
14
14
|
|
|
15
15
|
<required_reading>
|
|
16
16
|
Read STATE.md before any operation to load project context.
|
|
17
|
+
@~/.claude/deliver-great-systems/references/sync-hooks.md
|
|
17
18
|
</required_reading>
|
|
18
19
|
|
|
19
20
|
<process>
|
|
@@ -26,7 +27,7 @@ INIT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" init execute
|
|
|
26
27
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
27
28
|
```
|
|
28
29
|
|
|
29
|
-
Parse JSON for: `executor_model`, `verifier_model`, `commit_docs`, `parallelization`, `branching_strategy`, `branch_name`, `base_branch`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `plans`, `incomplete_plans`, `plan_count`, `incomplete_count`, `state_exists`, `roadmap_exists`, `author`, `phase_req_ids`.
|
|
30
|
+
Parse JSON for: `executor_model`, `verifier_model`, `commit_docs`, `parallelization`, `branching_strategy`, `branch_name`, `base_branch`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `plans`, `incomplete_plans`, `plan_count`, `incomplete_count`, `state_exists`, `roadmap_exists`, `author`, `phase_req_ids`, `sync_push`, `sync_pull`, `cadence_push`, `cadence_pull`.
|
|
30
31
|
|
|
31
32
|
**Load execution tier context:**
|
|
32
33
|
|
|
@@ -62,6 +63,60 @@ Set `NON_INTERACTIVE = true` if `--non-interactive` flag present OR `--auto` fla
|
|
|
62
63
|
|
|
63
64
|
`NON_INTERACTIVE` controls checkpoint auto-approval and verification auto-resolve.
|
|
64
65
|
`AUTO_MODE` controls auto-advance via transition.md only (offer_next step).
|
|
66
|
+
|
|
67
|
+
**Sync initialization:**
|
|
68
|
+
|
|
69
|
+
Set `WORKFLOW_NAME = "execute-phase"`.
|
|
70
|
+
Initialize `SYNC_WARNINGS = []` (accumulates mid-workflow push warnings for end-of-workflow summary).
|
|
71
|
+
|
|
72
|
+
Determine effective sync mode for this workflow:
|
|
73
|
+
- If `NON_INTERACTIVE` is true, treat sync as auto mode regardless of config setting (no prompting in auto/job mode).
|
|
74
|
+
- Otherwise use `sync_push` and `sync_pull` values from init JSON.
|
|
75
|
+
- Store as `EFFECTIVE_SYNC_PULL` and `EFFECTIVE_SYNC_PUSH`.
|
|
76
|
+
</step>
|
|
77
|
+
|
|
78
|
+
<step name="sync_before">
|
|
79
|
+
Pre-workflow pull. Execute BEFORE any DGS state modifications (before branching).
|
|
80
|
+
|
|
81
|
+
Follow the sync-hooks pre-workflow pull pattern with `WORKFLOW_NAME = "execute-phase"`:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
SYNC_CHECK=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-pull "execute-phase" --check-only)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Parse `SYNC_CHECK` JSON.
|
|
88
|
+
|
|
89
|
+
**If `first_run_hint` is not null:** Display it as a one-liner.
|
|
90
|
+
```bash
|
|
91
|
+
node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-pull "execute-phase" --mark-hint-shown
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**If `should_pull` is false:** Skip pull entirely.
|
|
95
|
+
|
|
96
|
+
**If `stale.stale` is true and mode is `"off"`:** Display:
|
|
97
|
+
`Warning: origin/{branch} is {commitsBehind} commits ahead. Consider pulling.`
|
|
98
|
+
|
|
99
|
+
**If `should_pull` is true:**
|
|
100
|
+
|
|
101
|
+
- **If `EFFECTIVE_SYNC_PULL` is `"auto"` OR `suppressed` is true:** Pull silently:
|
|
102
|
+
```bash
|
|
103
|
+
PULL_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-pull "execute-phase")
|
|
104
|
+
```
|
|
105
|
+
If `action` is `"aborted"`: report `diagnosis` and halt workflow before any branching or state changes.
|
|
106
|
+
|
|
107
|
+
- **If `EFFECTIVE_SYNC_PULL` is `"prompt"` and `suppressed` is false:**
|
|
108
|
+
Use AskUserQuestion: `Pull from remote before starting? [Y/n]`
|
|
109
|
+
- If Yes (or empty/default):
|
|
110
|
+
```bash
|
|
111
|
+
node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-pull "execute-phase" --record-yes
|
|
112
|
+
PULL_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-pull "execute-phase")
|
|
113
|
+
```
|
|
114
|
+
If `action` is `"aborted"`:
|
|
115
|
+
- Display diagnosis
|
|
116
|
+
- AskUserQuestion: `Continue without pulling? [y/N]`
|
|
117
|
+
- If No (default): halt workflow
|
|
118
|
+
- If Yes: continue with warning
|
|
119
|
+
- If No: skip pull, continue
|
|
65
120
|
</step>
|
|
66
121
|
|
|
67
122
|
<step name="handle_branching">
|
|
@@ -228,7 +283,21 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
|
|
|
228
283
|
- Bad: "Wave 2 complete. Proceeding to Wave 3."
|
|
229
284
|
- Good: "Terrain system complete — 3 biome types, height-based texturing, physics collision meshes. Vehicle physics (Wave 3) can now reference ground surfaces."
|
|
230
285
|
|
|
231
|
-
5. **
|
|
286
|
+
5. **Mid-workflow push (sync_mid_push):**
|
|
287
|
+
|
|
288
|
+
After each wave completes successfully, push if sync is configured.
|
|
289
|
+
|
|
290
|
+
Only if `EFFECTIVE_SYNC_PUSH` is not `"off"` and `cadence_push` is true:
|
|
291
|
+
```bash
|
|
292
|
+
PUSH_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-push "execute-phase" --mid-workflow)
|
|
293
|
+
```
|
|
294
|
+
Parse result JSON. Mid-workflow pushes are always silent (no prompt -- user consented at workflow start).
|
|
295
|
+
|
|
296
|
+
- If `action` is `"warning"`: append `message` to `SYNC_WARNINGS` accumulator
|
|
297
|
+
- If `action` is `"pushed"`: continue silently. If `message` mentions new remote branch, log: `Created remote branch: {branch}`
|
|
298
|
+
- Push failure does NOT halt execution -- warnings are accumulated for end-of-workflow summary
|
|
299
|
+
|
|
300
|
+
6. **Handle failures:**
|
|
232
301
|
|
|
233
302
|
**Known Claude Code bug (classifyHandoffIfNeeded):** If an agent reports "failed" with error containing `classifyHandoffIfNeeded is not defined`, this is a Claude Code runtime bug — not a DGS or agent issue. The error fires in the completion handler AFTER all tool calls finish. In this case: run the same spot-checks as step 4 (SUMMARY.md exists, git commits present, no Self-Check: FAILED). If spot-checks PASS → treat as **successful**. If spot-checks FAIL → treat as real failure below.
|
|
234
303
|
|
|
@@ -239,9 +308,9 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
|
|
|
239
308
|
**If `NON_INTERACTIVE` is false (interactive mode):**
|
|
240
309
|
For real failures: report which plan failed → ask "Continue?" or "Stop?" → if continue, dependent plans may also fail. If stop, partial completion report.
|
|
241
310
|
|
|
242
|
-
|
|
311
|
+
7. **Execute checkpoint plans between waves** — see `<checkpoint_handling>`.
|
|
243
312
|
|
|
244
|
-
|
|
313
|
+
8. **Proceed to next wave.**
|
|
245
314
|
</step>
|
|
246
315
|
|
|
247
316
|
<step name="checkpoint_handling">
|
|
@@ -462,6 +531,44 @@ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs(phase-
|
|
|
462
531
|
```
|
|
463
532
|
</step>
|
|
464
533
|
|
|
534
|
+
<step name="sync_after">
|
|
535
|
+
Post-workflow push. Execute AFTER all state modifications and commits are complete.
|
|
536
|
+
|
|
537
|
+
Follow the sync-hooks post-workflow push pattern with `WORKFLOW_NAME = "execute-phase"`:
|
|
538
|
+
|
|
539
|
+
Only if `EFFECTIVE_SYNC_PUSH` is not `"off"` and `cadence_push` is true:
|
|
540
|
+
|
|
541
|
+
```bash
|
|
542
|
+
PUSH_CHECK=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-push "execute-phase" --check-only)
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
Parse `PUSH_CHECK` JSON.
|
|
546
|
+
|
|
547
|
+
**If `should_push` is false:** Skip push. Done.
|
|
548
|
+
|
|
549
|
+
**If `should_push` is true:**
|
|
550
|
+
|
|
551
|
+
- **If `EFFECTIVE_SYNC_PUSH` is `"auto"` OR `suppressed` is true:** Push silently:
|
|
552
|
+
```bash
|
|
553
|
+
PUSH_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-push "execute-phase")
|
|
554
|
+
```
|
|
555
|
+
Parse result. Display `summary` if action is `"pushed"`. Display `message` if action is `"warning"`.
|
|
556
|
+
|
|
557
|
+
- **If `EFFECTIVE_SYNC_PUSH` is `"prompt"` and `suppressed` is false:**
|
|
558
|
+
Use AskUserQuestion: `Push to remote? [Y/n]`
|
|
559
|
+
- If Yes (or empty/default):
|
|
560
|
+
```bash
|
|
561
|
+
node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-push "execute-phase" --record-yes
|
|
562
|
+
PUSH_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-push "execute-phase")
|
|
563
|
+
```
|
|
564
|
+
Parse result. Display summary.
|
|
565
|
+
- If No: skip push
|
|
566
|
+
|
|
567
|
+
**Aggregated push summary:** After the final push, display a combined summary including any accumulated `SYNC_WARNINGS` from mid-workflow pushes. Format:
|
|
568
|
+
- If no warnings: display push summary as-is
|
|
569
|
+
- If warnings accumulated: append `\n{count} mid-workflow push warning(s) -- see above` to the summary
|
|
570
|
+
</step>
|
|
571
|
+
|
|
465
572
|
<step name="offer_next">
|
|
466
573
|
|
|
467
574
|
**Exception:** If `gaps_found`, the `verify_phase_goal` step already presents the gap-closure path (`/dgs:plan-phase {X} --gaps`). No additional routing needed — skip auto-advance.
|
|
@@ -354,7 +354,9 @@ AskUserQuestion([
|
|
|
354
354
|
},
|
|
355
355
|
"git": {
|
|
356
356
|
"branching_strategy": "none|phase|milestone",
|
|
357
|
-
"base_branch": "[from earlier question]"
|
|
357
|
+
"base_branch": "[from earlier question]",
|
|
358
|
+
"sync_push": "prompt",
|
|
359
|
+
"sync_pull": "prompt"
|
|
358
360
|
}
|
|
359
361
|
}
|
|
360
362
|
```
|
|
@@ -712,7 +714,9 @@ AskUserQuestion([
|
|
|
712
714
|
},
|
|
713
715
|
"git": {
|
|
714
716
|
"branching_strategy": "none|phase|milestone",
|
|
715
|
-
"base_branch": "[from earlier question]"
|
|
717
|
+
"base_branch": "[from earlier question]",
|
|
718
|
+
"sync_push": "prompt",
|
|
719
|
+
"sync_pull": "prompt"
|
|
716
720
|
}
|
|
717
721
|
}
|
|
718
722
|
```
|
|
@@ -8,6 +8,7 @@ The orchestrator stays lean: it reads only the job file and MILESTONE-AUDIT.md (
|
|
|
8
8
|
|
|
9
9
|
<required_reading>
|
|
10
10
|
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
11
|
+
@~/.claude/deliver-great-systems/references/sync-hooks.md
|
|
11
12
|
</required_reading>
|
|
12
13
|
|
|
13
14
|
<process>
|
|
@@ -19,7 +20,10 @@ Load planning context:
|
|
|
19
20
|
INIT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs init milestone-op)
|
|
20
21
|
```
|
|
21
22
|
|
|
22
|
-
Extract: `project_root`, `jobs_root` as needed by the workflow.
|
|
23
|
+
Extract: `project_root`, `jobs_root`, `sync_push`, `sync_pull`, `cadence_push`, `cadence_pull` as needed by the workflow.
|
|
24
|
+
|
|
25
|
+
Set `WORKFLOW_NAME = "run-job"`.
|
|
26
|
+
Initialize `SYNC_WARNINGS = []` (accumulates mid-workflow push warnings).
|
|
23
27
|
|
|
24
28
|
**Load execution tier context:**
|
|
25
29
|
|
|
@@ -180,6 +184,45 @@ Skipping {completedCount} completed steps, resuming from step {nextStepIndex + 1
|
|
|
180
184
|
```
|
|
181
185
|
</step>
|
|
182
186
|
|
|
187
|
+
<step name="sync_before">
|
|
188
|
+
Pre-workflow pull. Execute BEFORE any job steps run.
|
|
189
|
+
|
|
190
|
+
Follow the sync-hooks pre-workflow pull pattern with `WORKFLOW_NAME = "run-job"`:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
SYNC_CHECK=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-pull "run-job" --check-only)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Parse `SYNC_CHECK` JSON.
|
|
197
|
+
|
|
198
|
+
**If `first_run_hint` is not null:** Display it as a one-liner.
|
|
199
|
+
```bash
|
|
200
|
+
node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-pull "run-job" --mark-hint-shown
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**If `should_pull` is false:** Skip pull entirely.
|
|
204
|
+
|
|
205
|
+
**If `stale.stale` is true and mode is `"off"`:** Display:
|
|
206
|
+
`Warning: origin/{branch} is {commitsBehind} commits ahead. Consider pulling.`
|
|
207
|
+
|
|
208
|
+
**If `should_pull` is true:**
|
|
209
|
+
|
|
210
|
+
- **If `sync_pull` is `"auto"`:** Pull silently (run-job is always non-interactive):
|
|
211
|
+
```bash
|
|
212
|
+
PULL_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-pull "run-job")
|
|
213
|
+
```
|
|
214
|
+
If `action` is `"aborted"`: report `diagnosis` and halt job before any steps run.
|
|
215
|
+
|
|
216
|
+
- **If `sync_pull` is `"prompt"` and `suppressed` is false:**
|
|
217
|
+
Since run-job runs in non-interactive mode, treat prompt mode as auto mode -- pull silently.
|
|
218
|
+
```bash
|
|
219
|
+
PULL_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-pull "run-job")
|
|
220
|
+
```
|
|
221
|
+
If `action` is `"aborted"`: halt job before any steps run with diagnosis.
|
|
222
|
+
|
|
223
|
+
- **If `suppressed` is true:** Pull silently (recent Yes answer).
|
|
224
|
+
</step>
|
|
225
|
+
|
|
183
226
|
<step name="execute_steps">
|
|
184
227
|
Initialize tracking variables:
|
|
185
228
|
- `START_TIME` = current timestamp (for elapsed time calculation)
|
|
@@ -228,6 +271,20 @@ Loop through steps starting from `nextStepIndex`.
|
|
|
228
271
|
OK {command} {args_display} ({duration})
|
|
229
272
|
```
|
|
230
273
|
|
|
274
|
+
**Mid-workflow push (after phase-completing steps):**
|
|
275
|
+
|
|
276
|
+
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`.
|
|
277
|
+
|
|
278
|
+
If so, and `sync_push` is not `"off"` and `cadence_push` is true:
|
|
279
|
+
```bash
|
|
280
|
+
PUSH_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-push "run-job" --mid-workflow)
|
|
281
|
+
```
|
|
282
|
+
Parse result JSON. Mid-workflow pushes are always silent (no prompt).
|
|
283
|
+
|
|
284
|
+
- If `action` is `"warning"`: log warning and continue. Append to `SYNC_WARNINGS`.
|
|
285
|
+
- If `action` is `"pushed"`: continue silently. If `message` mentions new remote branch, log it.
|
|
286
|
+
- Push failure does NOT halt job execution.
|
|
287
|
+
|
|
231
288
|
5. **On failure:** Mark step failed with timestamp and error:
|
|
232
289
|
```bash
|
|
233
290
|
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs jobs update-step "$JOB_PATH" $INDEX failed --timestamp "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --error "{error_summary}"
|
|
@@ -455,7 +512,21 @@ When all steps are completed (`nextStepIndex` is null after the loop):
|
|
|
455
512
|
Parse the result. If `found: true`, write the `content` field to `${jobs_root}/completed/job-{version}-SUMMARY.md` using the Write tool.
|
|
456
513
|
Display: `Job summary written to ${jobs_root}/completed/job-{version}-SUMMARY.md`
|
|
457
514
|
|
|
458
|
-
4. **
|
|
515
|
+
4. **Post-workflow push (sync_after):**
|
|
516
|
+
|
|
517
|
+
Follow the sync-hooks post-workflow push pattern with `WORKFLOW_NAME = "run-job"`:
|
|
518
|
+
|
|
519
|
+
Only if `sync_push` is not `"off"` and `cadence_push` is true:
|
|
520
|
+
```bash
|
|
521
|
+
PUSH_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" sync workflow-push "run-job")
|
|
522
|
+
```
|
|
523
|
+
Parse result. Display `summary` if action is `"pushed"`. Display `message` if action is `"warning"`.
|
|
524
|
+
|
|
525
|
+
Since run-job is non-interactive, push silently (auto mode behavior).
|
|
526
|
+
|
|
527
|
+
Display aggregated push summary including any accumulated `SYNC_WARNINGS` from mid-workflow pushes.
|
|
528
|
+
|
|
529
|
+
5. **Display completion banner:**
|
|
459
530
|
|
|
460
531
|
If `AUTO_RESOLVE_COUNT` is 0:
|
|
461
532
|
```
|
|
@@ -495,4 +566,8 @@ The orchestrator MUST stay lean per EXEC-07:
|
|
|
495
566
|
- [ ] --dry-run flag displays step preview without executing
|
|
496
567
|
- [ ] Job summary auto-generated on completion (written to completed/)
|
|
497
568
|
- [ ] Job summary auto-generated on failure (written to in-progress/)
|
|
569
|
+
- [ ] Pre-workflow pull executed before job steps start (sync_before)
|
|
570
|
+
- [ ] Mid-workflow push after phase-completing steps (silent, no prompt)
|
|
571
|
+
- [ ] Post-workflow push after job completion (sync_after)
|
|
572
|
+
- [ ] Push failures logged as warnings, do not halt execution
|
|
498
573
|
</success_criteria>
|
|
@@ -48,6 +48,8 @@ Parse current values (default to `true` if not present):
|
|
|
48
48
|
- `model_profile` — which model each agent uses (default: `balanced`)
|
|
49
49
|
- `git.branching_strategy` — branching approach (default: `"none"`)
|
|
50
50
|
- `git.base_branch` — integration target branch for code repos (default: `"main"`)
|
|
51
|
+
- `git.sync_push` — remote sync push mode (default: "off" if absent for existing installs)
|
|
52
|
+
- `git.sync_pull` — remote sync pull mode (default: "off" if absent for existing installs)
|
|
51
53
|
- `workflow.discipline` — whether CLAUDE.md workflow routing is active (default: true if absent)
|
|
52
54
|
|
|
53
55
|
Also detect whether `./CLAUDE.md` exists and contains a DGS section:
|
|
@@ -320,6 +322,74 @@ Display: `Kept workflow discipline on.`
|
|
|
320
322
|
Do not change config or CLAUDE.md.
|
|
321
323
|
</step>
|
|
322
324
|
|
|
325
|
+
<step name="present_sync_settings">
|
|
326
|
+
Read the current sync state:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
SYNC_PUSH=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" config-get git.sync_push --raw 2>/dev/null || echo "off")
|
|
330
|
+
SYNC_PULL=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" config-get git.sync_pull --raw 2>/dev/null || echo "off")
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Check if any registered repo has a remote:
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
HAS_REMOTE=$(git remote 2>/dev/null | head -1)
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
Display current state:
|
|
340
|
+
```
|
|
341
|
+
Git Sync Push: {off/prompt/auto}
|
|
342
|
+
Git Sync Pull: {off/prompt/auto}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
Use AskUserQuestion for sync_push:
|
|
346
|
+
```
|
|
347
|
+
AskUserQuestion([{
|
|
348
|
+
question: "Git sync push mode — when should DGS push to remote after work?",
|
|
349
|
+
header: "Sync Push",
|
|
350
|
+
multiSelect: false,
|
|
351
|
+
options: [
|
|
352
|
+
{ label: "Off", description: "Never push automatically (current behaviour)" },
|
|
353
|
+
{ label: "Prompt", description: "Ask before pushing after each workflow" },
|
|
354
|
+
{ label: "Auto", description: "Push silently after each workflow, report only failures" }
|
|
355
|
+
]
|
|
356
|
+
}])
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Pre-select the option matching current `SYNC_PUSH` value.
|
|
360
|
+
|
|
361
|
+
Use AskUserQuestion for sync_pull:
|
|
362
|
+
```
|
|
363
|
+
AskUserQuestion([{
|
|
364
|
+
question: "Git sync pull mode — when should DGS pull from remote before work?",
|
|
365
|
+
header: "Sync Pull",
|
|
366
|
+
multiSelect: false,
|
|
367
|
+
options: [
|
|
368
|
+
{ label: "Off", description: "Never pull automatically (current behaviour)" },
|
|
369
|
+
{ label: "Prompt", description: "Ask before pulling at start of each workflow" },
|
|
370
|
+
{ label: "Auto", description: "Pull silently before each workflow, abort on failure" }
|
|
371
|
+
]
|
|
372
|
+
}])
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
Pre-select the option matching current `SYNC_PULL` value.
|
|
376
|
+
|
|
377
|
+
**If user selects a non-off value and HAS_REMOTE is empty:**
|
|
378
|
+
|
|
379
|
+
Display warning (but still apply the setting):
|
|
380
|
+
```
|
|
381
|
+
Warning: No git remote detected. Sync operations will be skipped until a remote is configured.
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Set config values:
|
|
385
|
+
```bash
|
|
386
|
+
node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" config-set git.sync_push "{selected_push_mode}"
|
|
387
|
+
node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" config-set git.sync_pull "{selected_pull_mode}"
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Display: `Git sync push: {off/prompt/auto}, pull: {off/prompt/auto}`
|
|
391
|
+
</step>
|
|
392
|
+
|
|
323
393
|
<step name="present_review_settings">
|
|
324
394
|
Load current review configuration:
|
|
325
395
|
|
|
@@ -368,7 +438,9 @@ Merge new settings into existing config:
|
|
|
368
438
|
},
|
|
369
439
|
"git": {
|
|
370
440
|
"branching_strategy": "none" | "phase" | "milestone",
|
|
371
|
-
"base_branch": "main" | user_answer
|
|
441
|
+
"base_branch": "main" | user_answer,
|
|
442
|
+
"sync_push": "off" | "prompt" | "auto",
|
|
443
|
+
"sync_pull": "off" | "prompt" | "auto"
|
|
372
444
|
}
|
|
373
445
|
}
|
|
374
446
|
```
|
|
@@ -416,6 +488,10 @@ Write `~/.dgs/defaults.json` with:
|
|
|
416
488
|
"nyquist_validation": <current>,
|
|
417
489
|
"codereview": <current>,
|
|
418
490
|
"discipline": <current>
|
|
491
|
+
},
|
|
492
|
+
"git": {
|
|
493
|
+
"sync_push": <current>,
|
|
494
|
+
"sync_pull": <current>
|
|
419
495
|
}
|
|
420
496
|
}
|
|
421
497
|
```
|
|
@@ -441,6 +517,8 @@ Display:
|
|
|
441
517
|
| Git Branching | {None/Per Phase/Per Milestone} |
|
|
442
518
|
| Base Branch | {main/develop/etc.} |
|
|
443
519
|
| Workflow Discipline | {On/Off} |
|
|
520
|
+
| Git Sync Push | {Off/Prompt/Auto} |
|
|
521
|
+
| Git Sync Pull | {Off/Prompt/Auto} |
|
|
444
522
|
| OpenAI Key | {set/not set} (edit review-keys.json) |
|
|
445
523
|
| Gemini Key | {set/not set} (edit review-keys.json) |
|
|
446
524
|
| Saved as Defaults | {Yes/No} |
|
|
@@ -467,4 +545,7 @@ Quick commands:
|
|
|
467
545
|
- [ ] User shown workflow discipline toggle with current state
|
|
468
546
|
- [ ] Toggle on creates/updates CLAUDE.md with DGS section delimiters
|
|
469
547
|
- [ ] Toggle off removes DGS section with confirmation, preserving user content
|
|
548
|
+
- [ ] User shown git sync push and pull toggles with current state
|
|
549
|
+
- [ ] Sync settings saved to config via config-set
|
|
550
|
+
- [ ] Warning shown when enabling sync without a git remote
|
|
470
551
|
</success_criteria>
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://github.com/KT-Partners-Ltd/dgs-platform-docs/issues"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.
|
|
7
|
+
"version": "2.7.1",
|
|
8
8
|
"description": "Deliver Great Systems Platform — A meta-prompting, context engineering and spec-driven development system for Claude Code and Gemini by KT Partners.",
|
|
9
9
|
"bin": {
|
|
10
10
|
"dgs": "bin/install.js"
|