@ktpartners/dgs-platform 2.7.5 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +15 -12
  3. package/agents/dgs-executor.md +0 -52
  4. package/deliver-great-systems/bin/dgs-tools.cjs +66 -10
  5. package/deliver-great-systems/bin/lib/commands.cjs +1 -8
  6. package/deliver-great-systems/bin/lib/config.cjs +9 -90
  7. package/deliver-great-systems/bin/lib/context.cjs +2 -2
  8. package/deliver-great-systems/bin/lib/context.test.cjs +100 -100
  9. package/deliver-great-systems/bin/lib/core.cjs +17 -57
  10. package/deliver-great-systems/bin/lib/core.test.cjs +166 -170
  11. package/deliver-great-systems/bin/lib/docs.cjs +3 -3
  12. package/deliver-great-systems/bin/lib/docs.test.cjs +14 -7
  13. package/deliver-great-systems/bin/lib/execution.cjs +2 -2
  14. package/deliver-great-systems/bin/lib/execution.test.cjs +65 -67
  15. package/deliver-great-systems/bin/lib/ideas.cjs +4 -4
  16. package/deliver-great-systems/bin/lib/ideas.test.cjs +45 -44
  17. package/deliver-great-systems/bin/lib/init.cjs +9 -4
  18. package/deliver-great-systems/bin/lib/init.test.cjs +242 -175
  19. package/deliver-great-systems/bin/lib/jobs.cjs +1 -1
  20. package/deliver-great-systems/bin/lib/jobs.test.cjs +203 -202
  21. package/deliver-great-systems/bin/lib/migration.cjs +256 -281
  22. package/deliver-great-systems/bin/lib/migration.test.cjs +385 -440
  23. package/deliver-great-systems/bin/lib/milestone.cjs +1 -1
  24. package/deliver-great-systems/bin/lib/overlap.cjs +4 -4
  25. package/deliver-great-systems/bin/lib/overlap.test.cjs +45 -44
  26. package/deliver-great-systems/bin/lib/path-audit.test.cjs +16 -22
  27. package/deliver-great-systems/bin/lib/paths.cjs +60 -59
  28. package/deliver-great-systems/bin/lib/paths.test.cjs +192 -225
  29. package/deliver-great-systems/bin/lib/phase.cjs +5 -4
  30. package/deliver-great-systems/bin/lib/projects.cjs +8 -8
  31. package/deliver-great-systems/bin/lib/projects.test.cjs +75 -74
  32. package/deliver-great-systems/bin/lib/repos.cjs +94 -230
  33. package/deliver-great-systems/bin/lib/repos.test.cjs +84 -75
  34. package/deliver-great-systems/bin/lib/search.cjs +4 -4
  35. package/deliver-great-systems/bin/lib/specs.cjs +2 -2
  36. package/deliver-great-systems/bin/lib/sync.cjs +1 -1
  37. package/deliver-great-systems/bin/lib/template.cjs +3 -3
  38. package/deliver-great-systems/bin/lib/test-helpers.cjs +59 -162
  39. package/deliver-great-systems/bin/lib/verify.cjs +3 -3
  40. package/deliver-great-systems/references/planning-config.md +7 -8
  41. package/deliver-great-systems/workflows/add-tests.md +1 -1
  42. package/deliver-great-systems/workflows/approve-spec.md +1 -11
  43. package/deliver-great-systems/workflows/complete-milestone.md +2 -2
  44. package/deliver-great-systems/workflows/consolidate-ideas.md +1 -1
  45. package/deliver-great-systems/workflows/create-milestone-job.md +2 -2
  46. package/deliver-great-systems/workflows/discuss-phase.md +2 -2
  47. package/deliver-great-systems/workflows/execute-phase.md +63 -4
  48. package/deliver-great-systems/workflows/execute-plan.md +0 -51
  49. package/deliver-great-systems/workflows/find-related-ideas.md +1 -1
  50. package/deliver-great-systems/workflows/help.md +55 -84
  51. package/deliver-great-systems/workflows/init-product.md +14 -451
  52. package/deliver-great-systems/workflows/map-codebase.md +109 -0
  53. package/deliver-great-systems/workflows/new-milestone.md +16 -6
  54. package/deliver-great-systems/workflows/new-project.md +22 -681
  55. package/deliver-great-systems/workflows/quick.md +2 -2
  56. package/deliver-great-systems/workflows/run-job.md +56 -0
  57. package/package.json +1 -1
