@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
@@ -1,5 +1,5 @@
1
1
  <purpose>
2
- Initialize a new project through unified flow: questioning, research (optional), requirements, roadmap. This is the most leveraged moment in any project — deep questioning here means better plans, better execution, better outcomes. One workflow takes you from idea to ready-for-planning.
2
+ Initialize a new project through questioning and PROJECT.md creation. This is the most leveraged moment in any project — deep questioning here means better plans, better execution, better outcomes. Run /dgs:new-milestone after to start your first milestone.
3
3
  </purpose>
4
4
 
5
5
  <context_tier>planning</context_tier>
@@ -16,12 +16,9 @@ Check if `--auto` flag is present in $ARGUMENTS.
16
16
  **If auto mode:**
17
17
  - Skip brownfield mapping offer (assume greenfield)
18
18
  - Skip deep questioning (extract context from provided document)
19
- - Config: Use existing product config from init-product (Step 2a sets auto_advance only)
20
- - After config: run Steps 6-9 automatically with smart defaults:
21
- - Research: Always yes
22
- - Requirements: Include all table stakes + features from provided document
23
- - Requirements approval: Auto-approve
24
- - Roadmap approval: Auto-approve
19
+ - Config: Use existing product config from init-product
20
+ - After config: run Step 2b (parse spec), Step 2c (repo cross-check), write PROJECT.md
21
+ - End with completion output directing to `/dgs:new-milestone --auto <spec-id>`
25
22
 
26
23
  **Document requirement:**
27
24
  Auto mode requires an idea document or spec reference — either:
@@ -64,7 +61,7 @@ If the `--auto` argument references a spec file path or spec ID:
64
61
  INIT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs init new-project)
65
62
  ```
66
63
 
67
- Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`, `state_path`, `roadmap_path`, `requirements_path`, `research_dir`, `milestone_version`, `milestone_name`.
64
+ Parse JSON for: `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`, `state_path`.
68
65
 
69
66
  Load planning-tier context files:
70
67
 
@@ -116,12 +113,6 @@ Exit command.
116
113
 
117
114
  **If auto mode:** Use existing product config (set during `/dgs:init-product`). No config questions needed here.
118
115
 
119
- **Persist auto-advance to config (survives context compaction):**
120
-
121
- ```bash
122
- node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs config-set workflow.auto_advance true
123
- ```
124
-
125
116
  Proceed to Step 4 (skip Step 3).
126
117
 
127
118
  ## 2b. Spec-Driven Project Creation (spec-driven auto mode only)
@@ -135,7 +126,7 @@ Read the spec file and extract:
135
126
  - **Problem** section → project description / core value
136
127
  - **Goals** section → project goals
137
128
  - **Non-Goals** section → out of scope
138
- - **Requirements** (P0/P1/P2) → v1 requirements (P0 + P1) and future requirements (P2)
129
+ - **Requirements** (P0/P1/P2) → requirements hypotheses for PROJECT.md
139
130
  - **User Stories** → inform requirement specificity
140
131
  - **Technical Considerations** → inform research/architecture
141
132
  - **"Repos likely touched"** or similar section → repos for cross-checking (Step 2c)
@@ -190,27 +181,16 @@ Create `${project_path}` with standard template structure, but derived entirely
190
181
  - Do NOT copy verbatim — restructure for project planning context
191
182
  - Add a `Source spec: [path]` line to PROJECT.md (per user decision — reference, not copy)
192
183
 
193
- ### Write REQUIREMENTS.md
194
-
195
- Generate `${requirements_path}` with:
196
- - REQ-IDs in `[CATEGORY]-[NUMBER]` format (e.g., AUTH-01, UI-02)
197
- - P0 requirements → v1 (must have)
198
- - P1 requirements → v1 (should have)
199
- - P2 requirements → Future
200
- - Non-Goals → Out of Scope with reasoning
201
-
202
- The requirements must be user-centric and atomic (one capability per requirement), following the quality criteria in the existing new-project workflow.
203
-
204
184
  ### Commit and Continue
205
185
 
206
- Commit PROJECT.md and REQUIREMENTS.md, then continue to Step 5 (Resolve Model Profile) — skip Steps 3 (Deep Questioning) and 4 (Write PROJECT.md) since they're replaced by spec-driven derivation.
186
+ Commit PROJECT.md, then proceed to Done.
207
187
 
