claude-raid 0.2.7 → 0.2.9

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 (39) hide show
  1. package/README.md +84 -23
  2. package/bin/cli.js +4 -2
  3. package/package.json +1 -1
  4. package/src/descriptions.js +10 -7
  5. package/src/init.js +36 -5
  6. package/src/merge-settings.js +53 -2
  7. package/src/remove.js +1 -1
  8. package/src/setup.js +32 -0
  9. package/src/ui.js +1 -0
  10. package/src/update.js +26 -3
  11. package/template/.claude/agents/archer.md +18 -4
  12. package/template/.claude/agents/rogue.md +18 -4
  13. package/template/.claude/agents/warrior.md +18 -4
  14. package/template/.claude/agents/wizard.md +32 -5
  15. package/template/.claude/dungeon-master-rules.md +120 -31
  16. package/template/.claude/hooks/raid-lib.sh +45 -4
  17. package/template/.claude/hooks/raid-pre-compact.sh +8 -4
  18. package/template/.claude/hooks/raid-session-end.sh +2 -2
  19. package/template/.claude/hooks/raid-session-start.sh +2 -0
  20. package/template/.claude/hooks/rtk-bridge.sh +46 -0
  21. package/template/.claude/hooks/validate-dungeon.sh +11 -3
  22. package/template/.claude/hooks/validate-file-naming.sh +6 -1
  23. package/template/.claude/hooks/validate-no-placeholders.sh +13 -2
  24. package/template/.claude/hooks/validate-write-gate.sh +7 -2
  25. package/template/.claude/party-rules.md +91 -65
  26. package/template/.claude/skills/raid-browser/SKILL.md +3 -5
  27. package/template/.claude/skills/raid-browser-chrome/SKILL.md +1 -1
  28. package/template/.claude/skills/raid-canonical-design/SKILL.md +309 -162
  29. package/template/.claude/skills/raid-canonical-implementation/SKILL.md +157 -132
  30. package/template/.claude/skills/raid-canonical-implementation-plan/SKILL.md +196 -141
  31. package/template/.claude/skills/raid-canonical-prd/SKILL.md +92 -89
  32. package/template/.claude/skills/raid-canonical-protocol/SKILL.md +29 -123
  33. package/template/.claude/skills/raid-canonical-review/SKILL.md +292 -148
  34. package/template/.claude/skills/raid-debugging/SKILL.md +1 -7
  35. package/template/.claude/skills/raid-init/SKILL.md +7 -5
  36. package/template/.claude/skills/raid-tdd/SKILL.md +5 -5
  37. package/template/.claude/skills/raid-teambuff/SKILL.md +6 -24
  38. package/template/.claude/skills/raid-verification/SKILL.md +0 -6
  39. package/template/.claude/skills/raid-wrap-up/SKILL.md +30 -29
@@ -5,97 +5,89 @@ description: "Use when Phase 4 (Implementation) begins in a Canonical Quest, aft
5
5
 
6
6
  # Raid Implementation — Phase 4
7
7
 
8
- One builds, two attack and the attackers attack each other's reviews too. Every implementation earns its approval through direct adversarial pressure.
8
+ Execute the plan. The Wizard assigns tasks strategically by domain affinity no dice, no challengers. Agents implement with TDD, report, and move to the next task. Cross-review happens in Phase 5.
9
9
 
10
10
  <HARD-GATE>
11
- Do NOT implement without an approved plan (except Scout mode). Do NOT skip TDD. Do NOT let any implementation pass unchallenged. Agents communicate via SendMessage — do not spawn subagents. Use `raid-tdd` skill for all test-driven development. Use `raid-verification` before any completion claims.
11
+ Do NOT implement without an approved plan. Do NOT skip TDD it is an Iron Law. Use `raid-tdd` skill for all test-driven development. Use `raid-verification` before any completion claims.
12
12
  </HARD-GATE>
