@ktpartners/dgs-platform 2.8.0 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +41 -13
  3. package/agents/dgs-plan-checker.md +29 -3
  4. package/agents/dgs-planner.md +10 -0
  5. package/commands/dgs/abandon-quick.md +28 -0
  6. package/commands/dgs/add-tests.md +2 -2
  7. package/commands/dgs/audit-milestone.md +2 -2
  8. package/commands/dgs/capture-principle.md +11 -11
  9. package/commands/dgs/cleanup.md +2 -2
  10. package/commands/dgs/complete-milestone.md +11 -11
  11. package/commands/dgs/complete-quick.md +28 -0
  12. package/commands/dgs/create-milestone-job.md +2 -2
  13. package/commands/dgs/debug.md +3 -3
  14. package/commands/dgs/develop-idea.md +1 -1
  15. package/commands/dgs/fast.md +3 -1
  16. package/commands/dgs/health.md +1 -1
  17. package/commands/dgs/map-codebase.md +6 -6
  18. package/commands/dgs/new-milestone.md +5 -5
  19. package/commands/dgs/new-project.md +6 -6
  20. package/commands/dgs/plan-milestone-gaps.md +1 -1
  21. package/commands/dgs/progress.md +3 -3
  22. package/commands/dgs/quick-abandon.md +8 -0
  23. package/commands/dgs/quick-complete.md +8 -0
  24. package/commands/dgs/quick.md +10 -3
  25. package/commands/dgs/research-idea.md +2 -2
  26. package/commands/dgs/research-phase.md +3 -3
  27. package/commands/dgs/switch-project.md +1 -1
  28. package/commands/dgs/write-spec.md +3 -3
  29. package/deliver-great-systems/bin/dgs-tools.cjs +284 -30
  30. package/deliver-great-systems/bin/lib/commands.cjs +316 -31
  31. package/deliver-great-systems/bin/lib/commands.test.cjs +336 -0
  32. package/deliver-great-systems/bin/lib/config.cjs +39 -6
  33. package/deliver-great-systems/bin/lib/context.cjs +120 -0
  34. package/deliver-great-systems/bin/lib/core.cjs +28 -11
  35. package/deliver-great-systems/bin/lib/execution.cjs +49 -17
  36. package/deliver-great-systems/bin/lib/flat-migration.test.cjs +396 -0
  37. package/deliver-great-systems/bin/lib/ideas.cjs +206 -91
  38. package/deliver-great-systems/bin/lib/ideas.test.cjs +244 -1
  39. package/deliver-great-systems/bin/lib/init.cjs +306 -39
  40. package/deliver-great-systems/bin/lib/init.test.cjs +416 -6
  41. package/deliver-great-systems/bin/lib/jobs.cjs +124 -21
  42. package/deliver-great-systems/bin/lib/jobs.test.cjs +193 -74
  43. package/deliver-great-systems/bin/lib/migration.cjs +409 -1
  44. package/deliver-great-systems/bin/lib/migration.test.cjs +158 -1
  45. package/deliver-great-systems/bin/lib/milestone.cjs +54 -29
  46. package/deliver-great-systems/bin/lib/phase.cjs +128 -2
  47. package/deliver-great-systems/bin/lib/phase.test.cjs +420 -0
  48. package/deliver-great-systems/bin/lib/projects.cjs +28 -8
  49. package/deliver-great-systems/bin/lib/projects.test.cjs +86 -0
  50. package/deliver-great-systems/bin/lib/quick.cjs +584 -0
  51. package/deliver-great-systems/bin/lib/quick.test.cjs +596 -0
  52. package/deliver-great-systems/bin/lib/repos.cjs +25 -1
  53. package/deliver-great-systems/bin/lib/roadmap.cjs +34 -13
  54. package/deliver-great-systems/bin/lib/specs.cjs +3 -81
  55. package/deliver-great-systems/bin/lib/state-transition-gate.test.cjs +160 -0
  56. package/deliver-great-systems/bin/lib/state.cjs +142 -54
  57. package/deliver-great-systems/bin/lib/sync.cjs +75 -0
  58. package/deliver-great-systems/bin/lib/verify.cjs +80 -1
  59. package/deliver-great-systems/bin/lib/worktrees.cjs +764 -0
  60. package/deliver-great-systems/bin/lib/worktrees.test.cjs +887 -0
  61. package/deliver-great-systems/templates/claude-md.md +16 -0
  62. package/deliver-great-systems/workflows/abandon-quick.md +89 -0
  63. package/deliver-great-systems/workflows/add-idea.md +3 -3
  64. package/deliver-great-systems/workflows/add-tests.md +14 -0
  65. package/deliver-great-systems/workflows/add-todo.md +1 -0
  66. package/deliver-great-systems/workflows/approve-spec.md +25 -4
  67. package/deliver-great-systems/workflows/audit-phase.md +15 -5
  68. package/deliver-great-systems/workflows/cancel-job.md +1 -1
  69. package/deliver-great-systems/workflows/check-todos.md +2 -3
  70. package/deliver-great-systems/workflows/complete-milestone.md +197 -22
  71. package/deliver-great-systems/workflows/complete-quick.md +68 -0
  72. package/deliver-great-systems/workflows/consolidate-ideas.md +1 -1
  73. package/deliver-great-systems/workflows/create-milestone-job.md +4 -4
  74. package/deliver-great-systems/workflows/develop-idea.md +11 -11
  75. package/deliver-great-systems/workflows/diagnose-issues.md +14 -0
  76. package/deliver-great-systems/workflows/discuss-idea.md +1 -1
  77. package/deliver-great-systems/workflows/execute-phase.md +121 -32
  78. package/deliver-great-systems/workflows/execute-plan.md +12 -21
  79. package/deliver-great-systems/workflows/help.md +33 -29
  80. package/deliver-great-systems/workflows/init-product.md +2 -18
  81. package/deliver-great-systems/workflows/new-milestone.md +40 -24
  82. package/deliver-great-systems/workflows/new-project.md +22 -680
  83. package/deliver-great-systems/workflows/progress-all.md +133 -0
  84. package/deliver-great-systems/workflows/quick-abandon.md +89 -0
  85. package/deliver-great-systems/workflows/quick-complete.md +68 -0
  86. package/deliver-great-systems/workflows/quick.md +152 -23
  87. package/deliver-great-systems/workflows/refine-spec.md +1 -1
  88. package/deliver-great-systems/workflows/research-idea.md +8 -8
  89. package/deliver-great-systems/workflows/resume-project.md +2 -2
  90. package/deliver-great-systems/workflows/run-job.md +8 -8
  91. package/deliver-great-systems/workflows/validate-phase.md +39 -1
  92. package/deliver-great-systems/workflows/verify-work.md +14 -0
  93. package/deliver-great-systems/workflows/write-spec.md +2 -2
  94. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dgs:map-codebase
