projecta-rrr 1.16.4 → 1.16.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,49 @@ All notable changes to RRR will be documented in this file.
4
4
 
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [1.16.6] - 2026-01-28
8
+
9
+ ### Added
10
+ - **Proactive Progress Routing** - Enhanced `/rrr:progress` to ask clarifying questions:
11
+ - **Route C** (phase complete): Asks "Continue to next phase?", "Discuss first?", or "Different work?"
12
+ - **Route F.1** (between milestones with context): Asks "Create milestone now?", "Discuss more?", or "Quick fix?"
13
+ - **Route F.2** (between milestones no context): Asks about work scope (quick fix, new feature, new milestone)
14
+ - Routes based on user intent, not just sequential progression
15
+
16
+ ### Changed
17
+ - **Progress command now uses AskUserQuestion** for all decision points instead of just presenting options
18
+ - Clearer guidance for Patch vs Phase vs Milestone decisions at milestone boundaries
19
+
20
+ ## [1.16.5] - 2026-01-28
21
+
22
+ ### Fixed
23
+ - **Verify-Work UAT Workflow Path** - Fixed workflow file loading for UAT mode:
24
+ - Changed from relative path (`rrr/workflows/verify-work.md`) to `@` reference (`@rrr/workflows/verify-work.md`)
25
+ - Workflow now loads correctly from RRR framework (`~/.claude/rrr/workflows/verify-work.md`)
26
+ - **Milestone-Level UAT Support** - Added comprehensive milestone support:
27
+ - Detects milestone targets (`v1.2`, `v2.0`) and finds all phases in that milestone
28
+ - Creates UAT file at `.planning/milestones/{milestone}/phases/{milestone}-UAT.md`
29
+ - Updates frontmatter with `target_type` (phase/milestone) and `target`
30
+ - Fixed commit message generation for milestone-level UAT
31
+ - **PHASE_ARG Variable Propagation** - Added export of `PHASE_ARG` for workflow consumption
32
+ - **SUMMARY Path Detection** - Fixed test type detection to search both old and new directory structures
33
+ - **UAT File Discovery** - Updated active session detection to search `.planning/` recursively
34
+
35
+ ### Added
36
+ - **Project State Decision Tree** - New reference document at `rrr/references/project-state-flow.md`:
37
+ - Visual state machine diagram showing all project states and transitions
38
+ - Decision tables for each state (Between Milestones, Active Milestone, Active Phase, Phase Complete, Milestone Complete)
39
+ - Quick reference: which command to use for each scenario
40
+ - Patch vs Phase vs Milestone comparison guide
41
+ - Decimal phase semantics explained
42
+
43
+ ### Changed
44
+ - **Proactive Progress Routing** - Enhanced `/rrr:progress` command to ask clarifying questions:
45
+ - **Route C** (phase complete): Asks "Continue to next phase?", "Discuss first?", or "Different work?"
46
+ - **Route F.1** (between milestones with context): Asks "Create milestone now?", "Discuss more?", or "Quick fix?"
47
+ - **Route F.2** (between milestones no context): Asks about work scope (quick fix, new feature, new initiative)
48
+ - Clear routing based on user intent rather than assuming sequential progression
49
+
7
50
  ## [1.16.4] - 2026-01-27
8
51
 
9
52
  ### Fixed
@@ -461,20 +461,60 @@ Include audit summary in output (if run).
461
461
 
462
462
  Full report: .planning/artifacts/VERIFY_WORK_AUDIT.md
463
463
 
464
- ## ▶ Next Up
464
+ <AskUserQuestion>
465
+ <questions>
466
+ [
467
+ {
468
+ "question": "Phase {Z} is complete. What's next?",
469
+ "header": "Next",
470
+ "options": [
471
+ {
472
+ "label": "Continue to Phase {Z+1}",
473
+ "description": "Execute next phase in current milestone"
474
+ },
475
+ {
476
+ "label": "Discuss Phase {Z+1} first",
477
+ "description": "Gather context before planning (recommended for UI/UX)"
478
+ },
479
+ {
480
+ "label": "Actually, different work",
481
+ "description": "Maybe a patch, or skip to another phase?"
482
+ }
483
+ ]
484
+ }
485
+ ]
486
+ </questions>
487
+ </AskUserQuestion>
465
488
 