208
188
  **Branch name preview:** After the project folder is created, if `branching_strategy` is not `"none"`, show:
209
189
  ```
210
190
  Branch names will look like: dgs/{project-slug}/phase-03-auth
211
191
  ```
212
192
 
213
- After model profile resolution, proceed to Step 6, 7 (if research selected, auto-default yes), 8 (Create Roadmap), 8.5 (Overlap Check), 9 (Done).
193
+ After PROJECT.md is committed, proceed to Step 5 (Done).
214
194
 
215
195
  ## 2c. Repo Cross-Check (spec-driven mode, v2 only)
216
196
 
@@ -419,599 +399,16 @@ Do not compress. Capture everything gathered.
419
399
  **Commit PROJECT.md:**
420
400
 
421
401
  ```bash
422
- mkdir -p .planning
423
402
  node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: initialize project" --push --files ${project_path}
424
403
  ```
425
404
 
426
- ## 5. Resolve Model Profile
427
-
428
- Use models from init: `researcher_model`, `synthesizer_model`, `roadmapper_model`.
429
-
430
- ## 6. Research Decision
431
-
432
- **If auto mode:** Default to "Research first" without asking.
433
-
434
- Use AskUserQuestion:
435
- - header: "Research"
436
- - question: "Research the domain ecosystem before defining requirements?"
437
- - options:
438
- - "Research first (Recommended)" — Discover standard stacks, expected features, architecture patterns
439
- - "Skip research" — I know this domain well, go straight to requirements
440
-
441
- **If "Research first":**
442
-
443
- Display stage banner:
444
- ```
445
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
446
- DGS ► RESEARCHING
447
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
448
-
449
- Researching [domain] ecosystem...
450
- ```
451
-
452
- Create research directory:
453
- ```bash
454
- mkdir -p ${research_dir}
455
- ```
456
-
457
- **Determine milestone context:**
458
-
459
- Check if this is greenfield or subsequent milestone:
460
- - If no "Validated" requirements in PROJECT.md → Greenfield (building from scratch)
461
- - If "Validated" requirements exist → Subsequent milestone (adding to existing app)
462
-
463
- **Discover product-level documents:**
464
-
465
- Before spawning researchers, check for product-level documents that should inform research:
466
-
467
- ```bash
468
- ls ${project_root}/docs/product/ 2>/dev/null
469
- ```
470
-
471
- If the directory exists and contains files, store the list of file paths as `$product_doc_files`. For each file, format as a `<files_to_read>` entry: `- ${project_root}/docs/product/{filename} (Product doc)`. If the directory does not exist or is empty, set `$product_doc_files` to empty string.
472
-
473
- Display spawning indicator:
474
- ```
475
- ◆ Spawning 4 researchers in parallel...
476
- → Stack research
477
- → Features research
478
- → Architecture research
479
- → Pitfalls research
480
- ```
481
-
482
- Spawn 4 parallel dgs-project-researcher agents with path references:
483
-
484
- ```
485
- Task(prompt="First, read ~/.claude/agents/dgs-project-researcher.md for your role and instructions.
486
-
487
- <research_type>
488
- Project Research — Stack dimension for [domain].
489
- </research_type>
490
-
491
- <milestone_context>
492
- [greenfield OR subsequent]
493
-
494
- Greenfield: Research the standard stack for building [domain] from scratch.
495
- Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
496
- </milestone_context>
497
-
498
- <question>
499
- What's the standard 2025 stack for [domain]?
500
- </question>
501
-
502
- <files_to_read>
503
- - {project_path} (Project context and goals)
504
- ${product_doc_files}
505
- </files_to_read>
506
-
507
- <downstream_consumer>
508
- Your STACK.md feeds into roadmap creation. Be prescriptive:
509
- - Specific libraries with versions
510
- - Clear rationale for each choice
511
- - What NOT to use and why
512
- </downstream_consumer>
513
-
514
- <quality_gate>
515
- - [ ] Versions are current (verify with Context7/official docs, not training data)
516
- - [ ] Rationale explains WHY, not just WHAT
517
- - [ ] Confidence levels assigned to each recommendation
518
- </quality_gate>
519
-
520
- <output>
521
- Write to: ${research_dir}/STACK.md
522
- Use template: ~/.claude/deliver-great-systems/templates/research-project/STACK.md
523
- </output>
524
- ", subagent_type="general-purpose", model="{researcher_model}", description="Stack research")
525
-
526
- Task(prompt="First, read ~/.claude/agents/dgs-project-researcher.md for your role and instructions.
527
-
528
- <research_type>
529
- Project Research — Features dimension for [domain].
530
- </research_type>
531
-
532
- <milestone_context>
533
- [greenfield OR subsequent]
534
-
535
- Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
536
- Subsequent: How do [target features] typically work? What's expected behavior?
537
- </milestone_context>
538
-
539
- <question>
540
- What features do [domain] products have? What's table stakes vs differentiating?
541
- </question>
542
-
543
- <files_to_read>
544
- - {project_path} (Project context)
545
- ${product_doc_files}
546
- </files_to_read>
547
-
548
- <downstream_consumer>
549
- Your FEATURES.md feeds into requirements definition. Categorize clearly:
550
- - Table stakes (must have or users leave)
551
- - Differentiators (competitive advantage)
552
- - Anti-features (things to deliberately NOT build)
553
- </downstream_consumer>
554
-
555
- <quality_gate>
556
- - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
557
- - [ ] Complexity noted for each feature
558
- - [ ] Dependencies between features identified
559
- </quality_gate>
560
-
561
- <output>
562
- Write to: ${research_dir}/FEATURES.md
563
- Use template: ~/.claude/deliver-great-systems/templates/research-project/FEATURES.md
564
- </output>
565
- ", subagent_type="general-purpose", model="{researcher_model}", description="Features research")
566
-
567
- Task(prompt="First, read ~/.claude/agents/dgs-project-researcher.md for your role and instructions.
568
-
569
- <research_type>
570
- Project Research — Architecture dimension for [domain].
571
- </research_type>
572
-
573
- <milestone_context>
574
- [greenfield OR subsequent]
575
-
576
- Greenfield: How are [domain] systems typically structured? What are major components?
577
- Subsequent: How do [target features] integrate with existing [domain] architecture?
578
- </milestone_context>
579
-
580
- <question>
581
- How are [domain] systems typically structured? What are major components?
582
- </question>
583
-
584
- <files_to_read>
585
- - {project_path} (Project context)
586
- ${product_doc_files}
587
- </files_to_read>
588
-
589
- <downstream_consumer>
590
- Your ARCHITECTURE.md informs phase structure in roadmap. Include:
591
- - Component boundaries (what talks to what)
592
- - Data flow (how information moves)
593
- - Suggested build order (dependencies between components)
594
- </downstream_consumer>
595
-
596
- <quality_gate>
597
- - [ ] Components clearly defined with boundaries
598
- - [ ] Data flow direction explicit
599
- - [ ] Build order implications noted
600
- </quality_gate>
601
-
602
- <output>
603
- Write to: ${research_dir}/ARCHITECTURE.md
604
- Use template: ~/.claude/deliver-great-systems/templates/research-project/ARCHITECTURE.md
605
- </output>
606
- ", subagent_type="general-purpose", model="{researcher_model}", description="Architecture research")
607
-
608
- Task(prompt="First, read ~/.claude/agents/dgs-project-researcher.md for your role and instructions.
609
-
610
- <research_type>
611
- Project Research — Pitfalls dimension for [domain].
612
- </research_type>
613
-
614
- <milestone_context>
615
- [greenfield OR subsequent]
616
-
617
- Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
618
- Subsequent: What are common mistakes when adding [target features] to [domain]?
619
- </milestone_context>
620
-
621
- <question>
622
- What do [domain] projects commonly get wrong? Critical mistakes?
623
- </question>
624
-
625
- <files_to_read>
626
- - {project_path} (Project context)
627
- ${product_doc_files}
628
- </files_to_read>
629
-
630
- <downstream_consumer>
631
- Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
632
- - Warning signs (how to detect early)
633
- - Prevention strategy (how to avoid)
634
- - Which phase should address it
635
- </downstream_consumer>
636
-
637
- <quality_gate>
638
- - [ ] Pitfalls are specific to this domain (not generic advice)
639
- - [ ] Prevention strategies are actionable
640
- - [ ] Phase mapping included where relevant
641
- </quality_gate>
642
-
643
- <output>
644
- Write to: ${research_dir}/PITFALLS.md
645
- Use template: ~/.claude/deliver-great-systems/templates/research-project/PITFALLS.md
646
- </output>
647
- ", subagent_type="general-purpose", model="{researcher_model}", description="Pitfalls research")
648
- ```
649
-
650
- After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
651
-
652
- ```
653
- Task(prompt="
654
- <task>
655
- Synthesize research outputs into SUMMARY.md.
656
- </task>
657
-
658
- <files_to_read>
659
- - ${research_dir}/STACK.md
660
- - ${research_dir}/FEATURES.md
661
- - ${research_dir}/ARCHITECTURE.md
662
- - ${research_dir}/PITFALLS.md
663
- </files_to_read>
664
-
665
- <output>
666
- Write to: ${research_dir}/SUMMARY.md
667
- Use template: ~/.claude/deliver-great-systems/templates/research-project/SUMMARY.md
668
- Commit after writing.
669
- </output>
670
- ", subagent_type="dgs-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
671
- ```
672
-
673
- Display research complete banner and key findings:
674
- ```
675
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
676
- DGS ► RESEARCH COMPLETE ✓
677
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
678
-
679
- ## Key Findings
680
-
681
- **Stack:** [from SUMMARY.md]
682
- **Table Stakes:** [from SUMMARY.md]
683
- **Watch Out For:** [from SUMMARY.md]
684
-
685
- Files: `${research_dir}/`
686
- ```
687
-
688
- **If "Skip research":** Continue to Step 7.
689
-
690
- ## 7. Define Requirements
691
-
692
- Display stage banner:
693
- ```
694
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
695
- DGS ► DEFINING REQUIREMENTS
696
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
697
- ```
698
-
699
- **Load context:**
700
-
701
- Read PROJECT.md and extract:
702
- - Core value (the ONE thing that must work)
703
- - Stated constraints (budget, timeline, tech limitations)
704
- - Any explicit scope boundaries
705
-
706
- **If research exists:** Read research/FEATURES.md and extract feature categories.
707
-
708
- **If auto mode:**
709
- - Auto-include all table stakes features (users expect these)
710
- - Include features explicitly mentioned in provided document
711
- - Auto-defer differentiators not mentioned in document
712
- - Skip per-category AskUserQuestion loops
713
- - Skip "Any additions?" question
714
- - Skip requirements approval gate
715
- - Generate REQUIREMENTS.md and commit directly
716
-
717
- **Present features by category (interactive mode only):**
718
-
719
- ```
720
- Here are the features for [domain]:
721
-
722
- ## Authentication
723
- **Table stakes:**
724
- - Sign up with email/password
725
- - Email verification
726
- - Password reset
727
- - Session management
728
-
729
- **Differentiators:**
730
- - Magic link login
731
- - OAuth (Google, GitHub)
732
- - 2FA
733
-
734
- **Research notes:** [any relevant notes]
735
-
736
- ---
737
-
738
- ## [Next Category]
739
- ...
740
- ```
741
-
742
- **If no research:** Gather requirements through conversation instead.
743
-
744
- Ask: "What are the main things users need to be able to do?"
745
-
746
- For each capability mentioned:
747
- - Ask clarifying questions to make it specific
748
- - Probe for related capabilities
749
- - Group into categories
750
-
751
- **Scope each category:**
752
-
753
- For each category, use AskUserQuestion:
754
-
755
- - header: "[Category]" (max 12 chars)
756
- - question: "Which [category] features are in v1?"
757
- - multiSelect: true
758
- - options:
759
- - "[Feature 1]" — [brief description]
760
- - "[Feature 2]" — [brief description]
761
- - "[Feature 3]" — [brief description]
762
- - "None for v1" — Defer entire category
763
-
764
- Track responses:
765
- - Selected features → v1 requirements
766
- - Unselected table stakes → v2 (users expect these)
767
- - Unselected differentiators → out of scope
768
-
769
- **Identify gaps:**
770
-
771
- Use AskUserQuestion:
772
- - header: "Additions"
773
- - question: "Any requirements research missed? (Features specific to your vision)"
774
- - options:
775
- - "No, research covered it" — Proceed
776
- - "Yes, let me add some" — Capture additions
777
-
778
- **Validate core value:**
779
-
780
- Cross-check requirements against Core Value from PROJECT.md. If gaps detected, surface them.
781
-
782
- **Generate REQUIREMENTS.md:**
783
-
784
- Create `${requirements_path}` with:
785
- - v1 Requirements grouped by category (checkboxes, REQ-IDs)
786
- - v2 Requirements (deferred)
787
- - Out of Scope (explicit exclusions with reasoning)
788
- - Traceability section (empty, filled by roadmap)
789
-
790
- **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, CONTENT-02)
791
-
792
- **Requirement quality criteria:**
793
-
794
- Good requirements are:
795
- - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
796
- - **User-centric:** "User can X" (not "System does Y")
797
- - **Atomic:** One capability per requirement (not "User can login and manage profile")
798
- - **Independent:** Minimal dependencies on other requirements
799
-
800
- Reject vague requirements. Push for specificity:
801
- - "Handle authentication" → "User can log in with email/password and stay logged in across sessions"
802
- - "Support sharing" → "User can share post via link that opens in recipient's browser"
803
-
804
- **Present full requirements list (interactive mode only):**
805
-
806
- Show every requirement (not counts) for user confirmation:
807
-
808
- ```
809
- ## v1 Requirements
810
-
811
- ### Authentication
812
- - [ ] **AUTH-01**: User can create account with email/password
813
- - [ ] **AUTH-02**: User can log in and stay logged in across sessions
814
- - [ ] **AUTH-03**: User can log out from any page
815
-
816
- ### Content
817
- - [ ] **CONT-01**: User can create posts with text
818
- - [ ] **CONT-02**: User can edit their own posts
819
-
820
- [... full list ...]
821
-
822
- ---
823
-
824
- Does this capture what you're building? (yes / adjust)
825
- ```
826
-
827
- If "adjust": Return to scoping.
828
-
829
- **Commit requirements:**
830
-
831
- ```bash
832
- node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: define v1 requirements" --push --files ${requirements_path}
833
- ```
834
-
835
- ## 8. Create Roadmap
836
-
837
- Display stage banner:
838
- ```
839
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
840
- DGS ► CREATING ROADMAP
841
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
842
-
843
- ◆ Spawning roadmapper...
844
- ```
845
-
846
- Spawn dgs-roadmapper agent with path references:
847
-
848
- ```
849
- Task(prompt="
850
- <planning_context>
851
-
852
- <files_to_read>
853
- - ${project_path} (Project context)
854
- - ${requirements_path} (v1 Requirements)
855
- - ${research_dir}/SUMMARY.md (Research findings - if exists)
856
- - ${config_path} (Depth and mode settings)
857
- ${product_doc_files}
858
- </files_to_read>
859
-
860
- <milestone>
861
- version: ${milestone_version}
862
- name: ${milestone_name}
863
- </milestone>
864
-
865
- </planning_context>
866
-
867
- <instructions>
868
- Create roadmap:
869
- 1. Derive phases from requirements (don't impose structure)
870
- 2. Map every v1 requirement to exactly one phase
871
- 3. Derive 2-5 success criteria per phase (observable user behaviors)
872
- Use the milestone version from <milestone> when writing STATE.md frontmatter and ROADMAP.md headings.
873
- 4. Validate 100% coverage
874
- 5. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
875
- 6. Return ROADMAP CREATED with summary
876
-
877
- Write files first, then return. This ensures artifacts persist even if context is lost.
878
- </instructions>
879
- ", subagent_type="dgs-roadmapper", model="{roadmapper_model}", description="Create roadmap")
880
- ```
881
-
882
- **Handle roadmapper return:**
883
-
884
- **If `## ROADMAP BLOCKED`:**
885
- - Present blocker information
886
- - Work with user to resolve
887
- - Re-spawn when resolved
888
-
889
- **If `## ROADMAP CREATED`:**
890
-
891
- Read the created ROADMAP.md and present it nicely inline:
892
-
893
- ```
894
- ---
895
-
896
- ## Proposed Roadmap
897
-
898
- **[N] phases** | **[X] requirements mapped** | All v1 requirements covered ✓
899
-
900
- | # | Phase | Goal | Requirements | Success Criteria |
901
- |---|-------|------|--------------|------------------|
902
- | 1 | [Name] | [Goal] | [REQ-IDs] | [count] |
903
- | 2 | [Name] | [Goal] | [REQ-IDs] | [count] |
904
- | 3 | [Name] | [Goal] | [REQ-IDs] | [count] |
905
- ...
906
-
907
- ### Phase Details
908
-
909
- **Phase 1: [Name]**
910
- Goal: [goal]
911
- Requirements: [REQ-IDs]
912
- Success criteria:
913
- 1. [criterion]
914
- 2. [criterion]
915
- 3. [criterion]
916
-
917
- **Phase 2: [Name]**
918
- Goal: [goal]
919
- Requirements: [REQ-IDs]
920
- Success criteria:
921
- 1. [criterion]
922
- 2. [criterion]
923
-
924
- [... continue for all phases ...]
925
-
926
- ---
927
- ```
928
-
929
- **If auto mode:** Skip approval gate — auto-approve and commit directly.
930
-
931
- **CRITICAL: Ask for approval before committing (interactive mode only):**
932
-
933
- Use AskUserQuestion:
934
- - header: "Roadmap"
935
- - question: "Does this roadmap structure work for you?"
936
- - options:
937
- - "Approve" — Commit and continue
938
- - "Adjust phases" — Tell me what to change
939
- - "Review full file" — Show raw ROADMAP.md
940
-
941
- **If "Approve":** Continue to commit.
942
-
943
- **If "Adjust phases":**
944
- - Get user's adjustment notes
945
- - Re-spawn roadmapper with revision context:
946
- ```
947
- Task(prompt="
948
- <revision>
949
- User feedback on roadmap:
950
- [user's notes]
951
-
952
- <files_to_read>
953
- - ${roadmap_path} (Current roadmap to revise)
954
- </files_to_read>
955
-
956
- Update the roadmap based on feedback. Edit files in place.
957
- Return ROADMAP REVISED with changes made.
958
- </revision>
959
- ", subagent_type="dgs-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
960
- ```
961
- - Present revised roadmap
962
- - Loop until user approves
963
-
964
- **If "Review full file":** Display raw `cat ${roadmap_path}`, then re-ask.
965
-
966
- **Commit roadmap (after approval or auto mode):**
967
-
968
- ```bash
969
- node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: create roadmap ([N] phases)" --push --files ${roadmap_path} ${state_path} ${requirements_path}
970
- ```
971
-
972
- ### Link Spec to Milestone (spec-driven mode only)
973
-
974
- If this project was created from a spec (spec-driven auto mode), update the spec's milestones frontmatter to record the bidirectional link:
975
-
976
- ```bash
977
- node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs specs link-milestone --id "$SPEC_ID" --milestone "v1.0"
978
- ```
979
-
980
- Include the updated spec file in a commit:
981
-
982
- ```bash
983
- node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "specs: link $SPEC_ID to v1.0" --push --files $SPEC_PATH
984
- ```
985
-
986
- ## 8.5. Overlap Check (v2 only)
987
-
988
- If v2 install (PROJECTS.md or REPOS.md exists in the planning root):
989
-
990
- ```bash
991
- OVERLAP=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs overlap check --raw 2>/dev/null)
992
- ```
993
-
994
- Parse JSON. If `overlapping_repos` array is non-empty, display warning:
995
-
996
- ```
997
- ⚠ Cross-project overlap detected:
998
-
999
- | Repo | Also touched by |
1000
- |------|----------------|
1001
- | {repo} | {other-project} |
1002
-
1003
- This is informational — work can proceed.
1004
- ```
1005
-
1006
- If no overlaps or not v2: skip silently.
1007
-
1008
- ## 9. Done
405
+ ## 5. Done
1009
406
 