3
- description: Analyze registered repos with parallel mapper agents to produce per-repo .planning/codebase/<repo>/ documents and cross-repo analysis
3
+ description: Analyze registered repos with parallel mapper agents to produce per-repo codebase/<repo>/ documents and cross-repo analysis
4
4
  argument-hint: "[<repo-name>]"
5
5
  allowed-tools:
6
6
  - Read
@@ -18,9 +18,9 @@ Supports two modes:
18
18
  - **Refresh mode** (default, no flags): Clears all existing codebase maps and remaps everything from scratch.
19
19
  - **Update mode** (`<repo-name>` or `--only <repo-name>`): Re-maps only the specified repo and regenerates unified files from all repos.
20
20
 
21
- Reads REPOS.md to discover registered repos, then spawns 4 mapper agents per repo (or just the targeted repo in update mode). Each agent explores the repo's actual path and writes documents directly to `.planning/codebase/<repo-name>/`. The orchestrator only receives confirmations.
21
+ Reads REPOS.md to discover registered repos, then spawns 4 mapper agents per repo (or just the targeted repo in update mode). Each agent explores the repo's actual path and writes documents directly to `codebase/<repo-name>/`. The orchestrator only receives confirmations.
22
22
 
23
- Output: .planning/codebase/<repo-name>/ folders, each with 7 structured documents about that repo's codebase state, plus 7 unified top-level files synthesized from per-repo content, plus CROSS-REPO.md with cross-repo comparison tables (when 2+ repos).
23
+ Output: codebase/<repo-name>/ folders, each with 7 structured documents about that repo's codebase state, plus 7 unified top-level files synthesized from per-repo content, plus CROSS-REPO.md with cross-repo comparison tables (when 2+ repos).
24
24
  </objective>