466
- **Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
489
+ ---
467
490
 
468
- `/rrr:plan-phase {Z+1}`
491
+ **Based on response:**
469
492
 
470
- <sub>`/clear` first fresh context window</sub>
493
+ | Response | Action | Command |
494
+ |----------|--------|---------|
495
+ | Continue to Phase {Z+1} | Plan and execute | `/rrr:plan-phase {Z+1}` |
496
+ | Discuss first | Gather context | `/rrr:discuss-phase {Z+1}` |
497
+ | Different work | Clarify intent | Present options (patch, skip phase, complete milestone) |
498
+
499
+ **For "Actually, different work" response:**
500
+ ```
501
+ ## → What would you like to work on instead?
502
+
503
+ **Options:**
504
+
505
+ 1. **Quick fix/patch** — `/rrr:insert-phase` as decimal (e.g., {Z}.1)
506
+ 2. **Skip to different phase** — `/rrr:execute-phase {XX}`
507
+ 3. **Complete milestone** — All remaining phases done? `/rrr:complete-milestone`
508
+ 4. **Different scope entirely** — Between milestones? `/rrr:discuss-milestone`
509
+
510
+ What type of work did you have in mind?
511
+ ```
471
512
 
472
513
  ---
473
514
 
474
515
  **Also available:**
475
516
  - `/rrr:verify-work --uat {Z}` — user acceptance test before continuing
476
517
  - `/rrr:verify-work --audit` — full implementation audit
477
- - `/rrr:discuss-phase {Z+1}` — gather context first
478
518
 
479
519
  ---
480
520
  ```
@@ -560,19 +600,40 @@ Key features from discussion:
560
600
  - [feature 2]
561
601
  - [feature 3]
562
602
 
563
- ## ▶ Next Up
564
-
565
- **Create the milestone** — formalize what you discussed
566
-
567
- `/rrr:new-milestone`
568
-
569
- <sub>`/clear` first → fresh context window</sub>
603
+ <AskUserQuestion>
604
+ <questions>
605
+ [
606
+ {
607
+ "question": "Ready to formalize this milestone, or want to discuss more?",
608
+ "header": "Milestone",
609
+ "options": [
610
+ {
611
+ "label": "Create milestone now",
612
+ "description": "Formalize vX.(Y+1) with requirements and roadmap"
613
+ },
614
+ {
615
+ "label": "Discuss more first",
616
+ "description": "Continue the discussion, add more context"
617
+ },
618
+ {
619
+ "label": "Actually, it's a quick fix",
620
+ "description": "This is just a patch, not a new milestone"
621
+ }
622
+ ]
623
+ }
624
+ ]
625
+ </questions>
626
+ </AskUserQuestion>
570
627
 
571
628
  ---
572
629
 
573
- **Also available:**
574
- - `/rrr:discuss-milestone` — continue the discussion
575
- - `/rrr:verify-work --audit` audit completed work
630
+ **Based on response:**
631
+
632
+ | Response | Action | Command |
633
+ |----------|--------|---------|
634
+ | Create milestone now | Formalize vX.(Y+1) | `/rrr:new-milestone` |
635
+ | Discuss more | Continue discussion | `/rrr:discuss-milestone` |
636
+ | Quick fix | Create patch | `/rrr:insert-phase` (decimal) |
576
637
 
577
638
  ---
578
639
  ```
@@ -612,29 +673,99 @@ Full report: .planning/artifacts/VERIFY_WORK_AUDIT.md
612
673
 
613
674
  ---
614
675
 
615
- ## What's Next?
676
+ ## What would you like to do next?
616
677
 
617
- **Choose based on scope of work:**
678
+ <AskUserQuestion>
679
+ <questions>
680
+ [
681
+ {
682
+ "question": "What's the scope of your next piece of work?",
683
+ "header": "Scope",
684
+ "options": [
685
+ {
686
+ "label": "Quick fix/hotfix",
687
+ "description": "Bug fix, small tweak, or one-line change → Creates a PATCH (vX.Y.1)"
688
+ },
689
+ {
690
+ "label": "New feature (current milestone)",
691
+ "description": "Fits current milestone scope → Creates a new PHASE in vX.Y"
692
+ },
693
+ {
694
+ "label": "New initiative (new milestone)",
695
+ "description": "New scope, capabilities, or requirements → Creates MILESTONE vX.(Y+1)"
696
+ }
697
+ ]
698
+ }
699
+ ]
700
+ </questions>
701
+ </AskUserQuestion>
618
702
 