@@ -12,33 +12,26 @@ Display the complete DGS command reference. Output ONLY the reference content. D
12
12
  ## Quick Start
13
13
 
14
14
  **Single-project (v1):**
15
- 1. `/dgs:new-project` - Initialize project (includes research, requirements, roadmap)
16
- 2. `/dgs:plan-phase 1` - Create detailed plan for first phase
17
- 3. `/dgs:execute-phase 1` - Execute the phase
15
+ 1. `/dgs:new-project` - Create project (questioning + PROJECT.md)
16
+ 2. `/dgs:new-milestone` - First milestone (research, requirements, roadmap)
17
+ 3. `/dgs:plan-phase 1` - Create detailed plan for first phase
18
+ 4. `/dgs:execute-phase 1` - Execute the phase
18
19
 
19
20
  **Multi-project / multi-repo (v2):**
20
21
  1. `/dgs:init-product` - Set up product folder and register repos
21
- 2. `/dgs:new-project` - Create a project (prompts for name and repos)
22
- 3. `/dgs:plan-phase 1` - Plan first phase (repos tracked per task)
23
- 4. `/dgs:execute-phase 1` - Execute (commits per-repo automatically)
22
+ 2. `/dgs:new-project` - Create a project (questioning + PROJECT.md)
23
+ 3. `/dgs:new-milestone` - First milestone (research, requirements, roadmap)
24
+ 4. `/dgs:plan-phase 1` - Plan first phase (repos tracked per task)
25
+ 5. `/dgs:execute-phase 1` - Execute (commits per-repo automatically)
24
26
 
25
- ## Layout Detection
27
+ ## Project Structure
26
28
 
27
- DGS supports two directory layouts:
29
+ Planning artifacts live at the repo root. DGS detects single-project or multi-project mode automatically:
28
30
 
29
- - **`.planning/` layout (default):** Planning artifacts live in a `.planning/` subdirectory. Standard for repos that also contain source code.
30
- - **Root layout:** Planning artifacts live at the repo root. For dedicated planning repos where DGS owns the entire directory.
31
+ - **v1 (single-project):** Standard setup. PROJECT.md, ROADMAP.md, STATE.md, phases/ live at root. All existing commands work as before.
32
+ - **v2 (multi-project):** Detected when `PROJECTS.md` or `REPOS.md` exists. Project artifacts live under `projects/<project-slug>/`. Commands available for repo management and project switching.
31
33
 
32
- Choose your layout during `/dgs:init-product`. DGS detects the active layout from `dgs.config.json` and resolves all paths automatically.
33
-
34
- ### v1 vs v2 Detection
35
-
36
- Within either layout, DGS detects single-project or multi-project mode:
37
-
38
- - **v1 (single-project):** Standard setup. The planning root contains PROJECT.md, ROADMAP.md, STATE.md, phases/ directly. All existing commands work as before.
39
- - **v2 (multi-project):** Detected when `PROJECTS.md` or `REPOS.md` exists in the planning root. Project artifacts live under `<planning-root>/<project-slug>/`. New commands available for repo management and project switching.
40
-
41
- No migration required. v1 installations continue working unchanged. Run `/dgs:init-product` when you want to adopt v2 features.
34
+ Run `/dgs:init-product` to set up multi-project mode.
42
35
 
43
36
  ## Staying Updated