13
13
 
14
- ## Mode Behavior
15
-
16
- - **Full Raid**: 1 implements, 2 challenge (and challenge each other's reviews). Rotate implementer.
17
- - **Skirmish**: 1 implements, 1 challenges. Swap roles each task.
18
- - **Scout**: 1 agent implements. Wizard reviews. Self-challenge ruthlessly.
19
-
20
- TDD is enforced in ALL modes. This is an Iron Law.
21
-
22
14
  ## Process Flow
23
15
 
24
16
  ```dot
25
17
  digraph implementation {
26
- "Wizard reads plan + Phase 3 plan docs" -> "Create task tracking (TaskCreate)";
27
- "Create task tracking (TaskCreate)" -> "Wizard assigns task N (rotate implementer)";
28
- "Wizard assigns task N (rotate implementer)" -> "Wizard opens task Dungeon";
29
- "Wizard opens task Dungeon" -> "Implementer executes (TDD)";
30
- "Implementer executes (TDD)" -> "Implementer reports status";
31
- "Implementer reports status" -> "Status?" [shape=diamond];
32
- "Status?" -> "Challengers attack directly" [label="DONE"];
33
- "Status?" -> "Read concerns, decide" [label="DONE_WITH_CONCERNS"];
34
- "Status?" -> "Provide context, re-dispatch" [label="NEEDS_CONTEXT"];
35
- "Status?" -> "Assess blocker" [label="BLOCKED"];
36
- "Read concerns, decide" -> "Challengers attack directly";
37
- "Provide context, re-dispatch" -> "Implementer executes (TDD)";
38
- "Assess blocker" -> "Break down task / escalate";
39
- "Challengers attack directly" -> "Challengers build on each other's critiques";
40
- "Challengers build on each other's critiques" -> "Implementer defends against both";
41
- "Implementer defends against both" -> "All issues resolved?" [shape=diamond];
42
- "All issues resolved?" -> "Challengers attack directly" [label="no, continue"];
43
- "All issues resolved?" -> "Wizard closes task: ruling" [label="yes"];
44
- "Wizard closes task: ruling" -> "More tasks?" [shape=diamond];
45
- "More tasks?" -> "Wizard assigns task N (rotate implementer)" [label="yes"];
46
- "More tasks?" -> "Archive Dungeon + invoke raid-canonical-review" [label="no", shape=doublecircle];
18
+ "Wizard reads plan + all prior deliverables" -> "Phase recap (PRD + Design + Plan)";
19
+ "Phase recap (PRD + Design + Plan)" -> "Step 0: Agents review plan for concerns";
20
+ "Step 0: Agents review plan for concerns" -> "Wizard divides tasks by domain affinity";
21
+ "Wizard divides tasks by domain affinity" -> "Wizard assigns task to agent";
22
+ "Wizard assigns task to agent" -> "Agent implements (TDD)";
23
+ "Agent implements (TDD)" -> "Agent writes breakdown in task section";
24
+ "Agent writes breakdown in task section" -> "Agent flags TURN_COMPLETE";
25
+ "Agent flags TURN_COMPLETE" -> "Wizard assigns next task" -> "More tasks?" [shape=diamond];
26
+ "More tasks?" -> "Wizard assigns task to agent" [label="yes"];
27
+ "More tasks?" -> "Wizard produces summary table" [label="no"];
28
+ "Wizard produces summary table" -> "Commit + report with deliverable link";
29
+ "Commit + report with deliverable link" -> "Ask human: Review or Wrap-up?" [shape=doublecircle];
47
30
  }
48
31
  ```
49
32
 
50
- ## Step 0: Critical Plan Review (before any implementation)
33
+ ## Step 0: Critical Plan Review
51
34
 
52
- Each agent MUST review the plan independently before implementing:
35
+ Before any implementation begins, each agent reviews the plan independently:
53
36
  - Are there concerns about feasibility or missing dependencies?
54
37
  - Are any steps unclear or ambiguous?
55
38
  - Does the plan match the design doc?
56
- - Are the TDD steps complete with actual test code?
57
39
 
58
- If concerns: raise via `WIZARD:` before starting. Fix the plan first. Never force through a flawed plan.
40
+ If concerns: raise via `WIZARD:` before starting. Fix the plan first. For minor issues, the wizard fixes the plan inline and gets human approval before implementation begins. For fundamental plan flaws, return to Phase 3.
59
41
 
60
42
  **Branch guard:** Never implement on main/master without explicit human consent. Create a feature branch first.
61
43
 
62
44
  ## Wizard Checklist
63
45
 
64
- 1. **Read the plan** — extract all tasks, dependencies, ordering
65
- 2. **Read Phase 3 plan docs** — carry forward context from `{questDir}/phase-3-plan.md` and task files
66
- 3. **Dispatch plan review** — each agent reviews plan independently, raises concerns via WIZARD:
46
+ 1. **Read the plan** — extract all tasks, dependencies, ordering from task files
47
+ 2. **Phase recap** — summarize PRD + Design + Plan findings. Present what carries forward.
48
+ 3. **Dispatch plan review** — each agent reviews the plan, raises concerns via `WIZARD:`
67
49
  4. **Resolve concerns** — fix plan issues before any implementation begins
68
- 4. **Browser setup (if `browser.enabled` in raid.json)**:
50
+ 5. **Browser setup (if `browser.enabled` in raid.json)**:
69
51
  - Check if `browser.startup` exists — if null, invoke `raid-browser` startup discovery FIRST
70
52
  - Check if Playwright is installed — if not, first task becomes "scaffold Playwright"
71
- - Assign port from `browser.portRange` to implementer
72
- 5. **Create task tracking** — use TaskCreate for every plan task
73
- 6. **Per task:**
74
- - Assign implementer via `TaskUpdate(taskId="N", owner="warrior")`
75
- - Notify via `SendMessage(to="warrior", message="Task N is yours. TDD enforced.")`
76
- - Alert challengers: `SendMessage(to="archer", message="Warrior implementing Task N. Stand by to challenge.")`
77
- - Observe messages (auto-delivered) + Dungeon updates
78
- - Close with ruling via SendMessage to all agents
79
- 7. **Track progress**mark complete only after Wizard ruling per task
80
- 8. **After all tasks** — archive Dungeon, invoke `raid-canonical-review`
53
+ 6. **Divide tasks strategically** see Task Division below
54
+ 7. **Create task tracking** — use TaskCreate for every plan task
55
+ 8. **Dispatch tasks one at a time** — see Dispatch Protocol below
56
+ 9. **After all tasks complete** — review the evolution log, verify all task reports are filled, fill the Implementation Summary table, polish before presenting to human
57
+ 10. **Commit** `feat(quest-{slug}): phase 4 implementation {summary}`
58
+ 11. **Report** link `{questDir}/phases/phase-4-implementation.md` to the human
59
+ 12. **Ask human** Review phase or straight to Wrap-up?
60
+
61
+ ## Task DivisionStrategic Assignment
62
+
63
+ The Wizard assigns tasks deliberately. No dice roll, no rotation — strategic domain-based assignment:
64
+
65
+ - **Group by affinity:** Tasks that touch the same files or domain go to the same agent. This gives the agent continuity and deeper context across related changes.
66
+ - **Match lens to domain:** Wizard considers which agent's lens fits the task best. Infrastructure-heavy tasks suit Warrior's structural lens. Pattern-sensitive integrations suit Archer. Security/validation tasks suit Rogue.
67
+ - **Track dependencies:** Know which tasks block which. If task 10 depends on task 3 (currently being implemented by @warrior), don't assign task 10 to @archer yet — give them a non-blocked task instead, or have them wait.
81
68
 
82
- ## The Implementation Gauntlet (per task)
69
+ **Example reasoning:**
70
+ > *"Tasks 1-3 all modify the auth module — assigning to @warrior for context continuity. Tasks 4-5 are integration points that need pattern consistency — @archer. Tasks 6-7 involve input validation and error paths — @rogue. Task 8 depends on tasks 1-3, so it waits until @warrior finishes those."*
83
71
 
84
- ### Step 1: Wizard Assigns + Opens Dungeon
72
+ ## Dispatch Template
85
73
 
86
- One agent implements. Others prepare to attack. **Rotate the implementer** across tasks.
74
+ One agent at a time. Dispatch carries task assignment and file pointers. TDD protocol comes from the agent's `raid-tdd` skill. Report instructions are embedded in the evolution log.
87
75
 
88
- Assign via task list and notify via SendMessage:
89
76
  ```
90
- TaskUpdate(taskId="N", owner="warrior")
91
- SendMessage(to="warrior", message="Task N is yours. TDD enforced. Commit when green. Report status when done.")
92
- SendMessage(to="archer", message="Warrior is implementing Task N. Challenge when they report done.")
93
- SendMessage(to="rogue", message="Warrior is implementing Task N. Challenge when they report done.")
77
+ TURN_DISPATCH: Task {N} — {task name}.
78
+ Quest: {description}
79
+
80
+ FIRST: Read the FULL document at {questDir}/phases/phase-4-implementation.md to understand
81
+ the structure and find your task section. Read the embedded instructions in your section.
82
+ Then read your task spec at {questDir}/spoils/tasks/phase-3-plan-task-{NN}.md.
83
+ THEN: Implement with TDD (load raid-tdd), fill your report in your section,
84
+ and fill Implementation Notes in the task file.
85
+ Signal TURN_COMPLETE with status when done.
94
86
  ```
95
87
 
96
- Phase 4 uses `{questDir}/phase-4-implementation.md` as the implementation log. The Wizard announces each task assignment via SendMessage. Agents flag `ROUND_COMPLETE:` when done with their task.
88
+ After `TURN_COMPLETE:`, the Wizard reads the report, then assigns the next task.
97
89
 
98
- ### Step 2: Implementer Executes (TDD)
90
+ ## Agent Implementation Protocol (TDD)
99
91
 
100
92
  Following `raid-tdd` strictly:
101
93
  1. Write the failing test from the plan
@@ -104,79 +96,112 @@ Following `raid-tdd` strictly:
104
96
  4. Run — verify pass
105
97
  5. Run FULL test suite — verify no regressions
106
98
  6. Self-review against acceptance criteria
107
- 7. Commit: `feat(scope): descriptive message`
99
+ 7. Write brief implementation breakdown in the task's "Implementation Notes" section
100
+ 8. Commit: `feat(scope): descriptive message`
108
101
 
109
102
  **Browser tasks (if `browser.enabled` and task involves browser-facing code):**
110
103
  - BOOT app on assigned port before browser TDD (invoke `raid-browser`)
111
- - Use Playwright MCP tools to explore while authoring tests
112
- - CLEANUP after task is complete (or on failure — cleanup always runs)
104
+ - Use Playwright MCP tools while authoring tests
105
+ - CLEANUP after task is complete (or on failure)
113
106
 
114
- Report status: **DONE** | **DONE_WITH_CONCERNS** | **NEEDS_CONTEXT** | **BLOCKED**
107
+ Signal `TURN_COMPLETE:` with status: **DONE** | **DONE_WITH_CONCERNS** | **NEEDS_CONTEXT** | **BLOCKED**
115
108
 
116
- ### Step 3: Challengers Attack Directly
109
+ ## Handling Agent Status
117
110
 
118
- Challengers work in their own tmux panes. They communicate directly with the implementer and each other via SendMessage:
111
+ | Status | Action |
112
+ |--------|--------|
113
+ | **DONE** | Wizard reads breakdown, assigns next task |
114
+ | **DONE_WITH_CONCERNS** | Read concerns. If correctness: address before next task. If observations: note and proceed. |
115
+ | **NEEDS_CONTEXT** | Provide missing information. Re-dispatch same task. |
116
+ | **BLOCKED** | 1) Context → provide more. 2) Too complex → break into subtasks. 3) Plan wrong → fix plan. |
119
117
 