1010
407
  Present completion summary:
1011
408
 
1012
409
  ```
1013
410
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1014
- DGS ► PROJECT INITIALIZED
411
+ DGS ► PROJECT CREATED
1015
412
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1016
413
 
1017
414
  **[Project Name]**
@@ -1019,60 +416,24 @@ Present completion summary:
1019
416
  | Artifact | Location |
1020
417
  |----------------|-----------------------------|
1021
418
  | Project | `${project_path}` |
1022
- | Config | `${config_path}` |
1023
- | Research | `${research_dir}/` |
1024
- | Requirements | `${requirements_path}` |
1025
- | Roadmap | `${roadmap_path}` |
1026
419
 
1027
- **[N] phases** | **[X] requirements** | Ready to build ✓
1028
- ```
420
+ ## Next Up
1029
421
 
1030
- **If spec-driven mode**, add to the summary table:
422
+ **Start your first milestone:**
1031
423
 
1032
- ```
1033
- **Source:** `[spec path]`
1034
- **Created from spec:** {spec_id} — "{spec_title}"
1035
- ```
424
+ `/dgs:new-milestone`
1036
425
 
1037
- **If auto mode (spec-driven):**
1038
-
1039
- ```
1040
- **Created from spec:** {spec_id} — "{spec_title}"
1041
-
1042
- ╔══════════════════════════════════════════╗
1043
- ║ AUTO-ADVANCING → DISCUSS PHASE 1 ║
1044
- ╚══════════════════════════════════════════╝
1045
- ```
1046
-
1047
- **If auto mode (idea-driven):**
1048
-
1049
- ```
1050
- ╔══════════════════════════════════════════╗
1051
- ║ AUTO-ADVANCING → DISCUSS PHASE 1 ║
1052
- ╚══════════════════════════════════════════╝
426
+ <sub>`/clear` first - fresh context window</sub>
1053
427
  ```