25
25
 
26
26
  <execution_context>
@@ -31,7 +31,7 @@ Output: .planning/codebase/<repo-name>/ folders, each with 7 structured document
31
31
  **Reads REPOS.md** to discover registered repos and their paths.
32
32
 
33
33
  **Load project state if exists:**
34
- Check for .planning/STATE.md - loads context if project already initialized
34
+ Check for ${state_path} - loads context if project already initialized
35
35
 
36
36
  **This command can run:**
37
37
  - Before /dgs:new-project (brownfield codebases) - creates codebase maps first
@@ -60,7 +60,7 @@ Check for .planning/STATE.md - loads context if project already initialized
60
60
  3. Mode-aware cleanup:
61
61
  - Refresh: Delete all existing codebase docs and per-repo subdirectories
62
62
  - Update: Delete only the targeted repo's subdirectory (other repos untouched)
63
- 4. Create .planning/codebase/<repo-name>/ directories (all repos or just targeted repo)
63
+ 4. Create codebase/<repo-name>/ directories (all repos or just targeted repo)
64
64
  5. Spawn 4 parallel dgs-codebase-mapper agents per repo (all run in parallel):
65
65
  - Agent 1: tech focus -> writes STACK.md, INTEGRATIONS.md
66
66
  - Agent 2: arch focus -> writes ARCHITECTURE.md, STRUCTURE.md
@@ -78,7 +78,7 @@ Check for .planning/STATE.md - loads context if project already initialized
78
78
  </process>
79
79
 
80
80
  <success_criteria>
81
- - [ ] .planning/codebase/<repo-name>/ directories created for each registered repo (or targeted repo in update mode)
81
+ - [ ] codebase/<repo-name>/ directories created for each registered repo (or targeted repo in update mode)
82
82
  - [ ] All 7 codebase documents written per repo by mapper agents
83
83
  - [ ] Documents follow template structure
84
84
  - [ ] Parallel agents completed without errors
@@ -15,11 +15,11 @@ Start a new milestone: questioning → research (optional) → requirements →
15
15
  Brownfield equivalent of new-project. Project exists, PROJECT.md has history. Gathers "what's next", updates PROJECT.md, then runs requirements → roadmap cycle.
16
16
 
17
17
  **Creates/Updates:**
18
- - `.planning/PROJECT.md` — updated with new milestone goals
19
- - `.planning/research/` — domain research (optional, NEW features only)
20
- - `.planning/REQUIREMENTS.md` — scoped requirements for this milestone
21
- - `.planning/ROADMAP.md` — phase structure (continues numbering)
22
- - `.planning/STATE.md` — reset for new milestone
18
+ - `${project_path}` — updated with new milestone goals
19
+ - `${project_root}/research/` — domain research (optional, NEW features only)
20
+ - `${project_root}/REQUIREMENTS.md` — scoped requirements for this milestone
21
+ - `${roadmap_path}` — phase structure (continues numbering)
22
+ - `${state_path}` — reset for new milestone
23
23
 
24
24
  **After:** `/dgs:plan-phase [N]` to start execution.
25
25
  </objective>
@@ -18,12 +18,12 @@ allowed-tools:
18
18
  Initialize a new project through unified flow: questioning → research (optional) → requirements → roadmap.
19
19
 
20
20
  **Creates:**
21
- - `.planning/PROJECT.md` — project context
22
- - `.planning/config.json` — workflow preferences
23
- - `.planning/research/` — domain research (optional)
24
- - `.planning/REQUIREMENTS.md` — scoped requirements
25
- - `.planning/ROADMAP.md` — phase structure
26
- - `.planning/STATE.md` — project memory
21
+ - `${project_path}` — project context
22
+ - `config.json` — workflow preferences
23
+ - `${project_root}/research/` — domain research (optional)
24
+ - `${project_root}/REQUIREMENTS.md` — scoped requirements
25
+ - `${roadmap_path}` — phase structure
26
+ - `${state_path}` — project memory
27
27
 
