@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.
- package/LICENSE +38 -0
- package/README.md +851 -0
- package/agents/dgs-codebase-cross-analyzer.md +183 -0
- package/agents/dgs-codebase-mapper.md +782 -0
- package/agents/dgs-codebase-synthesizer.md +156 -0
- package/agents/dgs-debugger.md +1256 -0
- package/agents/dgs-executor.md +550 -0
- package/agents/dgs-integration-checker.md +481 -0
- package/agents/dgs-nyquist-auditor.md +178 -0
- package/agents/dgs-phase-researcher.md +563 -0
- package/agents/dgs-phase-verifier.md +450 -0
- package/agents/dgs-plan-checker.md +708 -0
- package/agents/dgs-planner.md +1324 -0
- package/agents/dgs-project-researcher.md +631 -0
- package/agents/dgs-research-synthesizer.md +249 -0
- package/agents/dgs-roadmapper.md +652 -0
- package/agents/dgs-verifier.md +607 -0
- package/bin/install.js +2073 -0
- package/commands/dgs/add-doc.md +45 -0
- package/commands/dgs/add-idea.md +38 -0
- package/commands/dgs/add-phase.md +43 -0
- package/commands/dgs/add-repo.md +54 -0
- package/commands/dgs/add-tests.md +41 -0
- package/commands/dgs/add-todo.md +47 -0
- package/commands/dgs/approve-spec.md +38 -0
- package/commands/dgs/audit-milestone.md +36 -0
- package/commands/dgs/audit-phase.md +37 -0
- package/commands/dgs/cancel-job.md +23 -0
- package/commands/dgs/capture-principle.md +143 -0
- package/commands/dgs/check-todos.md +45 -0
- package/commands/dgs/cleanup.md +18 -0
- package/commands/dgs/complete-milestone.md +136 -0
- package/commands/dgs/complete-project.md +70 -0
- package/commands/dgs/consolidate-ideas.md +50 -0
- package/commands/dgs/create-milestone-job.md +37 -0
- package/commands/dgs/debug.md +164 -0
- package/commands/dgs/develop-idea.md +53 -0
- package/commands/dgs/discuss-idea.md +41 -0
- package/commands/dgs/discuss-phase.md +83 -0
- package/commands/dgs/execute-phase.md +41 -0
- package/commands/dgs/fast.md +38 -0
- package/commands/dgs/find-related-ideas.md +43 -0
- package/commands/dgs/health.md +28 -0
- package/commands/dgs/help.md +22 -0
- package/commands/dgs/import-spec.md +36 -0
- package/commands/dgs/init-product.md +28 -0
- package/commands/dgs/insert-phase.md +32 -0
- package/commands/dgs/join-discord.md +18 -0
- package/commands/dgs/list-docs.md +40 -0
- package/commands/dgs/list-ideas.md +42 -0
- package/commands/dgs/list-jobs.md +22 -0
- package/commands/dgs/list-phase-assumptions.md +46 -0
- package/commands/dgs/list-projects.md +57 -0
- package/commands/dgs/list-specs.md +40 -0
- package/commands/dgs/map-codebase.md +92 -0
- package/commands/dgs/new-milestone.md +44 -0
- package/commands/dgs/new-project.md +42 -0
- package/commands/dgs/node-repair.md +26 -0
- package/commands/dgs/overlap-check.md +20 -0
- package/commands/dgs/pause-work.md +38 -0
- package/commands/dgs/plan-milestone-gaps.md +34 -0
- package/commands/dgs/plan-phase.md +44 -0
- package/commands/dgs/progress.md +24 -0
- package/commands/dgs/quick.md +41 -0
- package/commands/dgs/reactivate-project.md +70 -0
- package/commands/dgs/reapply-patches.md +110 -0
- package/commands/dgs/refine-spec.md +38 -0
- package/commands/dgs/reject-idea.md +43 -0
- package/commands/dgs/remove-doc.md +44 -0
- package/commands/dgs/remove-phase.md +31 -0
- package/commands/dgs/remove-repo.md +69 -0
- package/commands/dgs/research-idea.md +43 -0
- package/commands/dgs/research-phase.md +189 -0
- package/commands/dgs/restore-idea.md +45 -0
- package/commands/dgs/resume-work.md +40 -0
- package/commands/dgs/rollback-job.md +24 -0
- package/commands/dgs/run-job.md +35 -0
- package/commands/dgs/search.md +40 -0
- package/commands/dgs/set-profile.md +34 -0
- package/commands/dgs/settings.md +38 -0
- package/commands/dgs/switch-project.md +58 -0
- package/commands/dgs/undo-consolidation.md +42 -0
- package/commands/dgs/update-idea.md +44 -0
- package/commands/dgs/update.md +37 -0
- package/commands/dgs/validate-phase.md +35 -0
- package/commands/dgs/verify-work.md +39 -0
- package/commands/dgs/write-spec.md +49 -0
- package/deliver-great-systems/.planning/phases/09-backend-wiring-and-error-handling/09-01-SUMMARY.md +84 -0
- package/deliver-great-systems/.planning/phases/09-backend-wiring-and-error-handling/09-02-SUMMARY.md +86 -0
- package/deliver-great-systems/.planning/phases/10-v1-to-v2-migration-flow/10-01-SUMMARY.md +85 -0
- package/deliver-great-systems/bin/dgs-tools.cjs +1444 -0
- package/deliver-great-systems/bin/lib/auto-test.cjs +1365 -0
- package/deliver-great-systems/bin/lib/commands.cjs +570 -0
- package/deliver-great-systems/bin/lib/config.cjs +417 -0
- package/deliver-great-systems/bin/lib/conflict-agent.cjs +1063 -0
- package/deliver-great-systems/bin/lib/conflict-agent.test.cjs +554 -0
- package/deliver-great-systems/bin/lib/context.cjs +929 -0
- package/deliver-great-systems/bin/lib/context.test.cjs +693 -0
- package/deliver-great-systems/bin/lib/core.cjs +744 -0
- package/deliver-great-systems/bin/lib/core.test.cjs +822 -0
- package/deliver-great-systems/bin/lib/docs.cjs +919 -0
- package/deliver-great-systems/bin/lib/docs.test.cjs +211 -0
- package/deliver-great-systems/bin/lib/execution.cjs +705 -0
- package/deliver-great-systems/bin/lib/execution.test.cjs +1472 -0
- package/deliver-great-systems/bin/lib/frontmatter.cjs +324 -0
- package/deliver-great-systems/bin/lib/ideas.cjs +1406 -0
- package/deliver-great-systems/bin/lib/ideas.test.cjs +1417 -0
- package/deliver-great-systems/bin/lib/identity.cjs +125 -0
- package/deliver-great-systems/bin/lib/init.cjs +1114 -0
- package/deliver-great-systems/bin/lib/init.test.cjs +1271 -0
- package/deliver-great-systems/bin/lib/jobs.cjs +2015 -0
- package/deliver-great-systems/bin/lib/jobs.test.cjs +2619 -0
- package/deliver-great-systems/bin/lib/merge-conflicts.cjs +654 -0
- package/deliver-great-systems/bin/lib/merge-conflicts.test.cjs +370 -0
- package/deliver-great-systems/bin/lib/migration.cjs +352 -0
- package/deliver-great-systems/bin/lib/migration.test.cjs +582 -0
- package/deliver-great-systems/bin/lib/milestone.cjs +243 -0
- package/deliver-great-systems/bin/lib/overlap.cjs +437 -0
- package/deliver-great-systems/bin/lib/overlap.test.cjs +747 -0
- package/deliver-great-systems/bin/lib/path-audit.test.cjs +384 -0
- package/deliver-great-systems/bin/lib/paths.cjs +144 -0
- package/deliver-great-systems/bin/lib/paths.test.cjs +486 -0
- package/deliver-great-systems/bin/lib/phase.cjs +910 -0
- package/deliver-great-systems/bin/lib/projects.cjs +691 -0
- package/deliver-great-systems/bin/lib/projects.test.cjs +871 -0
- package/deliver-great-systems/bin/lib/repos.cjs +1432 -0
- package/deliver-great-systems/bin/lib/repos.test.cjs +1882 -0
- package/deliver-great-systems/bin/lib/roadmap.cjs +305 -0
- package/deliver-great-systems/bin/lib/search.cjs +570 -0
- package/deliver-great-systems/bin/lib/specs.cjs +1303 -0
- package/deliver-great-systems/bin/lib/state.cjs +893 -0
- package/deliver-great-systems/bin/lib/template.cjs +228 -0
- package/deliver-great-systems/bin/lib/test-helpers.cjs +291 -0
- package/deliver-great-systems/bin/lib/verify.cjs +796 -0
- package/deliver-great-systems/references/checkpoints.md +776 -0
- package/deliver-great-systems/references/conflict-resolution.md +66 -0
- package/deliver-great-systems/references/context-tiers.md +166 -0
- package/deliver-great-systems/references/continuation-format.md +249 -0
- package/deliver-great-systems/references/decimal-phase-calculation.md +67 -0
- package/deliver-great-systems/references/git-integration.md +250 -0
- package/deliver-great-systems/references/git-planning-commit.md +40 -0
- package/deliver-great-systems/references/model-profile-resolution.md +36 -0
- package/deliver-great-systems/references/model-profiles.md +95 -0
- package/deliver-great-systems/references/phase-argument-parsing.md +61 -0
- package/deliver-great-systems/references/planning-config.md +224 -0
- package/deliver-great-systems/references/questioning.md +162 -0
- package/deliver-great-systems/references/spec-review-loop.md +177 -0
- package/deliver-great-systems/references/tdd.md +265 -0
- package/deliver-great-systems/references/ui-brand.md +160 -0
- package/deliver-great-systems/references/verification-patterns.md +612 -0
- package/deliver-great-systems/templates/DEBUG.md +166 -0
- package/deliver-great-systems/templates/UAT.md +251 -0
- package/deliver-great-systems/templates/VALIDATION.md +95 -0
- package/deliver-great-systems/templates/claude-md.md +74 -0
- package/deliver-great-systems/templates/codebase/architecture.md +257 -0
- package/deliver-great-systems/templates/codebase/concerns.md +312 -0
- package/deliver-great-systems/templates/codebase/conventions.md +309 -0
- package/deliver-great-systems/templates/codebase/integrations.md +282 -0
- package/deliver-great-systems/templates/codebase/stack.md +188 -0
- package/deliver-great-systems/templates/codebase/structure.md +287 -0
- package/deliver-great-systems/templates/codebase/testing.md +482 -0
- package/deliver-great-systems/templates/config.json +38 -0
- package/deliver-great-systems/templates/context.md +354 -0
- package/deliver-great-systems/templates/continue-here.md +80 -0
- package/deliver-great-systems/templates/debug-subagent-prompt.md +93 -0
- package/deliver-great-systems/templates/discovery.md +148 -0
- package/deliver-great-systems/templates/milestone-archive.md +125 -0
- package/deliver-great-systems/templates/milestone.md +117 -0
- package/deliver-great-systems/templates/phase-prompt.md +615 -0
- package/deliver-great-systems/templates/planner-subagent-prompt.md +119 -0
- package/deliver-great-systems/templates/project.md +186 -0
- package/deliver-great-systems/templates/requirements.md +233 -0
- package/deliver-great-systems/templates/research-project/ARCHITECTURE.md +206 -0
- package/deliver-great-systems/templates/research-project/FEATURES.md +149 -0
- package/deliver-great-systems/templates/research-project/PITFALLS.md +202 -0
- package/deliver-great-systems/templates/research-project/STACK.md +122 -0
- package/deliver-great-systems/templates/research-project/SUMMARY.md +172 -0
- package/deliver-great-systems/templates/research.md +554 -0
- package/deliver-great-systems/templates/retrospective.md +54 -0
- package/deliver-great-systems/templates/roadmap.md +204 -0
- package/deliver-great-systems/templates/state.md +178 -0
- package/deliver-great-systems/templates/summary-complex.md +59 -0
- package/deliver-great-systems/templates/summary-minimal.md +41 -0
- package/deliver-great-systems/templates/summary-standard.md +48 -0
- package/deliver-great-systems/templates/summary.md +253 -0
- package/deliver-great-systems/templates/user-setup.md +313 -0
- package/deliver-great-systems/templates/verification-report.md +324 -0
- package/deliver-great-systems/workflows/add-doc.md +151 -0
- package/deliver-great-systems/workflows/add-idea.md +96 -0
- package/deliver-great-systems/workflows/add-phase.md +120 -0
- package/deliver-great-systems/workflows/add-tests.md +359 -0
- package/deliver-great-systems/workflows/add-todo.md +162 -0
- package/deliver-great-systems/workflows/approve-spec.md +194 -0
- package/deliver-great-systems/workflows/audit-milestone.md +364 -0
- package/deliver-great-systems/workflows/audit-phase.md +462 -0
- package/deliver-great-systems/workflows/cancel-job.md +108 -0
- package/deliver-great-systems/workflows/check-todos.md +181 -0
- package/deliver-great-systems/workflows/cleanup.md +247 -0
- package/deliver-great-systems/workflows/codereview.md +526 -0
- package/deliver-great-systems/workflows/complete-milestone.md +1298 -0
- package/deliver-great-systems/workflows/consolidate-ideas.md +365 -0
- package/deliver-great-systems/workflows/create-milestone-job.md +177 -0
- package/deliver-great-systems/workflows/develop-idea.md +544 -0
- package/deliver-great-systems/workflows/diagnose-issues.md +231 -0
- package/deliver-great-systems/workflows/discovery-phase.md +301 -0
- package/deliver-great-systems/workflows/discuss-idea.md +263 -0
- package/deliver-great-systems/workflows/discuss-phase.md +733 -0
- package/deliver-great-systems/workflows/execute-phase.md +571 -0
- package/deliver-great-systems/workflows/execute-plan.md +592 -0
- package/deliver-great-systems/workflows/find-related-ideas.md +271 -0
- package/deliver-great-systems/workflows/health.md +173 -0
- package/deliver-great-systems/workflows/help.md +997 -0
- package/deliver-great-systems/workflows/import-spec.md +381 -0
- package/deliver-great-systems/workflows/init-product.md +767 -0
- package/deliver-great-systems/workflows/insert-phase.md +138 -0
- package/deliver-great-systems/workflows/list-docs.md +119 -0
- package/deliver-great-systems/workflows/list-ideas.md +154 -0
- package/deliver-great-systems/workflows/list-jobs.md +89 -0
- package/deliver-great-systems/workflows/list-phase-assumptions.md +192 -0
- package/deliver-great-systems/workflows/list-specs.md +101 -0
- package/deliver-great-systems/workflows/map-codebase.md +621 -0
- package/deliver-great-systems/workflows/new-milestone.md +591 -0
- package/deliver-great-systems/workflows/new-project.md +1113 -0
- package/deliver-great-systems/workflows/node-repair.md +94 -0
- package/deliver-great-systems/workflows/overlap-check.md +86 -0
- package/deliver-great-systems/workflows/pause-work.md +134 -0
- package/deliver-great-systems/workflows/plan-milestone-gaps.md +306 -0
- package/deliver-great-systems/workflows/plan-phase.md +698 -0
- package/deliver-great-systems/workflows/progress.md +386 -0
- package/deliver-great-systems/workflows/quick.md +845 -0
- package/deliver-great-systems/workflows/refine-spec.md +275 -0
- package/deliver-great-systems/workflows/reject-idea.md +109 -0
- package/deliver-great-systems/workflows/remove-doc.md +117 -0
- package/deliver-great-systems/workflows/remove-phase.md +163 -0
- package/deliver-great-systems/workflows/research-idea.md +325 -0
- package/deliver-great-systems/workflows/research-phase.md +81 -0
- package/deliver-great-systems/workflows/restore-idea.md +101 -0
- package/deliver-great-systems/workflows/resume-project.md +311 -0
- package/deliver-great-systems/workflows/rollback-job.md +130 -0
- package/deliver-great-systems/workflows/run-job.md +498 -0
- package/deliver-great-systems/workflows/search.md +130 -0
- package/deliver-great-systems/workflows/set-profile.md +83 -0
- package/deliver-great-systems/workflows/settings.md +470 -0
- package/deliver-great-systems/workflows/transition.md +563 -0
- package/deliver-great-systems/workflows/undo-consolidation.md +155 -0
- package/deliver-great-systems/workflows/update-idea.md +157 -0
- package/deliver-great-systems/workflows/update.md +242 -0
- package/deliver-great-systems/workflows/validate-phase.md +177 -0
- package/deliver-great-systems/workflows/verify-phase.md +253 -0
- package/deliver-great-systems/workflows/verify-work.md +671 -0
- package/deliver-great-systems/workflows/write-spec.md +450 -0
- package/hooks/dist/dgs-check-update.js +62 -0
- package/hooks/dist/dgs-context-monitor.js +141 -0
- package/hooks/dist/dgs-statusline.js +115 -0
- package/package.json +60 -0
- package/scripts/build-hooks.js +43 -0
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Initialize a v2 multi-project product folder. Creates REPOS.md, PROJECTS.md, discovers repos. Handles fresh install, v1 detection, and already-initialized cases. Supports root-mode layout for dedicated planning repos.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<context_tier>lite</context_tier>
|
|
6
|
+
|
|
7
|
+
<process>
|
|
8
|
+
|
|
9
|
+
## 0. Load Context and Detect Layout
|
|
10
|
+
|
|
11
|
+
Load project context via tier system:
|
|
12
|
+
```bash
|
|
13
|
+
TIER_FILES=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" context load-tier lite --raw 2>/dev/null)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Use `TIER_FILES` JSON `files` array for project context (PROJECT.md, STATE.md, config.json).
|
|
17
|
+
|
|
18
|
+
Run layout detection:
|
|
19
|
+
```bash
|
|
20
|
+
LAYOUT_RESULT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs repos detect-layout --raw)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Parse the JSON response to get the `suggested` field (`'root'` or `'dotplanning'`).
|
|
24
|
+
|
|
25
|
+
If the response indicates an existing layout is already configured (e.g., `v1_detected`, `already_initialized`, or existing `.planning/` directory), skip the layout prompt and proceed directly to Step 1 with `LAYOUT_MODE` unset. The v1/v2 handlers in Steps 3-4 will handle those cases.
|
|
26
|
+
|
|
27
|
+
For fresh repos only, present the layout choice using AskUserQuestion:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
AskUserQuestion([{
|
|
31
|
+
question: "How should DGS organize planning files in this repo?",
|
|
32
|
+
header: "Repository Layout",
|
|
33
|
+
multiSelect: false,
|
|
34
|
+
options: [
|
|
35
|
+
{ label: "Root mode — planning files at repo root", description: "For dedicated planning repos where all files are DGS artifacts" },
|
|
36
|
+
{ label: ".planning/ mode — planning files in subdirectory", description: "For repos that also contain source code" }
|
|
37
|
+
]
|
|
38
|
+
}])
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Pre-select the option matching `suggested` from the detection result.
|
|
42
|
+
|
|
43
|
+
If user selects "Root mode": set `LAYOUT_MODE="root"`, proceed to Step 0a (namespace warning).
|
|
44
|
+
If user selects ".planning/ mode": set `LAYOUT_MODE="dotplanning"`, skip Step 0a, proceed to Step 1 (Get Product Name).
|
|
45
|
+
|
|
46
|
+
## 0a. Namespace Warning (root-mode only)
|
|
47
|
+
|
|
48
|
+
This step only runs if `LAYOUT_MODE="root"`.
|
|
49
|
+
|
|
50
|
+
Display warning:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
54
|
+
DGS ► ROOT MODE WARNING
|
|
55
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
56
|
+
|
|
57
|
+
Warning: Root-mode assumes this entire repo is for DGS.
|
|
58
|
+
Don't use this in a repo with existing source code.
|
|
59
|
+
|
|
60
|
+
DGS will create the following directories at the repo root:
|
|
61
|
+
- phases/
|
|
62
|
+
- ideas/ (pending, rejected, done)
|
|
63
|
+
- specs/
|
|
64
|
+
- docs/product/
|
|
65
|
+
- jobs/ (when needed)
|
|
66
|
+
|
|
67
|
+
And these files:
|
|
68
|
+
- PROJECT.md
|
|
69
|
+
- ROADMAP.md
|
|
70
|
+
- REPOS.md
|
|
71
|
+
- PROJECTS.md
|
|
72
|
+
- dgs.config.json
|
|
73
|
+
- .gitignore (created or updated)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Use AskUserQuestion for blocking confirmation:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
AskUserQuestion([{
|
|
80
|
+
question: "Proceed with root-mode setup?",
|
|
81
|
+
header: "Confirm",
|
|
82
|
+
multiSelect: false,
|
|
83
|
+
options: [
|
|
84
|
+
{ label: "Yes, proceed", description: "Create DGS planning structure at repo root" },
|
|
85
|
+
{ label: "Cancel", description: "Exit without creating anything" }
|
|
86
|
+
]
|
|
87
|
+
}])
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
If user selects "Cancel":
|
|
91
|
+
```
|
|
92
|
+
Setup cancelled. Run `/dgs:init-product` again to restart.
|
|
93
|
+
```
|
|
94
|
+
Exit.
|
|
95
|
+
|
|
96
|
+
If user selects "Yes, proceed": continue to Step 1 (Get Product Name).
|
|
97
|
+
|
|
98
|
+
## 1. Get Product Name
|
|
99
|
+
|
|
100
|
+
If `$ARGUMENTS` contains a product name, use it.
|
|
101
|
+
|
|
102
|
+
If no arguments provided, use AskUserQuestion:
|
|
103
|
+
```
|
|
104
|
+
What would you like to name this product? (e.g., "my-saas-app", "mobile-platform")
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## 2. Run Init Product
|
|
108
|
+
|
|
109
|
+
If `LAYOUT_MODE` is `"root"`, pass the `--layout root` flag:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
RESULT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs repos init-product "$PRODUCT_NAME" --layout root --raw)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
If `LAYOUT_MODE` is `"dotplanning"` or unset, use the existing command without the flag (unchanged behavior):
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
RESULT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs repos init-product "$PRODUCT_NAME" --raw)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Parse JSON response. Route to the appropriate handler based on the response shape.
|
|
122
|
+
|
|
123
|
+
## 3. Handle v1 Detected
|
|
124
|
+
|
|
125
|
+
If response contains `v1_detected: true`:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
129
|
+
DGS ► INIT PRODUCT
|
|
130
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
131
|
+
|
|
132
|
+
Existing v1 DGS setup detected (project: "{project_name}").
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Use AskUserQuestion:
|
|
136
|
+
- header: "Migration"
|
|
137
|
+
- question: "Migrate '{project_name}' to v2 multi-project mode? This moves your planning files into a project subfolder. A backup git tag is created before any changes."
|
|
138
|
+
- options:
|
|
139
|
+
- "Migrate to v2" — Move planning files to project subfolder, enable multi-project
|
|
140
|
+
- "Keep v1 mode" — No changes, v1 continues working (permanent, won't ask again)
|
|
141
|
+
|
|
142
|
+
**If "Migrate to v2":**
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
MIGRATE_RESULT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs repos migrate "{slug}" --raw)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Parse JSON. If `migrated: true`:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
152
|
+
DGS ► MIGRATION COMPLETE ✓
|
|
153
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
154
|
+
|
|
155
|
+
Project "{project_name}" migrated to v2.
|
|
156
|
+
|
|
157
|
+
Files moved: {files_moved}
|
|
158
|
+
Backup tag: dgs-pre-v2-migration
|
|
159
|
+
Current project: {slug}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Configure Base Branch (after migration):**
|
|
163
|
+
|
|
164
|
+
Prompt the user for their code repo base branch:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
AskUserQuestion([{
|
|
168
|
+
question: "What is the base branch for your code repos? (e.g., main, develop, dev)",
|
|
169
|
+
header: "Git Configuration",
|
|
170
|
+
multiSelect: false,
|
|
171
|
+
freeform: true,
|
|
172
|
+
placeholder: ""
|
|
173
|
+
}])
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Always ask — no auto-detection, no default pre-fill. The user types the branch name explicitly.
|
|
177
|
+
|
|
178
|
+
After receiving the answer, write to config:
|
|
179
|
+
```bash
|
|
180
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs config-set git.base_branch "$USER_ANSWER"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
If the user provides an empty answer or skips, do NOT write anything — the default `main` from config-ensure-section already provides the fallback.
|
|
184
|
+
|
|
185
|
+
**Configure Workflow Discipline:**
|
|
186
|
+
|
|
187
|
+
Read the CLAUDE.md template:
|
|
188
|
+
```bash
|
|
189
|
+
CLAUDE_TEMPLATE=$(cat ~/.claude/deliver-great-systems/templates/claude-md.md)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Use AskUserQuestion:
|
|
193
|
+
```
|
|
194
|
+
AskUserQuestion([{
|
|
195
|
+
question: "Enable workflow discipline? This adds a CLAUDE.md file that routes code changes through /dgs:* commands for traceability and atomic commits. Read-only operations (searching, tests, git log) stay unrestricted.",
|
|
196
|
+
header: "Workflow Discipline",
|
|
197
|
+
multiSelect: false,
|
|
198
|
+
options: [
|
|
199
|
+
{ label: "Yes (Recommended)", description: "Creates CLAUDE.md with DGS command routing rules" },
|
|
200
|
+
{ label: "No", description: "Skip — no CLAUDE.md created" }
|
|
201
|
+
]
|
|
202
|
+
}])
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**If "Yes":**
|
|
206
|
+
|
|
207
|
+
Check if `./CLAUDE.md` already exists in the project root (cwd):
|
|
208
|
+
|
|
209
|
+
- **If CLAUDE.md does NOT exist:** Create `./CLAUDE.md` with DGS section delimiters wrapping the template content:
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
<!-- DGS:BEGIN — managed by deliver-great-systems, do not edit this section manually -->
|
|
213
|
+
{CLAUDE_TEMPLATE content}
|
|
214
|
+
<!-- DGS:END -->
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
- **If CLAUDE.md ALREADY exists:** Read existing content. Check if it already contains `<!-- DGS:BEGIN`.
|
|
218
|
+
- If DGS section already present: replace everything between `<!-- DGS:BEGIN` and `<!-- DGS:END -->` (inclusive) with the latest template version (idempotent update).
|
|
219
|
+
- If no DGS section: append to the end of the file, separated by a blank line:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
{existing CLAUDE.md content}
|
|
223
|
+
|
|
224
|
+
<!-- DGS:BEGIN — managed by deliver-great-systems, do not edit this section manually -->
|
|
225
|
+
{CLAUDE_TEMPLATE content}
|
|
226
|
+
<!-- DGS:END -->
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Set config:
|
|
230
|
+
```bash
|
|
231
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs config-set workflow.discipline true
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Display: `Workflow discipline enabled — CLAUDE.md added.`
|
|
235
|
+
|
|
236
|
+
Add `CLAUDE.md` to the commit file list for the init commit that follows (the `dgs-tools.cjs commit` call at the end of the flow).
|
|
237
|
+
|
|
238
|
+
**If "No":**
|
|
239
|
+
|
|
240
|
+
Set config:
|
|
241
|
+
```bash
|
|
242
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs config-set workflow.discipline false
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Display: `Skipped.`
|
|
246
|
+
|
|
247
|
+
Do NOT create or modify CLAUDE.md. Do NOT add CLAUDE.md to any commit.
|
|
248
|
+
|
|
249
|
+
**Configure Workflow Preferences (Round 1 — Core settings):**
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
AskUserQuestion([
|
|
253
|
+
{
|
|
254
|
+
header: "Mode",
|
|
255
|
+
question: "How do you want to work?",
|
|
256
|
+
multiSelect: false,
|
|
257
|
+
options: [
|
|
258
|
+
{ label: "YOLO (Recommended)", description: "Auto-approve, just execute" },
|
|
259
|
+
{ label: "Interactive", description: "Confirm at each step" }
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
header: "Depth",
|
|
264
|
+
question: "How thorough should planning be?",
|
|
265
|
+
multiSelect: false,
|
|
266
|
+
options: [
|
|
267
|
+
{ label: "Quick", description: "Ship fast (3-5 phases, 1-3 plans each)" },
|
|
268
|
+
{ label: "Standard", description: "Balanced scope and speed (5-8 phases, 3-5 plans each)" },
|
|
269
|
+
{ label: "Comprehensive", description: "Thorough coverage (8-12 phases, 5-10 plans each)" }
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
header: "Git Tracking",
|
|
274
|
+
question: "Commit planning docs to git?",
|
|
275
|
+
multiSelect: false,
|
|
276
|
+
options: [
|
|
277
|
+
{ label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
|
|
278
|
+
{ label: "No", description: "Keep planning docs local-only (add to .gitignore)" }
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
header: "Branching",
|
|
283
|
+
question: "Git branching strategy?",
|
|
284
|
+
multiSelect: false,
|
|
285
|
+
options: [
|
|
286
|
+
{ label: "None (Recommended)", description: "Commit to current branch (fine for single projects)" },
|
|
287
|
+
{ label: "Per Phase", description: "Branch per phase, review before merging" },
|
|
288
|
+
{ label: "Per Milestone", description: "Branch per project, merge all at end (for parallel projects)" }
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
])
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Configure Workflow Preferences (Round 2 — Agents):**
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
AskUserQuestion([
|
|
298
|
+
{
|
|
299
|
+
header: "AI Models",
|
|
300
|
+
question: "Which AI models for planning agents?",
|
|
301
|
+
multiSelect: false,
|
|
302
|
+
options: [
|
|
303
|
+
{ label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
|
|
304
|
+
{ label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
|
|
305
|
+
{ label: "Budget", description: "Haiku where possible — fastest, lowest cost" }
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
header: "Research",
|
|
310
|
+
question: "Research before planning each phase? (adds tokens/time)",
|
|
311
|
+
multiSelect: false,
|
|
312
|
+
options: [
|
|
313
|
+
{ label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
|
|
314
|
+
{ label: "No", description: "Plan directly from requirements" }
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
header: "Plan Check",
|
|
319
|
+
question: "Verify plans will achieve their goals? (adds tokens/time)",
|
|
320
|
+
multiSelect: false,
|
|
321
|
+
options: [
|
|
322
|
+
{ label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
|
|
323
|
+
{ label: "No", description: "Execute plans without verification" }
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
header: "Verifier",
|
|
328
|
+
question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
|
|
329
|
+
multiSelect: false,
|
|
330
|
+
options: [
|
|
331
|
+
{ label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
|
|
332
|
+
{ label: "No", description: "Trust execution, skip verification" }
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
])
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Write config.json** with all values collected above:
|
|
339
|
+
|
|
340
|
+
```json
|
|
341
|
+
{
|
|
342
|
+
"mode": "yolo|interactive",
|
|
343
|
+
"depth": "quick|standard|comprehensive",
|
|
344
|
+
"parallelization": true,
|
|
345
|
+
"commit_docs": true|false,
|
|
346
|
+
"model_profile": "quality|balanced|budget",
|
|
347
|
+
"workflow": {
|
|
348
|
+
"research": true|false,
|
|
349
|
+
"plan_check": true|false,
|
|
350
|
+
"verifier": true|false,
|
|
351
|
+
"nyquist_validation": true,
|
|
352
|
+
"auto_advance": false,
|
|
353
|
+
"discipline": true|false
|
|
354
|
+
},
|
|
355
|
+
"git": {
|
|
356
|
+
"branching_strategy": "none|phase|milestone",
|
|
357
|
+
"base_branch": "[from earlier question]"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
Smart defaults (not asked): `parallelization: true`, `auto_advance: false`, `nyquist_validation: true`.
|
|
363
|
+
|
|
364
|
+
**If commit_docs = No:** Add the planning root directory to `.gitignore`.
|
|
365
|
+
|
|
366
|
+
**Commit config:**
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "chore: add product config" --files ${config_path}
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**Branch name preview:** If `branching_strategy` is not `"none"`, show:
|
|
373
|
+
```
|
|
374
|
+
Branch names will look like: dgs/{project-slug}/phase-03-auth
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**Commit migrated files:**
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: migrate product to v2 multi-project" --files .planning/REPOS.md .planning/PROJECTS.md dgs.config.json CLAUDE.md
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
Only include CLAUDE.md in the --files list if workflow discipline was enabled (user answered Yes).
|
|
384
|
+
|
|
385
|
+
```
|
|
386
|
+
───────────────────────────────────────────────────────────────
|
|
387
|
+
|
|
388
|
+
## ▶ Next Up
|
|
389
|
+
|
|
390
|
+
**Create another project** or start working
|
|
391
|
+
|
|
392
|
+
`/dgs:new-project` — add a second project
|
|
393
|
+
`/dgs:progress` — see current status
|
|
394
|
+
|
|
395
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
396
|
+
|
|
397
|
+
───────────────────────────────────────────────────────────────
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
If migration fails (error response):
|
|
401
|
+
|
|
402
|
+
```
|
|
403
|
+
Migration failed: {error_message}
|
|
404
|
+
|
|
405
|
+
Your v1 setup is unchanged (rollback applied automatically).
|
|
406
|
+
Backup tag 'dgs-pre-v2-migration' was created before the attempt.
|
|
407
|
+
|
|
408
|
+
To retry: `/dgs:init-product`
|
|
409
|
+
To continue with v1: No action needed — v1 works as before.
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
Exit.
|
|
413
|
+
|
|
414
|
+
**If "Keep v1 mode":**
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs config-set v1_decline_migration true
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
```
|
|
421
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
422
|
+
DGS ► INIT PRODUCT
|
|
423
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
424
|
+
|
|
425
|
+
v1 mode preserved. Your DGS setup continues to work unchanged.
|
|
426
|
+
|
|
427
|
+
This choice is permanent — you won't be prompted again.
|
|
428
|
+
To continue using DGS, run `/dgs:new-project` as usual.
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
Exit.
|
|
432
|
+
|
|
433
|
+
## 3a. Handle v1 Declined (previously declined migration)
|
|
434
|
+
|
|
435
|
+
If response contains `v1_declined: true`:
|
|
436
|
+
|
|
437
|
+
```
|
|
438
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
439
|
+
DGS ► INIT PRODUCT
|
|
440
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
441
|
+
|
|
442
|
+
v1 mode is active (migration was previously declined).
|
|
443
|
+
Your DGS setup continues to work unchanged.
|
|
444
|
+
|
|
445
|
+
To continue: `/dgs:new-project`
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
Exit.
|
|
449
|
+
|
|
450
|
+
## 4. Handle Already Initialized
|
|
451
|
+
|
|
452
|
+
If response contains an error about already initialized:
|
|
453
|
+
|
|
454
|
+
```
|
|
455
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
456
|
+
DGS ► INIT PRODUCT
|
|
457
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
458
|
+
|
|
459
|
+
This product folder is already initialized.
|
|
460
|
+
|
|
461
|
+
To create a new project: `/dgs:new-project`
|
|
462
|
+
To see existing projects: `/dgs:list-projects`
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
Exit.
|
|
466
|
+
|
|
467
|
+
## 5. Handle Fresh Install Success
|
|
468
|
+
|
|
469
|
+
If response contains `initialized: true`:
|
|
470
|
+
|
|
471
|
+
**a. Check `needs_git_init`.** If true:
|
|
472
|
+
```bash
|
|
473
|
+
git init
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
**b. Display results:**
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
480
|
+
DGS ► INIT PRODUCT ✓
|
|
481
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
482
|
+
|
|
483
|
+
Product "{product_name}" initialized.
|
|
484
|
+
|
|
485
|
+
Discovered {repos_found} repo(s):
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
For each repo in `repos` array:
|
|
489
|
+
```
|
|
490
|
+
- {repo.name} ({repo.path})
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
If root-mode (`layout: 'root'` in response or `LAYOUT_MODE="root"`), display:
|
|
494
|
+
```
|
|
495
|
+
Created:
|
|
496
|
+
- REPOS.md
|
|
497
|
+
- PROJECTS.md
|
|
498
|
+
- ideas/ (pending, rejected, done)
|
|
499
|
+
- specs/
|
|
500
|
+
- docs/product/
|
|
501
|
+
- dgs.config.json
|
|
502
|
+
- review-keys.json
|
|
503
|
+
- .gitignore
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
If standard .planning/ mode (existing behavior), display:
|
|
507
|
+
```
|
|
508
|
+
Created:
|
|
509
|
+
- .planning/REPOS.md
|
|
510
|
+
- .planning/PROJECTS.md
|
|
511
|
+
- .planning/ideas/ (pending, rejected, done)
|
|
512
|
+
- .planning/specs/
|
|
513
|
+
- .planning/docs/product/
|
|
514
|
+
- dgs.config.json (updated)
|
|
515
|
+
- .planning/review-keys.json
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
If `gitignore_synced` is true in the response (standard mode only), also show: ` - .gitignore (synced)`
|
|
519
|
+
|
|
520
|
+
**b2. Configure Base Branch:**
|
|
521
|
+
|
|
522
|
+
Prompt the user for their code repo base branch:
|
|
523
|
+
|
|
524
|
+
```
|
|
525
|
+
AskUserQuestion([{
|
|
526
|
+
question: "What is the base branch for your code repos? (e.g., main, develop, dev)",
|
|
527
|
+
header: "Git Configuration",
|
|
528
|
+
multiSelect: false,
|
|
529
|
+
freeform: true,
|
|
530
|
+
placeholder: ""
|
|
531
|
+
}])
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
Always ask — no auto-detection, no default pre-fill. The user types the branch name explicitly.
|
|
535
|
+
|
|
536
|
+
After receiving the answer, write to config:
|
|
537
|
+
```bash
|
|
538
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs config-set git.base_branch "$USER_ANSWER"
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
If the user provides an empty answer or skips, do NOT write anything — the default `main` from config-ensure-section already provides the fallback.
|
|
542
|
+
|
|
543
|
+
**b3. Configure Workflow Discipline:**
|
|
544
|
+
|
|
545
|
+
Read the CLAUDE.md template:
|
|
546
|
+
```bash
|
|
547
|
+
CLAUDE_TEMPLATE=$(cat ~/.claude/deliver-great-systems/templates/claude-md.md)
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
Use AskUserQuestion:
|
|
551
|
+
```
|
|
552
|
+
AskUserQuestion([{
|
|
553
|
+
question: "Enable workflow discipline? This adds a CLAUDE.md file that routes code changes through /dgs:* commands for traceability and atomic commits. Read-only operations (searching, tests, git log) stay unrestricted.",
|
|
554
|
+
header: "Workflow Discipline",
|
|
555
|
+
multiSelect: false,
|
|
556
|
+
options: [
|
|
557
|
+
{ label: "Yes (Recommended)", description: "Creates CLAUDE.md with DGS command routing rules" },
|
|
558
|
+
{ label: "No", description: "Skip — no CLAUDE.md created" }
|
|
559
|
+
]
|
|
560
|
+
}])
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
**If "Yes":**
|
|
564
|
+
|
|
565
|
+
Check if `./CLAUDE.md` already exists in the project root (cwd):
|
|
566
|
+
|
|
567
|
+
- **If CLAUDE.md does NOT exist:** Create `./CLAUDE.md` with DGS section delimiters wrapping the template content:
|
|
568
|
+
|
|
569
|
+
```
|
|
570
|
+
<!-- DGS:BEGIN — managed by deliver-great-systems, do not edit this section manually -->
|
|
571
|
+
{CLAUDE_TEMPLATE content}
|
|
572
|
+
<!-- DGS:END -->
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
- **If CLAUDE.md ALREADY exists:** Read existing content. Check if it already contains `<!-- DGS:BEGIN`.
|
|
576
|
+
- If DGS section already present: replace everything between `<!-- DGS:BEGIN` and `<!-- DGS:END -->` (inclusive) with the latest template version (idempotent update).
|
|
577
|
+
- If no DGS section: append to the end of the file, separated by a blank line:
|
|
578
|
+
|
|
579
|
+
```
|
|
580
|
+
{existing CLAUDE.md content}
|
|
581
|
+
|
|
582
|
+
<!-- DGS:BEGIN — managed by deliver-great-systems, do not edit this section manually -->
|
|
583
|
+
{CLAUDE_TEMPLATE content}
|
|
584
|
+
<!-- DGS:END -->
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
Set config:
|
|
588
|
+
```bash
|
|
589
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs config-set workflow.discipline true
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
Display: `Workflow discipline enabled — CLAUDE.md added.`
|
|
593
|
+
|
|
594
|
+
Add `CLAUDE.md` to the commit file list for the init commit that follows (the `dgs-tools.cjs commit` call at the end of the flow).
|
|
595
|
+
|
|
596
|
+
**If "No":**
|
|
597
|
+
|
|
598
|
+
Set config:
|
|
599
|
+
```bash
|
|
600
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs config-set workflow.discipline false
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
Display: `Skipped.`
|
|
604
|
+
|
|
605
|
+
Do NOT create or modify CLAUDE.md. Do NOT add CLAUDE.md to any commit.
|
|
606
|
+
|
|
607
|
+
**b4. Configure Workflow Preferences (Round 1 — Core settings):**
|
|
608
|
+
|
|
609
|
+
```
|
|
610
|
+
AskUserQuestion([
|
|
611
|
+
{
|
|
612
|
+
header: "Mode",
|
|
613
|
+
question: "How do you want to work?",
|
|
614
|
+
multiSelect: false,
|
|
615
|
+
options: [
|
|
616
|
+
{ label: "YOLO (Recommended)", description: "Auto-approve, just execute" },
|
|
617
|
+
{ label: "Interactive", description: "Confirm at each step" }
|
|
618
|
+
]
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
header: "Depth",
|
|
622
|
+
question: "How thorough should planning be?",
|
|
623
|
+
multiSelect: false,
|
|
624
|
+
options: [
|
|
625
|
+
{ label: "Quick", description: "Ship fast (3-5 phases, 1-3 plans each)" },
|
|
626
|
+
{ label: "Standard", description: "Balanced scope and speed (5-8 phases, 3-5 plans each)" },
|
|
627
|
+
{ label: "Comprehensive", description: "Thorough coverage (8-12 phases, 5-10 plans each)" }
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
header: "Git Tracking",
|
|
632
|
+
question: "Commit planning docs to git?",
|
|
633
|
+
multiSelect: false,
|
|
634
|
+
options: [
|
|
635
|
+
{ label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
|
|
636
|
+
{ label: "No", description: "Keep planning docs local-only (add to .gitignore)" }
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
header: "Branching",
|
|
641
|
+
question: "Git branching strategy?",
|
|
642
|
+
multiSelect: false,
|
|
643
|
+
options: [
|
|
644
|
+
{ label: "None (Recommended)", description: "Commit to current branch (fine for single projects)" },
|
|
645
|
+
{ label: "Per Phase", description: "Branch per phase, review before merging" },
|
|
646
|
+
{ label: "Per Milestone", description: "Branch per project, merge all at end (for parallel projects)" }
|
|
647
|
+
]
|
|
648
|
+
}
|
|
649
|
+
])
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
**b5. Configure Workflow Preferences (Round 2 — Agents):**
|
|
653
|
+
|
|
654
|
+
```
|
|
655
|
+
AskUserQuestion([
|
|
656
|
+
{
|
|
657
|
+
header: "AI Models",
|
|
658
|
+
question: "Which AI models for planning agents?",
|
|
659
|
+
multiSelect: false,
|
|
660
|
+
options: [
|
|
661
|
+
{ label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
|
|
662
|
+
{ label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
|
|
663
|
+
{ label: "Budget", description: "Haiku where possible — fastest, lowest cost" }
|
|
664
|
+
]
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
header: "Research",
|
|
668
|
+
question: "Research before planning each phase? (adds tokens/time)",
|
|
669
|
+
multiSelect: false,
|
|
670
|
+
options: [
|
|
671
|
+
{ label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
|
|
672
|
+
{ label: "No", description: "Plan directly from requirements" }
|
|
673
|
+
]
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
header: "Plan Check",
|
|
677
|
+
question: "Verify plans will achieve their goals? (adds tokens/time)",
|
|
678
|
+
multiSelect: false,
|
|
679
|
+
options: [
|
|
680
|
+
{ label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
|
|
681
|
+
{ label: "No", description: "Execute plans without verification" }
|
|
682
|
+
]
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
header: "Verifier",
|
|
686
|
+
question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
|
|
687
|
+
multiSelect: false,
|
|
688
|
+
options: [
|
|
689
|
+
{ label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
|
|
690
|
+
{ label: "No", description: "Trust execution, skip verification" }
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
])
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
**b6. Write config.json** with all values collected above:
|
|
697
|
+
|
|
698
|
+
```json
|
|
699
|
+
{
|
|
700
|
+
"mode": "yolo|interactive",
|
|
701
|
+
"depth": "quick|standard|comprehensive",
|
|
702
|
+
"parallelization": true,
|
|
703
|
+
"commit_docs": true|false,
|
|
704
|
+
"model_profile": "quality|balanced|budget",
|
|
705
|
+
"workflow": {
|
|
706
|
+
"research": true|false,
|
|
707
|
+
"plan_check": true|false,
|
|
708
|
+
"verifier": true|false,
|
|
709
|
+
"nyquist_validation": true,
|
|
710
|
+
"auto_advance": false,
|
|
711
|
+
"discipline": true|false
|
|
712
|
+
},
|
|
713
|
+
"git": {
|
|
714
|
+
"branching_strategy": "none|phase|milestone",
|
|
715
|
+
"base_branch": "[from earlier question]"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
Smart defaults (not asked): `parallelization: true`, `auto_advance: false`, `nyquist_validation: true`.
|
|
721
|
+
|
|
722
|
+
**If commit_docs = No:** Add the planning root directory to `.gitignore`.
|
|
723
|
+
|
|
724
|
+
**Commit config:**
|
|
725
|
+
|
|
726
|
+
```bash
|
|
727
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "chore: add product config" --files ${config_path}
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
**Branch name preview:** If `branching_strategy` is not `"none"`, show:
|
|
731
|
+
```
|
|
732
|
+
Branch names will look like: dgs/{project-slug}/phase-03-auth
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
**b7. Commit initialized files:**
|
|
736
|
+
|
|
737
|
+
For root-mode (`LAYOUT_MODE="root"`), use the `files_created` array from the init response to build the commit file list:
|
|
738
|
+
|
|
739
|
+
```bash
|
|
740
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: initialize product ${product_name} (root layout)" --files REPOS.md PROJECTS.md dgs.config.json .gitignore CLAUDE.md
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
For standard .planning/ mode, use the existing commit:
|
|
744
|
+
|
|
745
|
+
```bash
|
|
746
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: initialize product ${product_name}" --files .planning/REPOS.md .planning/PROJECTS.md dgs.config.json CLAUDE.md
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
Only include CLAUDE.md in the --files list if workflow discipline was enabled (user answered Yes).
|
|
750
|
+
|
|
751
|
+
**c. Route to next step:**
|
|
752
|
+
|
|
753
|
+
```
|
|
754
|
+
───────────────────────────────────────────────────────────────
|
|
755
|
+
|
|
756
|
+
## ▶ Next Up
|
|
757
|
+
|
|
758
|
+
**Create your first project** — define scope, research, and plan
|
|
759
|
+
|
|
760
|
+
`/dgs:new-project`
|
|
761
|
+
|
|
762
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
763
|
+
|
|
764
|
+
───────────────────────────────────────────────────────────────
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
</process>
|