projecta-rrr 1.16.5 → 1.16.7

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,7 +4,56 @@ 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.5] - 2026-01-27
7
+ ## [1.16.7] - 2026-01-28
8
+
9
+ ### Added
10
+ - **Memory System** (`rrr/lib/memory-store.js`) - Central library for tracking:
11
+ - Command history with intent extraction
12
+ - Current user intent persistence
13
+ - Decision log with rationale
14
+ - Drift detection (context drift, stale plans, decision conflicts)
15
+
16
+ - **Visual HUD** (`scripts/rrr-hud.js`) - ASCII progress display showing:
17
+ - Milestone progress bar with percentage
18
+ - Per-phase completion status
19
+ - Drift status (green/yellow/red)
20
+ - Current intent from memory
21
+
22
+ - **Proactive Guidance** (`scripts/rrr-memory/state-detector.js`) - State-aware suggestions:
23
+ - 4D state analysis (project, milestone, phase, action)
24
+ - `guidanceFor(command)` for 17 command scenarios
25
+ - Orphan phase detection and migration guidance
26
+
27
+ - **Memory-Enriched Preflight** (`scripts/handoff-preflight.js`) - Drift detection on handoff
28
+
29
+ ### Changed
30
+ - **Phase path resolution** (`rrr/lib/phase-paths.md`) - Fixed bug where phases were created outside milestones when no `:construction:` marker existed. Now errors if `.planning/milestones/` exists but no active milestone detected.
31
+
32
+ - **execute-plan** - Tracks intent before execution for drift detection
33
+
34
+ - **verify-work** - Shows memory context during verification
35
+
36
+ - **add-phase / insert-phase** - Validates no orphan phases exist before allowing new phase creation
37
+
38
+ - **Duplicate prevention** (`bin/install.js`, `scripts/doctor-rrr.js`) - Auto-cleans old quarantine directories (>7 days) to prevent duplicate command scanning
39
+
40
+ ### Fixed
41
+ - **Duplicate commands** - 282 command references reduced to 41 by cleaning old quarantines
42
+
43
+ ## [1.16.6] - 2026-01-28
44
+
45
+ ### Added
46
+ - **Proactive Progress Routing** - Enhanced `/rrr:progress` to ask clarifying questions:
47
+ - **Route C** (phase complete): Asks "Continue to next phase?", "Discuss first?", or "Different work?"
48
+ - **Route F.1** (between milestones with context): Asks "Create milestone now?", "Discuss more?", or "Quick fix?"
49
+ - **Route F.2** (between milestones no context): Asks about work scope (quick fix, new feature, new milestone)
50
+ - Routes based on user intent, not just sequential progression
51
+
52
+ ### Changed
53
+ - **Progress command now uses AskUserQuestion** for all decision points instead of just presenting options
54
+ - Clearer guidance for Patch vs Phase vs Milestone decisions at milestone boundaries
55
+
56
+ ## [1.16.5] - 2026-01-28
8
57
 
9
58
  ### Fixed
10
59
  - **Verify-Work UAT Workflow Path** - Fixed workflow file loading for UAT mode:
@@ -17,9 +66,57 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
17
66
  - Fixed commit message generation for milestone-level UAT
18
67
  - **PHASE_ARG Variable Propagation** - Added export of `PHASE_ARG` for workflow consumption
19
68
  - **SUMMARY Path Detection** - Fixed test type detection to search both old and new directory structures
20
- - **UAT File Discovery** - Updated active session detection to search `.planning/` recursively for both phase and milestone UAT files
69
+ - **UAT File Discovery** - Updated active session detection to search `.planning/` recursively
70
+
71
+ ### Added
72
+ - **Project State Decision Tree** - New reference document at `rrr/references/project-state-flow.md`:
73
+ - Visual state machine diagram showing all project states and transitions
74
+ - Decision tables for each state (Between Milestones, Active Milestone, Active Phase, Phase Complete, Milestone Complete)
75
+ - Quick reference: which command to use for each scenario
76
+ - Patch vs Phase vs Milestone comparison guide
77
+ - Decimal phase semantics explained
78
+
79
+ ### Changed
80
+ - **Proactive Progress Routing** - Enhanced `/rrr:progress` command to ask clarifying questions:
81
+ - **Route C** (phase complete): Asks "Continue to next phase?", "Discuss first?", or "Different work?"
82
+ - **Route F.1** (between milestones with context): Asks "Create milestone now?", "Discuss more?", or "Quick fix?"
83
+ - **Route F.2** (between milestones no context): Asks about work scope (quick fix, new feature, new initiative)
84
+ - Clear routing based on user intent rather than assuming sequential progression
21
85
 