28
28
  **After this command:** Run `/dgs:plan-phase 1` to start execution.
29
29
  </objective>
@@ -23,7 +23,7 @@ One command creates all fix phases — no manual `/dgs:add-phase` per gap.
23
23
 
24
24
  <context>
25
25
  **Audit results:**
26
- Glob: .planning/v*-MILESTONE-AUDIT.md (use most recent)
26
+ Glob: ${project_root}/v*-MILESTONE-AUDIT.md (use most recent)
27
27
 
28
28
  Original intent and current planning state are loaded on demand inside the workflow.
29
29
  </context>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dgs:progress
3
- description: Check project progress, show context, and route to next action (execute or plan)
3
+ description: Check project progress, show context, and route to next action (execute or plan). Use --all for product-wide dashboard across all projects
4
4
  allowed-tools:
5
5
  - Read
6
6
  - Bash
@@ -16,9 +16,9 @@ Provides situational awareness before continuing work.
16
16
 
17
17
  <execution_context>
18
18
  @~/.claude/deliver-great-systems/workflows/progress.md
19
+ @~/.claude/deliver-great-systems/workflows/progress-all.md
19
20
  </execution_context>
20
21
 
21
22
  <process>
22
- Execute the progress workflow from @~/.claude/deliver-great-systems/workflows/progress.md end-to-end.
23
- Preserve all routing logic (Routes A through F) and edge case handling.
23
+ Parse $ARGUMENTS. If it contains the `--all` flag, execute the product-level dashboard workflow from @~/.claude/deliver-great-systems/workflows/progress-all.md end-to-end. Otherwise, execute the single-project progress workflow from @~/.claude/deliver-great-systems/workflows/progress.md end-to-end, preserving all routing logic (Routes A through F) and edge case handling.
24
24
  </process>
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: dgs:quick-abandon
3
+ description: "Alias for /dgs:abandon-quick"
4
+ allowed-tools: []
5
+ ---
6
+ This command has been renamed. Use `/dgs:abandon-quick` instead.
7
+
8
+ Run `/dgs:abandon-quick $ARGUMENTS` to continue.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: dgs:quick-complete
3
+ description: "Alias for /dgs:complete-quick"
4
+ allowed-tools: []
5
+ ---
6
+ This command has been renamed. Use `/dgs:complete-quick` instead.
7
+
8
+ Run `/dgs:complete-quick $ARGUMENTS` to continue.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: dgs:quick
3
3
  description: Execute a quick task with DGS guarantees (atomic commits, state tracking) but skip optional agents
4
- argument-hint: "[--full]"
4
+ argument-hint: "[--full] [--debug] [--main]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -17,12 +17,19 @@ Execute small, ad-hoc tasks with DGS guarantees (atomic commits, STATE.md tracki
17
17
 
18
18
  Quick mode is the same system with a shorter path:
19
19
  - Spawns dgs-planner (quick mode) + dgs-executor(s)
20
- - Quick tasks live in `.planning/quick/` separate from planned phases
20
+ - Quick tasks live in `quick/` separate from planned phases
21
21
  - Updates STATE.md "Quick Tasks Completed" table (NOT ROADMAP.md)
22
22
 
23
+ **Two flavors (auto-detected):**
24
+ - **Product-level quick** (no active milestone, or `--main` flag): Creates an ephemeral worktree off main with a `quick/{slug}` branch. Use `/dgs:complete-quick` to rebase, merge, and clean up. Use `/dgs:abandon-quick` to discard.
25
+ - **Milestone-context quick** (active milestone): Works within the existing milestone worktree. No new worktree created. Changes merge with the milestone via `/dgs:complete-milestone`.
26
+
23
27
  **Default:** Skips research, plan-checker, verifier. Use when you know exactly what to do.
24
28
 
