projecta-rrr 1.9.4 → 1.9.5
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/commands/rrr/execute-phase.md +58 -0
- package/commands/rrr/execute-plan.md +124 -1
- package/commands/rrr/plan-phase.md +37 -0
- package/commands/rrr/progress.md +74 -2
- package/commands/rrr/verify-work.md +76 -3
- package/package.json +1 -1
- package/rrr/templates/review-checklist.md +165 -0
- package/rrr/workflows/handoff-preflight.md +327 -0
- package/scripts/handoff-preflight.js +1035 -0
- package/scripts/test-handoff-preflight.js +262 -0
- package/scripts/verify-milestone.js +777 -0
|
@@ -48,6 +48,50 @@ Phase: $ARGUMENTS
|
|
|
48
48
|
- Count PLAN.md files
|
|
49
49
|
- Error if no plans found
|
|
50
50
|
|
|
51
|
+
1.5. **Run phase-level preflight**
|
|
52
|
+
|
|
53
|
+
Before execution, run preflight in phase mode:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
node ~/.claude/rrr/scripts/handoff-preflight.js --phase $ARGUMENTS
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Parse the JSON output.
|
|
60
|
+
|
|
61
|
+
**Handle by recommendation:**
|
|
62
|
+
|
|
63
|
+
| Recommendation | Action |
|
|
64
|
+
|----------------|--------|
|
|
65
|
+
| `proceed` | Continue to step 2 |
|
|
66
|
+
| `warn_and_proceed` | Show warning, continue |
|
|
67
|
+
| `reconcile_first` | Show decision gate |
|
|
68
|
+
| `review_instead_of_execute` | Show decision gate, pause |
|
|
69
|
+
|
|
70
|
+
**Decision gate:**
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
⚠ PHASE DRIFT DETECTED
|
|
74
|
+
|
|
75
|
+
{overlap_ratio}% of phase files already changed.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Use AskUserQuestion:
|
|
79
|
+
- question: "Phase work may have started. How to proceed?"
|
|
80
|
+
- header: "Preflight"
|
|
81
|
+
- options:
|
|
82
|
+
- "Continue anyway" — Override, proceed
|
|
83
|
+
- "Review per-plan" — Run preflight per plan during execution
|
|
84
|
+
- "Capture as TODO" — Defer phase execution
|
|
85
|
+
- "Cancel" — Exit
|
|
86
|
+
|
|
87
|
+
**If "Review per-plan":**
|
|
88
|
+
- Set flag: `per_plan_preflight = true`
|
|
89
|
+
- Continue to step 2
|
|
90
|
+
- Run preflight for each plan in step 5
|
|
91
|
+
|
|
92
|
+
**If script not found:**
|
|
93
|
+
- Log warning, continue without preflight
|
|
94
|
+
|
|
51
95
|
2. **Discover plans**
|
|
52
96
|
- List all *-PLAN.md files in phase directory
|
|
53
97
|
- Check which have *-SUMMARY.md (already complete)
|
|
@@ -68,6 +112,20 @@ Phase: $ARGUMENTS
|
|
|
68
112
|
|
|
69
113
|
5. **Execute waves**
|
|
70
114
|
For each wave in order:
|
|
115
|
+
|
|
116
|
+
**5a. Per-plan preflight (if `per_plan_preflight` flag set):**
|
|
117
|
+
|
|
118
|
+
Before spawning executor for each plan:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
node ~/.claude/rrr/scripts/handoff-preflight.js --plan "{plan_path}"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- If `review_instead_of_execute`: Show decision gate for that plan
|
|
125
|
+
- If user chooses to skip: Mark plan as skipped, continue to next
|
|
126
|
+
- If user chooses to continue: Proceed with execution
|
|
127
|
+
|
|
128
|
+
**5b. Execute plans:**
|
|
71
129
|
- For each plan, inject `<skills>` block into executor prompt
|
|
72
130
|
- Spawn `rrr-executor` for each plan in wave (parallel Task calls)
|
|
73
131
|
- Wait for completion (Task blocks)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rrr:execute-plan
|
|
3
3
|
description: Execute a PLAN.md file
|
|
4
|
-
argument-hint: "[path-to-PLAN.md]"
|
|
4
|
+
argument-hint: "[path-to-PLAN.md] [--summary-only]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Glob
|
|
@@ -31,6 +31,9 @@ Context budget: ~15% orchestrator, 100% fresh for subagent.
|
|
|
31
31
|
<context>
|
|
32
32
|
Plan path: $ARGUMENTS
|
|
33
33
|
|
|
34
|
+
**Flags:**
|
|
35
|
+
- `--summary-only` — Skip execution, generate SUMMARY.md from existing work (use after preflight review confirms all deliverables present)
|
|
36
|
+
|
|
34
37
|
@.planning/STATE.md
|
|
35
38
|
@.planning/config.json (if exists)
|
|
36
39
|
</context>
|
|
@@ -94,6 +97,126 @@ Plan path: $ARGUMENTS
|
|
|
94
97
|
- Confirm file at $ARGUMENTS exists
|
|
95
98
|
- Error if not found: "Plan not found: {path}"
|
|
96
99
|
|
|
100
|
+
1.1. **Check for --summary-only flag**
|
|
101
|
+
|
|
102
|
+
If `--summary-only` is present in $ARGUMENTS:
|
|
103
|
+
|
|
104
|
+
**Purpose:** Generate SUMMARY.md from existing work without re-executing. Use after preflight review confirms all deliverables are already present.
|
|
105
|
+
|
|
106
|
+
**Process:**
|
|
107
|
+
1. Parse plan to extract:
|
|
108
|
+
- Plan ID, title, objective
|
|
109
|
+
- Task list from `<task>` elements
|
|
110
|
+
- Expected files from frontmatter
|
|
111
|
+
|
|
112
|
+
2. Verify existing work:
|
|
113
|
+
- Check each expected file exists
|
|
114
|
+
- Run any verification commands from plan
|
|
115
|
+
- Note: Do NOT execute any tasks
|
|
116
|
+
|
|
117
|
+
3. Generate SUMMARY.md:
|
|
118
|
+
```markdown
|
|
119
|
+
---
|
|
120
|
+
plan: {plan_id}
|
|
121
|
+
status: complete
|
|
122
|
+
method: summary-only
|
|
123
|
+
timestamp: {ISO-8601}
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
# Summary: {plan_title}
|
|
127
|
+
|
|
128
|
+
## Goal
|
|
129
|
+
{objective from plan}
|
|
130
|
+
|
|
131
|
+
## Tasks Completed
|
|
132
|
+
{For each task in plan:}
|
|
133
|
+
- [x] {task_name} — (pre-existing)
|
|
134
|
+
|
|
135
|
+
## Outcome
|
|
136
|
+
All deliverables verified as present via preflight review.
|
|
137
|
+
No execution was performed — work was already complete.
|
|
138
|
+
|
|
139
|
+
## Evidence
|
|
140
|
+
- Review checklist: .planning/reviews/{plan_id}-REVIEW.md
|
|
141
|
+
- Verified files: {list of files confirmed present}
|
|
142
|
+
|
|
143
|
+
## Method
|
|
144
|
+
Generated via `--summary-only` flag after preflight confirmed all deliverables present.
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
4. Write to: `.planning/phases/{phase}/{plan_id}-SUMMARY.md`
|
|
148
|
+
|
|
149
|
+
5. Update STATE.md to reflect completion
|
|
150
|
+
|
|
151
|
+
6. Display:
|
|
152
|
+
```
|
|
153
|
+
✓ SUMMARY.md generated (summary-only mode)
|
|
154
|
+
|
|
155
|
+
Plan: {plan_id}
|
|
156
|
+
Path: .planning/phases/{phase}/{plan_id}-SUMMARY.md
|
|
157
|
+
|
|
158
|
+
No execution performed — existing work documented.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
7. Exit (do not continue to step 1.5 or beyond)
|
|
162
|
+
|
|
163
|
+
1.5. **Run handoff preflight**
|
|
164
|
+
|
|
165
|
+
Before any execution, check for drift:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
node ~/.claude/rrr/scripts/handoff-preflight.js --plan "$ARGUMENTS"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Parse the JSON output (after `---JSON---` marker).
|
|
172
|
+
|
|
173
|
+
**Handle by recommendation:**
|
|
174
|
+
|
|
175
|
+
| Recommendation | Action |
|
|
176
|
+
|----------------|--------|
|
|
177
|
+
| `proceed` | Continue to step 2 |
|
|
178
|
+
| `warn_and_proceed` | Show warning, continue to step 2 |
|
|
179
|
+
| `reconcile_first` | Show decision gate (see below) |
|
|
180
|
+
| `review_instead_of_execute` | Show decision gate, do NOT proceed until user chooses |
|
|
181
|
+
|
|
182
|
+
**Decision gate (for reconcile_first or review_instead_of_execute):**
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
⚠ DRIFT DETECTED
|
|
186
|
+
|
|
187
|
+
{overlap_ratio}% of expected files already changed.
|
|
188
|
+
Changed: {changed_files_count} files
|
|
189
|
+
Expected: {expected_files_count} files
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Use AskUserQuestion:
|
|
193
|
+
- question: "Work may have started. How to proceed?"
|
|
194
|
+
- header: "Preflight"
|
|
195
|
+
- options:
|
|
196
|
+
- "Continue anyway" — Override, proceed to step 2
|
|
197
|
+
- "Review and mark progress (Recommended)" — Generate review checklist, exit
|
|
198
|
+
- "Capture as TODO" — Create pending todo, exit
|
|
199
|
+
- "Switch plan" — Show alternatives, exit
|
|
200
|
+
|
|
201
|
+
**If user selects "Review and mark progress":**
|
|
202
|
+
- Run: `node ~/.claude/rrr/scripts/handoff-preflight.js --plan "$ARGUMENTS" --generate-review`
|
|
203
|
+
- Display: "Review checklist created. Use it to assess progress."
|
|
204
|
+
- Exit without executing
|
|
205
|
+
|
|
206
|
+
**If user selects "Capture as TODO":**
|
|
207
|
+
- Create `.planning/todos/pending/{timestamp}-{plan}-preflight.md`
|
|
208
|
+
- Display: "TODO created for later review."
|
|
209
|
+
- Exit without executing
|
|
210
|
+
|
|
211
|
+
**If user selects "Switch plan":**
|
|
212
|
+
- If `possible_matching_plans` exists, show them
|
|
213
|
+
- Otherwise: "Run `/rrr:progress` to see available plans."
|
|
214
|
+
- Exit without executing
|
|
215
|
+
|
|
216
|
+
**If script not found or fails:**
|
|
217
|
+
- Log warning: `[PREFLIGHT] Script not found, skipping preflight check`
|
|
218
|
+
- Continue to step 2
|
|
219
|
+
|
|
97
220
|
2. **Check if already executed**
|
|
98
221
|
- Derive SUMMARY path from plan path (replace PLAN.md with SUMMARY.md)
|
|
99
222
|
- If SUMMARY exists: "Plan already executed. SUMMARY: {path}"
|
|
@@ -137,6 +137,43 @@ Use Grep tool: `Grep pattern: "Phase ${PHASE}:" path: ".planning/ROADMAP.md"` wi
|
|
|
137
137
|
|
|
138
138
|
**If not found:** Error with available phases. **If found:** Extract phase number, name, description.
|
|
139
139
|
|
|
140
|
+
## 3.5. Check for Drift Before Planning
|
|
141
|
+
|
|
142
|
+
If existing plans exist for this phase, run preflight to detect if work may have already started:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
node ~/.claude/rrr/scripts/handoff-preflight.js --phase ${PHASE}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**If `likely_already_started: true`:**
|
|
149
|
+
|
|
150
|
+
Display warning:
|
|
151
|
+
```
|
|
152
|
+
⚠ You may have started Phase ${PHASE} work already.
|
|
153
|
+
|
|
154
|
+
Changed files overlap with existing plan inventory.
|
|
155
|
+
Overlap: {overlap_ratio}%
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Use AskUserQuestion:
|
|
159
|
+
- question: "Proceed with planning or reconcile first?"
|
|
160
|
+
- header: "Drift"
|
|
161
|
+
- options:
|
|
162
|
+
- "Continue planning" — Proceed normally
|
|
163
|
+
- "Review existing work first (Recommended)" — Generate review, then plan
|
|
164
|
+
- "Skip to execution" — Execute existing plans instead
|
|
165
|
+
|
|
166
|
+
**If "Review existing work first":**
|
|
167
|
+
- Run: `node ~/.claude/rrr/scripts/handoff-preflight.js --phase ${PHASE} --generate-review`
|
|
168
|
+
- Display checklist
|
|
169
|
+
- Return to planning after review
|
|
170
|
+
|
|
171
|
+
**If "Skip to execution":**
|
|
172
|
+
- Display: "Use `/rrr:execute-phase ${PHASE}` to run existing plans"
|
|
173
|
+
- Exit
|
|
174
|
+
|
|
175
|
+
**If script not found:** Continue without warning.
|
|
176
|
+
|
|
140
177
|
## 4. Ensure Phase Directory Exists (Cross-Platform)
|
|
141
178
|
|
|
142
179
|
**On macOS/Linux:**
|
package/commands/rrr/progress.md
CHANGED
|
@@ -117,6 +117,15 @@ Exit.
|
|
|
117
117
|
**Check active debug sessions (Cross-Platform):**
|
|
118
118
|
- On macOS/Linux: `ls .planning/debug/*.md 2>/dev/null | grep -v resolved | wc -l`
|
|
119
119
|
- On Windows: `Glob pattern: ".planning/debug/*.md"` — count results (exclude resolved/)
|
|
120
|
+
|
|
121
|
+
**Run quick preflight check:**
|
|
122
|
+
```bash
|
|
123
|
+
node ~/.claude/rrr/scripts/handoff-preflight.js --phase {current_phase} 2>/dev/null
|
|
124
|
+
```
|
|
125
|
+
Parse result for `likely_already_started` and `overlap_ratio`.
|
|
126
|
+
- If script fails or not found: set preflight_status = "unknown"
|
|
127
|
+
- If `likely_already_started`: set preflight_status = "drift detected ({overlap_ratio}%)"
|
|
128
|
+
- Otherwise: set preflight_status = "clean"
|
|
120
129
|
</step>
|
|
121
130
|
|
|
122
131
|
<step name="report">
|
|
@@ -150,6 +159,10 @@ CONTEXT: [✓ if CONTEXT.md exists | - if not]
|
|
|
150
159
|
- [count] active — /rrr:debug to continue
|
|
151
160
|
(Only show this section if count > 0)
|
|
152
161
|
|
|
162
|
+
## Preflight Status
|
|
163
|
+
- {preflight_status}
|
|
164
|
+
(Show "✓ clean" if no drift, "⚠ drift detected (X%)" if overlap found, "? unknown" if script unavailable)
|
|
165
|
+
|
|
153
166
|
## What's Next
|
|
154
167
|
[Next phase/plan objective from ROADMAP]
|
|
155
168
|
```
|
|
@@ -322,11 +335,30 @@ State: "Current phase is {X}. Milestone has {N} phases (highest: {Y})."
|
|
|
322
335
|
|
|
323
336
|
Read ROADMAP.md to get the next phase's name and goal.
|
|
324
337
|
|
|
338
|
+
**Auto-run audit if progress >= 90%:**
|
|
339
|
+
|
|
340
|
+
Calculate overall progress: `completed_plans / total_plans`.
|
|
341
|
+
|
|
342
|
+
If progress >= 90%, run implementation audit:
|
|
343
|
+
```bash
|
|
344
|
+
node ~/.claude/rrr/scripts/verify-milestone.js --summary-only 2>/dev/null || node scripts/verify-milestone.js --summary-only 2>/dev/null
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Include audit summary in output (if run).
|
|
348
|
+
|
|
325
349
|
```
|
|
326
350
|
---
|
|
327
351
|
|
|
328
352
|
## ✓ Phase {Z} Complete
|
|
329
353
|
|
|
354
|
+
{If audit ran (progress >= 90%):}
|
|
355
|
+
### Implementation Audit
|
|
356
|
+
✓ Done: {done_count}
|
|
357
|
+
⚠ Missing summaries: {likely_done_count}
|
|
358
|
+
✗ Not done: {not_done_count}
|
|
359
|
+
|
|
360
|
+
Full report: .planning/artifacts/VERIFY_WORK_AUDIT.md
|
|
361
|
+
|
|
330
362
|
## ▶ Next Up
|
|
331
363
|
|
|
332
364
|
**Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
|
|
@@ -339,6 +371,7 @@ Read ROADMAP.md to get the next phase's name and goal.
|
|
|
339
371
|
|
|
340
372
|
**Also available:**
|
|
341
373
|
- `/rrr:verify-work {Z}` — user acceptance test before continuing
|
|
374
|
+
- `/rrr:verify-work --audit` — full implementation audit
|
|
342
375
|
- `/rrr:discuss-phase {Z+1}` — gather context first
|
|
343
376
|
|
|
344
377
|
---
|
|
@@ -348,6 +381,18 @@ Read ROADMAP.md to get the next phase's name and goal.
|
|
|
348
381
|
|
|
349
382
|
**Route D: Milestone complete**
|
|
350
383
|
|
|
384
|
+
**Auto-run implementation audit:**
|
|
385
|
+
|
|
386
|
+
Before displaying the completion message, run verify-work in audit mode:
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
node ~/.claude/rrr/scripts/verify-milestone.js --summary-only 2>/dev/null || node scripts/verify-milestone.js --summary-only 2>/dev/null
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
This generates `.planning/artifacts/VERIFY_WORK_AUDIT.md` and prints summary counts.
|
|
393
|
+
|
|
394
|
+
**Display result:**
|
|
395
|
+
|
|
351
396
|
```
|
|
352
397
|
---
|
|
353
398
|
|
|
@@ -355,6 +400,14 @@ Read ROADMAP.md to get the next phase's name and goal.
|
|
|
355
400
|
|
|
356
401
|
All {N} phases finished!
|
|
357
402
|
|
|
403
|
+
### Implementation Audit
|
|
404
|
+
{Include summary counts from audit output}
|
|
405
|
+
✓ Done: {done_count}
|
|
406
|
+
⚠ Missing summaries: {likely_done_count}
|
|
407
|
+
✗ Not done: {not_done_count}
|
|
408
|
+
|
|
409
|
+
Full report: .planning/artifacts/VERIFY_WORK_AUDIT.md
|
|
410
|
+
|
|
358
411
|
## ▶ Next Up
|
|
359
412
|
|
|
360
413
|
**Complete Milestone** — archive and prepare for next
|
|
@@ -366,7 +419,8 @@ All {N} phases finished!
|
|
|
366
419
|
---
|
|
367
420
|
|
|
368
421
|
**Also available:**
|
|
369
|
-
- `/rrr:verify-work` —
|
|
422
|
+
- `/rrr:verify-work --audit` — full implementation audit report
|
|
423
|
+
- `/rrr:verify-work` — interactive user acceptance test
|
|
370
424
|
|
|
371
425
|
---
|
|
372
426
|
```
|
|
@@ -377,7 +431,17 @@ All {N} phases finished!
|
|
|
377
431
|
|
|
378
432
|
STATE.md indicates "Between milestones" — this is the expected state after completing a milestone.
|
|
379
433
|
|
|
380
|
-
**
|
|
434
|
+
**Auto-run implementation audit:**
|
|
435
|
+
|
|
436
|
+
Before displaying the between-milestones message, run verify-work in audit mode:
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
node ~/.claude/rrr/scripts/verify-milestone.js --summary-only 2>/dev/null || node scripts/verify-milestone.js --summary-only 2>/dev/null
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
This generates `.planning/artifacts/VERIFY_WORK_AUDIT.md` and prints summary counts for the completed milestone.
|
|
443
|
+
|
|
444
|
+
**Display status (with audit summary):**
|
|
381
445
|
|
|
382
446
|
Read MILESTONES.md to find the last completed milestone version.
|
|
383
447
|
|
|
@@ -386,6 +450,14 @@ Read MILESTONES.md to find the last completed milestone version.
|
|
|
386
450
|
|
|
387
451
|
## ✓ Milestone v{X.Y} Complete
|
|
388
452
|
|
|
453
|
+
### Implementation Audit
|
|
454
|
+
{Include summary counts from audit output}
|
|
455
|
+
✓ Done: {done_count}
|
|
456
|
+
⚠ Missing summaries: {likely_done_count}
|
|
457
|
+
✗ Not done: {not_done_count}
|
|
458
|
+
|
|
459
|
+
Full report: .planning/artifacts/VERIFY_WORK_AUDIT.md
|
|
460
|
+
|
|
389
461
|
Ready to plan the next milestone.
|
|
390
462
|
|
|
391
463
|
## ▶ Next Up
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rrr:verify-work
|
|
3
3
|
description: Validate built features through conversational UAT
|
|
4
|
-
argument-hint: "[phase number, e.g., '4']"
|
|
4
|
+
argument-hint: "[phase number, e.g., '4'] [--audit]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Bash
|
|
@@ -14,9 +14,12 @@ allowed-tools:
|
|
|
14
14
|
<objective>
|
|
15
15
|
Validate built features through conversational testing with persistent state.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
**Default mode:** Interactive UAT - one test at a time, plain text responses.
|
|
18
|
+
**Audit mode (`--audit`):** Non-interactive implementation check - verifies plans have summaries and git evidence.
|
|
18
19
|
|
|
19
|
-
Output:
|
|
20
|
+
Output:
|
|
21
|
+
- Default: {phase}-UAT.md tracking all test results, gaps logged for /rrr:plan-phase --gaps
|
|
22
|
+
- Audit: .planning/artifacts/VERIFY_WORK_AUDIT.md (no UAT files created)
|
|
20
23
|
</objective>
|
|
21
24
|
|
|
22
25
|
<execution_context>
|
|
@@ -29,10 +32,80 @@ Phase: $ARGUMENTS (optional)
|
|
|
29
32
|
- If provided: Test specific phase (e.g., "4")
|
|
30
33
|
- If not provided: Check for active sessions or prompt for phase
|
|
31
34
|
|
|
35
|
+
Flags:
|
|
36
|
+
- `--audit` or `--implementation-only`: Non-interactive mode, check implementation status only
|
|
37
|
+
|
|
32
38
|
@.planning/STATE.md
|
|
33
39
|
@.planning/ROADMAP.md
|
|
34
40
|
</context>
|
|
35
41
|
|
|
42
|
+
<audit_mode>
|
|
43
|
+
**If --audit flag is present:**
|
|
44
|
+
|
|
45
|
+
This mode runs a non-interactive implementation audit. It does NOT:
|
|
46
|
+
- Create UAT files
|
|
47
|
+
- Ask for manual verification
|
|
48
|
+
- Present interactive tests
|
|
49
|
+
|
|
50
|
+
**Step 1: Determine scope**
|
|
51
|
+
|
|
52
|
+
Parse $ARGUMENTS for phase number and --audit flag.
|
|
53
|
+
|
|
54
|
+
| Arguments | Scope |
|
|
55
|
+
|-----------|-------|
|
|
56
|
+
| `--audit 4` or `4 --audit` | Audit phase 4 only |
|
|
57
|
+
| `--audit` (no phase) | Check STATE.md for context |
|
|
58
|
+
|
|
59
|
+
**If no phase provided, read STATE.md:**
|
|
60
|
+
- If active phase exists → audit that phase
|
|
61
|
+
- If "Between milestones" or "Phase: N/A" → audit entire milestone (all phases)
|
|
62
|
+
|
|
63
|
+
**Step 2: Run verification script**
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
node ~/.claude/rrr/scripts/verify-milestone.js --summary-only 2>/dev/null
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**If auditing single phase, filter output:**
|
|
70
|
+
- Only show results for the specified phase
|
|
71
|
+
- Still generate full artifact but highlight relevant section
|
|
72
|
+
|
|
73
|
+
**Step 3: Output to artifact**
|
|
74
|
+
|
|
75
|
+
The script generates:
|
|
76
|
+
- `.planning/artifacts/VERIFY_MILESTONE.md` → Copy/rename to `.planning/artifacts/VERIFY_WORK_AUDIT.md`
|
|
77
|
+
- `.planning/artifacts/VERIFY_MILESTONE.json` → Copy/rename to `.planning/artifacts/VERIFY_WORK_AUDIT.json`
|
|
78
|
+
|
|
79
|
+
**Step 4: Display summary**
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
## Implementation Audit
|
|
83
|
+
|
|
84
|
+
{Scope: Phase X | Entire Milestone}
|
|
85
|
+
|
|
86
|
+
| Metric | Count |
|
|
87
|
+
|--------|-------|
|
|
88
|
+
| ✓ Done | {N} |
|
|
89
|
+
| ⚠ Likely done (missing summary) | {N} |
|
|
90
|
+
| ✗ Not done | {N} |
|
|
91
|
+
| ? Suspicious | {N} |
|
|
92
|
+
|
|
93
|
+
{If gaps exist:}
|
|
94
|
+
### Gaps
|
|
95
|
+
|
|
96
|
+
| Phase | Plan | Status | Action |
|
|
97
|
+
|-------|------|--------|--------|
|
|
98
|
+
| ... | ... | ... | ... |
|
|
99
|
+
|
|
100
|
+
Full report: .planning/artifacts/VERIFY_WORK_AUDIT.md
|
|
101
|
+
|
|
102
|
+
{If all done:}
|
|
103
|
+
✓ All plans verified. Ready for milestone completion.
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Exit after audit - do not proceed to interactive UAT.**
|
|
107
|
+
</audit_mode>
|
|
108
|
+
|
|
36
109
|
<process>
|
|
37
110
|
1. Check for active UAT sessions (resume or start new)
|
|
38
111
|
2. Find SUMMARY.md files for the phase
|
package/package.json
CHANGED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Review Checklist Template
|
|
2
|
+
|
|
3
|
+
*Template for preflight review checklists.*
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
This template is used by the handoff preflight workflow to generate review checklists when drift is detected.
|
|
10
|
+
|
|
11
|
+
**Generated file location:** `.planning/reviews/{phase}-{plan}-REVIEW.md`
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Template Structure
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
# Review Checklist: {phase}-{plan}
|
|
19
|
+
|
|
20
|
+
*Generated by preflight on {timestamp}*
|
|
21
|
+
*Overlap detected: {overlap_ratio}%*
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Plan Details
|
|
26
|
+
|
|
27
|
+
| Field | Value |
|
|
28
|
+
|-------|-------|
|
|
29
|
+
| Plan ID | {plan_id} |
|
|
30
|
+
| Title | {plan_title} |
|
|
31
|
+
| Objective | {plan_objective} |
|
|
32
|
+
| Expected files | {expected_files_count} |
|
|
33
|
+
| Changed files | {changed_files_count} |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Overlapping Files
|
|
38
|
+
|
|
39
|
+
Files that appear in both "expected" and "changed":
|
|
40
|
+
|
|
41
|
+
| File | Status | Notes |
|
|
42
|
+
|------|--------|-------|
|
|
43
|
+
| `{file_1}` | ☐ Review | |
|
|
44
|
+
| `{file_2}` | ☐ Review | |
|
|
45
|
+
|
|
46
|
+
**Status options:**
|
|
47
|
+
- ☐ Review — Not yet checked
|
|
48
|
+
- ✓ Aligned — Matches plan intent
|
|
49
|
+
- ⚠ Partial — Partially complete
|
|
50
|
+
- ✗ Diverged — Does not match plan
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Deliverables Checklist
|
|
55
|
+
|
|
56
|
+
{Extracted from plan tasks}
|
|
57
|
+
|
|
58
|
+
| # | Deliverable | Status | Evidence |
|
|
59
|
+
|---|-------------|--------|----------|
|
|
60
|
+
| 1 | {task_1_name} | ☐ Check | |
|
|
61
|
+
| 2 | {task_2_name} | ☐ Check | |
|
|
62
|
+
|
|
63
|
+
**Status options:**
|
|
64
|
+
- ☐ Check — Not yet verified
|
|
65
|
+
- ✓ Present — Already implemented
|
|
66
|
+
- ○ Missing — Needs implementation
|
|
67
|
+
- ? Unclear — Cannot determine
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Verification Commands
|
|
72
|
+
|
|
73
|
+
{If plan has verification section}
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Command 1: {description}
|
|
77
|
+
{verify_command_1}
|
|
78
|
+
|
|
79
|
+
# Command 2: {description}
|
|
80
|
+
{verify_command_2}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Recommendation
|
|
86
|
+
|
|
87
|
+
### If all deliverables present (✓):
|
|
88
|
+
|
|
89
|
+
The work appears complete. Generate SUMMARY.md with evidence instead of re-executing:
|
|
90
|
+
|
|
91
|
+
1. Document what was found in SUMMARY.md
|
|
92
|
+
2. Run `/rrr:execute-plan {plan_path} --summary-only`
|
|
93
|
+
3. Or manually write: `.planning/phases/{phase}/{plan_id}-SUMMARY.md`
|
|
94
|
+
|
|
95
|
+
### If partially complete (mixed ✓ and ○):
|
|
96
|
+
|
|
97
|
+
Continue execution from current state:
|
|
98
|
+
|
|
99
|
+
1. The executor will detect existing work
|
|
100
|
+
2. It will skip completed tasks
|
|
101
|
+
3. It will continue from first incomplete task
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
/rrr:execute-plan {plan_path}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### If mostly missing (○):
|
|
108
|
+
|
|
109
|
+
Execute normally — previous changes may be unrelated:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
/rrr:execute-plan {plan_path}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### If unclear (?):
|
|
116
|
+
|
|
117
|
+
Manual review needed. Options:
|
|
118
|
+
|
|
119
|
+
1. Read the changed files directly
|
|
120
|
+
2. Run tests to verify behavior
|
|
121
|
+
3. Ask team about recent changes
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Sign-off
|
|
126
|
+
|
|
127
|
+
| Reviewer | Date | Decision |
|
|
128
|
+
|----------|------|----------|
|
|
129
|
+
| | | ☐ Execute / ☐ Mark complete / ☐ Defer |
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
*Review checklist generated by RRR handoff preflight.*
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Field Descriptions
|
|
139
|
+
|
|
140
|
+
| Field | Source | Description |
|
|
141
|
+
|-------|--------|-------------|
|
|
142
|
+
| phase | Plan path | Phase number (e.g., "05") |
|
|
143
|
+
| plan | Plan path | Plan ID (e.g., "05-04") |
|
|
144
|
+
| timestamp | System | ISO-8601 timestamp |
|
|
145
|
+
| overlap_ratio | Preflight | Percentage overlap (0-100) |
|
|
146
|
+
| plan_id | Plan frontmatter | Unique plan identifier |
|
|
147
|
+
| plan_title | Plan frontmatter | Human-readable title |
|
|
148
|
+
| plan_objective | Plan content | First line of objective |
|
|
149
|
+
| expected_files | Plan frontmatter | files_modified + files_exclusive |
|
|
150
|
+
| changed_files | Git diff | Working tree + staged changes |
|
|
151
|
+
| task_N_name | Plan tasks | Extracted from task elements |
|
|
152
|
+
| verify_command | Plan verification | Commands from verification section |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Integration
|
|
157
|
+
|
|
158
|
+
The preflight script generates this review by:
|
|
159
|
+
|
|
160
|
+
1. Parsing PLAN.md for deliverables
|
|
161
|
+
2. Comparing expected vs changed files
|
|
162
|
+
3. Extracting verification commands
|
|
163
|
+
4. Writing to `.planning/reviews/{phase}-{plan}-REVIEW.md`
|
|
164
|
+
|
|
165
|
+
The workflow presents the review and routes based on user assessment.
|