120
- 1. **Read ACTUAL CODE** (not the implementer's report — reports lie)
121
- 2. **Challenge the implementer directly:** `CHALLENGE: @Warrior, your implementation at handler.js:23 doesn't validate...`
122
- 3. **Build on each other's critiques:** `BUILDING: @Archer, your naming drift finding — the inconsistency also affects the test at...`
123
- 4. **Challenge weak implementations:** `CHALLENGE: @Rogue, you claimed this handles concurrent access but there's no lock at...`
124
- 5. **Pin verified issues to Dungeon:** `DUNGEON: Confirmed issue — handler.js:23 missing validation [verified by @Archer and @Rogue]`
118
+ ## When to STOP Executing
125
119
 
126
- **Browser verification (if `browser.enabled`):**
127
- - Challengers can BOOT on their own ports to run Playwright tests independently
128
- - Verify tests pass without flakiness (run 3x if suspect)
129
- - Explore the feature manually via Playwright MCP to find gaps the tests missed
130
- - Each challenger CLEANUPS their own instance when done
120
+ STOP implementing immediately when:
121
+ - Missing dependency not covered in plan
122
+ - Test fails for unexpected reason (not the expected "right" failure)
123
+ - Instruction is ambiguous two valid interpretations exist
124
+ - Verification fails repeatedly (2+ times on same step)
125
+ - Implementation diverges significantly from plan
131
126
 
132
- **Challengers check:**
133
- - Spec compliance — does it match the task spec line by line?
134
- - Design doc compliance — does it match the design requirements?
135
- - Edge cases — what inputs break it?
136
- - Test quality — do tests prove correctness or just confirm happy path?
137
- - Naming consistency — do new names follow established patterns?
138
- - File structure — does new code follow project conventions?
127
+ **Ask via `WIZARD:` rather than guessing.** The Wizard escalates to the human if needed.
139
128
 
140
- ### Step 4: Implementer Defends
129
+ ## Evolution Log Template
141
130
 
142
- The implementer defends against BOTH challengers simultaneously:
143
- - Respond to each challenge with evidence or concede immediately
144
- - Fix conceded issues
145
- - Re-run all tests
146
- - Pin resolved issues to Dungeon: `DUNGEON: Resolved — added validation at handler.js:23 [tests pass]`
131
+ Scaffold `{questDir}/phases/phase-4-implementation.md`. Wizard pre-fills one task slot per plan task with the assigned agent's name:
147
132
 
148
- ### Step 5: Wizard Closes Task
133
+ ```markdown
134
+ # Phase 4: Implementation — Evolution Log
149
135
 
150
- Broadcast the ruling:
151
- ```
152
- SendMessage(to="warrior", message="RULING: Task N [approved | needs fixes].")
153
- SendMessage(to="archer", message="RULING: Task N [approved | needs fixes].")
154
- SendMessage(to="rogue", message="RULING: Task N [approved | needs fixes].")
155
- ```
136
+ ## Quest: [quest description]
137
+ ## Quest Type: Canonical Quest
156
138
 
157
- The Wizard closes when messages + Dungeon show all issues resolved and challengers have no remaining critiques.
139
+ ## References
140
+ - PRD: `{questDir}/spoils/prd.md` (if exists)
141
+ - Design: `{questDir}/spoils/design.md`
142
+ - Tasks: `{questDir}/spoils/tasks/phase-3-plan-task-*.md`
158
143
 
159
- ## Handling Implementer Status
144
+ ## Quest Goal
145
+ <!-- Wizard writes 2-3 lines: what the implementation aims to deliver,
146
+ total task count, and the division strategy (which agent gets which domain) -->
160
147
 
161
- | Status | Action |
162
- |--------|--------|
163
- | **DONE** | Challengers attack directly |
164
- | **DONE_WITH_CONCERNS** | Read concerns. If correctness: address before attack. If observations: note and proceed. |
165
- | **NEEDS_CONTEXT** | Provide missing information. Re-dispatch. |
166
- | **BLOCKED** | 1) Context → provide more. 2) Too complex → break into subtasks. 3) Plan wrong → fix plan. |
148
+ ## Task Assignment
167
149
 
168
- **Never ignore an escalation.** If the implementer says it's stuck, something needs to change.
150
+ <!-- Wizard fills this table after dividing tasks by domain affinity -->
169
151
 
170
- ## When to STOP Executing
152
+ | Task | Agent | Domain | Blocked By | Status |
153
+ |------|-------|--------|------------|--------|
171
154
 
172
- STOP implementing immediately when:
173
- - Missing dependency not covered in plan
174
- - Test fails for unexpected reason (not the expected "right" failure)
175
- - Instruction is ambiguous — two valid interpretations exist
176
- - Verification fails repeatedly (2+ times on same step)
177
- - Implementation diverges significantly from plan
155
+ ---
156
+
157
+ ## Task Reports
158
+
159
+ ### Task 1: [Name] @{assigned agent}
160
+
161
+ <!-- @{agent}: After completing this task, fill in the sections below.
162
+ Sign your report. Be concise — this is a report, not a narrative.
163
+ Also fill the Implementation Notes section in the Phase 3 task file.
164
+ Update the Task Assignment table status to "complete" when done. -->
165
+
166
+ **Status:** pending | in_progress | complete | blocked
167
+ **Files Changed:**
168
+ <!-- List every file created or modified, with action:
169
+ - `src/auth/handler.ts` (created)
170
+ - `src/middleware.ts` (modified L45-60) -->
171
+
172
+ **Summary:**
173
+ <!-- 1-3 sentences: what was built, key decisions made, test count.
174
+ Reference the task file for full spec. -->
175
+
176
+ **Commit:** `feat(scope): message`
177
+
178
+ **Deviations from Plan:**
179
+ <!-- If you deviated from the task spec, explain WHAT and WHY.
180
+ If none: "None — implemented as specified." -->
178
181
 
179
- **Ask via `WIZARD:` rather than guessing.** Don't force through blockers — they indicate plan gaps, not agent weakness. The Wizard escalates to the human if needed.
182
+ ---
183
+
184
+ <!-- Wizard pre-scaffolds one slot per task with the assigned agent's name -->
185
+
186
+ ---
187
+
188
+ ## Implementation Summary
189
+
190
+ <!-- Wizard fills this after ALL tasks are complete.
191
+ This is the phase deliverable — a table of all changes. -->
192
+
193
+ | File | Change | Why | Task | Agent |
194
+ |------|--------|-----|------|-------|
195
+
196
+ ---
197
+
198
+ ## Writing Guidance
199
+ - Sign all work: `@{name}`
200
+ - Be concise — report what happened, not how you felt about it
201
+ - Every deviation from plan must be explained
202
+ - Update the Task Assignment table as you go
203
+ - If blocked: flag WIZARD: immediately, don't wait
204
+ ```
180
205
 
181
206
  ## Quality Gates Per Task
182
207
 
@@ -184,28 +209,24 @@ STOP implementing immediately when:
184
209
  - [ ] Tests fail for the right reason
185
210
  - [ ] Tests pass after implementation
186
211
  - [ ] Full test suite passes (no regressions)
187
- - [ ] Challengers attacked ACTUAL CODE directly
188
- - [ ] Challengers built on each other's critiques
189
- - [ ] All challenges addressed (fixed or defended with evidence)
190
- - [ ] Implementation matches task spec (nothing more, nothing less)
212
+ - [ ] Implementation matches task spec
191
213
  - [ ] Naming follows established patterns
192
- - [ ] Verified issues pinned to Dungeon
214
+ - [ ] Implementation breakdown written in task section
193
215
  - [ ] Code committed with descriptive message
194
216
 
195
217
  ## Red Flags
196
218
 
197
219
  | Thought | Reality |
198
220
  |---------|---------|
199
- | "This task is simple, skip cross-testing" | Simple tasks are where assumptions slip through. |
200
- | "The challengers should report to the Wizard" | Challengers attack the implementer and each other directly. |
201
- | "We can batch the review for multiple tasks" | Review per task. Batching lets issues compound. |
202
- | "I trust this agent's work" | Trust without verification is the definition of a bug farm. |
203
- | "The same agent can implement twice in a row" | Rotation prevents blind spots. Enforce it. |
204
- | "I'll wait for the Wizard to coordinate the review" | Attack directly. Build on each other's findings. |
221
+ | "This task is simple, skip TDD" | TDD is an Iron Law. No exceptions. |
222
+ | "Let me review my teammate's code" | No cross-review during implementation. That's Phase 5. |
223
+ | "I'll implement tasks in whatever order" | Wizard assigns strategically. Follow the assignment. |
224
+ | "I'll batch commits across tasks" | One commit per task. Atomic changes. |
225
+ | "The plan is wrong, I'll improvise" | Flag to Wizard via WIZARD:. Don't improvise. |
205
226
 
206
227
  ## Escalation
207
228
 
208
- - **3+ fix attempts on one task:** Question whether the task spec or design is wrong.
229
+ - **3+ attempts on one task:** Question whether the task spec or design is wrong.
209
230
  - **Agent repeatedly blocked:** The plan may need revision.
210
231
  - **Tests can't be written:** The design may not be testable. Return to Phase 2.
211
232
 
@@ -213,16 +234,20 @@ STOP implementing immediately when:
213
234
 
214
235
  ## Phase Transition
215
236
 
216
- When all tasks are approved and committed:
237
+ When all tasks are complete and committed:
217
238
 
218
- 1. Update `.claude/raid-session` phase via Bash (write gate blocks Write/Edit on this file):
239
+ 1. Update raid-session phase via Bash:
219
240
  ```bash
220
241
  jq '.phase="review"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
221
242
  ```
222
- 2. **Commit**: `feat(quest-{slug}): phase 4 implementation — {summary}`
223
- 3. **Send phase report to human**: what was built, test coverage, any concerns
224
- 4. **Ask human**: "Shall we inspect the treasure? (Review phase) Or proceed directly to wrap-up?"
225
- 5. If review → **Load `raid-canonical-review` skill and begin Phase 5**
226
- 6. If skip → **Load `raid-wrap-up` skill and begin Phase 6**
243
+ 2. **Commit:** `feat(quest-{slug}): phase 4 implementation — {summary}`
244
+ 3. **Report:** Link `{questDir}/phases/phase-4-implementation.md` and summary table to the human.
245
+ 4. **Ask human:** "Shall we inspect the treasure? (Review phase) Or proceed directly to wrap-up?"
246
+ 5. If review → **Load `raid-canonical-review` and begin Phase 5**
247
+ 6. If skip → **Load `raid-wrap-up` and begin Phase 6**
248
+
249
+ ## Phase Spoils
227
250
 
228
- Do not wait. Do not ask twice. The next action after all tasks pass is the human's choice.
251
+ **Two outputs:**
252
+ - `{questDir}/phases/phase-4-implementation.md` — Evolution log with per-task breakdowns
253
+ - Code changes committed with descriptive messages + summary table of all changed files