619
- ### Small Work → Track as Patch
620
- Bugs, hotfixes, small improvements belong in v{X.Y} as patches.
621
- - Document in `.planning/milestones/v{X.Y}/PATCHES.md`
622
- - Commit with `fix:` or `chore:` prefix
623
- - Bump patch version (v{X.Y}.1, v{X.Y}.2, etc.)
624
- - No formal phase/plan needed
703
+ ---
625
704
 
626
- ### Larger Scope Start New Milestone
627
- Features, multi-file changes, new capabilities need proper planning.
705
+ **Based on response, route accordingly:**
628
706
 
629
- ---
707
+ | Response | Action | Command |
708
+ |----------|--------|---------|
709
+ | Quick fix/hotfix | Create decimal phase as patch | `/rrr:insert-phase` (decimal like 9.1) |
710
+ | New feature | Add phase to current milestone | `/rrr:add-phase` |
711
+ | New initiative | Discuss and create milestone | `/rrr:discuss-milestone` |
630
712
 
631
- ## Next Up (for new milestone)
713
+ **For "Quick fix/hotfix" response:**
714
+ ```
715
+ ## → Creating a Patch (v{X.Y}.1)
632
716
 
633
- **Discuss what to build next** thinking partner for next milestone
717
+ Quick fixes don't need full phase/plan structure.
634
718
 
635
- `/rrr:discuss-milestone`
719
+ **To create a patch:**
720
+ 1. `/rrr:insert-phase` — I'll insert as decimal phase (e.g., {current_phase}.1)
721
+ 2. This creates a minimal phase directory for tracking
722
+ 3. Or simply commit directly with `fix:` prefix — patches are documented in PATCHES.md
636
723
 
637
- <sub>`/clear` first fresh context window</sub>
724
+ **Patch vs Phase Decision Guide:**
725
+ - Patch: Hours of work, 1-2 files changed, bug fix
726
+ - Phase: Days of work, multiple files, feature addition
727
+
728
+ Want me to create a decimal phase for this patch?
729
+ ```
730
+
731
+ **For "New feature (current milestone)" response:**
732
+ ```
733
+ ## → Adding Phase to v{X.Y}
734
+
735
+ **Current phases in v{X.Y}:**
736
+ - [list phases from ROADMAP.md]
737
+
738
+ **To add a new phase:**
739
+ `/rrr:add-phase` — I'll ask for phase number and description
740
+
741
+ **Phase Naming:**
742
+ - Next sequential: {next_phase_num}
743
+ - Or specify custom number
744
+
745
+ Ready to add the phase?
746
+ ```
747
+
748
+ **For "New initiative (new milestone)" response:**
749
+ ```
750
+ ## → Starting New Milestone v{X.(Y+1)}
751
+
752
+ **To begin a new milestone:**
753
+
754
+ 1. **Discuss first** (recommended): `/rrr:discuss-milestone`
755
+ - Thinking partner for next scope
756
+ - Creates MILESTONE-CONTEXT.md with decisions
757
+ - Then `/rrr:new-milestone` formalizes it
758
+
759
+ 2. **Skip discussion**: `/rrr:new-milestone`
760
+ - Directly creates milestone structure
761
+ - Less context gathered upfront
762
+
763
+ **New Milestone vs Patch Decision Guide:**
764
+ - New Milestone: New capabilities, integrations, multi-sprint work
765
+ - Patch: Quick fixes, small improvements, bug fixes
766
+
767
+ How would you like to proceed?
768
+ ```
638
769
 
639
770
  ---
640
771
 
@@ -86,6 +86,14 @@ Validate built features through **audit mode by default**, or interactive UAT wi
86
86
  hasAuditFlag = $ARGUMENTS contains "--audit"
87
87
  hasUatFlag = $ARGUMENTS contains "--uat"