44
37
 
@@ -63,7 +56,7 @@ Each command loads a specific tier of project context. Higher tiers include all
63
56
  ## Core Workflow
64
57
 
65
58
  ```
66
- /dgs:new-project → /dgs:plan-phase → /dgs:execute-phase → repeat
59
+ /dgs:new-project → /dgs:new-milestone → /dgs:plan-phase → /dgs:execute-phase → repeat
67
60
  ```
68
61
 
69
62
  ### Product Setup (v2)
@@ -81,23 +74,19 @@ Usage: `/dgs:init-product`
81
74
  ### Project Initialization
82
75
 
83
76
  **`/dgs:new-project`**
84
- Initialize new project through unified flow. *(Tier 2: planning)*
77
+ Initialize new project through deep questioning. *(Tier 2: planning)*
85
78
 
86
- One command takes you from idea to ready-for-planning:
79
+ One command takes you from idea to project identity:
87
80
  - Deep questioning to understand what you're building
88
- - Optional domain research (spawns 4 parallel researcher agents)
89
- - Requirements definition with v1/v2/out-of-scope scoping
90
- - Roadmap creation with phase breakdown and success criteria
81
+ - Optional brownfield mapping for existing codebases
82
+ - PROJECT.md creation with vision, requirements hypotheses, and key decisions
91
83
 
92
84
  Creates project artifacts:
93
85
  - `PROJECT.md` — vision and requirements
94
- - `config.json` — workflow mode (interactive/yolo)
95
- - `research/` — domain research (if selected)
96
- - `REQUIREMENTS.md` — scoped requirements with REQ-IDs
97
- - `ROADMAP.md` — phases mapped to requirements
98
- - `STATE.md` — project memory
99
86
 
100
- **v2 additions:** Prompts for project name (used as folder slug), prompts for which repos this project touches (from REPOS.md), checks for overlap with other active projects. Artifacts are created under `<planning-root>/<project-slug>/`.
87
+ **v2 additions:** Prompts for project name (used as folder slug), prompts for which repos this project touches (from REPOS.md). Artifacts are created under `projects/<project-slug>/`.
88
+
89
+ After completion, run `/dgs:new-milestone` to start your first milestone.
101
90
 
102
91
  Usage: `/dgs:new-project`
103
92
 
@@ -143,7 +132,7 @@ Usage: `/dgs:map-codebase --only api-service` (same, explicit flag)
143
132
  Switch active project context. *(Tier 1: lite)*
144
133
 
145
134
  - If no name given, shows picker with all active projects
146
- - Sets `current_project` in `dgs.config.json`
135
+ - Sets `current_project` in `config.json`
147
136
  - All subsequent DGS commands operate on the selected project
148
137
  - Shows brief status of the switched-to project
149
138
 
@@ -195,7 +184,7 @@ Show which repos are touched by multiple active projects. *(Tier 1: lite)*
195
184
 
196
185
  - Scans plan files across all active projects for repo references
197
186
  - Highlights specific file-level overlaps
198
- - Runs automatically during `/dgs:new-project` and `/dgs:new-milestone`
187
+ - Runs automatically during `/dgs:new-milestone`
199
188
 
200
189
  Usage: `/dgs:overlap-check`
201
190
 
@@ -316,14 +305,14 @@ Result: Phase 17 deleted, phases 18-20 become 17-19
316
305
  ### Milestone Management
317
306
 
318
307
  **`/dgs:new-milestone <name>`**
319
- Start a new milestone through unified flow. *(Tier 2: planning)*
308
+ Start a new milestone (or the first milestone after `/dgs:new-project`). *(Tier 2: planning)*
320
309
 
321
- - Deep questioning to understand what you're building next
310
+ - Gathers milestone goals (interactive or from spec via --auto)
322
311
  - Optional domain research (spawns 4 parallel researcher agents)
323
312
  - Requirements definition with scoping