25
- **`--full` flag:** Enables plan-checking (max 2 iterations) and post-execution verification. Use when you want quality guarantees without full milestone ceremony.
29
+ **Flags:**
30
+ - **`--full`:** Enables plan-checking (max 2 iterations) and post-execution verification. Use when you want quality guarantees without full milestone ceremony.
31
+ - **`--debug`:** Investigation-focused guidance. Agent investigates root cause before fixing, documents findings. May result in no code change. Same git mechanics.
32
+ - **`--main`:** Forces product-level quick even when a milestone is active. Creates its own worktree instead of working in the milestone worktree.
26
33
  </objective>
27
34
 
28
35
  <execution_context>
@@ -19,7 +19,7 @@ Research an idea's technical landscape and feasibility through a subagent workfl
19
19
  - **With an idea ID** (`/dgs:research-idea 5`): Researches that specific idea directly
20
20
  - **Without an idea ID** (`/dgs:research-idea`): Lists pending ideas for selection
21
21
 
22
- The output is a research document at `.planning/docs/ideas/pending/{slug}-research.md` and a Research Log entry appended to the idea file, both committed together. When prior research exists, the document is overwritten with a "Changes from Prior Research" section highlighting what shifted.
22
+ The output is a research document at `${project_root}/docs/ideas/pending/{slug}-research.md` and a Research Log entry appended to the idea file, both committed together. When prior research exists, the document is overwritten with a "Changes from Prior Research" section highlighting what shifted.
23
23
  </objective>
24
24
 
25
25
  <execution_context>
@@ -37,7 +37,7 @@ The workflow handles all logic including:
37
37
  1. Argument parsing and idea selection (with or without ID)
38
38
  2. Loading idea context and prior research/discussion history
39
39
  3. Five adaptive research dimensions (web search, codebase analysis, landscape survey, approach identification, feasibility assessment)
40
- 4. Research document creation at `.planning/docs/ideas/pending/{slug}-research.md`
40
+ 4. Research document creation at `${project_root}/docs/ideas/pending/{slug}-research.md`
41
41
  5. Research log entry save via `dgs-tools.cjs ideas research-save`
42
42
  6. Git commit of both files and next-step suggestion
43
43
  </process>
@@ -55,7 +55,7 @@ PHASE_INFO=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs roadmap get-
55
55
  ## 2. Check Existing Research
56
56
 
57
57
  ```bash
58
- ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
58
+ ls ${project_root}/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
59
59
  ```
60
60
 
61
61
  **If exists:** Offer: 1) Update research, 2) View existing, 3) Skip. Wait for response.
@@ -129,7 +129,7 @@ Before declaring complete, verify:
129
129
  </quality_gate>
130
130
 
131
131
  <output>
132
- Write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
132
+ Write to: ${project_root}/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
133
133
  </output>
134
134
  ```
135
135
 
@@ -159,7 +159,7 @@ Continue research for Phase {phase_number}: {phase_name}
159
159
 
160
160
  <prior_state>
161
161
  <files_to_read>
162
- - .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md (Existing research)
162
+ - ${project_root}/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md (Existing research)
163
163
  </files_to_read>
164
164
  </prior_state>
165
165
 
@@ -10,7 +10,7 @@ allowed-tools:
10
10
  <objective>
11
11
  Switch the active project context. If a project name is provided, switches immediately. If no name is given, shows a picker with all active projects.
12
12
 
13
- After switching, all DGS commands operate in the new project's context (its .planning/ directory, repos, and state).
13
+ After switching, all DGS commands operate in the new project's context (its project directory, repos, and state).
14
14
  </objective>
15
15
 
16
16
  <process>
@@ -28,9 +28,9 @@ The spec covers the full lifecycle: idea selection, PRD generation with all requ
28
28
  Arguments: $ARGUMENTS (optional idea IDs and `--auto` flag)
29
29
 
30
30
  Codebase context for Technical Considerations:
31
- @.planning/codebase/ARCHITECTURE.md
32
- @.planning/codebase/STACK.md
33
- @.planning/codebase/STRUCTURE.md
31
+ @codebase/ARCHITECTURE.md
32
+ @codebase/STACK.md
33
+ @codebase/STRUCTURE.md
34
34
  </context>
35
35
 
36
36
  <process>