88
88
  target = $ARGUMENTS with flags removed (e.g., "05", "v1.9", or empty)
89
+
90
+ # Set PHASE_ARG for workflow consumption (UAT mode needs this)
91
+ if [ -n "$target" ]; then
92
+ PHASE_ARG="$target"
93
+ else
94
+ PHASE_ARG=""
95
+ fi
96
+ export PHASE_ARG
89
97
  ```
90
98
 
91
99
  **Step 2: Route and explain selection**
@@ -98,6 +106,7 @@ target = $ARGUMENTS with flags removed (e.g., "05", "v1.9", or empty)
98
106
  **If --uat is present:**
99
107
  1. Execute the `<uat_mode>` section below
100
108
  2. This loads the workflow file which runs component tests then UAT
109
+ 3. The workflow uses `$PHASE_ARG` to find summaries
101
110
 
102
111
  **If --audit is present OR no flags:**
103
112
  1. Execute the `<audit_mode>` section below (DEFAULT)
@@ -331,9 +340,9 @@ Purpose: Component tests → Zeroshot/Manual user acceptance testing
331
340
  For quick evidence check, use: /rrr:verify-work --audit
332
341
  ```
333
342
 
334
- **Load the workflow to run UAT:**
343
+ **Load the UAT workflow:**
335
344
 
336
- Read the file at: `rrr/workflows/verify-work.md`
345
+ @rrr/workflows/verify-work.md
337
346
 
338
347
  The workflow contains the full UAT process including:
339
348
  1. **Component tests** — Runs vitest --browser if configured
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projecta-rrr",
3
- "version": "1.16.4",
3
+ "version": "1.16.6",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code by Projecta.ai",
5
5
  "bin": {
6
6
  "projecta-rrr": "bin/install.js"
@@ -0,0 +1,208 @@
1
+ # Project State Decision Tree
2
+
3
+ Comprehensive decision guide for all project states and transitions in RRR.
4
+
5
+ ## State Diagram
6
+
7
+ ```
8
+ ┌─────────────────────────────────────────────────────────────────────────────┐
9
+ │ RRR PROJECT STATE MACHINE │
10
+ └─────────────────────────────────────────────────────────────────────────────┘
11
+
12
+ ┌─────────────────┐
13
+ │ START/NEW │
14
+ │ PROJECT │
15
+ └────────┬────────┘
16
+
17
+
18
+ ┌──────────────────────────────────┐
19
+ │ Between Milestones │
20
+ │ Milestone: Between milestones │
21
+ │ Phase: N/A │
22
+ └──────────┬───────────────────────┘
23
+
24
+ ┌──────────────────┼──────────────────┐
25
+ │ │ │
26
+ ▼ ▼ ▼
27
+ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐
28
+ │ Discuss │ │ Quick Fix │ │ Skip Discussion │
29
+ │ Milestone │ │ (Patch) │ │ Direct Milestone │
30
+ └──────┬───────┘ └──────┬───────┘ └────────┬─────────┘
31
+ │ │ │
32
+ ▼ ▼ ▼
33
+ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐
34
+ │ New Milestone│ │ Add Decimal │ │ New Milestone │
35
+ │ vX.(Y+1) │ │ Phase (9.1) │ │ vX.(Y+1) │
36
+ └──────┬───────┘ └──────┬───────┘ └────────┬─────────┘
37
+ │ │ │
38
+ └─────────────────┼────────────────────┘
39
+
40
+ ┌──────────────────┐
41
+ │ Active │
42
+ │ Milestone │
43
+ │ vX.Y │
44
+ └────────┬─────────┘
45
+
46
+ ┌──────────────┼──────────────┐
47
+ │ │ │
48
+ ▼ ▼ ▼
49
+ ┌────────────┐ ┌────────────┐ ┌──────────────────┐
50
+ │ Add Phase │ │ Execute │ │ Complete │
51
+ │ (X+1) │ │ Phase │ │ Milestone │
52
+ └──────┬─────┘ └─────┬──────┘ └────────┬─────────┘
53
+ │ │ │
54
+ │ ▼ │
55
+ │ ┌──────────────────┐ │
56
+ │ │ Active Phase │ │
57
+ │ │ XX-name │ │
58
+ │ └────────┬─────────┘ │
59
+ │ │ │
60
+ │ ┌────────┼────────┐ │
61
+ │ │ │ │ │
62
+ │ ▼ ▼ ▼ │
63
+ │ ┌──────┐ ┌──────┐ ┌───────┐ │
64
+ │ │ Add │ │ Pause │ │ Next │ │
65
+ │ │Sub │ │/Defer │ │ Phase │ │
66
+ │ │Phase │ │ │ │ │ │
67
+ │ └──┬───┘ └──┬───┘ └───┬───┘ │
68
+ │ │ │ │ │
69
+ │ ▼ ▼ ▼ │
70
+ │ ┌─────────────────────┐ │
71
+ └────│ Phase Complete │◄───┘
72
+ │ (SUMMARY.md exists)│
73
+ └──────────┬──────────┘
74
+
75
+ ┌──────────────┼──────────────┐
76
+ │ │ │
77
+ ▼ ▼ ▼
78
+ ┌────────────┐ ┌────────────┐ ┌──────────────────┐
79
+ │ Next Phase │ │ Different │ │ Complete │
80
+ │ (X+1) │ │ Phase │ │ Milestone │
81
+ └──────┬─────┘ └─────┬──────┘ └────────┬─────────┘
82
+ │ │ │
83
+ │ └────────┬────────┘
84
+ │ │
85
+ └──────────────────────┘
86
+
87
+
88
+ ┌──────────────────────┐
89
+ │ Milestone Complete │
90
+ │ All phases done │
91
+ └──────────┬───────────┘
92
+
93
+
94
+ ┌──────────────────────┐
95
+ │ Between Milestones │
96
+ └──────────────────────┘
97
+ ```
98
+
99
+ ## State Definitions
100
+
101
+ | State | Trigger | Exit Condition | Next States |
102
+ |-------|---------|----------------|-------------|
103
+ | **Between Milestones** | Milestone completion | User starts new work | Active Milestone, Patch Phase |
104
+ | **Active Milestone** | New milestone created | All phases complete | Milestone Complete |
105
+ | **Active Phase** | Phase execution starts | SUMMARY.md written | Phase Complete |
106
+ | **Phase Complete** | Phase finishes | User continues | Next Phase, Different Phase, Complete Milestone |
107
+ | **Milestone Complete** | All phases done | User starts new | Between Milestones |
108
+
109
+ ## Decision Trees by Current State
110
+
111
+ ### 1. From "Between Milestones"
112
+
113
+ **Question:** "What do you want to work on?"
114
+
115
+ | Answer | Classification | Action | Command |
116
+ |--------|---------------|--------|---------|
117
+ | "New feature/initiative" | New Scope | Create milestone vX.(Y+1) | `/rrr:discuss-milestone` |
118
+ | "Bug fix / small change" | Patch | Create decimal phase (e.g., 9.1) | `/rrr:insert-phase` |
119
+ | "Already know what I want" | Direct | Skip discussion, create milestone | `/rrr:new-milestone` |
120
+ | "Not sure" | Uncertain | Offer discussion options | `/rrr:discuss-milestone` |
121
+
122
+ ### 2. From "Active Milestone"
123
+
124
+ **Question:** "What's next for this milestone?"
125
+
126
+ | Answer | Classification | Action | Command |
127
+ |--------|---------------|--------|---------|
128
+ | "Continue current phase" | Continue | Execute phase in STATE.md | `/rrr:execute-phase` |
129
+ | "Add new phase" | Expand | Create phase in current milestone | `/rrr:add-phase` |
130
+ | "Finish milestone" | Complete | Audit → Complete milestone | `/rrr:complete-milestone` |
131
+ | "Move to next milestone" | Defer | Complete current, start new | `/rrr:complete-milestone` |
132
+
133
+ ### 3. From "Active Phase"
134
+
135
+ **Question:** "What do you want to do with this phase?"
136
+
137
+ | Answer | Classification | Action | Command |
138
+ |--------|---------------|--------|---------|
139
+ | "Keep working" | Continue | Resume execution | `/rrr:execute-phase` |
140
+ | "Add sub-work" | Expand | Decimal phase (e.g., 5.1) | `/rrr:insert-phase` |
141
+ | "Pause/defer" | Pause | Set Phase: N/A in STATE.md | Edit STATE.md |
142
+ | "Done early" | Complete | Write SUMMARY.md | `/rrr:execute-phase` → checkpoint |
143
+
144
+ ### 4. From "Phase Complete"
145
+
146
+ **Question:** "Where to next?"
147
+
148
+ | Answer | Classification | Action | Command |
149
+ |--------|---------------|--------|---------|
150
+ | "Next numbered phase" | Sequential | Execute X+1 | `/rrr:execute-phase` |
151
+ | "Different phase" | Non-sequential | Execute specific phase | `/rrr:execute-phase XX` |
152
+ | "Finish milestone" | Milestone | Complete milestone | `/rrr:complete-milestone` |
153
+
154
+ ### 5. From "Milestone Complete"
155
+
156
+ **Question:** "What's next?"
157
+
158
+ | Answer | Classification | Action | Command |
159
+ |--------|---------------|--------|---------|
160
+ | "New milestone" | New Scope | Create vX.(Y+1) | `/rrr:discuss-milestone` |
161
+ | "Quick fix" | Patch | Decimal phase (9.1) | `/rrr:insert-phase` |
162
+ | "Just checking" | Idle | Stay between milestones | No action |
163
+
164
+ ## Quick Reference: Which Command?
165
+
166
+ | Scenario | Command |
167
+ |----------|---------|
168
+ | Start fresh project | `/rrr:new-project` |
169
+ | Discuss next milestone | `/rrr:discuss-milestone` |
170
+ | Create milestone directly | `/rrr:new-milestone` |
171
+ | Add phase to current milestone | `/rrr:add-phase` |
172
+ | Insert between phases (or patch) | `/rrr:insert-phase` |
173
+ | Execute current phase | `/rrr:execute-phase` |
174
+ | Execute specific phase | `/rrr:execute-phase XX` |
175
+ | Check milestone readiness | `/rrr:audit-milestone` |
176
+ | Archive milestone | `/rrr:complete-milestone` |
177
+ | Check current state | `/rrr:progress` |
178
+
179
+ ## Decimal Phase Semantics
180
+
181
+ | Phase Number | Meaning | Use Case |
182
+ |--------------|---------|----------|
183
+ | `05` | Main phase | Standard milestone phase |
184
+ | `05.1` | First patch | Bug fix after milestone complete |
185
+ | `05.2` | Second patch | Additional quick fix |
186
+ | `05.01` | Sub-phase | Work within a phase (less common) |
187
+
188
+ ## Patch vs Phase vs Milestone
189
+
190
+ | Type | Version | Scope | Duration | When to Use |
191
+ |------|---------|-------|----------|-------------|
192
+ | **Patch** | vX.Y.1 | 1-2 files | Hours | Bug fixes, small tweaks |
193
+ | **Phase** | vX.(Y+1) | 1-3 plans | Days | Feature additions, refactors |
194
+ | **Milestone** | vX.(Y+1) | Multiple phases | Weeks | New capabilities, integrations |
195
+
196
+ ## Error Recovery
197
+
198
+ | Problem | Solution |
199
+ |---------|----------|
200
+ | Stuck in wrong state | Edit STATE.md directly |
201
+ | Phases in wrong location | `/rrr:doctor --phases` → cleanup |
202
+ | Missing milestone marker | Create ROADMAP.md with current milestone |
203
+ | Orphaned phases | `/rrr:migrate-phases` |
204
+
205
+ ---
206
+
207
+ *Reference: rrr/workflows/progress.md*
208
+ *Version: 1.0*
@@ -237,7 +237,8 @@ Based on what's available, calculate the recommended mode:
237
237
 
238
238
  ```bash
239
239
  # Check SUMMARY.md content to determine test type
240
- SUMMARY_CONTENT=$(cat .planning/phases/*/phases/*-SUMMARY.md 2>/dev/null | head -100)
240
+ # Search in both old (.planning/phases/*/) and new (.planning/milestones/*/phases/*/) structures
241
+ SUMMARY_CONTENT=$(cat .planning/phases/*/*-SUMMARY.md .planning/milestones/*/phases/*/*-SUMMARY.md 2>/dev/null | head -100)
241
242
 
242
243
  if echo "$SUMMARY_CONTENT" | grep -qiE "(ui|page|screen|button|form|input|click|navigation|redirect|layout|visual|interface)"; then
243
244
  TEST_TYPE="WEB_UI"
@@ -306,34 +307,35 @@ Proceed to `check_active_session`.
306
307
  **First: Check for active UAT sessions**
307
308
 
308
309
  ```bash
309
- find .planning/phases -name "*-UAT.md" -type f 2>/dev/null | head -5
310
+ # Search for UAT files in both old (.planning/phases/) and new (.planning/milestones/*/phases/) structures
311
+ UAT_FILES=$(find .planning -name "*-UAT.md" -type f 2>/dev/null | head -10)
310
312
  ```
311
313
 
312
314
  **If active sessions exist AND no $ARGUMENTS provided:**
313
315
 
314
- Read each file's frontmatter (status, phase) and Current Test section.
316
+ Read each file's frontmatter (status, target, target_type) and Current Test section.
315
317
 
316
318
  Display inline:
317
319
 
318
320
  ```
319
321
  ## Active UAT Sessions
320
322
 
321
- | # | Phase | Status | Current Test | Progress |
322
- |---|-------|--------|--------------|----------|
323
- | 1 | 04-comments | testing | 3. Reply to Comment | 2/6 |
324
- | 2 | 05-auth | testing | 1. Login Form | 0/4 |
323
+ | # | Target | Type | Status | Current Test | Progress |
324
+ |---|--------|------|--------|--------------|----------|
325
+ | 1 | 04-comments | phase | testing | 3. Reply to Comment | 2/6 |
326
+ | 2 | v1.2 | milestone | testing | 1. Login Form | 0/4 |
325
327
 
326
- Reply with a number to resume, or provide a phase number to start new.
328
+ Reply with a number to resume, or provide a target to start new.
327
329
  ```
328
330
 
329
331
  Wait for user response.
330
332
 
331
333
  - If user replies with number (1, 2) → Load that file, go to `resume_from_file`
332
- - If user replies with phase number → Treat as new session, go to `create_uat_file`
334
+ - If user replies with phase number or milestone → Treat as new session, go to `create_uat_file`
333
335
 
334
336
  **If active sessions exist AND $ARGUMENTS provided:**
335
337
 
336
- Check if session exists for that phase. If yes, offer to resume or restart.
338
+ Check if session exists for that target (phase or milestone). If yes, offer to resume or restart.
337
339
  If no, continue to `create_uat_file`.
338
340
 
339
341
  **If no active sessions AND no $ARGUMENTS:**
@@ -341,7 +343,7 @@ If no, continue to `create_uat_file`.
341
343
  ```
342
344
  No active UAT sessions.
343
345
 
344
- Provide a phase number to start testing (e.g., /rrr:verify-work 4)
346
+ Provide a phase number (e.g., 4) or milestone (e.g., v1.2) to start testing:
345
347
  ```
346
348
 
347
349
  **If no active sessions AND $ARGUMENTS provided:**
@@ -352,15 +354,32 @@ Continue to `create_uat_file`.
352
354
  <step name="find_summaries">
353
355
  **Find what to test:**
354
356
 
355
- Parse $ARGUMENTS as phase number (e.g., "4") or plan number (e.g., "04-02").
357
+ Parse $ARGUMENTS to determine scope:
356
358
 
357
- ```bash
358
- # Find phase directory
359
- # Find phase directory using phase-paths library (handles milestone-aware structure)
360
- PHASE_DIR=$(find_phase_dir "${PHASE_ARG}")
359
+ - **Phase number** (e.g., `4`, `05`, `05-auth`): Test that phase only
360
+ - **Milestone** (e.g., `v1.9`, `v2.0`): Test all phases in that milestone
361
+ - **Empty**: Use current milestone from ROADMAP.md
361
362
 
362
- # Find SUMMARY files
363
- ls "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null
363
+ ```bash
364
+ # Determine if target is a milestone (starts with 'v' followed by digits)
365
+ if [[ "$PHASE_ARG" =~ ^v[0-9]+\.[0-9]+$ ]]; then
366
+ # Milestone target - find all SUMMARY files in that milestone's phases
367
+ MILESTONE="$PHASE_ARG"
368
+ MILESTONE_DIR=".planning/milestones/${MILESTONE}/phases"
369
+ if [ -d "$MILESTONE_DIR" ]; then
370
+ find "$MILESTONE_DIR" -maxdepth 2 -name "*-SUMMARY.md" 2>/dev/null | sort
371
+ else
372
+ echo "ERROR: Milestone directory not found: $MILESTONE_DIR" >&2
373
+ fi
374
+ else
375
+ # Phase target - use find_phase_dir
376
+ PHASE_DIR=$(find_phase_dir "${PHASE_ARG}")
377
+ if [ -n "$PHASE_DIR" ]; then
378
+ ls "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null
379
+ else
380
+ echo "ERROR: Phase directory not found for: $PHASE_ARG" >&2
381
+ fi
382
+ fi
364
383
  ```
365
384
 
366
385
  Read each SUMMARY.md to extract testable deliverables.
@@ -391,7 +410,21 @@ Skip internal/non-observable items (refactors, type changes, etc.).
391
410
  **Create UAT file with all tests:**
392
411
 
393
412
  ```bash
394
- mkdir -p "$PHASE_DIR"
413
+ # Determine if milestone target and set up output location
414
+ if [[ "$PHASE_ARG" =~ ^v[0-9]+\.[0-9]+$ ]]; then
415
+ # Milestone-level UAT - create in milestone's phases directory
416
+ MILESTONE="$PHASE_ARG"
417
+ MILESTONE_DIR=".planning/milestones/${MILESTONE}/phases"
418
+ mkdir -p "$MILESTONE_DIR"
419
+ UAT_FILE="$MILESTONE_DIR/${MILESTONE}-UAT.md"
420
+ TARGET_TYPE="milestone"
421
+ else
422
+ # Phase-level UAT - use existing phase directory
423
+ mkdir -p "$PHASE_DIR"
424
+ PHASE_NAME=$(basename "$PHASE_DIR")
425
+ UAT_FILE="$PHASE_DIR/${PHASE_NAME}-UAT.md"
426
+ TARGET_TYPE="phase"
427
+ fi
395
428
  ```
396
429
 
397
430
  Build test list from extracted deliverables.
@@ -401,7 +434,8 @@ Create file:
401
434
  ```markdown
402
435
  ---
403
436
  status: testing
404
- phase: XX-name
437
+ target_type: {TARGET_TYPE}
438
+ target: {PHASE_ARG}
405
439
  source: [list of SUMMARY.md files]
406
440
  started: [ISO timestamp]
407
441
  updated: [ISO timestamp]
@@ -441,7 +475,7 @@ skipped: 0
441
475
  [none yet]
442
476
  ```
443
477
 
444
- Write to `{phase_dir}/{phase}-UAT.md` (where phase_dir is from get_phase_dir)
478
+ Write to `$UAT_FILE`
445
479
 
446
480
  **Route based on testing mode:**
447
481
  - If `TESTING_MODE=qa-engineer` → Go to `run_qa_engineer_batch`
@@ -782,13 +816,19 @@ Clear Current Test section:
782
816
 
783
817
  Commit the UAT file:
784
818
  ```bash
785
- git add "{phase_dir}/{phase}-UAT.md"
786
- git commit -m "test({phase}): complete UAT - {passed} passed, {issues} issues"
819
+ # Use target from frontmatter (phase or milestone)
820
+ if [ "$TARGET_TYPE" = "milestone" ]; then
821
+ git add "$UAT_FILE"
822
+ git commit -m "test(${TARGET}): complete UAT - ${passed} passed, ${issues} issues"
823
+ else
824
+ git add "$UAT_FILE"
825
+ git commit -m "test(${TARGET}): complete UAT - ${passed} passed, ${issues} issues"
826
+ fi
787
827
  ```
788
828
 
789
829
  Present summary:
790
830
  ```
791
- ## UAT Complete: Phase {phase}
831
+ ## UAT Complete: {TARGET_TYPE} {TARGET}
792
832
 
793
833
  | Result | Count |
794
834
  |--------|-------|