324
313
  - Roadmap creation with phase breakdown
325
314
 
326
- Mirrors `/dgs:new-project` flow for brownfield projects (existing PROJECT.md).
315
+ Handles both first milestones (creates STATE.md, defaults to v1.0) and subsequent milestones (continues from MILESTONES.md).
327
316
 
328
317
  Usage: `/dgs:new-milestone "v2.0 Features"`
329
318
 
@@ -417,7 +406,7 @@ Usage: `/dgs:check-todos api`
417
406
 
418
407
  ### Ideas & Specs
419
408
 
420
- `capture ideas → develop idea → write spec → new-project --auto`
409
+ `capture ideas → develop idea → write spec → new-project --auto → new-milestone --auto`
421
410
 
422
411
  #### Ideas
423
412
 
@@ -698,7 +687,7 @@ Configure workflow toggles and model profile interactively. *(Tier 1: lite)*
698
687
 
699
688
  - Toggle researcher, plan checker, verifier agents
700
689
  - Select model profile (quality/balanced/budget)
701
- - Updates `dgs.config.json`
690
+ - Updates `config.json`
702
691
 
703
692
  Usage: `/dgs:settings`
704
693
 
@@ -759,41 +748,13 @@ Usage: `/dgs:join-discord`
759
748
 
760
749
  ## Files & Structure
761
750
 
762
- DGS supports two directory layouts. Choose during `/dgs:init-product`:
751
+ ### Directory Layout
763
752
 
764
- ### .planning/ Layout (Default)
765
-
766
- Standard layout for repos that also contain source code:
753
+ Planning artifacts live at the repo root:
767
754
 
768
755
  ```
769
756
  my-repo/
770
- ├── .planning/ # Planning root
771
- │ ├── dgs.config.json # Workflow mode & gates
772
- │ ├── PROJECT.md # Project vision
773
- │ ├── ROADMAP.md # Current phase breakdown
774
- │ ├── STATE.md # Project memory & context
775
- │ ├── REQUIREMENTS.md # Scoped requirements
776
- │ ├── todos/ # Captured ideas and tasks
777
- │ ├── debug/ # Active debug sessions
778
- │ ├── milestones/ # Archived milestone snapshots
779
- │ ├── codebase/ # Codebase map (brownfield projects)
780
- │ └── phases/ # Phase directories
781
- │ ├── 01-foundation/
782
- │ │ ├── 01-01-PLAN.md
783
- │ │ └── 01-01-SUMMARY.md
784
- │ └── 02-core-features/
785
- │ ├── 02-01-PLAN.md
786
- │ └── 02-01-SUMMARY.md
787
- └── src/ # Your source code
788
- ```
789
-
790
- ### Root Layout
791
-
792
- For dedicated planning repos where DGS owns the entire directory:
793
-
794
- ```
795
- my-planning-repo/
796
- ├── dgs.config.json # Workflow mode & gates
757
+ ├── config.json # Workflow mode & gates
797
758
  ├── PROJECT.md # Project vision
798
759
  ├── ROADMAP.md # Current phase breakdown
799
760
  ├── STATE.md # Project memory & context
@@ -804,21 +765,25 @@ my-planning-repo/
804
765
  ├── codebase/ # Codebase map (brownfield projects)
805
766
  └── phases/ # Phase directories
806
767
  ├── 01-foundation/
768
+ │ ├── 01-01-PLAN.md
769
+ │ └── 01-01-SUMMARY.md
807
770
  └── 02-core-features/
771
+ ├── 02-01-PLAN.md
772
+ └── 02-01-SUMMARY.md
808
773
  ```
809
774
 
810
775
  ### v2 (Multi-Project, Multi-Repo)
811
776
 
812
- Multi-project mode works with either layout. Planning root contains project subfolders:
777
+ Multi-project mode adds project subfolders and a repo registry:
813
778
 
