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