1054
428
 
1055
- Exit skill and invoke SlashCommand("/dgs:discuss-phase 1 --auto")
1056
-
1057
- **If interactive mode:**
429
+ **If spec-driven mode**, add:
1058
430
 
1059
431
  ```
1060
- ───────────────────────────────────────────────────────────────
1061
-
1062
- ## ▶ Next Up
1063
-
1064
- **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1065
-
1066
- /dgs:discuss-phase 1 — gather context and clarify approach
1067
-
1068
- <sub>/clear first → fresh context window</sub>
1069
-
1070
- ---
432
+ **Created from spec:** {spec_id} -- "{spec_title}"
1071
433
 
1072
- **Also available:**
1073
- - /dgs:plan-phase 1 — skip discussion, plan directly
434
+ **Start first milestone from this spec:**
1074
435
 
1075
- ───────────────────────────────────────────────────────────────
436
+ `/dgs:new-milestone --auto <spec-id>`
1076
437
  ```
1077
438
 
1078
439
  </process>
@@ -1080,16 +441,7 @@ Exit skill and invoke SlashCommand("/dgs:discuss-phase 1 --auto")
1080
441
  <output>
1081
442
 
1082
443
  - `${project_path}`
1083
- - `${config_path}`
1084
- - `${research_dir}/` (if research selected)
1085
- - `STACK.md`
1086
- - `FEATURES.md`
1087
- - `ARCHITECTURE.md`
1088
- - `PITFALLS.md`
1089
- - `SUMMARY.md`
1090
- - `${requirements_path}`
1091
- - `${roadmap_path}`
1092
- - `${state_path}`
444
+ - `${config_path}` (from init-product, not created here)
1093
445
 