22
86
  ## [1.16.4] - 2026-01-27
87
+
88
+ ### Fixed
89
+ - **Playwright MCP Detection** - Enhanced detection logic now checks multiple locations:
90
+ - `~/.claude/mcp.json` (primary)
91
+ - `~/.claude/settings.json` (alternate)
92
+ - `playwright-mcp` command availability
93
+ - Running processes via `ps`
94
+ - **QA Engineer Mode Auto-Detection** - UAT now auto-detects test type from SUMMARY.md:
95
+ - Web UI tests → Recommend AI QA Engineer (Playwright + MiniMax)
96
+ - API/Backend tests → Recommend Zeroshot
97
+ - Mixed tests → Offer both options with clear recommendations
98
+
99
+ ### Added
100
+ - **Intuitive Mode Selection** - Testing mode selection now shows:
101
+ - Auto-detected test type (e.g., "Web UI tests")
102
+ - Clear explanation of each mode's strengths
103
+ - Recommended option highlighted
104
+ - Cost estimates for AI-powered modes
105
+
106
+ - **run_qa_engineer_batch Step** - New workflow step for AI QA Engineer mode:
107
+ - Combines Playwright MCP (browser control) + MiniMax (visual AI)
108
+ - Tests edge cases automatically
109
+ - Explores navigation paths beyond happy path
110
+ - ~$0.001 per test (MiniMax vision is 50-100x cheaper than Anthropic API)
111
+
112
+ - **run_playwright_batch Step** - New workflow step for Playwright-only mode:
113
+ - Browser automation without visual AI validation
114
+ - Fallback when MiniMax API key not available
115
+
116
+ ### Changed
117
+ - **Improved Mode Routing** - create_uat_file step now routes to 4 modes:
118
+ - `qa-engineer` → run_qa_engineer_batch
119
+ - `zeroshot` → run_zeroshot_batch
23
120
  - `playwright` → run_playwright_batch
24
121
  - `manual` → present_test
25
122
 
package/bin/install.js CHANGED
@@ -11,7 +11,8 @@ const {
11
11
  detectAndQuarantineDuplicates,
12
12
  writeInstallInfo,
13
13
  getCurrentVersion,
14
- getCanonicalRoots
14
+ getCanonicalRoots,
15
+ cleanOldQuarantines
15
16
  } = require('../rrr/lib/install-roots');
16
17
 
