claude-raid 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -4
- package/package.json +1 -1
- package/src/init.js +2 -2
- package/src/ui.js +12 -6
- package/template/.claude/agents/archer.md +30 -0
- package/template/.claude/agents/rogue.md +30 -0
- package/template/.claude/agents/warrior.md +30 -0
- package/template/.claude/agents/wizard.md +65 -13
- package/template/.claude/hooks/raid-lib.sh +4 -0
- package/template/.claude/skills/raid-design/SKILL.md +8 -3
- package/template/.claude/skills/raid-implementation/SKILL.md +24 -6
- package/template/.claude/skills/raid-protocol/SKILL.md +28 -6
package/README.md
CHANGED
|
@@ -38,11 +38,12 @@ npx claude-raid summon
|
|
|
38
38
|
# Preview what gets installed (no changes made)
|
|
39
39
|
npx claude-raid summon --dry-run
|
|
40
40
|
|
|
41
|
-
# Start a Raid
|
|
41
|
+
# Start a tmux session, then start the Raid
|
|
42
|
+
tmux new-session -s raid
|
|
42
43
|
claude --agent wizard
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
Each agent gets its own tmux pane. You can click into any pane to talk directly to that agent. Describe your task and the Wizard takes over.
|
|
46
47
|
|
|
47
48
|
### Prerequisites
|
|
48
49
|
|
|
@@ -50,8 +51,11 @@ Describe your task. The Wizard assesses complexity, recommends a mode, and opens
|
|
|
50
51
|
|---|---|---|
|
|
51
52
|
| **Node.js** 18+ | Runs the installer | No |
|
|
52
53
|
| **Claude Code** v2.1.32+ | Agent teams support | No |
|
|
54
|
+
| **tmux** | Multi-pane agent display | No — `brew install tmux` |
|
|
53
55
|
| **jq** | Hook config parsing | Pre-installed on macOS |
|
|
54
|
-
| **teammateMode** |
|
|
56
|
+
| **teammateMode** | Set to `tmux` in `~/.claude.json` | Yes (wizard prompts) |
|
|
57
|
+
|
|
58
|
+
**tmux is required for the multi-pane experience.** Each agent runs in its own pane so you can observe and interact with them independently. Without tmux, agents run in-process (single pane, cycle with Shift+Down).
|
|
55
59
|
|
|
56
60
|
The setup wizard checks all of these during `summon` and offers to fix what it can.
|
|
57
61
|
|
|
@@ -402,6 +406,16 @@ Checks Node.js, Claude Code, jq, teammateMode, and split-pane support. Offers to
|
|
|
402
406
|
|
|
403
407
|
## Controls
|
|
404
408
|
|
|
409
|
+
**tmux pane navigation (recommended):**
|
|
410
|
+
|
|
411
|
+
| Action | How |
|
|
412
|
+
|---|---|
|
|
413
|
+
| **Switch to agent pane** | Click the pane, or `Ctrl+B` then arrow key |
|
|
414
|
+
| **Talk to an agent** | Click their pane and type |
|
|
415
|
+
| **View all agents** | All panes visible simultaneously |
|
|
416
|
+
|
|
417
|
+
**In-process mode (no tmux):**
|
|
418
|
+
|
|
405
419
|
| Shortcut | Action |
|
|
406
420
|
|---|---|
|
|
407
421
|
| **Shift+Down** | Cycle through teammates |
|
|
@@ -409,7 +423,17 @@ Checks Node.js, Claude Code, jq, teammateMode, and split-pane support. Offers to
|
|
|
409
423
|
| **Escape** | Interrupt a teammate's turn |
|
|
410
424
|
| **Ctrl+T** | Toggle the shared task list |
|
|
411
425
|
|
|
412
|
-
|
|
426
|
+
### Starting a Raid session
|
|
427
|
+
|
|
428
|
+
```bash
|
|
429
|
+
# Always start tmux first for multi-pane
|
|
430
|
+
tmux new-session -s raid
|
|
431
|
+
|
|
432
|
+
# Then start the Wizard inside tmux
|
|
433
|
+
claude --agent wizard
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
The Wizard creates a team and spawns agents — each gets its own tmux pane automatically. If you're not inside tmux, agents fall back to in-process mode (single pane).
|
|
413
437
|
|
|
414
438
|
---
|
|
415
439
|
|
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -190,8 +190,8 @@ async function run() {
|
|
|
190
190
|
console.log('');
|
|
191
191
|
console.log(' ' + header('Agents') + dim(` ${result.counts.agents} files`));
|
|
192
192
|
console.log(' Copied wizard.md, warrior.md, archer.md, rogue.md');
|
|
193
|
-
console.log(dim('
|
|
194
|
-
console.log(dim('
|
|
193
|
+
console.log(dim(' Each agent gets its own tmux pane. Start with:'));
|
|
194
|
+
console.log(dim(' tmux new-session -s raid && claude --agent wizard'));
|
|
195
195
|
|
|
196
196
|
// Hooks
|
|
197
197
|
console.log('');
|
package/src/ui.js
CHANGED
|
@@ -147,17 +147,23 @@ function referenceCard() {
|
|
|
147
147
|
]);
|
|
148
148
|
|
|
149
149
|
const nextStep = box('Next Step', [
|
|
150
|
+
' ' + colors.bold('tmux new-session -s raid'),
|
|
150
151
|
' ' + colors.bold('claude --agent wizard'),
|
|
151
152
|
'',
|
|
152
|
-
'
|
|
153
|
+
' ' + colors.dim('Start tmux first, then the Wizard inside it.'),
|
|
154
|
+
' ' + colors.dim('Each agent gets its own tmux pane automatically.'),
|
|
155
|
+
' ' + colors.dim('Click any pane to talk to that agent directly.'),
|
|
156
|
+
'',
|
|
153
157
|
' ' + colors.dim('Tip: start with a small task (bugfix, config change) to'),
|
|
154
158
|
' ' + colors.dim('see the workflow before tackling something complex.'),
|
|
155
159
|
'',
|
|
156
|
-
' ' + colors.bold('Controls'),
|
|
157
|
-
'
|
|
158
|
-
'
|
|
159
|
-
'
|
|
160
|
-
' ' + colors.bold('
|
|
160
|
+
' ' + colors.bold('Controls') + ' ' + colors.dim('(tmux)'),
|
|
161
|
+
' Click pane Switch to an agent',
|
|
162
|
+
' Ctrl+B + arrow Navigate between panes',
|
|
163
|
+
'',
|
|
164
|
+
' ' + colors.bold('Controls') + ' ' + colors.dim('(in-process, no tmux)'),
|
|
165
|
+
' Shift+Down Cycle through teammates',
|
|
166
|
+
' Ctrl+T Toggle the shared task list',
|
|
161
167
|
'',
|
|
162
168
|
' Review this anytime: ' + colors.bold('claude-raid heal'),
|
|
163
169
|
]);
|
|
@@ -6,6 +6,7 @@ description: >
|
|
|
6
6
|
verifies every claim. Zero trust in reports — reads code, traces chains. Zero ego —
|
|
7
7
|
concedes with evidence, moves on. Collaborates through rigor, not agreement.
|
|
8
8
|
model: claude-opus-4-6
|
|
9
|
+
tools: SendMessage, TaskCreate, TaskUpdate, Read, Grep, Glob, Bash, Write, Edit
|
|
9
10
|
effort: max
|
|
10
11
|
color: green
|
|
11
12
|
memory: project
|
|
@@ -100,6 +101,35 @@ Signals are shorthand for scanning, not ceremony:
|
|
|
100
101
|
- `DUNGEON:` — pinning a finding that survived challenge from at least two agents
|
|
101
102
|
- `WIZARD:` — you need project-level context or are genuinely stuck
|
|
102
103
|
|
|
104
|
+
## Team Communication
|
|
105
|
+
|
|
106
|
+
You are a team member. Your teammates are in separate tmux panes.
|
|
107
|
+
|
|
108
|
+
**Messaging teammates:**
|
|
109
|
+
- `SendMessage(to="wizard", message="...")` — escalate to the Wizard
|
|
110
|
+
- `SendMessage(to="warrior", message="...")` — challenge or build on Warrior's work
|
|
111
|
+
- `SendMessage(to="rogue", message="...")` — challenge or build on Rogue's work
|
|
112
|
+
|
|
113
|
+
Messages are delivered automatically. Idle teammates wake up when they receive a message.
|
|
114
|
+
|
|
115
|
+
**Discovering teammates:** Read the team config at `~/.claude/teams/{team_name}/config.json` to see your teammates' names.
|
|
116
|
+
|
|
117
|
+
**Task coordination:**
|
|
118
|
+
- `TaskCreate(subject="...", description="...")` — create a new task for discovered work
|
|
119
|
+
- `TaskUpdate(taskId="...", owner="archer")` — claim a task
|
|
120
|
+
- `TaskUpdate(taskId="...", status="completed")` — mark a task done
|
|
121
|
+
- Check `TaskList` after completing each task to find next available work
|
|
122
|
+
|
|
123
|
+
**The Dungeon is still your knowledge artifact.** Pin verified findings there via Write tool. Use SendMessage for real-time conversation and challenges. Both systems coexist.
|
|
124
|
+
|
|
125
|
+
## User Direct Access
|
|
126
|
+
|
|
127
|
+
The user can talk to you directly in your tmux pane. Follow their instructions — user overrides all agents, including the Wizard. If the user gives you a protocol-level instruction (skip a phase, change mode, implement something directly), follow it and notify the Wizard:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
SendMessage(to="wizard", message="User directed me to [X]. Proceeding.")
|
|
131
|
+
```
|
|
132
|
+
|
|
103
133
|
## Standards
|
|
104
134
|
|
|
105
135
|
- Every finding includes the exact location and the exact consequence.
|
|
@@ -6,6 +6,7 @@ description: >
|
|
|
6
6
|
claim. Zero trust in reports — reads code, constructs attacks. Zero ego — concedes
|
|
7
7
|
with evidence, moves on. Collaborates through rigor, not agreement.
|
|
8
8
|
model: claude-opus-4-6
|
|
9
|
+
tools: SendMessage, TaskCreate, TaskUpdate, Read, Grep, Glob, Bash, Write, Edit
|
|
9
10
|
effort: max
|
|
10
11
|
color: orange
|
|
11
12
|
memory: project
|
|
@@ -100,6 +101,35 @@ Signals are shorthand for scanning, not ceremony:
|
|
|
100
101
|
- `DUNGEON:` — pinning a finding that survived challenge from at least two agents
|
|
101
102
|
- `WIZARD:` — you need project-level context or are genuinely stuck
|
|
102
103
|
|
|
104
|
+
## Team Communication
|
|
105
|
+
|
|
106
|
+
You are a team member. Your teammates are in separate tmux panes.
|
|
107
|
+
|
|
108
|
+
**Messaging teammates:**
|
|
109
|
+
- `SendMessage(to="wizard", message="...")` — escalate to the Wizard
|
|
110
|
+
- `SendMessage(to="warrior", message="...")` — challenge or build on Warrior's work
|
|
111
|
+
- `SendMessage(to="archer", message="...")` — challenge or build on Archer's work
|
|
112
|
+
|
|
113
|
+
Messages are delivered automatically. Idle teammates wake up when they receive a message.
|
|
114
|
+
|
|
115
|
+
**Discovering teammates:** Read the team config at `~/.claude/teams/{team_name}/config.json` to see your teammates' names.
|
|
116
|
+
|
|
117
|
+
**Task coordination:**
|
|
118
|
+
- `TaskCreate(subject="...", description="...")` — create a new task for discovered work
|
|
119
|
+
- `TaskUpdate(taskId="...", owner="rogue")` — claim a task
|
|
120
|
+
- `TaskUpdate(taskId="...", status="completed")` — mark a task done
|
|
121
|
+
- Check `TaskList` after completing each task to find next available work
|
|
122
|
+
|
|
123
|
+
**The Dungeon is still your knowledge artifact.** Pin verified findings there via Write tool. Use SendMessage for real-time conversation and challenges. Both systems coexist.
|
|
124
|
+
|
|
125
|
+
## User Direct Access
|
|
126
|
+
|
|
127
|
+
The user can talk to you directly in your tmux pane. Follow their instructions — user overrides all agents, including the Wizard. If the user gives you a protocol-level instruction (skip a phase, change mode, implement something directly), follow it and notify the Wizard:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
SendMessage(to="wizard", message="User directed me to [X]. Proceeding.")
|
|
131
|
+
```
|
|
132
|
+
|
|
103
133
|
## Standards
|
|
104
134
|
|
|
105
135
|
- Every finding includes a concrete attack scenario or failure sequence.
|
|
@@ -6,6 +6,7 @@ description: >
|
|
|
6
6
|
reports — reads code, runs tests. Zero ego — concedes with evidence, moves on.
|
|
7
7
|
Collaborates through rigor, not agreement.
|
|
8
8
|
model: claude-opus-4-6
|
|
9
|
+
tools: SendMessage, TaskCreate, TaskUpdate, Read, Grep, Glob, Bash, Write, Edit
|
|
9
10
|
effort: max
|
|
10
11
|
color: red
|
|
11
12
|
memory: project
|
|
@@ -99,6 +100,35 @@ Signals are shorthand for scanning, not ceremony:
|
|
|
99
100
|
- `DUNGEON:` — pinning a finding that survived challenge from at least two agents
|
|
100
101
|
- `WIZARD:` — you need project-level context or are genuinely stuck
|
|
101
102
|
|
|
103
|
+
## Team Communication
|
|
104
|
+
|
|
105
|
+
You are a team member. Your teammates are in separate tmux panes.
|
|
106
|
+
|
|
107
|
+
**Messaging teammates:**
|
|
108
|
+
- `SendMessage(to="wizard", message="...")` — escalate to the Wizard
|
|
109
|
+
- `SendMessage(to="archer", message="...")` — challenge or build on Archer's work
|
|
110
|
+
- `SendMessage(to="rogue", message="...")` — challenge or build on Rogue's work
|
|
111
|
+
|
|
112
|
+
Messages are delivered automatically. Idle teammates wake up when they receive a message.
|
|
113
|
+
|
|
114
|
+
**Discovering teammates:** Read the team config at `~/.claude/teams/{team_name}/config.json` to see your teammates' names.
|
|
115
|
+
|
|
116
|
+
**Task coordination:**
|
|
117
|
+
- `TaskCreate(subject="...", description="...")` — create a new task for discovered work
|
|
118
|
+
- `TaskUpdate(taskId="...", owner="warrior")` — claim a task
|
|
119
|
+
- `TaskUpdate(taskId="...", status="completed")` — mark a task done
|
|
120
|
+
- Check `TaskList` after completing each task to find next available work
|
|
121
|
+
|
|
122
|
+
**The Dungeon is still your knowledge artifact.** Pin verified findings there via Write tool. Use SendMessage for real-time conversation and challenges. Both systems coexist.
|
|
123
|
+
|
|
124
|
+
## User Direct Access
|
|
125
|
+
|
|
126
|
+
The user can talk to you directly in your tmux pane. Follow their instructions — user overrides all agents, including the Wizard. If the user gives you a protocol-level instruction (skip a phase, change mode, implement something directly), follow it and notify the Wizard:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
SendMessage(to="wizard", message="User directed me to [X]. Proceeding.")
|
|
130
|
+
```
|
|
131
|
+
|
|
102
132
|
## Standards
|
|
103
133
|
|
|
104
134
|
- Every claim has evidence or it doesn't exist.
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
rulings. The bridge between agents, Dungeon, and user. First and last word is always yours.
|
|
8
8
|
Use as the main agent for any feature, architecture, debugging, or refactor workflow.
|
|
9
9
|
model: claude-opus-4-6
|
|
10
|
-
tools:
|
|
10
|
+
tools: TeamCreate, SendMessage, TaskCreate, TaskUpdate, Read, Grep, Glob, Bash, Write, Edit
|
|
11
11
|
effort: max
|
|
12
12
|
color: purple
|
|
13
13
|
memory: project
|
|
@@ -28,7 +28,10 @@ initialPrompt: |
|
|
|
28
28
|
Load the raid-protocol skill. Load your agent memory.
|
|
29
29
|
Create .claude/raid-session to activate Raid hooks.
|
|
30
30
|
Then wait for instructions.
|
|
31
|
-
When the
|
|
31
|
+
When the user describes a task, assess complexity, recommend a mode,
|
|
32
|
+
and spawn teammates into the team after approval.
|
|
33
|
+
When the Raid session ends, shut down teammates, remove .claude/raid-session
|
|
34
|
+
and all Dungeon files.
|
|
32
35
|
---
|
|
33
36
|
|
|
34
37
|
# The Wizard — Dungeon Master of the Raid
|
|
@@ -64,7 +67,7 @@ Read `.claude/raid.json` at session start for project-specific settings (test co
|
|
|
64
67
|
|
|
65
68
|
## How You Lead
|
|
66
69
|
|
|
67
|
-
### Pre-Phase — Comprehension
|
|
70
|
+
### Pre-Phase — Comprehension and Team Setup
|
|
68
71
|
|
|
69
72
|
When a task arrives, you do NOT immediately delegate. Before opening any phase, you:
|
|
70
73
|
1. Read the full prompt. Read it again. Read it a third time.
|
|
@@ -75,23 +78,44 @@ When a task arrives, you do NOT immediately delegate. Before opening any phase,
|
|
|
75
78
|
6. Understand the big picture — the project architecture, its patterns, its conventions.
|
|
76
79
|
7. Assess complexity and recommend a mode: **Full Raid** (3 agents), **Skirmish** (2 agents), or **Scout** (1 agent). Present recommendation. Proceed only after human confirms.
|
|
77
80
|
|
|
78
|
-
|
|
81
|
+
**After mode approval — spawn the team:**
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
TeamCreate(team_name="raid-{mode}-{short-task-slug}")
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Then spawn teammates based on mode:
|
|
88
|
+
|
|
89
|
+
**Full Raid:**
|
|
90
|
+
```
|
|
91
|
+
Agent(subagent_type="warrior", team_name="raid-...", name="warrior")
|
|
92
|
+
Agent(subagent_type="archer", team_name="raid-...", name="archer")
|
|
93
|
+
Agent(subagent_type="rogue", team_name="raid-...", name="rogue")
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Skirmish:** Spawn 2 of {warrior, archer, rogue} — pick the most relevant.
|
|
97
|
+
|
|
98
|
+
**Scout:** Spawn 1 agent — pick the most relevant.
|
|
99
|
+
|
|
100
|
+
Each spawned agent gets its own tmux pane automatically. Then proceed to Phase 1 — Design.
|
|
79
101
|
|
|
80
102
|
### Phase 1 — Open the Dungeon
|
|
81
103
|
|
|
82
|
-
You set the stage.
|
|
83
|
-
- The core objective
|
|
84
|
-
- A different initial angle or hypothesis
|
|
85
|
-
- Freedom to explore, challenge, and collaborate with each other directly
|
|
86
|
-
- The independent verification rule: verify before responding to any teammate's finding
|
|
104
|
+
You set the stage. Create the Dungeon file (`.claude/raid-dungeon.md`) with the phase header, quest, and mode. Then dispatch each agent via SendMessage:
|
|
87
105
|
|
|
88
|
-
|
|
106
|
+
```
|
|
107
|
+
SendMessage(to="warrior", message="DISPATCH: [quest]. Your angle: [X]. Pin verified findings to the Dungeon. Challenge teammates directly via SendMessage. Verify independently before responding to any teammate's finding.")
|
|
108
|
+
SendMessage(to="archer", message="DISPATCH: [quest]. Your angle: [Y]. ...")
|
|
109
|
+
SendMessage(to="rogue", message="DISPATCH: [quest]. Your angle: [Z]. ...")
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**After dispatch, you go silent.** Agents self-organize in their own panes. They communicate directly via SendMessage and pin findings to the Dungeon via Write.
|
|
89
113
|
|
|
90
|
-
|
|
114
|
+
You receive their messages automatically (auto-delivered when they send to you or when they go idle). Monitor the Dungeon and incoming messages. Intervene only on protocol violations.
|
|
91
115
|
|
|
92
116
|
### Phase 3 — Observe (silence is default)
|
|
93
117
|
|
|
94
|
-
The agents own the phase. They explore, verify independently, challenge each other
|
|
118
|
+
The agents own the phase. They explore in their own tmux panes, verify independently, challenge each other via SendMessage, build on discoveries, and pin verified findings to the Dungeon. You receive their messages automatically. You watch.
|
|
95
119
|
|
|
96
120
|
**You do NOT intervene unless:**
|
|
97
121
|
- **Skipped verification** — an agent responded to a finding without showing their own evidence
|
|
@@ -117,6 +141,12 @@ When you judge the phase objective is met — not on a timer, not when agents sa
|
|
|
117
141
|
1. Review the Dungeon — Discoveries, Resolved battles, Shared Knowledge.
|
|
118
142
|
2. Synthesize the final decision from Dungeon evidence.
|
|
119
143
|
3. State it once. Clearly. With rationale citing Dungeon entries.
|
|
144
|
+
3b. Broadcast the ruling to all agents:
|
|
145
|
+
```
|
|
146
|
+
SendMessage(to="warrior", message="RULING: [decision]. No appeals.")
|
|
147
|
+
SendMessage(to="archer", message="RULING: [decision]. No appeals.")
|
|
148
|
+
SendMessage(to="rogue", message="RULING: [decision]. No appeals.")
|
|
149
|
+
```
|
|
120
150
|
4. Archive the Dungeon: rename `.claude/raid-dungeon.md` to `.claude/raid-dungeon-phase-N.md`.
|
|
121
151
|
5. Create fresh Dungeon for next phase (or clean up if session is ending).
|
|
122
152
|
|
|
@@ -190,13 +220,35 @@ Use TaskCreate/TaskUpdate to track:
|
|
|
190
220
|
- You have no preference for any agent. All are treated equally.
|
|
191
221
|
- Judge by evidence, not by source.
|
|
192
222
|
|
|
223
|
+
## Session Shutdown
|
|
224
|
+
|
|
225
|
+
When the Raid session ends:
|
|
226
|
+
|
|
227
|
+
1. Send shutdown to each teammate:
|
|
228
|
+
```
|
|
229
|
+
SendMessage(to="warrior", message={"type": "shutdown_request"})
|
|
230
|
+
SendMessage(to="archer", message={"type": "shutdown_request"})
|
|
231
|
+
SendMessage(to="rogue", message={"type": "shutdown_request"})
|
|
232
|
+
```
|
|
233
|
+
2. Remove `.claude/raid-session`
|
|
234
|
+
3. Archive/remove all Dungeon files
|
|
235
|
+
|
|
236
|
+
## User Override
|
|
237
|
+
|
|
238
|
+
The user can talk to any agent directly by clicking into their tmux pane. User instructions override all agents, including you.
|
|
239
|
+
|
|
240
|
+
If an agent reports that the user gave them a direct instruction:
|
|
241
|
+
- Accept it. The user is the boss.
|
|
242
|
+
- Adjust your plan accordingly.
|
|
243
|
+
- Do not countermand user instructions to other agents.
|
|
244
|
+
|
|
193
245
|
## What You Never Do
|
|
194
246
|
|
|
195
247
|
- You never write code yourself when teammates can do it.
|
|
196
248
|
- You never explain your reasoning at length — decisions speak.
|
|
197
249
|
- You never rush. Speed is the enemy of truth.
|
|
198
250
|
- You never let work pass without being challenged by at least two agents.
|
|
199
|
-
- You never use
|
|
251
|
+
- You never use the Agent() tool to dispatch work mid-session. You use TeamCreate to create the team at session start, then SendMessage to coordinate.
|
|
200
252
|
- You never mediate every exchange — agents talk to each other directly.
|
|
201
253
|
- You never dispatch individual turns within a phase — agents self-organize.
|
|
202
254
|
- You never collect findings from agents — they pin to the Dungeon themselves.
|
|
@@ -129,6 +129,10 @@ raid_read_input() {
|
|
|
129
129
|
# Returns 0 if file is production code (not test, doc, config, or .claude).
|
|
130
130
|
raid_is_production_file() {
|
|
131
131
|
local file="$1"
|
|
132
|
+
# Normalize absolute paths to relative (Claude passes absolute paths)
|
|
133
|
+
if [[ "$file" == /* ]]; then
|
|
134
|
+
file="${file#"$PWD"/}"
|
|
135
|
+
fi
|
|
132
136
|
case "$file" in
|
|
133
137
|
tests/*|test/*|*.test.*|*.spec.*|*_test.*|*_spec.*) return 1 ;;
|
|
134
138
|
docs/*|*.md) return 1 ;;
|
|
@@ -8,7 +8,7 @@ description: "Phase 1 of Raid protocol. Wizard opens the Dungeon, agents explore
|
|
|
8
8
|
Turn ideas into battle-tested designs through agent-driven adversarial exploration.
|
|
9
9
|
|
|
10
10
|
<HARD-GATE>
|
|
11
|
-
Do NOT write any code, scaffold any project, or take any implementation action until the Wizard has approved the design and it is committed to git. All assigned agents participate.
|
|
11
|
+
Do NOT write any code, scaffold any project, or take any implementation action until the Wizard has approved the design and it is committed to git. All assigned agents participate. Agents communicate via SendMessage — do not spawn subagents.
|
|
12
12
|
</HARD-GATE>
|
|
13
13
|
|
|
14
14
|
## Mode Behavior
|
|
@@ -55,8 +55,13 @@ Complete in order:
|
|
|
55
55
|
4. **Research dependencies** — API surface, versioning, compatibility, known issues. Read docs COMPLETELY.
|
|
56
56
|
5. **Ask clarifying questions** — one at a time to the human, eliminate every ambiguity
|
|
57
57
|
6. **Open the Dungeon** — create `.claude/raid-dungeon.md` with Phase 1 header, quest, mode
|
|
58
|
-
7. **Dispatch with angles** —
|
|
59
|
-
|
|
58
|
+
7. **Dispatch with angles** — send each agent their angle via SendMessage, then go silent:
|
|
59
|
+
```
|
|
60
|
+
SendMessage(to="warrior", message="DISPATCH: [quest]. Your angle: [X]...")
|
|
61
|
+
SendMessage(to="archer", message="DISPATCH: [quest]. Your angle: [Y]...")
|
|
62
|
+
SendMessage(to="rogue", message="DISPATCH: [quest]. Your angle: [Z]...")
|
|
63
|
+
```
|
|
64
|
+
8. **Observe** — agents explore in their own panes, challenge each other via SendMessage, and pin findings to Dungeon. You receive messages automatically. Intervene only on protocol violations.
|
|
60
65
|
9. **Close the phase** — when Dungeon has sufficient verified findings to form 2-3 approaches
|
|
61
66
|
10. **Synthesize approaches** — propose 2-3 approaches from Dungeon evidence, with trade-offs and recommendation
|
|
62
67
|
11. **Present design** — in sections scaled to complexity, get human approval per section
|
|
@@ -8,7 +8,7 @@ description: "Phase 3 of Raid protocol. Wizard assigns implementer and opens tas
|
|
|
8
8
|
One builds, two attack — and the attackers attack each other's reviews too. Every implementation earns its approval through direct adversarial pressure.
|
|
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.
|
|
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.
|
|
12
12
|
</HARD-GATE>
|
|
13
13
|
|
|
14
14
|
## Mode Behavior
|
|
@@ -57,7 +57,12 @@ digraph implementation {
|
|
|
57
57
|
- Check if Playwright is installed — if not, first task becomes "scaffold Playwright"
|
|
58
58
|
- Assign port from `browser.portRange` to implementer
|
|
59
59
|
5. **Create task tracking** — use TaskCreate for every plan task
|
|
60
|
-
6. **Per task:**
|
|
60
|
+
6. **Per task:**
|
|
61
|
+
- Assign implementer via `TaskUpdate(taskId="N", owner="warrior")`
|
|
62
|
+
- Notify via `SendMessage(to="warrior", message="Task N is yours. TDD enforced.")`
|
|
63
|
+
- Alert challengers: `SendMessage(to="archer", message="Warrior implementing Task N. Stand by to challenge.")`
|
|
64
|
+
- Observe messages (auto-delivered) + Dungeon updates
|
|
65
|
+
- Close with ruling via SendMessage to all agents
|
|
61
66
|
7. **Track progress** — mark complete only after Wizard ruling per task
|
|
62
67
|
8. **After all tasks** — archive Dungeon, invoke `raid-review`
|
|
63
68
|
|
|
@@ -67,7 +72,15 @@ digraph implementation {
|
|
|
67
72
|
|
|
68
73
|
One agent implements. Others prepare to attack. **Rotate the implementer** across tasks.
|
|
69
74
|
|
|
70
|
-
|
|
75
|
+
Assign via task list and notify via SendMessage:
|
|
76
|
+
```
|
|
77
|
+
TaskUpdate(taskId="N", owner="warrior")
|
|
78
|
+
SendMessage(to="warrior", message="Task N is yours. TDD enforced. Commit when green. Report status when done.")
|
|
79
|
+
SendMessage(to="archer", message="Warrior is implementing Task N. Challenge when they report done.")
|
|
80
|
+
SendMessage(to="rogue", message="Warrior is implementing Task N. Challenge when they report done.")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Phase 3 uses a single continuous Dungeon (`.claude/raid-dungeon.md`) across all tasks. The Wizard announces each task assignment via SendMessage.
|
|
71
84
|
|
|
72
85
|
### Step 2: Implementer Executes (TDD)
|
|
73
86
|
|
|
@@ -89,7 +102,7 @@ Report status: **DONE** | **DONE_WITH_CONCERNS** | **NEEDS_CONTEXT** | **BLOCKED
|
|
|
89
102
|
|
|
90
103
|
### Step 3: Challengers Attack Directly
|
|
91
104
|
|
|
92
|
-
|
|
105
|
+
Challengers work in their own tmux panes. They communicate directly with the implementer and each other via SendMessage:
|
|
93
106
|
|
|
94
107
|
1. **Read ACTUAL CODE** (not the implementer's report — reports lie)
|
|
95
108
|
2. **Challenge the implementer directly:** `CHALLENGE: @Warrior, your implementation at handler.js:23 doesn't validate...`
|
|
@@ -121,9 +134,14 @@ The implementer defends against BOTH challengers simultaneously:
|
|
|
121
134
|
|
|
122
135
|
### Step 5: Wizard Closes Task
|
|
123
136
|
|
|
124
|
-
|
|
137
|
+
Broadcast the ruling:
|
|
138
|
+
```
|
|
139
|
+
SendMessage(to="warrior", message="RULING: Task N [approved | needs fixes].")
|
|
140
|
+
SendMessage(to="archer", message="RULING: Task N [approved | needs fixes].")
|
|
141
|
+
SendMessage(to="rogue", message="RULING: Task N [approved | needs fixes].")
|
|
142
|
+
```
|
|
125
143
|
|
|
126
|
-
The Wizard closes when
|
|
144
|
+
The Wizard closes when messages + Dungeon show all issues resolved and challengers have no remaining critiques.
|
|
127
145
|
|
|
128
146
|
## Handling Implementer Status
|
|
129
147
|
|
|
@@ -8,7 +8,7 @@ description: "MUST use at the start of any Raid session. Establishes the 4-phase
|
|
|
8
8
|
The canonical workflow for all Raid operations. Every feature, bugfix, refactor follows this sequence.
|
|
9
9
|
|
|
10
10
|
<HARD-GATE>
|
|
11
|
-
Do NOT skip phases. Do NOT let a single agent work unchallenged (except in Scout mode). Do NOT proceed without a Wizard ruling.
|
|
11
|
+
Do NOT skip phases. Do NOT let a single agent work unchallenged (except in Scout mode). Do NOT proceed without a Wizard ruling. Agents communicate via SendMessage — do not spawn subagents.
|
|
12
12
|
</HARD-GATE>
|
|
13
13
|
|
|
14
14
|
## Session Lifecycle
|
|
@@ -20,7 +20,8 @@ digraph session {
|
|
|
20
20
|
"Create .claude/raid-session" -> "Assess task complexity";
|
|
21
21
|
"Assess task complexity" -> "Recommend mode";
|
|
22
22
|
"Recommend mode" -> "Human confirms mode?";
|
|
23
|
-
"Human confirms mode?" -> "
|
|
23
|
+
"Human confirms mode?" -> "Create team + spawn agents" [label="yes"];
|
|
24
|
+
"Create team + spawn agents" -> "Begin Phase 1";
|
|
24
25
|
"Human confirms mode?" -> "Recommend mode" [label="override"];
|
|
25
26
|
"Begin Phase 1" -> "Phase 1: Design (raid-design)";
|
|
26
27
|
"Phase 1: Design (raid-design)" -> "Phase 2: Plan (raid-implementation-plan)";
|
|
@@ -33,8 +34,8 @@ digraph session {
|
|
|
33
34
|
}
|
|
34
35
|
```
|
|
35
36
|
|
|
36
|
-
**On session start:** Create `.claude/raid-session` to activate workflow hooks.
|
|
37
|
-
**On session end:**
|
|
37
|
+
**On session start:** Create `.claude/raid-session` to activate workflow hooks. After mode approval, create team with `TeamCreate` and spawn agents — each gets their own tmux pane.
|
|
38
|
+
**On session end:** Send shutdown to teammates, remove `.claude/raid-session`, remove all Dungeon files.
|
|
38
39
|
|
|
39
40
|
Hooks that enforce workflow discipline (phase-gate, test-pass, verification) only fire when `.claude/raid-session` exists.
|
|
40
41
|
|
|
@@ -47,6 +48,27 @@ Hooks that enforce workflow discipline (phase-gate, test-pass, verification) onl
|
|
|
47
48
|
| **Archer** | Precise pattern-seeker, finds hidden connections and drift, traces ripple effects | Green |
|
|
48
49
|
| **Rogue** | Adversarial assumption-destroyer, constructs attack scenarios, weaponizes findings | Orange |
|
|
49
50
|
|
|
51
|
+
## Team Spawning
|
|
52
|
+
|
|
53
|
+
After mode approval, the Wizard creates the team and spawns agents:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
TeamCreate(team_name="raid-{mode}-{slug}")
|
|
57
|
+
Agent(subagent_type="warrior", team_name="raid-...", name="warrior")
|
|
58
|
+
Agent(subagent_type="archer", team_name="raid-...", name="archer") # Full Raid + Skirmish
|
|
59
|
+
Agent(subagent_type="rogue", team_name="raid-...", name="rogue") # Full Raid only
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Each agent gets its own tmux pane. Agents stay alive for the entire session — they go idle between turns and wake up when they receive a message.
|
|
63
|
+
|
|
64
|
+
**Communication:**
|
|
65
|
+
- `SendMessage(to="warrior", message="...")` — direct message
|
|
66
|
+
- Agents message each other directly: `SendMessage(to="archer", ...)`
|
|
67
|
+
- The Dungeon is still the shared knowledge artifact for durable findings
|
|
68
|
+
- The task list (`TaskCreate`/`TaskUpdate`) handles work coordination
|
|
69
|
+
|
|
70
|
+
**User access:** The user can click into any agent's tmux pane and interact directly. User instructions override all agents.
|
|
71
|
+
|
|
50
72
|
## Team Rules
|
|
51
73
|
|
|
52
74
|
Read and follow `.claude/raid-rules.md`. Non-negotiable. 17 rules including Dungeon discipline, direct engagement, wise escalation, and evidence-backed roasts.
|
|
@@ -177,7 +199,7 @@ Every phase follows the open/close bookend model:
|
|
|
177
199
|
|
|
178
200
|
```dot
|
|
179
201
|
digraph phase_pattern {
|
|
180
|
-
"Wizard opens (quest + angles + Dungeon)" -> "Agents self-organize";
|
|
202
|
+
"Wizard opens (quest + angles + Dungeon via SendMessage)" -> "Agents self-organize in own panes";
|
|
181
203
|
"Agents self-organize" -> "Agents explore, challenge, roast, build";
|
|
182
204
|
"Agents explore, challenge, roast, build" -> "Agents pin findings to Dungeon";
|
|
183
205
|
"Agents pin findings to Dungeon" -> "Intervention needed?" [shape=diamond];
|
|
@@ -208,7 +230,7 @@ digraph phase_pattern {
|
|
|
208
230
|
|
|
209
231
|
| Signal | Who | Meaning | Goes to Dungeon? |
|
|
210
232
|
|--------|-----|---------|------------------|
|
|
211
|
-
| `DISPATCH:` | Wizard | Opening a phase, assigning angles | No (phase opening) |
|
|
233
|
+
| `DISPATCH:` | Wizard | Opening a phase via SendMessage, assigning angles | No (phase opening) |
|
|
212
234
|
| `REDIRECT:` | Wizard | Brief course correction — one sentence, then silence | No |
|
|
213
235
|
| `RULING:` | Wizard | Phase over, binding decision | Ruling archived with Dungeon |
|
|
214
236
|
| `@Name, ...` | Any agent | Direct address to specific agent | No |
|