1094
446
  </output>
1095
447
 
@@ -1099,20 +451,9 @@ Exit skill and invoke SlashCommand("/dgs:discuss-phase 1 --auto")
1099
451
  - [ ] Git repo initialized
1100
452
  - [ ] Brownfield detection completed
1101
453
  - [ ] Deep questioning completed (threads followed, not rushed)
1102
- - [ ] PROJECT.md captures full context **committed**
1103
- - [ ] Product config validated (mode, depth, workflow settings from init-product)
1104
- - [ ] Research completed (if selected) 4 parallel agents spawned → **committed**
1105
- - [ ] Requirements gathered (from research or conversation)
1106
- - [ ] User scoped each category (v1/v2/out of scope)
1107
- - [ ] REQUIREMENTS.md created with REQ-IDs → **committed**
1108
- - [ ] dgs-roadmapper spawned with context
1109
- - [ ] Roadmap files written immediately (not draft)
1110
- - [ ] User feedback incorporated (if any)
1111
- - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
1112
- - [ ] STATE.md initialized
1113
- - [ ] REQUIREMENTS.md traceability updated
1114
- - [ ] Spec-driven mode: spec milestones field updated with link-milestone call
1115
- - [ ] User knows next step is `/dgs:discuss-phase 1`
454
+ - [ ] PROJECT.md captures full context -- **committed**
455
+ - [ ] Product config validated
456
+ - [ ] User knows next step is `/dgs:new-milestone`
1116
457
 
1117
458
  **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
1118
459