814
779
  ```
815
780
  my-product/ # Product folder (git repo)
816
- ├── <planning-root>/ # .planning/ or repo root
817
- ├── REPOS.md # Repo registry (names, paths, URLs)
818
- ├── PROJECTS.md # Project index (auto-generated)
819
- ├── dgs.config.json # Product-level config
820
- ├── codebase/ # Shared codebase map
821
- │ │ └── <repo-name>/ # Per-repo codebase maps
781
+ ├── REPOS.md # Repo registry (names, paths, URLs)
782
+ ├── PROJECTS.md # Project index (auto-generated)
783
+ ├── config.json # Product-level config
784
+ ├── codebase/ # Shared codebase map
785
+ └── <repo-name>/ # Per-repo codebase maps
786
+ ├── projects/
822
787
  │ ├── auth-overhaul/ # Project: auth-overhaul
823
788
  │ │ ├── PROJECT.md
824
789
  │ │ ├── REQUIREMENTS.md
@@ -840,12 +805,12 @@ my-product/ # Product folder (git repo)
840
805
 
841
806
  **Key concepts:**
842
807
  - **Product** = top-level container with its own git repo for planning changes
843
- - **Project** = a unit of work (feature, initiative). Lives in `<planning-root>/<project-slug>/`. Multiple can be active.
808
+ - **Project** = a unit of work (feature, initiative). Lives in `projects/<project-slug>/`. Multiple can be active.
844
809
  - **Repo** = a source code repository. Registered in REPOS.md. Projects can touch multiple repos.
845
810
 
846
811
  ## Workflow Modes
847
812
 
848
- Set during `/dgs:new-project`:
813
+ Set during `/dgs:init-product`:
849
814
 
850
815
  **Interactive Mode**
851
816
 
@@ -859,11 +824,11 @@ Set during `/dgs:new-project`:
859
824
  - Executes plans without confirmation
860
825
  - Only stops for critical checkpoints
861
826
 
862
- Change anytime by editing `dgs.config.json`
827
+ Change anytime by editing `config.json`
863
828
 
864
829
  ## Planning Configuration
865
830
 
866
- Configure how planning artifacts are managed in `dgs.config.json`:
831
+ Configure how planning artifacts are managed in `config.json`:
867
832
 
868
833
  **`planning.commit_docs`** (default: `true`)
869
834
  - `true`: Planning artifacts committed to git (standard workflow)
@@ -901,7 +866,9 @@ Example config:
901
866
  **Starting a new project (v1):**
902
867
 
903
868
  ```
904
- /dgs:new-project # Unified flow: questioning -> research -> requirements -> roadmap
869
+ /dgs:new-project # Questioning -> PROJECT.md
870
+ /clear
871
+ /dgs:new-milestone # Research -> requirements -> roadmap
905
872
  /clear
906
873
  /dgs:plan-phase 1 # Create plans for first phase
907
874
  /clear
@@ -912,7 +879,9 @@ Example config:
912
879
 
913
880
  ```
914
881
  /dgs:init-product # One-time: register repos, create product structure
915
- /dgs:new-project # Create project (picks name, selects repos)
882
+ /dgs:new-project # Questioning -> PROJECT.md
883
+ /clear
884
+ /dgs:new-milestone # Research -> requirements -> roadmap
916
885
  /clear
917
886
  /dgs:plan-phase 1 # Plan with per-repo task tracking
918
887
  /clear
@@ -975,7 +944,9 @@ Example config:
975
944
  # /dgs:research-idea # Investigate feasibility
976
945
  /dgs:write-spec # Turn ideas into structured spec
977
946
  /clear
978
- /dgs:new-project --auto @spec.md # Create project directly from spec
947
+ /dgs:new-project --auto @spec.md # Create project from spec
948
+ /clear
949
+ /dgs:new-milestone --auto <spec-id> # First milestone from spec
979
950
  ```
980
951
 
981
952
  **Debugging an issue:**