17
18
  /**
@@ -909,6 +910,38 @@ function install(isGlobal) {
909
910
  console.log(` ${green}✓${reset} Installed rrr/scripts/test-install-smoke.js`);
910
911
  }
911
912
 
913
+ // PATCH-01: Copy handoff-preflight.js to ~/.claude/rrr/scripts/
914
+ // Memory-enriched preflight for drift detection
915
+ const handoffSrc = path.join(src, 'scripts', 'handoff-preflight.js');
916
+ if (fs.existsSync(handoffSrc)) {
917
+ const scriptsDestDir = path.join(claudeDir, 'rrr', 'scripts');
918
+ fs.mkdirSync(scriptsDestDir, { recursive: true });
919
+ const handoffDest = path.join(scriptsDestDir, 'handoff-preflight.js');
920
+ fs.copyFileSync(handoffSrc, handoffDest);
921
+ console.log(` ${green}✓${reset} Installed rrr/scripts/handoff-preflight.js`);
922
+ }
923
+
924
+ // PATCH-01: Copy rrr-hud.js to ~/.claude/rrr/scripts/
925
+ // Visual HUD for project state display
926
+ const hudSrc = path.join(src, 'scripts', 'rrr-hud.js');
927
+ if (fs.existsSync(hudSrc)) {
928
+ const scriptsDestDir = path.join(claudeDir, 'rrr', 'scripts');
929
+ fs.mkdirSync(scriptsDestDir, { recursive: true });
930
+ const hudDest = path.join(scriptsDestDir, 'rrr-hud.js');
931
+ fs.copyFileSync(hudSrc, hudDest);
932
+ console.log(` ${green}✓${reset} Installed rrr/scripts/rrr-hud.js`);
933
+ }
934
+
935
+ // PATCH-01: Copy rrr-memory/ directory to ~/.claude/rrr/scripts/
936
+ // Memory store and state detector for proactive guidance
937
+ const rrrMemorySrc = path.join(src, 'scripts', 'rrr-memory');
938
+ if (fs.existsSync(rrrMemorySrc)) {
939
+ const scriptsDestDir = path.join(claudeDir, 'rrr', 'scripts');
940
+ const rrrMemoryDest = path.join(scriptsDestDir, 'rrr-memory');
941
+ copyWithPathReplacement(rrrMemorySrc, rrrMemoryDest, pathPrefix);
942
+ console.log(` ${green}✓${reset} Installed rrr/scripts/rrr-memory/`);
943
+ }
944
+
912
945
  // Copy skills to ~/.claude/skills (skills system)
913
946
  const skillsSrc = path.join(src, 'rrr', 'skills');
914
947
  if (fs.existsSync(skillsSrc)) {
@@ -963,6 +996,15 @@ function install(isGlobal) {
963
996
  if (quarantineResult.quarantined.length > 0) {
964
997
  console.log(` ${green}✓${reset} Quarantined ${quarantineResult.quarantined.length} legacy/duplicate root(s)`);
965
998
  }
999
+
1000
+ // Clean up old quarantine directories (>7 days) to prevent duplicate command scanning
1001
+ console.log(` ${green}✓${reset} Cleaning old quarantine directories...`);
1002
+ const cleanupResult = cleanOldQuarantines({
1003
+ configDir: explicitConfigDir || process.env.CLAUDE_CONFIG_DIR
1004
+ });
1005
+ if (cleanupResult.cleaned.length > 0) {
1006
+ console.log(` ${green}✓${reset} Cleaned ${cleanupResult.cleaned.length} old quarantine folder(s)`);
1007
+ }
966
1008
  }
967
1009
 
968
1010
  // Register rrr-search MCP server and run semantic migration
@@ -33,6 +33,7 @@ Purpose: Add planned work discovered during execution that belongs at the end of
33
33
  @.planning/STATE.md
34
34
  @rrr/lib/phase-paths.md
35
35
  @rrr/lib/milestone-utils.md
36
+ @rrr/lib/memory-store.js
36
37
  </execution_context>
37
38
 
38
39
  <process>
@@ -68,6 +69,50 @@ Example: /rrr:add-phase Add authentication system
68
69
  Exit.
69
70
  </step>
70
71
 
72
+ <step name="check_orphan_phases_memory">
73
+ **Check for orphan phases using state-detector (PATCH-01 enhancement)**
74
+
75
+ Before creating phases, check if there are orphan phases that need migration:
76
+
77
+ ```bash
78
+ # Check for orphan phases
79
+ node -e "
80
+ const { StateDetector } = require(process.env.HOME + '/.claude/rrr/scripts/rrr-memory/state-detector');
81
+ const detector = new StateDetector();
82
+ const state = detector.detectPhaseState('.planning');
83
+ const milestone = detector.detectMilestoneState('.planning');
84
+
85
+ if (milestone === 'NO_MILESTONE' && state !== 'NO_PHASES') {
86
+ console.log('HAS_ORPHAN_PHASES=true');
87
+ console.log('RUN: /rrr:new-milestone or /rrr:migrate-phases');
88
+ }
89
+ " 2>/dev/null
90
+ ```
91
+
92
+ If `HAS_ORPHAN_PHASES=true` is output, show guidance and exit (unless --force).
93
+
94
+ **If orphan phases detected:**
95
+
96
+ ```
97
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
98
+ ⚠ ORPHAN PHASES DETECTED
99
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
100
+
101
+ Found phases not assigned to any milestone.
102
+ New phases cannot be created until orphans are assigned.
103
+
104
+ To migrate orphan phases:
105
+ 1. /rrr:new-milestone - Create milestone for orphan phases
106
+ 2. /rrr:migrate-phases - Assign phases to milestone
107
+
108
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
109
+ ```
110
+
111
+ Exit command.
112
+
113
+ **If no orphans or --force:** Continue to validate_milestone_first step.
114
+ </step>
115
+
71
116
  <step name="validate_milestone_first">
72
117
  **MILESTONE-FIRST ENFORCEMENT (v1.11 breaking change)**
73
118
 
@@ -36,6 +36,7 @@ Plan path: $ARGUMENTS
36
36
 
37
37
  @.planning/STATE.md
38
38
  @.planning/config.json (if exists)
39
+ @rrr/lib/memory-store.js
39
40
  </context>
40
41
 
41
42
  <process>
@@ -46,6 +47,42 @@ Plan path: $ARGUMENTS
46
47
  ```
47
48
  Cross-platform: works in PowerShell on Windows. Path resolved to installed location.
48
49
 
50
+ 0. **Track command in memory (before execution)**
51
+ Parse the plan to extract intent from frontmatter and context, then track this execution:
52
+
53
+ ```bash
54
+ # Extract plan ID and objective for intent tracking
55
+ PLAN_ID=$(basename "$ARGUMENTS" | sed 's/-PLAN\.md$//')
56
+ PLAN_DIR=$(dirname "$ARGUMENTS")
57
+ PHASE_DIR=$(basename "$PLAN_DIR")
58
+
59
+ # Get intent from plan frontmatter (try files_modified, then title)
60
+ INTENT=""
61
+ if [ -f "$ARGUMENTS" ]; then
62
+ INTENT=$(grep -E "^files_modified:" "$ARGUMENTS" 2>/dev/null | head -1 | sed 's/files_modified: *\[*\]*/Intent from plan/' || \
63
+ grep -E "^title:" "$ARGUMENTS" 2>/dev/null | head -1 | sed 's/title: *//' || \
64
+ echo "Executing plan $PLAN_ID")
65
+ fi
66
+
67
+ # Track in memory (if memory-store.js is available)
68
+ node -e "
69
+ const { initMemory, trackCommand } = require(process.env.HOME + '/.claude/rrr/lib/memory-store');
70
+ (async () => {
71
+ try {
72
+ const memory = await initMemory();
73
+ await trackCommand(memory, {
74
+ command: '/rrr:execute-plan',
75
+ target: '$PLAN_ID',
76
+ intent: '$INTENT',
77
+ files: []
78
+ });
79
+ } catch (e) {
80
+ // Memory tracking is optional
81
+ }
82
+ })();
83
+ " 2>/dev/null || echo "[MEMORY] Tracking skipped"
84
+ ```
85
+
49
86
  0.5. **Scope Check (validate plan is in scope)**
50
87
 
51
88
  Before executing, validate the plan's files against current scope:
@@ -23,6 +23,7 @@ Purpose: Handle urgent work discovered during execution without renumbering enti
23
23
  @.planning/STATE.md
24
24
  @rrr/lib/phase-paths.md
25
25
  @rrr/lib/milestone-utils.md
26
+ @rrr/lib/memory-store.js
26
27
  </execution_context>
27
28
 
28
29
  <process>
@@ -74,6 +75,50 @@ fi
74
75
 
75
76
  </step>
76
77
 
78
+ <step name="check_orphan_phases_memory">
79
+ **Check for orphan phases using state-detector (PATCH-01 enhancement)**
80
+
81
+ Same validation as add-phase - check for orphan phases before allowing new insert:
82
+
83
+ ```bash
84
+ # Check for orphan phases
85
+ node -e "
86
+ const { StateDetector } = require(process.env.HOME + '/.claude/rrr/scripts/rrr-memory/state-detector');
87
+ const detector = new StateDetector();
88
+ const state = detector.detectPhaseState('.planning');
89
+ const milestone = detector.detectMilestoneState('.planning');
90
+
91
+ if (milestone === 'NO_MILESTONE' && state !== 'NO_PHASES') {
92
+ console.log('HAS_ORPHAN_PHASES=true');
93
+ console.log('RUN: /rrr:new-milestone or /rrr:migrate-phases');
94
+ }
95
+ " 2>/dev/null
96
+ ```
97
+
98
+ If `HAS_ORPHAN_PHASES=true`, show guidance and exit (unless --force).
99
+
100
+ **If orphan phases detected:**
101
+
102
+ ```
103
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
104
+ ⚠ ORPHAN PHASES DETECTED
105
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
106
+
107
+ Found phases not assigned to any milestone.
108
+ Inserting new phase not allowed until orphans are assigned.
109
+
110
+ To migrate orphan phases:
111
+ 1. /rrr:new-milestone - Create milestone for orphan phases
112
+ 2. /rrr:migrate-phases - Assign phases to milestone
113
+
114
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
115
+ ```
116
+
117
+ Exit command.
118
+
119
+ **If no orphans or --force:** Continue to validate_milestone_first step.
120
+ </step>
121
+
77
122
  <step name="validate_milestone_first">
78
123
  **MILESTONE-FIRST ENFORCEMENT (v1.11 breaking change)**
79
124
 
@@ -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
 
@@ -71,6 +71,7 @@ Validate built features through **audit mode by default**, or interactive UAT wi
71
71
 
72
72
  <execution_context>
73
73
  @rrr/lib/phase-paths.md
74
+ @rrr/lib/memory-store.js
74
75
  </execution_context>
75
76
 
76
77
  <!-- ═══════════════════════════════════════════════════════════════════════════
@@ -140,6 +141,41 @@ For manual testing, use: /rrr:verify-work --uat [phase]
140
141
 
141
142
  ---
142
143
 
144
+ ### Step 0.5: Show Memory Context (PATCH-01 enhancement)
145
+
146
+ Display current intent and recent commands to provide context during verification:
147
+
148
+ ```bash
149
+ # Show memory context if available
150
+ node -e "
151
+ const { initMemory, getSummary } = require(process.env.HOME + '/.claude/rrr/lib/memory-store');
152
+ (async () => {
153
+ try {
154
+ const memory = await initMemory();
155
+ const summary = await getSummary(memory);
156
+ console.log('');
157
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
158
+ console.log(' RRR ► MEMORY CONTEXT');
159
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
160
+ console.log('Intent:', summary.currentIntent || '(no intent tracked)');
161
+ console.log('Recent:', summary.recentCommands.slice(0, 2).map(c =>
162
+ c.cmd + (c.target ? '(' + c.target + ')' : '')
163
+ ).join(' → ') || 'none');
164
+ if (summary.drift && summary.drift.drifting) {
165
+ console.log('Drift:', summary.drift.message);
166
+ }
167
+ console.log('───────────────────────────────────────────────────────');
168
+ } catch (e) {
169
+ // Memory not available, skip silently
170
+ }
171
+ })();
172
+ " 2>/dev/null || true
173
+ ```
174
+
175
+ This helps verify-work understand what the user was working on.
176
+
177
+ ---
178
+
143
179
  ### Step 1: Determine Scope
144
180
 
145
181
  **Parse target from arguments (with flags removed):**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projecta-rrr",
3
- "version": "1.16.5",
3
+ "version": "1.16.7",
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"
@@ -22,7 +22,10 @@
22
22
  "sessions:index": "bash scripts/index-sessions.sh",
23
23
  "sessions:status": "bash scripts/index-sessions.sh --status",
24
24
  "semantic:verify": "bash scripts/verify-semantic-search.sh",
25
- "prepublish:check": "node scripts/prepublish-check.js"
25
+ "prepublish:check": "node scripts/prepublish-check.js",
26
+ "browser:uat": "bash scripts/browser-uat.sh",
27
+ "scaffold:e2e": "bash scripts/scaffold-e2e.sh",
28
+ "chrome:visual": "bash scripts/chrome-visual-check.sh"
26
29
  },
27
30
  "files": [
28
31
  "bin",