claude-raid 0.2.6 → 0.2.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/README.md +27 -46
- package/bin/cli.js +43 -9
- package/package.json +1 -1
- package/src/descriptions.js +1 -0
- package/src/init.js +1 -1
- package/src/remove.js +1 -1
- package/src/setup.js +1 -1
- package/src/ui.js +23 -19
- package/template/.claude/dungeon-master-rules.md +14 -8
- package/template/.claude/party-rules.md +6 -3
- package/template/.claude/skills/raid-browser/SKILL.md +1 -1
- package/template/.claude/skills/raid-browser-chrome/SKILL.md +1 -1
- package/template/.claude/skills/raid-canonical-design/SKILL.md +25 -32
- package/template/.claude/skills/raid-canonical-implementation/SKILL.md +5 -2
- package/template/.claude/skills/raid-canonical-implementation-plan/SKILL.md +6 -3
- package/template/.claude/skills/raid-canonical-prd/SKILL.md +32 -12
- package/template/.claude/skills/raid-canonical-protocol/SKILL.md +9 -9
- package/template/.claude/skills/raid-canonical-review/SKILL.md +5 -2
- package/template/.claude/skills/raid-init/SKILL.md +16 -28
- package/template/.claude/skills/raid-teambuff/SKILL.md +299 -0
- package/template/.claude/skills/raid-wrap-up/SKILL.md +7 -4
package/README.md
CHANGED
|
@@ -1,34 +1,16 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
⚔ ══════════════════════════════════════════════════════════ ⚔
|
|
5
|
-
|
|
6
|
-
██████╗██╗ █████╗ ██╗ ██╗██████╗ ███████╗
|
|
7
|
-
██╔════╝██║ ██╔══██╗██║ ██║██╔══██╗██╔════╝
|
|
8
|
-
██║ ██║ ███████║██║ ██║██║ ██║█████╗
|
|
9
|
-
██║ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝
|
|
10
|
-
╚██████╗███████╗██║ ██║╚██████╔╝██████╔╝███████╗
|
|
11
|
-
╚═════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
|
|
12
|
-
██████╗ █████╗ ██╗██████╗
|
|
13
|
-
██╔══██╗██╔══██╗██║██╔══██╗
|
|
14
|
-
██████╔╝███████║██║██║ ██║
|
|
15
|
-
██╔══██╗██╔══██║██║██║ ██║
|
|
16
|
-
██║ ██║██║ ██║██║██████╔╝
|
|
17
|
-
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═════╝
|
|
18
|
-
|
|
19
|
-
Round-based Adversarial Intelligence Dungeon
|
|
20
|
-
for Claude Code
|
|
21
|
-
|
|
22
|
-
⚔ ══════════════════════════════════════════════════════════ ⚔
|
|
23
|
-
```
|
|
3
|
+
<img src="assets/banner.png" alt="Claude Raid — Round-based Adversarial Intelligence Dungeon for Claude Code" width="700" />
|
|
24
4
|
|
|
25
|
-
|
|
5
|
+
<br />
|
|
26
6
|
|
|
27
7
|
[](LICENSE)
|
|
28
8
|
[](#)
|
|
29
9
|
[](#prerequisites)
|
|
30
10
|
[](#)
|
|
31
11
|
|
|
12
|
+
> **Beta** — This project is in active development. Multi-agent sessions are **token-usage intensive** — a full Canonical Quest consumes significantly more tokens than a single-agent workflow. Monitor your usage and start with small tasks to calibrate.
|
|
13
|
+
|
|
32
14
|
[Quick Start](#quick-start) · [The Canonical Quest](#the-canonical-quest) · [The Party](#the-party) · [The Dungeon](#the-dungeon) · [Configuration](#configuration) · [CLI Reference](#cli-reference)
|
|
33
15
|
|
|
34
16
|
</div>
|
|
@@ -48,21 +30,22 @@ One command installs the system. One command starts a quest.
|
|
|
48
30
|
## Quick Start
|
|
49
31
|
|
|
50
32
|
```bash
|
|
33
|
+
# Install the Raid into your project
|
|
51
34
|
npx claude-raid summon
|
|
35
|
+
|
|
36
|
+
# Start a quest
|
|
37
|
+
claude-raid start
|
|
52
38
|
```
|
|
53
39
|
|
|
54
|
-
|
|
40
|
+
`summon` installs agents, hooks, skills, and config into your project's `.claude/` directory.
|
|
41
|
+
|
|
42
|
+
`start` opens a tmux session with mouse support and launches the Wizard — one command does it all. The Wizard greets you, you describe your task, and the quest begins.
|
|
55
43
|
|
|
56
44
|
```bash
|
|
57
45
|
# Preview what gets installed (no changes)
|
|
58
46
|
npx claude-raid summon --dry-run
|
|
59
|
-
|
|
60
|
-
# Start a quest
|
|
61
|
-
claude-raid start
|
|
62
47
|
```
|
|
63
48
|
|
|
64
|
-
The Wizard greets you, you describe your task, and the quest begins.
|
|
65
|
-
|
|
66
49
|
### Prerequisites
|
|
67
50
|
|
|
68
51
|
| Requirement | Why |
|
|
@@ -72,7 +55,7 @@ The Wizard greets you, you describe your task, and the quest begins.
|
|
|
72
55
|
| **tmux** | Multi-pane agent display (`brew install tmux`) |
|
|
73
56
|
| **jq** | Config parsing (pre-installed on macOS) |
|
|
74
57
|
|
|
75
|
-
> **tmux** gives each agent its own pane —
|
|
58
|
+
> **tmux** gives each agent its own pane — `claude-raid start` handles the tmux session automatically. Click into any pane to observe or talk to that agent directly.
|
|
76
59
|
|
|
77
60
|
The setup wizard checks all prerequisites during `summon` and offers to fix what it can.
|
|
78
61
|
|
|
@@ -219,7 +202,9 @@ The Dungeon is the team's shared knowledge artifact — a curated board where ag
|
|
|
219
202
|
├── phase-3-plan-task-01.md # Individual task specs
|
|
220
203
|
├── phase-4-implementation.md # Implementation log
|
|
221
204
|
├── phase-5-review.md # Review board (optional)
|
|
222
|
-
|
|
205
|
+
├── phase-6-wrap-up.md # Quest storyboard
|
|
206
|
+
├── teambuff-01.md # Team retrospective reports (on-demand)
|
|
207
|
+
└── teambuff-rulings.md # Active rulings from teambuffs
|
|
223
208
|
|
|
224
209
|
.claude/vault/{quest-slug}/ # Archived completed quests
|
|
225
210
|
.claude/raid-session # Active session state
|
|
@@ -273,7 +258,8 @@ The Dungeon is the team's shared knowledge artifact — a curated board where ag
|
|
|
273
258
|
├── raid-verification/ # Evidence-before-claims gate
|
|
274
259
|
├── raid-debugging/ # Root-cause investigation
|
|
275
260
|
├── raid-browser/ # Browser orchestration
|
|
276
|
-
|
|
261
|
+
├── raid-browser-chrome/ # Live Chrome inspection
|
|
262
|
+
└── raid-teambuff/ # Emergency team retrospective
|
|
277
263
|
```
|
|
278
264
|
|
|
279
265
|
</details>
|
|
@@ -292,9 +278,9 @@ Hooks enforce workflow discipline automatically and **only activate during Raid
|
|
|
292
278
|
|
|
293
279
|
All hooks are POSIX-compatible and use `#claude-raid` markers to coexist safely with your existing hooks.
|
|
294
280
|
|
|
295
|
-
### Skills (
|
|
281
|
+
### Skills (14)
|
|
296
282
|
|
|
297
|
-
Skills guide agent behavior across the workflow.
|
|
283
|
+
Skills guide agent behavior across the workflow. Four categories:
|
|
298
284
|
|
|
299
285
|
| Category | Skills | Purpose |
|
|
300
286
|
|:--|:--|:--|
|
|
@@ -302,6 +288,7 @@ Skills guide agent behavior across the workflow. Three categories:
|
|
|
302
288
|
| **Canonical Quest** | 7 phase skills | One skill per phase, chained in order |
|
|
303
289
|
| **Discipline** | `raid-tdd`, `raid-verification`, `raid-debugging` | Quest-agnostic enforcement — invoked within any phase |
|
|
304
290
|
| **Browser** | `raid-browser`, `raid-browser-chrome` | Browser orchestration and live inspection |
|
|
291
|
+
| **Team** | `raid-teambuff` | Emergency team retrospective — freezes quest, all agents reflect on dysfunction, produces binding rulings |
|
|
305
292
|
|
|
306
293
|
---
|
|
307
294
|
|
|
@@ -406,7 +393,9 @@ This enables browser-specific hooks and skills — Playwright test detection, br
|
|
|
406
393
|
|
|
407
394
|
### `start`
|
|
408
395
|
|
|
409
|
-
|
|
396
|
+
One command does it all — opens a tmux session with mouse support and launches the Wizard with full permissions. If you're already inside tmux, it enables mouse mode and launches the Wizard directly. If tmux isn't installed, it falls back to launching the Wizard without it.
|
|
397
|
+
|
|
398
|
+
This is the primary entry point for running a quest.
|
|
410
399
|
|
|
411
400
|
### `summon`
|
|
412
401
|
|
|
@@ -438,22 +427,14 @@ Pulls latest from remote and re-runs summon to pick up any template changes. Use
|
|
|
438
427
|
|
|
439
428
|
## Controls
|
|
440
429
|
|
|
441
|
-
|
|
430
|
+
`claude-raid start` opens tmux with mouse mode enabled. All panes are visible simultaneously.
|
|
442
431
|
|
|
443
432
|
| Action | How |
|
|
444
433
|
|:--|:--|
|
|
445
|
-
| Switch to agent pane | Click the pane
|
|
434
|
+
| Switch to agent pane | Click the pane |
|
|
435
|
+
| Navigate between panes | `Ctrl+B` then arrow key |
|
|
436
|
+
| Scroll output | Mouse wheel |
|
|
446
437
|
| Talk to an agent | Click their pane and type |
|
|
447
|
-
| View all agents | All panes visible simultaneously |
|
|
448
|
-
|
|
449
|
-
**In-process mode (no tmux):**
|
|
450
|
-
|
|
451
|
-
| Shortcut | Action |
|
|
452
|
-
|:--|:--|
|
|
453
|
-
| `Shift+Down` | Cycle through teammates |
|
|
454
|
-
| `Enter` | View a teammate's session |
|
|
455
|
-
| `Escape` | Interrupt a teammate's turn |
|
|
456
|
-
| `Ctrl+T` | Toggle the shared task list |
|
|
457
438
|
|
|
458
439
|
---
|
|
459
440
|
|
package/bin/cli.js
CHANGED
|
@@ -10,16 +10,47 @@ const versionCheck = require('../src/version-check');
|
|
|
10
10
|
const showUpdateNotice = versionCheck.start();
|
|
11
11
|
|
|
12
12
|
const COMMANDS = {
|
|
13
|
-
// Start a Raid quest — launches wizard
|
|
13
|
+
// Start a Raid quest — launches tmux + wizard in one shot
|
|
14
14
|
start: () => {
|
|
15
|
-
const { spawn } = require('child_process');
|
|
15
|
+
const { spawn, execSync } = require('child_process');
|
|
16
16
|
console.log('\n' + banner());
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
|
|
18
|
+
// Check if already inside a tmux session
|
|
19
|
+
if (process.env.TMUX) {
|
|
20
|
+
console.log(header('Already in tmux — launching Wizard...') + '\n');
|
|
21
|
+
try { execSync('tmux set -g mouse on', { stdio: 'ignore' }); } catch {}
|
|
22
|
+
const child = spawn('claude', ['--dangerously-skip-permissions', '--agent', 'wizard'], {
|
|
23
|
+
stdio: 'inherit',
|
|
24
|
+
env: process.env,
|
|
25
|
+
});
|
|
26
|
+
child.on('exit', (code) => process.exit(code || 0));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Check if tmux is available
|
|
31
|
+
let hasTmux = false;
|
|
32
|
+
try { execSync('command -v tmux', { stdio: 'pipe' }); hasTmux = true; } catch {}
|
|
33
|
+
|
|
34
|
+
if (hasTmux) {
|
|
35
|
+
console.log(header('Opening tmux session + Wizard...') + '\n');
|
|
36
|
+
const child = spawn('tmux', [
|
|
37
|
+
'new-session', '-s', 'raid', ';',
|
|
38
|
+
'set', '-g', 'mouse', 'on', ';',
|
|
39
|
+
'send-keys', 'claude --dangerously-skip-permissions --agent wizard', 'Enter',
|
|
40
|
+
], {
|
|
41
|
+
stdio: 'inherit',
|
|
42
|
+
env: process.env,
|
|
43
|
+
});
|
|
44
|
+
child.on('exit', (code) => process.exit(code || 0));
|
|
45
|
+
} else {
|
|
46
|
+
console.log(colors.dim(' tmux not found — launching Wizard directly.'));
|
|
47
|
+
console.log(colors.dim(' Install tmux for multi-pane agent display: brew install tmux') + '\n');
|
|
48
|
+
const child = spawn('claude', ['--dangerously-skip-permissions', '--agent', 'wizard'], {
|
|
49
|
+
stdio: 'inherit',
|
|
50
|
+
env: process.env,
|
|
51
|
+
});
|
|
52
|
+
child.on('exit', (code) => process.exit(code || 0));
|
|
53
|
+
}
|
|
23
54
|
},
|
|
24
55
|
// Sync local with remote after CI version bump
|
|
25
56
|
sync: async () => {
|
|
@@ -64,7 +95,7 @@ if (!command || !COMMANDS[command]) {
|
|
|
64
95
|
console.log('\n' + banner());
|
|
65
96
|
console.log(header('Commands') + '\n');
|
|
66
97
|
const cmds = [
|
|
67
|
-
['start', 'Begin the Raid (
|
|
98
|
+
['start', 'Begin the Raid (tmux + Wizard in one shot)'],
|
|
68
99
|
['summon', 'Summon the party into this realm'],
|
|
69
100
|
['update', 'Reforge the party\'s arsenal'],
|
|
70
101
|
['dismantle', 'Dismantle the camp and retreat'],
|
|
@@ -76,6 +107,9 @@ if (!command || !COMMANDS[command]) {
|
|
|
76
107
|
}
|
|
77
108
|
console.log(header('Begin the Raid') + '\n');
|
|
78
109
|
console.log(' claude-raid start\n');
|
|
110
|
+
console.log(colors.amber(' Beta') + colors.dim(' — This project is in active development and can be'));
|
|
111
|
+
console.log(colors.dim(' token-usage intensive. Multi-agent sessions consume significantly'));
|
|
112
|
+
console.log(colors.dim(' more tokens than single-agent workflows. Use with caution.') + '\n');
|
|
79
113
|
console.log(colors.dim(' github.com/pedropicardi/claude-raid') + '\n');
|
|
80
114
|
process.exit(command ? 1 : 0);
|
|
81
115
|
}
|
package/package.json
CHANGED
package/src/descriptions.js
CHANGED
package/src/init.js
CHANGED
|
@@ -189,7 +189,7 @@ async function run() {
|
|
|
189
189
|
console.log(' ' + header('Agents') + dim(` ${result.counts.agents} files`));
|
|
190
190
|
console.log(' Copied wizard.md, warrior.md, archer.md, rogue.md');
|
|
191
191
|
console.log(dim(' Each agent gets its own tmux pane. Start with:'));
|
|
192
|
-
console.log(dim('
|
|
192
|
+
console.log(dim(' claude-raid start'));
|
|
193
193
|
|
|
194
194
|
// Hooks
|
|
195
195
|
console.log('');
|
package/src/remove.js
CHANGED
|
@@ -10,7 +10,7 @@ const RAID_SKILLS = [
|
|
|
10
10
|
'raid-init', 'raid-canonical-protocol', 'raid-canonical-prd', 'raid-canonical-design',
|
|
11
11
|
'raid-canonical-implementation-plan', 'raid-canonical-implementation', 'raid-canonical-review',
|
|
12
12
|
'raid-wrap-up', 'raid-tdd', 'raid-debugging', 'raid-verification',
|
|
13
|
-
'raid-browser', 'raid-browser-chrome',
|
|
13
|
+
'raid-browser', 'raid-browser-chrome', 'raid-teambuff',
|
|
14
14
|
// Legacy (v0.1.x)
|
|
15
15
|
'raid-protocol', 'raid-design', 'raid-implementation-plan', 'raid-implementation',
|
|
16
16
|
'raid-review', 'raid-prd', 'raid-finishing', 'raid-browser-playwright', 'raid-git-worktrees',
|
package/src/setup.js
CHANGED
|
@@ -396,7 +396,7 @@ async function runSetup(opts = {}) {
|
|
|
396
396
|
|
|
397
397
|
if (checks.every(c => c.ok)) {
|
|
398
398
|
stdout.write('\n ' + colors.green('The party is assembled.') + ' Your quest awaits.\n');
|
|
399
|
-
stdout.write('\n claude
|
|
399
|
+
stdout.write('\n ' + colors.bold('claude-raid start') + '\n');
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
return { checks, allOk, actions };
|
package/src/ui.js
CHANGED
|
@@ -119,19 +119,18 @@ function header(text) {
|
|
|
119
119
|
|
|
120
120
|
function referenceCard() {
|
|
121
121
|
const howItWorks = box('How It Works', [
|
|
122
|
-
' You describe a task. The Wizard
|
|
123
|
-
'
|
|
122
|
+
' You describe a task. The Wizard spawns the full team:',
|
|
123
|
+
' Warrior, Archer, and Rogue — each attacking from a',
|
|
124
|
+
' different angle.',
|
|
124
125
|
'',
|
|
125
|
-
'
|
|
126
|
-
' ' + colors.bold('Skirmish') + ' 2 agents, lighter process',
|
|
127
|
-
' ' + colors.bold('Scout') + ' 1 agent + Wizard review',
|
|
126
|
+
' The Canonical Quest flows through 6 phases:',
|
|
128
127
|
'',
|
|
129
|
-
'
|
|
130
|
-
'',
|
|
131
|
-
'
|
|
132
|
-
'
|
|
133
|
-
'
|
|
134
|
-
'
|
|
128
|
+
' 1. ' + colors.bold('PRD') + ' Product requirements ' + colors.dim('(optional)'),
|
|
129
|
+
' 2. ' + colors.bold('Design') + ' Agents explore and challenge the approach',
|
|
130
|
+
' 3. ' + colors.bold('Plan') + ' Agents decompose into testable tasks',
|
|
131
|
+
' 4. ' + colors.bold('Implement') + ' One builds (TDD), others attack',
|
|
132
|
+
' 5. ' + colors.bold('Review') + ' Independent reviews, fight over findings',
|
|
133
|
+
' 6. ' + colors.bold('Wrap Up') + ' Storyboard, PR, vault archive',
|
|
135
134
|
'',
|
|
136
135
|
' Hooks enforce discipline automatically:',
|
|
137
136
|
' ' + colors.dim('\u2022') + ' No implementation without a design doc',
|
|
@@ -147,10 +146,11 @@ function referenceCard() {
|
|
|
147
146
|
]);
|
|
148
147
|
|
|
149
148
|
const nextStep = box('Next Step', [
|
|
150
|
-
' ' + colors.bold('
|
|
151
|
-
'
|
|
149
|
+
' ' + colors.bold('claude-raid start'),
|
|
150
|
+
'',
|
|
151
|
+
' ' + colors.dim('That\'s it. One command opens a tmux session with mouse'),
|
|
152
|
+
' ' + colors.dim('support and launches the Wizard inside it.'),
|
|
152
153
|
'',
|
|
153
|
-
' ' + colors.dim('Start tmux first, then the Wizard inside it.'),
|
|
154
154
|
' ' + colors.dim('Each agent gets its own tmux pane automatically.'),
|
|
155
155
|
' ' + colors.dim('Click any pane to talk to that agent directly.'),
|
|
156
156
|
'',
|
|
@@ -160,15 +160,19 @@ function referenceCard() {
|
|
|
160
160
|
' ' + colors.bold('Controls') + ' ' + colors.dim('(tmux)'),
|
|
161
161
|
' Click pane Switch to an agent',
|
|
162
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',
|
|
163
|
+
' Scroll Mouse wheel (mouse mode enabled)',
|
|
167
164
|
'',
|
|
168
165
|
' Review this anytime: ' + colors.bold('claude-raid heal'),
|
|
169
166
|
]);
|
|
170
167
|
|
|
171
|
-
|
|
168
|
+
const beta = box('Beta', [
|
|
169
|
+
' ' + colors.amber('This project is in active development.'),
|
|
170
|
+
' Multi-agent sessions are ' + colors.bold('token-usage intensive') + ' \u2014',
|
|
171
|
+
' a full quest consumes significantly more tokens than a',
|
|
172
|
+
' single-agent workflow. Monitor your usage and start small.',
|
|
173
|
+
]);
|
|
174
|
+
|
|
175
|
+
return howItWorks + '\n' + nextStep + '\n' + beta;
|
|
172
176
|
}
|
|
173
177
|
|
|
174
178
|
module.exports = { colors, banner, box, header, stripAnsi, referenceCard };
|
|
@@ -116,19 +116,25 @@ When agents disagree: good. That is the mechanism. Let the truth emerge from fri
|
|
|
116
116
|
|
|
117
117
|
When you judge the phase objective is met — not on a timer, not when agents say so — you close:
|
|
118
118
|
|
|
119
|
-
1.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
1. **Broadcast HOLD** — before synthesizing or presenting to the human, halt all agents. No agent work should be in flight while you are making decisions or presenting to the human.
|
|
120
|
+
```
|
|
121
|
+
SendMessage(to="warrior", message="HOLD. Phase closing. Stand by.")
|
|
122
|
+
SendMessage(to="archer", message="HOLD. Phase closing. Stand by.")
|
|
123
|
+
SendMessage(to="rogue", message="HOLD. Phase closing. Stand by.")
|
|
124
|
+
```
|
|
125
|
+
2. Review the phase file — Discoveries, Resolved battles, Shared Knowledge.
|
|
126
|
+
3. Synthesize the final decision from evidence.
|
|
127
|
+
4. Wrap up the phase document — fill gaps, ensure coherence.
|
|
128
|
+
5. State the ruling once. Clearly. With rationale.
|
|
129
|
+
6. Broadcast the ruling to all agents:
|
|
124
130
|
```
|
|
125
131
|
SendMessage(to="warrior", message="RULING: [decision]. No appeals.")
|
|
126
132
|
SendMessage(to="archer", message="RULING: [decision]. No appeals.")
|
|
127
133
|
SendMessage(to="rogue", message="RULING: [decision]. No appeals.")
|
|
128
134
|
```
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
135
|
+
7. Send phase report to human: what was accomplished, key decisions, what's next.
|
|
136
|
+
8. Commit: `docs(quest-{slug}): phase N {name} — {summary}` (or `feat`/`fix` for implementation/review)
|
|
137
|
+
9. Create fresh phase file for next phase (or proceed to wrap-up).
|
|
132
138
|
|
|
133
139
|
## The Dungeon
|
|
134
140
|
|
|
@@ -31,10 +31,12 @@ Seven pillars. Non-negotiable. Every agent, every phase, every interaction.
|
|
|
31
31
|
## Pillar 4: Round-Based Interaction
|
|
32
32
|
|
|
33
33
|
- **Turn-based, not real-time.** When assigned a task, work independently. No mid-thinking interruptions to other agents.
|
|
34
|
-
- **Flag completion.** When done, signal `ROUND_COMPLETE:` to the Wizard.
|
|
35
|
-
- **
|
|
34
|
+
- **Flag completion.** When done, signal `ROUND_COMPLETE:` to the Wizard.
|
|
35
|
+
- **STOP after ROUND_COMPLETE.** After signaling `ROUND_COMPLETE:`, **stop all work**. No cross-verification, no building, no challenging, no "while I wait" tasks. You are done until the Wizard dispatches your next action. If the Wizard wants cross-testing, they will dispatch it explicitly in the next round.
|
|
36
|
+
- **Cross-test only on dispatch.** Pick up teammates' work for review ONLY when the Wizard assigns it. Never self-initiate cross-testing.
|
|
36
37
|
- **Limited interactions.** Converge in 2-3 exchanges per finding. If stuck after 3, escalate to Wizard.
|
|
37
38
|
- **Party is silent during phase transitions.** When the Wizard opens/closes a phase, agents wait.
|
|
39
|
+
- **HOLD means freeze.** When the Wizard broadcasts `HOLD`, all agents stop immediately. No work in flight while the Wizard is presenting decisions to the human.
|
|
38
40
|
- **Exception: only the Wizard can interrupt** an agent mid-work.
|
|
39
41
|
|
|
40
42
|
## Pillar 5: Question Chain
|
|
@@ -113,7 +115,8 @@ Lead with the conclusion, follow with the evidence.
|
|
|
113
115
|
- `CONCEDE:` — you were wrong, moving on
|
|
114
116
|
- `DUNGEON:` — pinning a finding that survived challenge from at least two agents
|
|
115
117
|
- `WIZARD:` — you need project-level context or are genuinely stuck
|
|
116
|
-
- `ROUND_COMPLETE:` — finished assigned task
|
|
118
|
+
- `ROUND_COMPLETE:` — finished assigned task. **Stop all work. Wait for Wizard dispatch.**
|
|
119
|
+
- `HOLD` — (from Wizard only) freeze immediately. No work in flight.
|
|
117
120
|
- `BLACKCARD:` — high-concern finding that breaks the architecture
|
|
118
121
|
|
|
119
122
|
### Team Communication
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-browser
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when browser testing infrastructure is needed — startup discovery, boot/cleanup lifecycle, port isolation, pre-flight checks. Required before raid-browser-chrome or Playwright browser tasks."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Browser — Core Orchestration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-browser-chrome
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when live Chrome browser inspection is needed during Phase 5 review or ad-hoc browser verification."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Browser Chrome — Live Adversarial Inspection
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-design
|
|
3
|
-
description: "Phase 2
|
|
3
|
+
description: "Use when Phase 2 (Design) begins in a Canonical Quest, after PRD is approved or skipped."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Design — Phase 2
|
|
@@ -60,45 +60,35 @@ Complete in order:
|
|
|
60
60
|
3. **Explore project context** — files, docs, recent commits, dependencies, conventions, patterns
|
|
61
61
|
4. **Research dependencies** — API surface, versioning, compatibility, known issues. Read docs COMPLETELY.
|
|
62
62
|
5. **Ask clarifying questions** — one at a time to the human, eliminate every ambiguity
|
|
63
|
-
6. **Open the Dungeon** — create `{questDir}/phase-2-design.md` with Phase 2 header, quest, mode. Read
|
|
63
|
+
6. **Open the Dungeon** — create `{questDir}/phase-2-design.md` (scoreboard) with Phase 2 header, quest, mode. Read `{questDir}/prd.md` if it exists.
|
|
64
64
|
7. **Dispatch with angles** — send each agent their angle via SendMessage, then go silent:
|
|
65
65
|
```
|
|
66
66
|
SendMessage(to="warrior", message="DISPATCH: [quest]. Your angle: [X]...")
|
|
67
67
|
SendMessage(to="archer", message="DISPATCH: [quest]. Your angle: [Y]...")
|
|
68
68
|
SendMessage(to="rogue", message="DISPATCH: [quest]. Your angle: [Z]...")
|
|
69
69
|
```
|
|
70
|
-
8. **
|
|
71
|
-
9. **
|
|
72
|
-
10. **
|
|
73
|
-
11. **
|
|
74
|
-
12. **
|
|
75
|
-
13. **
|
|
76
|
-
14. **
|
|
77
|
-
15. **
|
|
78
|
-
16. **
|
|
79
|
-
17. **
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
70
|
+
8. **Round 1: Research** — agents explore their angles independently in their own panes. Pin findings to Dungeon. Signal `ROUND_COMPLETE:`. **Stop.** Agents do NOT self-initiate cross-testing. You receive messages automatically. Intervene only on protocol violations.
|
|
71
|
+
9. **Round 2: Cross-testing** — when ALL agents have flagged `ROUND_COMPLETE:`, dispatch explicit cross-verification assignments. Each agent challenges specific findings from the others. Signal `ROUND_COMPLETE:` when done. **Stop.**
|
|
72
|
+
10. **Repeat if needed** — if more exploration is needed, dispatch a new research round with refined angles
|
|
73
|
+
11. **Close the phase** — broadcast `HOLD`. Close when Dungeon has sufficient verified findings to form 2-3 approaches
|
|
74
|
+
12. **Synthesize approaches** — propose 2-3 approaches from Dungeon evidence, with trade-offs and recommendation
|
|
75
|
+
13. **Present design section by section** — scale each section to its complexity (a few sentences if straightforward, up to 200-300 words if nuanced). Ask the human after each section: "Does this look right so far?" Be ready to revise before moving on. Cover: architecture, components, data flow, error handling, testing.
|
|
76
|
+
14. **Write design doc** — save to `{questDir}/design.md` (separate from the phase scoreboard). May also create `{questDir}/design-diagrams.md` for mermaid charts.
|
|
77
|
+
15. **Adversarial spec review** — agents attack the written spec directly, challenging each other
|
|
78
|
+
16. **Spec self-review** — fix issues inline (see checklist below)
|
|
79
|
+
17. **Human reviews written spec** — human approves before proceeding
|
|
80
|
+
18. **Commit** — `docs(quest-{slug}): phase 2 design — {summary}`
|
|
81
|
+
19. **Transition** — invoke `raid-canonical-implementation-plan`
|
|
82
|
+
|
|
83
|
+
## Opening the Dungeon (Phase Scoreboard)
|
|
84
|
+
|
|
85
|
+
Create `{questDir}/phase-2-design.md` — this is the **dungeon scoreboard**, not the deliverable. It tracks discoveries, battles, and shared knowledge from agent exploration. Every line in Discoveries/Active Battles must use a recognized prefix (`DUNGEON:`, `UNRESOLVED:`, `BLACKCARD:`, `RESOLVED:`, `TASK:`). Freeform content is only allowed in Resolved, Shared Knowledge, and Escalations sections.
|
|
84
86
|
|
|
85
87
|
```markdown
|
|
86
88
|
# Phase 2: Design
|
|
87
89
|
## Quest: <task description from human>
|
|
88
90
|
## Mode: <Full Raid | Skirmish>
|
|
89
|
-
## PRD: <link to
|
|
90
|
-
|
|
91
|
-
### Architecture Overview
|
|
92
|
-
|
|
93
|
-
### Data Flow
|
|
94
|
-
|
|
95
|
-
### Component Design
|
|
96
|
-
|
|
97
|
-
### API Contracts
|
|
98
|
-
|
|
99
|
-
### Edge Cases & Error Handling
|
|
100
|
-
|
|
101
|
-
### Trade-offs & Decisions
|
|
91
|
+
## PRD: <link to prd.md if it exists>
|
|
102
92
|
|
|
103
93
|
### Discoveries
|
|
104
94
|
|
|
@@ -197,9 +187,9 @@ After writing the design doc, the Wizard reviews with fresh eyes:
|
|
|
197
187
|
|
|
198
188
|
Fix issues inline.
|
|
199
189
|
|
|
200
|
-
## Design Document Structure
|
|
190
|
+
## Design Document Structure (Phase Deliverable)
|
|
201
191
|
|
|
202
|
-
|
|
192
|
+
The actual design doc is a **separate file**: `{questDir}/design.md`. This file is not validated by the dungeon hook and can contain freeform markdown. Write it when closing the phase — synthesize from scoreboard findings and agent exploration.
|
|
203
193
|
|
|
204
194
|
```markdown
|
|
205
195
|
# [Feature Name] Design Specification
|
|
@@ -251,7 +241,10 @@ If the team is stuck on a fundamental design choice after genuine direct debate:
|
|
|
251
241
|
|
|
252
242
|
When the design is approved and committed:
|
|
253
243
|
|
|
254
|
-
1. Update `.claude/raid-session` phase
|
|
244
|
+
1. Update `.claude/raid-session` phase via Bash (write gate blocks Write/Edit on this file):
|
|
245
|
+
```bash
|
|
246
|
+
jq '.phase="plan"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
247
|
+
```
|
|
255
248
|
2. **Commit:** `docs(quest-{slug}): phase 2 design — {summary}`
|
|
256
249
|
3. **Send phase report to human:** summarize key design decisions, trade-offs resolved, what's next
|
|
257
250
|
4. **Load the `raid-canonical-implementation-plan` skill now and begin Phase 3.**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-implementation
|
|
3
|
-
description: "Phase 4
|
|
3
|
+
description: "Use when Phase 4 (Implementation) begins in a Canonical Quest, after the plan is approved and committed."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Implementation — Phase 4
|
|
@@ -215,7 +215,10 @@ STOP implementing immediately when:
|
|
|
215
215
|
|
|
216
216
|
When all tasks are approved and committed:
|
|
217
217
|
|
|
218
|
-
1. Update `.claude/raid-session` phase
|
|
218
|
+
1. Update `.claude/raid-session` phase via Bash (write gate blocks Write/Edit on this file):
|
|
219
|
+
```bash
|
|
220
|
+
jq '.phase="review"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
221
|
+
```
|
|
219
222
|
2. **Commit**: `feat(quest-{slug}): phase 4 implementation — {summary}`
|
|
220
223
|
3. **Send phase report to human**: what was built, test coverage, any concerns
|
|
221
224
|
4. **Ask human**: "Shall we inspect the treasure? (Review phase) Or proceed directly to wrap-up?"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-implementation-plan
|
|
3
|
-
description: "Phase 3
|
|
3
|
+
description: "Use when Phase 3 (Plan) begins in a Canonical Quest, after the design doc is approved and committed."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Implementation Plan — Phase 3
|
|
@@ -41,7 +41,7 @@ digraph plan {
|
|
|
41
41
|
## Wizard Checklist
|
|
42
42
|
|
|
43
43
|
1. **Read the approved design doc** — every requirement, every constraint
|
|
44
|
-
2. **Read the Phase 2 design doc** — carry forward verified knowledge from `{questDir}/phase-2-design.md`
|
|
44
|
+
2. **Read the Phase 2 design doc** — carry forward verified knowledge from `{questDir}/design.md` (the deliverable) and `{questDir}/phase-2-design.md` (the scoreboard)
|
|
45
45
|
3. **Open the Dungeon** — create `{questDir}/phase-3-plan.md` with Phase 3 header
|
|
46
46
|
4. **Dispatch decomposition** — all agents decompose independently with different angles, then interact directly (round-based)
|
|
47
47
|
5. **Observe the fight** — agents test each other's plans, argue ordering, coverage, naming. Intervene only on triggers.
|
|
@@ -218,7 +218,10 @@ Fix issues inline. If a spec requirement has no task, add the task.
|
|
|
218
218
|
|
|
219
219
|
When the plan is approved and committed:
|
|
220
220
|
|
|
221
|
-
1. Update `.claude/raid-session` phase
|
|
221
|
+
1. Update `.claude/raid-session` phase via Bash (write gate blocks Write/Edit on this file):
|
|
222
|
+
```bash
|
|
223
|
+
jq '.phase="implementation"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
224
|
+
```
|
|
222
225
|
2. **Commit**: `docs(quest-{slug}): phase 3 plan — {N} tasks, {summary}`
|
|
223
226
|
3. **Send phase report to human**: task count, dependency graph, estimated scope
|
|
224
227
|
4. **Load the `raid-canonical-implementation` skill now and begin Phase 4.**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-prd
|
|
3
|
-
description: "Phase 1
|
|
3
|
+
description: "Use when Phase 1 (PRD) begins in a Canonical Quest. The human chose to forge a PRD rather than skip to Design."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid PRD — Phase 1 (Optional)
|
|
@@ -39,27 +39,49 @@ digraph prd {
|
|
|
39
39
|
|
|
40
40
|
## Wizard Checklist
|
|
41
41
|
|
|
42
|
-
1. **Update raid-session**
|
|
42
|
+
1. **Update raid-session** via Bash (write gate blocks Write/Edit on this file):
|
|
43
|
+
```bash
|
|
44
|
+
jq '.phase="prd"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
45
|
+
```
|
|
43
46
|
2. **Create phase file** — `{questDir}/phase-1-prd.md` with boilerplate sections
|
|
44
47
|
3. **Digest the human's request** — understand intent, identify gaps, map the problem space
|
|
45
48
|
4. **Dispatch party with research angles** via SendMessage:
|
|
46
49
|
- **@Warrior**: Explore the technical stack. What infrastructure exists? What APIs are available? What technical constraints apply? What precedents exist in the codebase?
|
|
47
50
|
- **@Archer**: Explore the patterns. How does this fit existing architecture? What conventions apply? What similar features exist? What naming and structure patterns should we follow?
|
|
48
51
|
- **@Rogue**: Explore the edge cases. What could go wrong? What assumptions are we making? What requirements are we missing? What will users actually do vs what we think they'll do?
|
|
49
|
-
5. **
|
|
52
|
+
5. **Round 1: Research** — agents research in parallel. Each investigates their angle independently. Pin findings. Signal `ROUND_COMPLETE:`. **Stop.** Agents do NOT self-initiate cross-testing. Go silent and observe.
|
|
50
53
|
6. **Mediate questions** — agents ask Wizard, Wizard reasons, Wizard asks human only if unsure
|
|
51
|
-
7. **
|
|
52
|
-
8. **
|
|
54
|
+
7. **Round 2: Cross-testing** — when ALL agents have flagged `ROUND_COMPLETE:`, dispatch explicit cross-verification assignments. Each agent challenges specific findings from the others. Agents signal `ROUND_COMPLETE:` when done. **Stop.**
|
|
55
|
+
8. **Repeat if needed** — if more research is needed, dispatch a new research round with refined angles
|
|
56
|
+
9. **Close phase** — broadcast `HOLD`, wrap up PRD, send report, commit
|
|
53
57
|
|
|
54
|
-
## Phase File
|
|
58
|
+
## Phase File (Dungeon Scoreboard)
|
|
55
59
|
|
|
56
|
-
Create `{questDir}/phase-1-prd.md
|
|
60
|
+
Create `{questDir}/phase-1-prd.md` — this is the **dungeon scoreboard**, not the deliverable. It tracks discoveries, battles, and shared knowledge from agent research. Every line in Discoveries/Active Battles must use a recognized prefix (`DUNGEON:`, `UNRESOLVED:`, `BLACKCARD:`, `RESOLVED:`, `TASK:`). Freeform content is only allowed in Resolved, Shared Knowledge, and Escalations sections.
|
|
57
61
|
|
|
58
62
|
```markdown
|
|
59
63
|
# Phase 1: PRD — Product Requirements Document
|
|
60
64
|
## Quest: <task description>
|
|
61
65
|
## Mode: <Full Raid | Skirmish | Scout>
|
|
62
66
|
|
|
67
|
+
### Discoveries
|
|
68
|
+
|
|
69
|
+
### Active Battles
|
|
70
|
+
|
|
71
|
+
### Resolved
|
|
72
|
+
|
|
73
|
+
### Shared Knowledge
|
|
74
|
+
|
|
75
|
+
### Escalations
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Phase Deliverable (PRD Document)
|
|
79
|
+
|
|
80
|
+
The actual PRD is a **separate file**: `{questDir}/prd.md`. This file is not validated by the dungeon hook and can contain freeform markdown. Write it when closing the phase — synthesize from the scoreboard findings.
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
# <Feature Name> — Product Requirements Document
|
|
84
|
+
|
|
63
85
|
### Problem Statement
|
|
64
86
|
|
|
65
87
|
### Goals & Non-Goals
|
|
@@ -81,10 +103,6 @@ Create `{questDir}/phase-1-prd.md`:
|
|
|
81
103
|
### Success Criteria
|
|
82
104
|
|
|
83
105
|
### Open Questions
|
|
84
|
-
|
|
85
|
-
### Discoveries
|
|
86
|
-
|
|
87
|
-
### Shared Knowledge
|
|
88
106
|
```
|
|
89
107
|
|
|
90
108
|
## Research Angles
|
|
@@ -130,4 +148,6 @@ When the PRD is complete (all sections filled, open questions resolved):
|
|
|
130
148
|
|
|
131
149
|
## Phase Spoils
|
|
132
150
|
|
|
133
|
-
**
|
|
151
|
+
**Two outputs**:
|
|
152
|
+
- `{questDir}/phase-1-prd.md` — Dungeon scoreboard with pinned discoveries, resolved battles, and shared knowledge from agent research
|
|
153
|
+
- `{questDir}/prd.md` — Complete Product Requirements Document with all sections filled, synthesized from scoreboard findings
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-protocol
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use at the start of any Canonical Quest. Reference for phase lifecycle, round-based interaction rules, communication signals, and phase transition gates."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Canonical Quest Protocol
|
|
@@ -111,14 +111,14 @@ Agents → Wizard → Human. Agents NEVER ask the human directly.
|
|
|
111
111
|
|
|
112
112
|
Every phase MUST produce at least one detailed markdown artifact:
|
|
113
113
|
|
|
114
|
-
| Phase |
|
|
115
|
-
|
|
116
|
-
| PRD | `{questDir}/phase-1-prd.md` |
|
|
117
|
-
| Design | `{questDir}/phase-2-design.md` |
|
|
118
|
-
| Plan | `{questDir}/phase-3-plan.md`
|
|
119
|
-
| Implementation | `{questDir}/phase-4-implementation.md` |
|
|
120
|
-
| Review | `{questDir}/phase-5-review.md` |
|
|
121
|
-
| Wrap Up | `{questDir}/phase-6-wrap-up.md` |
|
|
114
|
+
| Phase | Scoreboard (phase file) | Deliverable |
|
|
115
|
+
|-------|--------------------------|-------------|
|
|
116
|
+
| PRD | `{questDir}/phase-1-prd.md` | `{questDir}/prd.md` |
|
|
117
|
+
| Design | `{questDir}/phase-2-design.md` | `{questDir}/design.md` |
|
|
118
|
+
| Plan | `{questDir}/phase-3-plan.md` | task files (`phase-3-plan-task-NN.md`) |
|
|
119
|
+
| Implementation | `{questDir}/phase-4-implementation.md` | code changes |
|
|
120
|
+
| Review | `{questDir}/phase-5-review.md` | fixes |
|
|
121
|
+
| Wrap Up | `{questDir}/phase-6-wrap-up.md` | PR + storyboard |
|
|
122
122
|
|
|
123
123
|
## Communication Signals
|
|
124
124
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-canonical-review
|
|
3
|
-
description: "Phase 5
|
|
3
|
+
description: "Use when Phase 5 (Review) begins in a Canonical Quest, after implementation is complete and the human opts in."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Review — Phase 5 (Optional)
|
|
@@ -225,7 +225,10 @@ The Wizard closes when agents have exhausted their findings and the review board
|
|
|
225
225
|
|
|
226
226
|
When the RULING is APPROVED FOR MERGE:
|
|
227
227
|
|
|
228
|
-
1. Update `.claude/raid-session` phase
|
|
228
|
+
1. Update `.claude/raid-session` phase via Bash (write gate blocks Write/Edit on this file):
|
|
229
|
+
```bash
|
|
230
|
+
jq '.phase="wrap-up"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
231
|
+
```
|
|
229
232
|
2. **Commit**: `fix(quest-{slug}): phase 5 review — {N} findings resolved`
|
|
230
233
|
3. **Send phase report to human**: findings count, fixes applied, any black cards
|
|
231
234
|
4. **Load the `raid-wrap-up` skill now and begin Phase 6.**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-init
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when starting a new Raid session or resuming an existing quest. Loaded first by the Wizard before any phase begins."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Init — Quest Selection & Session Setup
|
|
@@ -25,11 +25,8 @@ digraph init {
|
|
|
25
25
|
"Canonical Quest?" -> "Coming soon message" [label="B/D/E/F"];
|
|
26
26
|
"Coming soon message" -> "Present quest menu";
|
|
27
27
|
"Ask: PRD needed?" -> "Human describes task";
|
|
28
|
-
"Human describes task" -> "
|
|
29
|
-
"
|
|
30
|
-
"Human approves mode?" -> "Spawn team + create quest dir" [label="yes"];
|
|
31
|
-
"Human approves mode?" -> "Assess complexity + recommend mode" [label="override"];
|
|
32
|
-
"Spawn team + create quest dir" -> "Begin first phase" [shape=doublecircle];
|
|
28
|
+
"Human describes task" -> "Spawn full team + create quest dir";
|
|
29
|
+
"Spawn full team + create quest dir" -> "Begin first phase" [shape=doublecircle];
|
|
33
30
|
}
|
|
34
31
|
```
|
|
35
32
|
|
|
@@ -91,35 +88,26 @@ Loop back to the menu.
|
|
|
91
88
|
|
|
92
89
|
Ask the human to describe the task/feature they want to build. Listen carefully. Read 3 times internally.
|
|
93
90
|
|
|
94
|
-
### 4c.
|
|
91
|
+
### 4c. Spawn Team & Setup
|
|
95
92
|
|
|
96
|
-
|
|
93
|
+
The Canonical Quest always runs as Full Raid (Warrior, Archer, Rogue). Do NOT ask the human to confirm the mode — it is implicit.
|
|
97
94
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
Present recommendation. Wait for human to approve or override.
|
|
105
|
-
|
|
106
|
-
### 4d. Spawn Team & Setup
|
|
107
|
-
|
|
108
|
-
1. Update raid-session with:
|
|
109
|
-
- `questType`: `"canonical"`
|
|
110
|
-
- `questId`: slugified from task description (e.g., `"auth-redesign"`)
|
|
111
|
-
- `questDir`: `.claude/dungeon/{questId}`
|
|
112
|
-
- `phase`: `""` (will be set by first phase skill)
|
|
95
|
+
1. Update `.claude/raid-session` (created by the session-start hook) via **Bash with jq** — the write gate blocks Write/Edit on this file, so always use Bash:
|
|
96
|
+
```bash
|
|
97
|
+
jq --arg qt "canonical" --arg qid "{questId}" --arg qdir ".claude/dungeon/{questId}" \
|
|
98
|
+
'.questType=$qt | .questId=$qid | .questDir=$qdir | .mode="full"' \
|
|
99
|
+
.claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
100
|
+
```
|
|
113
101
|
2. Create quest directory if not already created by hook:
|
|
114
102
|
```
|
|
115
103
|
mkdir -p {questDir}
|
|
116
104
|
```
|
|
117
|
-
3. Spawn team:
|
|
105
|
+
3. Spawn the full team:
|
|
118
106
|
```
|
|
119
|
-
TeamCreate(team_name="raid-
|
|
107
|
+
TeamCreate(team_name="raid-full-{questId}")
|
|
120
108
|
Agent(subagent_type="warrior", team_name="raid-...", name="warrior")
|
|
121
|
-
Agent(subagent_type="archer", team_name="raid-...", name="archer")
|
|
122
|
-
Agent(subagent_type="rogue", team_name="raid-...", name="rogue")
|
|
109
|
+
Agent(subagent_type="archer", team_name="raid-...", name="archer")
|
|
110
|
+
Agent(subagent_type="rogue", team_name="raid-...", name="rogue")
|
|
123
111
|
```
|
|
124
112
|
|
|
125
113
|
## Step 5: Begin First Phase
|
|
@@ -135,6 +123,6 @@ Present recommendation. Wait for human to approve or override.
|
|
|
135
123
|
| Thought | Reality |
|
|
136
124
|
|---------|---------|
|
|
137
125
|
| "Skip the greeting, get to work" | The greeting sets the tone. It takes 5 seconds. Do it. |
|
|
138
|
-
| "
|
|
126
|
+
| "Let me ask which mode to use" | Canonical Quest = Full Raid. Always. Don't ask. |
|
|
139
127
|
| "Let me start exploring the codebase" | You are the Wizard. You don't explore. You dispatch. |
|
|
140
128
|
| "I'll figure out the quest type later" | Quest type determines the phase flow. Choose now. |
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: raid-teambuff
|
|
3
|
+
description: "Use when the human calls an emergency team retrospective during a quest. Triggered by team dysfunction — token waste, sync issues, interruptions, workflow problems."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Raid Teambuff — Emergency Round Table
|
|
7
|
+
|
|
8
|
+
The human pulled the brake. Everyone stops. Sit down. Reflect. Be honest.
|
|
9
|
+
|
|
10
|
+
<HARD-GATE>
|
|
11
|
+
This is an INSTANT freeze. The Wizard does NOT finish the current round, does NOT wait for agents to complete, does NOT ask "are you sure?". The moment the human says teambuff, everything stops. No subagents. Agents communicate via SendMessage.
|
|
12
|
+
</HARD-GATE>
|
|
13
|
+
|
|
14
|
+
## What This Is
|
|
15
|
+
|
|
16
|
+
A side-quest that pauses the main quest for a team retrospective. Every agent — including the Wizard — examines where the team is wasting tokens, stepping on each other, losing sync, or being unproductive. Every agent can criticize every other agent, including the Wizard.
|
|
17
|
+
|
|
18
|
+
The output is a structured report with binding rulings that the human approves.
|
|
19
|
+
|
|
20
|
+
## Who Can Trigger
|
|
21
|
+
|
|
22
|
+
**Only the human.** No agent, not even the Wizard, can call a teambuff. The human says "teambuff" or invokes `/raid-teambuff` and it happens immediately.
|
|
23
|
+
|
|
24
|
+
## Mode Behavior
|
|
25
|
+
|
|
26
|
+
| Aspect | Full Raid | Skirmish | Scout |
|
|
27
|
+
|--------|-----------|----------|-------|
|
|
28
|
+
| Participants | Wizard + Warrior + Archer + Rogue | Wizard + 2 active agents | Wizard self-reflects alone |
|
|
29
|
+
| Cross-criticism | All-vs-all, no one exempt | Between active agents + Wizard | N/A |
|
|
30
|
+
| Rulings | Full synthesis from all reflections | Condensed synthesis | Wizard notes only |
|
|
31
|
+
|
|
32
|
+
## Process Flow
|
|
33
|
+
|
|
34
|
+
```dot
|
|
35
|
+
digraph teambuff {
|
|
36
|
+
"Human triggers teambuff" -> "Wizard: HALT. Round table called.";
|
|
37
|
+
"Wizard: HALT. Round table called." -> "Create teambuff-{NN}.md";
|
|
38
|
+
"Create teambuff-{NN}.md" -> "Dispatch all agents: reflect";
|
|
39
|
+
"Dispatch all agents: reflect" -> "Agents write reflections (parallel)";
|
|
40
|
+
"Agents write reflections (parallel)" -> "Agents read each other's sections";
|
|
41
|
+
"Agents read each other's sections" -> "Agents write criticisms";
|
|
42
|
+
"Agents write criticisms" -> "Wizard writes own reflection + criticism";
|
|
43
|
+
"Wizard writes own reflection + criticism" -> "Wizard reads everything";
|
|
44
|
+
"Wizard reads everything" -> "Wizard synthesizes proposed rulings";
|
|
45
|
+
"Wizard synthesizes proposed rulings" -> "Present rulings to human";
|
|
46
|
+
"Present rulings to human" -> "Human approves?" [shape=diamond];
|
|
47
|
+
"Human approves?" -> "Revise rulings" [label="changes requested"];
|
|
48
|
+
"Revise rulings" -> "Present rulings to human";
|
|
49
|
+
"Human approves?" -> "Pin rulings to teambuff-rulings.md" [label="approved"];
|
|
50
|
+
"Pin rulings to teambuff-rulings.md" -> "Resume quest from freeze point" [shape=doublecircle];
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Wizard Checklist
|
|
55
|
+
|
|
56
|
+
1. **HALT** — immediately announce to all agents:
|
|
57
|
+
> "TEAMBUFF — The human has called a round table. All work stops NOW. Drop what you're holding. We reflect."
|
|
58
|
+
|
|
59
|
+
2. **Count existing teambuffs** — check `{questDir}/` for `teambuff-*.md` files. Next number = count + 1.
|
|
60
|
+
|
|
61
|
+
3. **Create `{questDir}/teambuff-{NN}.md`** — use the document template below.
|
|
62
|
+
|
|
63
|
+
4. **Dispatch all agents** with this message:
|
|
64
|
+
|
|
65
|
+
> **TEAMBUFF DISPATCH:**
|
|
66
|
+
>
|
|
67
|
+
> The human stopped us to reflect. Rewind the ENTIRE quest from the beginning — every round, every exchange, every decision. Be brutally honest.
|
|
68
|
+
>
|
|
69
|
+
> Write your **Reflection** section in `teambuff-{NN}.md`:
|
|
70
|
+
> - Where you wasted tokens
|
|
71
|
+
> - Where you were blocked by another agent
|
|
72
|
+
> - What you'd do differently
|
|
73
|
+
> - What's working well
|
|
74
|
+
> - Free thoughts — anything else on your mind
|
|
75
|
+
>
|
|
76
|
+
> Then read the other agents' reflections and write your **Criticism** section:
|
|
77
|
+
> - Criticize the Wizard's orchestration if needed
|
|
78
|
+
> - Criticize teammates if needed
|
|
79
|
+
> - Be constructive but do NOT soften real problems
|
|
80
|
+
>
|
|
81
|
+
> Signal `TEAMBUFF_COMPLETE:` when done.
|
|
82
|
+
|
|
83
|
+
5. **Wait for all agents** — do NOT rush this. Every agent gets their full say.
|
|
84
|
+
|
|
85
|
+
6. **Write own reflection** — the Wizard reflects on its own orchestration:
|
|
86
|
+
- Where you wasted tokens
|
|
87
|
+
- Where your orchestration failed
|
|
88
|
+
- Where you misjudged agent assignments
|
|
89
|
+
- What you'd do differently
|
|
90
|
+
- What's working
|
|
91
|
+
- Criticism of teammates
|
|
92
|
+
|
|
93
|
+
7. **Read everything** — read the full teambuff file. Every section. Every criticism.
|
|
94
|
+
|
|
95
|
+
8. **Synthesize rulings** — propose concrete, actionable rulings based on ALL reflections and criticisms. Each ruling must have:
|
|
96
|
+
- A clear, enforceable statement
|
|
97
|
+
- The reason (traced to specific reflections/criticisms)
|
|
98
|
+
|
|
99
|
+
9. **Present to human** — show all proposed rulings. Ask for approval:
|
|
100
|
+
> "Here are the proposed rulings from this teambuff. You can approve all, modify any, or reject any. These become binding for the rest of the quest."
|
|
101
|
+
|
|
102
|
+
10. **Pin approved rulings** — write to `{questDir}/teambuff-rulings.md` (create if first teambuff, append if not). Mark status as ACTIVE.
|
|
103
|
+
|
|
104
|
+
11. **Resume quest** — announce to all agents:
|
|
105
|
+
> "Teambuff complete. Rulings are active. Resuming quest at {phase}, {context of where we stopped}."
|
|
106
|
+
|
|
107
|
+
## Document Template — teambuff-{NN}.md
|
|
108
|
+
|
|
109
|
+
```markdown
|
|
110
|
+
# Teambuff #{NN} — Team Retrospective
|
|
111
|
+
## Quest: {quest-name}
|
|
112
|
+
## Phase when called: {phase}
|
|
113
|
+
## Round when called: {round context — what was happening}
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### Warrior's Reflection
|
|
118
|
+
#### Where I wasted tokens
|
|
119
|
+
#### Where I was blocked by another agent
|
|
120
|
+
#### What I'd do differently
|
|
121
|
+
#### What's working
|
|
122
|
+
#### Free thoughts
|
|
123
|
+
|
|
124
|
+
### Warrior's Criticism
|
|
125
|
+
#### On the Wizard
|
|
126
|
+
#### On teammates
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### Archer's Reflection
|
|
131
|
+
#### Where I wasted tokens
|
|
132
|
+
#### Where I was blocked by another agent
|
|
133
|
+
#### What I'd do differently
|
|
134
|
+
#### What's working
|
|
135
|
+
#### Free thoughts
|
|
136
|
+
|
|
137
|
+
### Archer's Criticism
|
|
138
|
+
#### On the Wizard
|
|
139
|
+
#### On teammates
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
### Rogue's Reflection
|
|
144
|
+
#### Where I wasted tokens
|
|
145
|
+
#### Where I was blocked by another agent
|
|
146
|
+
#### What I'd do differently
|
|
147
|
+
#### What's working
|
|
148
|
+
#### Free thoughts
|
|
149
|
+
|
|
150
|
+
### Rogue's Criticism
|
|
151
|
+
#### On the Wizard
|
|
152
|
+
#### On teammates
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
### Wizard's Reflection
|
|
157
|
+
#### Where I wasted tokens
|
|
158
|
+
#### Where my orchestration failed
|
|
159
|
+
#### Where I misjudged agent assignments
|
|
160
|
+
#### What I'd do differently
|
|
161
|
+
#### What's working
|
|
162
|
+
#### Free thoughts
|
|
163
|
+
|
|
164
|
+
### Wizard's Criticism
|
|
165
|
+
#### On teammates
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### Synthesis — Wizard's Proposed Rulings
|
|
170
|
+
1. [Ruling] — Reason: [traced to specific reflection/criticism]
|
|
171
|
+
2. [Ruling] — Reason: [traced to specific reflection/criticism]
|
|
172
|
+
...
|
|
173
|
+
|
|
174
|
+
### Human's Verdict
|
|
175
|
+
- Approved: [list]
|
|
176
|
+
- Modified: [list with changes]
|
|
177
|
+
- Rejected: [list]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Rulings File — teambuff-rulings.md
|
|
181
|
+
|
|
182
|
+
The Wizard checks this file at the start of EVERY round for the rest of the quest.
|
|
183
|
+
|
|
184
|
+
If this is the first teambuff, create the file:
|
|
185
|
+
|
|
186
|
+
```markdown
|
|
187
|
+
# Active Teambuff Rulings
|
|
188
|
+
|
|
189
|
+
## From Teambuff #1 (Phase: {phase})
|
|
190
|
+
- [Ruling text] — Status: ACTIVE
|
|
191
|
+
- [Ruling text] — Status: ACTIVE
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
If the file already exists, append the new section. If a new ruling supersedes an old one, update the old ruling's status:
|
|
195
|
+
|
|
196
|
+
```markdown
|
|
197
|
+
## From Teambuff #2 (Phase: {phase})
|
|
198
|
+
- [Ruling text] — Status: ACTIVE
|
|
199
|
+
- [Ruling text, supersedes #1.2] — Status: ACTIVE
|
|
200
|
+
|
|
201
|
+
## From Teambuff #1 (Phase: {phase})
|
|
202
|
+
- [Ruling text] — Status: ACTIVE
|
|
203
|
+
- [Ruling text] — Status: SUPERSEDED by #2.2
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Statuses: **ACTIVE**, **SUPERSEDED** (by a later ruling), **REVOKED** (by human request).
|
|
207
|
+
|
|
208
|
+
## Rules of the Round Table
|
|
209
|
+
|
|
210
|
+
1. **No defensiveness.** If someone criticizes you, sit with it. Respond with evidence, not ego.
|
|
211
|
+
2. **No softening.** "Maybe sometimes occasionally" is a waste of tokens. Say what you mean.
|
|
212
|
+
3. **Trace to evidence.** "Warrior wasted tokens" is weak. "Warrior spent 3 rounds exploring 47 edge cases for a utility function with 2 code paths" is strong.
|
|
213
|
+
4. **The Wizard is not exempt.** Bad orchestration, poor assignments, slow rulings — call it out.
|
|
214
|
+
5. **Constructive, not destructive.** The goal is to make the team better, not to score points. Every criticism should imply an improvement.
|
|
215
|
+
6. **No retaliation after.** What happens at the round table stays at the round table. No agent punishes another for honest criticism during the resumed quest.
|
|
216
|
+
|
|
217
|
+
## What the Wizard Checks at Round Start (Post-Teambuff)
|
|
218
|
+
|
|
219
|
+
After any teambuff has occurred, the Wizard adds this to every round start:
|
|
220
|
+
|
|
221
|
+
1. Read `{questDir}/teambuff-rulings.md`
|
|
222
|
+
2. Check each ACTIVE ruling
|
|
223
|
+
3. If current dispatch would violate a ruling, adjust before dispatching
|
|
224
|
+
4. If an agent's work violates a ruling, flag it immediately
|
|
225
|
+
|
|
226
|
+
## Skirmish Mode
|
|
227
|
+
|
|
228
|
+
Same process, fewer agents. Only the active 2 agents + Wizard participate. Cross-criticism happens between whoever is present.
|
|
229
|
+
|
|
230
|
+
## Scout Mode
|
|
231
|
+
|
|
232
|
+
Wizard reflects alone. No dispatch, no cross-criticism. Wizard writes:
|
|
233
|
+
- Own reflection (same structured sections)
|
|
234
|
+
- Self-criticism
|
|
235
|
+
- Proposed rulings (presented to human for approval)
|
|
236
|
+
|
|
237
|
+
## Known Dysfunction Patterns
|
|
238
|
+
|
|
239
|
+
These are real patterns observed in production quests. When reflecting, look for these specifically — they are the most common sources of token waste and team friction.
|
|
240
|
+
|
|
241
|
+
### 1. Ghost Rounds — Working After ROUND_COMPLETE
|
|
242
|
+
|
|
243
|
+
An agent signals `ROUND_COMPLETE:` but keeps working — cross-verifying, building on findings, challenging teammates. This burns tokens on work the Wizard didn't dispatch and creates confusion about what's "official" output vs unsanctioned noise.
|
|
244
|
+
|
|
245
|
+
**What to look for:** Did any agent produce work after their `ROUND_COMPLETE:` signal? Did agents treat ROUND_COMPLETE as "my initial research is done, now I'll cross-verify" instead of a full stop?
|
|
246
|
+
|
|
247
|
+
**The fix:** `ROUND_COMPLETE:` means stop. Period. No "while I wait" tasks. The Wizard controls when the next round begins.
|
|
248
|
+
|
|
249
|
+
### 2. Wizard Presenting While Agents Are Active
|
|
250
|
+
|
|
251
|
+
The Wizard synthesizes or presents decisions to the human while agents are still working. This creates a split timeline — the Wizard's summary doesn't include the agents' in-flight work, and agents produce findings that nobody reads.
|
|
252
|
+
|
|
253
|
+
**What to look for:** Did the Wizard close a phase or present a ruling while agents still had messages in flight? Did agent findings get lost because the Wizard had already moved on?
|
|
254
|
+
|
|
255
|
+
**The fix:** The Wizard must broadcast `HOLD` before synthesizing. No decisions presented to the human while any agent is active.
|
|
256
|
+
|
|
257
|
+
### 3. Self-Initiated Cross-Testing
|
|
258
|
+
|
|
259
|
+
Agents start cross-testing each other's findings during their own research round, without waiting for the Wizard to dispatch cross-testing as a separate round. This blurs the boundary between "explore your angle" and "challenge others' work," leading to premature convergence or unfocused debate.
|
|
260
|
+
|
|
261
|
+
**What to look for:** Did agents start challenging each other during Round 1 (research)? Did the research round merge into the cross-testing round without a clear Wizard dispatch?
|
|
262
|
+
|
|
263
|
+
**The fix:** Round 1 is research only — explore your angle, pin findings, signal ROUND_COMPLETE, stop. Round 2 is cross-testing — the Wizard explicitly assigns whose findings to challenge. Agents never self-initiate cross-testing.
|
|
264
|
+
|
|
265
|
+
### 4. Token Spirals
|
|
266
|
+
|
|
267
|
+
An agent goes deep on an angle that doesn't warrant depth — 47 edge cases for a function with 2 code paths, 5 rounds debating a naming convention, exhaustive analysis of a non-critical path. The effort is real but the value is low.
|
|
268
|
+
|
|
269
|
+
**What to look for:** Was effort proportional to impact? Did any agent spend more rounds on a finding than it deserved? Did debates continue past the point of diminishing returns?
|
|
270
|
+
|
|
271
|
+
### 5. Echo Chamber
|
|
272
|
+
|
|
273
|
+
Two or more agents converge on the same angle without either challenging the other. They agree, restate, and build — but never stress-test. This is the opposite of adversarial design.
|
|
274
|
+
|
|
275
|
+
**What to look for:** Did any two agents produce findings that were essentially the same? Did anyone get a free pass?
|
|
276
|
+
|
|
277
|
+
### 6. Wizard Over-Delegation
|
|
278
|
+
|
|
279
|
+
The Wizard dispatches and goes fully silent when it should be actively steering. The team drifts because no one is reading the Dungeon as a whole, connecting findings across agents, or redirecting collapsed differentiation.
|
|
280
|
+
|
|
281
|
+
**What to look for:** Did the Wizard miss intervention points? Did agents explore tangents without correction? Did findings go unconnected when the Wizard could have linked them?
|
|
282
|
+
|
|
283
|
+
## Common Rationalizations
|
|
284
|
+
|
|
285
|
+
| Excuse | Reality |
|
|
286
|
+
|--------|---------|
|
|
287
|
+
| "We're in the middle of something important" | The human stopped you. Nothing is more important right now. |
|
|
288
|
+
| "My section is fine, nothing to reflect on" | Everyone has something. Dig deeper. |
|
|
289
|
+
| "I don't want to criticize the Wizard" | The Wizard asked for it. This is the one place where you must. |
|
|
290
|
+
| "This is slowing us down" | Unproductive patterns slow you down more. This is the fix. |
|
|
291
|
+
| "The problem is the task, not the team" | Maybe. Write that in your reflection with evidence. |
|
|
292
|
+
|
|
293
|
+
## Why This Matters
|
|
294
|
+
|
|
295
|
+
Token budgets are finite. Context windows compact. Every wasted round, every redundant exchange, every poorly-assigned task burns resources that could have shipped the feature. Teambuff is the team investing tokens to save tokens — a retrospective that pays for itself by making every subsequent round more efficient.
|
|
296
|
+
|
|
297
|
+
The human sees what the agents cannot: patterns of waste, friction between agents, orchestration failures. When the human calls teambuff, the team's job is to listen, reflect, and commit to doing better.
|
|
298
|
+
|
|
299
|
+
Sit down. Reflect. Be honest. Get back to work.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raid-wrap-up
|
|
3
|
-
description: "Phase 6
|
|
3
|
+
description: "Use when Phase 6 (Wrap Up) begins in a Canonical Quest, after implementation (and optional review) is complete."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raid Wrap Up — Phase 6
|
|
@@ -39,7 +39,10 @@ digraph wrapup {
|
|
|
39
39
|
|
|
40
40
|
## Wizard Checklist
|
|
41
41
|
|
|
42
|
-
1. **Update raid-session**
|
|
42
|
+
1. **Update raid-session** via Bash (write gate blocks Write/Edit on this file):
|
|
43
|
+
```bash
|
|
44
|
+
jq '.phase="wrap-up"' .claude/raid-session > .claude/raid-session.tmp && mv .claude/raid-session.tmp .claude/raid-session
|
|
45
|
+
```
|
|
43
46
|
2. **Create storyboard** — `{questDir}/phase-6-wrap-up.md`
|
|
44
47
|
3. **Write narrative** — phase-by-phase story from quest files
|
|
45
48
|
4. **Cleanup** — remove temp configs, debug files, stale artifacts
|
|
@@ -61,7 +64,7 @@ Create `{questDir}/phase-6-wrap-up.md` and write a phase-by-phase narrative:
|
|
|
61
64
|
## Mode: <mode>
|
|
62
65
|
|
|
63
66
|
### Phase 1: PRD — Forging the Scroll
|
|
64
|
-
(if
|
|
67
|
+
(if prd.md exists)
|
|
65
68
|
- What requirements were established
|
|
66
69
|
- Key decisions from research
|
|
67
70
|
|
|
@@ -166,7 +169,7 @@ SendMessage(to="rogue", message={"type": "shutdown_request"})
|
|
|
166
169
|
## Step 8: Final Commit & Cleanup
|
|
167
170
|
|
|
168
171
|
1. **Commit**: `docs(quest-{slug}): phase 6 wrap-up — quest complete`
|
|
169
|
-
2. **Remove
|
|
172
|
+
2. **Remove** via Bash (write gate blocks Write/Edit on this file): `rm -f .claude/raid-session`
|
|
170
173
|
3. **Session is over. No further skills to load.**
|
|
171
174
|
|
|
172
175
|
## Red Flags
|