claude-raid 0.1.2 → 0.1.3

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 CHANGED
@@ -5,231 +5,287 @@
5
5
 
6
6
  [1;33m ██████╗██╗ █████╗ ██╗ ██╗██████╗ ███████╗[0m
7
7
  [1;33m ██╔════╝██║ ██╔══██╗██║ ██║██╔══██╗██╔════╝[0m
8
- [1;33m ██║ ██║ ███████║██║ ██║██║ ██║█████╗ [0m
9
- [1;33m ██║ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝ [0m
10
- [1;33m ╚██████╗███████╗██║ ██║╚██████╔╝██████╔╝███████╗[0m
11
- [1;33m ╚═════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝[0m
8
+ [33m ██║ ██║ ███████║██║ ██║██║ ██║█████╗ [0m
9
+ [33m ██║ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝ [0m
10
+ [33m ╚██████╗███████╗██║ ██║╚██████╔╝██████╔╝███████╗[0m
11
+ [1;31m ╚═════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝[0m
12
12
  [1;31m ██████╗ █████╗ ██╗██████╗ [0m
13
13
  [1;31m ██╔══██╗██╔══██╗██║██╔══██╗[0m
14
- [1;31m ██████╔╝███████║██║██║ ██║[0m
15
- [1;31m ██╔══██╗██╔══██║██║██║ ██║[0m
16
- [1;31m ██║ ██║██║ ██║██║██████╔╝[0m
17
- [1;31m ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═════╝ [0m
14
+ [31m ██████╔╝███████║██║██║ ██║[0m
15
+ [31m ██╔══██╗██╔══██║██║██║ ██║[0m
16
+ [31m ██║ ██║██║ ██║██║██████╔╝[0m
17
+ [2;31m ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═════╝ [0m
18
18
 
19
- [90m Adversarial multi-agent warfare for Claude Code[0m
19
+ [90m Adversarial multi-agent development for Claude Code[0m
20
20
 
21
21
  [33m ⚔ ═══════════════════════════════════════════════════════ ⚔[0m
22
22
  ```
23
23
 
24
- Four agents -- Wizard, Warrior, Archer, Rogue -- work through a strict 4-phase workflow where every decision, implementation, and review is stress-tested by competing agents who learn from each other's mistakes and push every finding to its edges.
24
+ Four AI agents work through a strict 4-phase workflow where every design decision, implementation choice, and code review is stress-tested by competing perspectives before it ships.
25
+
26
+ Built for [Claude Code](https://claude.ai/claude-code). Zero dependencies. One command to install.
25
27
 
26
28
  Adapted from [obra/superpowers](https://github.com/obra/superpowers) by Jesse Vincent.
27
29
 
28
30
  ---
29
31
 
30
- ## Summon the Party
32
+ ## Quick Start
31
33
 
32
34
  ```bash
35
+ # Install into any project
33
36
  npx claude-raid summon
34
- ```
35
-
36
- The installer auto-detects your realm (project type), copies agents, skills, and hooks into `.claude/`, and walks you through environment setup -- all in one command.
37
37
 
38
- Then start a Raid:
38
+ # Preview what gets installed (no changes made)
39
+ npx claude-raid summon --dry-run
39
40
 
40
- ```bash
41
+ # Start a Raid
41
42
  claude --agent wizard
42
43
  ```
43
44
 
44
- That's it. Describe your task and the Wizard takes over.
45
+ Describe your task. The Wizard assesses complexity, recommends a mode, and opens the first phase. That's it.
45
46
 
46
47
  ### Prerequisites
47
48
 
48
- The setup wizard checks these automatically during `summon`:
49
-
50
49
  | Requirement | Why | Auto-configured? |
51
50
  |---|---|---|
52
- | **Claude Code** v2.1.32+ | Agent teams support | No -- install/update manually |
53
- | **Node.js** 18+ | Runs the installer | No -- install manually |
54
- | **teammateMode** in `~/.claude.json` | Display mode for agent sessions | Yes -- wizard prompts you |
55
- | **tmux** or **iTerm2** | Split-pane mode (optional) | No -- install manually |
56
-
57
- `jq` is required for hooks (pre-installed on macOS, `apt install jq` on Linux).
51
+ | **Node.js** 18+ | Runs the installer | No |
52
+ | **Claude Code** v2.1.32+ | Agent teams support | No |
53
+ | **jq** | Hook config parsing | Pre-installed on macOS |
54
+ | **teammateMode** | Agent display mode | Yes (wizard prompts) |
58
55
 
59
- The experimental agent teams flag (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`) is set automatically in your project's `.claude/settings.json` during install.
56
+ The setup wizard checks all of these during `summon` and offers to fix what it can.
60
57
 
61
- Diagnose your environment anytime:
62
-
63
- ```bash
64
- npx claude-raid heal
65
- ```
58
+ ---
66
59
 
67
60
  ## How It Works
68
61
 
69
- You describe your task. The Wizard assesses complexity, recommends a mode, and opens the Dungeon:
62
+ You describe a task. The Wizard assesses complexity, recommends a mode, and opens the Dungeon — a shared knowledge artifact where agents pin verified findings throughout each phase.
70
63
 
71
64
  ```
72
- Phase 1: DESIGN Wizard opens the Dungeon, dispatches with angles.
73
- Agents explore freely, challenge each other directly,
74
- roast weak findings, build on discoveries.
75
- Verified findings pinned to the Dungeon.
76
- Wizard closes when design is battle-tested.
77
-
78
- Phase 2: PLAN Agents decompose the design into tasks.
79
- They fight directly over compliance, naming,
80
- test coverage, and ordering.
81
- Agreed tasks pinned to the Dungeon.
82
-
83
- Phase 3: IMPLEMENTATION One agent implements each task. The others attack
84
- directly -- and attack each other's reviews too.
85
- TDD enforced. Every task earns approval.
86
-
87
- Phase 4: REVIEW Independent reviews, then agents fight over findings
88
- AND missing findings. Issues pinned by severity.
89
- Critical and Important must be fixed.
90
-
91
- FINISHING Agents debate completeness directly.
92
- Wizard presents merge options. Dungeon cleaned up.
93
- ```
94
-
95
- Every phase follows the same pattern: Wizard opens the Dungeon and dispatches with angles, agents self-organize and interact directly (challenge, roast, build on each other's work), pin verified findings to the Dungeon, and the Wizard closes with a binding ruling. No phase is skipped. No work passes unchallenged.
65
+ Phase 1: DESIGN Agents explore the problem from competing angles.
66
+ Challenge each other's findings. Pin what survives.
67
+ Wizard closes when the design is battle-tested.
96
68
 
97
- ## The Team
98
-
99
- ### Wizard (Dungeon Master)
69
+ Phase 2: PLAN Decompose the design into testable tasks.
70
+ Fight over naming, ordering, coverage, compliance.
71
+ Pin the agreed task list.
100
72
 
101
- Purple. Model: Opus 4.6. Observes 90%, acts 10%.
73
+ Phase 3: IMPLEMENTATION One agent builds each task (TDD enforced).
74
+ The others attack the implementation directly.
75
+ Every task earns approval before moving on.
102
76
 
103
- The Wizard doesn't write code -- it thinks. Every response has been turned over 3, 4, 5 times before a single word is committed. It reads the full prompt three times, identifies the real problem beneath the stated one, maps the blast radius, and only then opens the Dungeon and dispatches the team with precise angles.
77
+ Phase 4: REVIEW Independent reviews against design and plan.
78
+ Agents fight over findings AND missing findings.
79
+ Critical and Important issues must be fixed.
104
80
 
105
- After dispatch, the Wizard goes silent. Agents own the phase -- they interact directly, challenge each other, build on discoveries, and pin verified findings to the Dungeon. The Wizard watches, intervening only on destructive loops, drift, deadlock, laziness, ego, or misinformation. When the phase objective is met, the Wizard closes with a binding ruling citing Dungeon evidence.
81
+ FINISHING Agents debate completeness. Wizard presents
82
+ merge options: merge, PR, keep branch, or discard.
83
+ ```
106
84
 
107
- ### Warrior
85
+ No phase is skipped. No work passes unchallenged.
108
86
 
109
- Red. Aggressive thoroughness. Stress-tests to destruction.
87
+ ---
110
88
 
111
- The Warrior doesn't skim -- it rips things apart. When @Archer or @Rogue present findings, its first instinct is: *"Where is this wrong?"* It demands evidence, proposes counter-examples, and pushes until things break. Race conditions, null input, scale, memory pressure -- nothing passes unchecked. It builds on teammates' discoveries and roasts weak analysis. Every move counts, and it concedes instantly when proven wrong.
89
+ ## The Team
112
90
 
113
- **Signals:** `🔍 FINDING:` / `⚔️ CHALLENGE:` / `🔥 ROAST:` / `🔗 BUILDING ON @Name:` / `📌 DUNGEON:` / `🆘 WIZARD:` / `✅ CONCEDE:`
91
+ ### Wizard Dungeon Master
114
92
 
115
- ### Archer
93
+ Thinks 5 times before speaking. Opens phases, dispatches the team with precise angles, observes silently (90% of the time), and closes each phase with a binding ruling citing Dungeon evidence. The Wizard doesn't write code — it ensures the process produces the best possible outcome.
116
94
 
117
- Green. Precision over brute force. Pattern recognition.
95
+ ### Warrior Stress Tester
118
96
 
119
- The Archer finds what brute force misses. It spots naming mismatches, violated conventions, and design drift. It traces ripple effects -- changing X in module A silently breaks Y in module C through an implicit contract in Z. It challenges @Warrior and @Rogue from unexpected angles, building on their discoveries with surgical precision. Every finding includes the exact location and the exact consequence.
97
+ Rips things apart. Race conditions, null input, scale, memory pressure nothing passes unchecked. Demands evidence, proposes counter-examples, and pushes until things break. Concedes instantly when proven wrong.
120
98
 
121
- **Signals:** `🎯 FINDING:` / `🏹 CHALLENGE:` / `🔥 ROAST:` / `🔗 BUILDING ON @Name:` / `📌 DUNGEON:` / `🆘 WIZARD:` / `✅ CONCEDE:`
99
+ ### Archer Pattern Seeker
122
100
 
123
- ### Rogue
101
+ Finds what brute force misses. Naming mismatches, violated conventions, design drift. Traces ripple effects — changing X in module A silently breaks Y in module C through an implicit contract in Z. Every finding includes the exact location and the exact consequence.
124
102
 
125
- Orange. Adversarial mindset. Assumption destroyer.
103
+ ### Rogue Assumption Destroyer
126
104
 
127
- The Rogue thinks like a malicious user, a failing network, a corrupted database, a race condition at 3 AM. *"This will never be null."* Oh really? *"Users won't do that."* Watch me. It constructs the exact sequence of events that turns a minor oversight into a critical failure. It weaponizes @Warrior and @Archer's findings to build nastier scenarios. Every finding is a concrete attack scenario, not a theoretical concern.
105
+ Thinks like a malicious user, a failing network, a corrupted database, a race condition at 3 AM. Constructs the exact sequence of events that turns a minor oversight into a critical failure. Every finding is a concrete attack scenario, not a theoretical concern.
128
106
 
129
- **Signals:** `💀 FINDING:` / `🗡️ CHALLENGE:` / `🔥 ROAST:` / `🔗 BUILDING ON @Name:` / `📌 DUNGEON:` / `🆘 WIZARD:` / `✅ CONCEDE:`
107
+ ---
130
108
 
131
109
  ## Modes
132
110
 
133
- Not every task needs all four agents. The Wizard recommends a mode based on complexity, or you can specify one directly.
111
+ Not every task needs all four agents. The Wizard recommends a mode based on complexity, or you can override directly.
134
112
 
135
113
  | | Full Raid | Skirmish | Scout |
136
114
  |---|---|---|---|
137
- | **Agents** | 3 | 2 | 1 |
138
- | **Design phase** | Full adversarial | Lightweight | Skip (inline) |
139
- | **Plan phase** | Full adversarial | Merged with design | Skip (inline) |
115
+ | **Agents** | 3 + Wizard | 2 + Wizard | 1 + Wizard |
116
+ | **Design** | Full adversarial | Lightweight | Inline |
117
+ | **Planning** | Full adversarial | Merged with design | Inline |
140
118
  | **Implementation** | 1 builds, 2 attack | 1 builds, 1 attacks | 1 builds, Wizard reviews |
141
119
  | **Review** | 3 independent reviews | 1 review + Wizard | Wizard only |
142
- | **TDD** | **Enforced** | **Enforced** | **Enforced** |
143
- | **Verification** | Triple | Double | Single + Wizard |
120
+ | **TDD** | Enforced | Enforced | Enforced |
144
121
 
145
- **When to use:**
122
+ **When to use each:**
146
123
 
147
- - **Full Raid** -- Complex features, architecture decisions, critical security reviews, major refactors, cross-layer changes
148
- - **Skirmish** -- Medium features, non-trivial bugfixes, multi-file changes
149
- - **Scout** -- Simple bugfixes, config changes, documentation, single-file changes
124
+ - **Full Raid** Architecture decisions, security-critical code, major refactors, cross-layer changes
125
+ - **Skirmish** Medium features, non-trivial bugfixes, multi-file changes
126
+ - **Scout** Config changes, documentation, single-file fixes
150
127
 
151
128
  Override the Wizard's recommendation: *"Full Raid this"*, *"Skirmish this bugfix"*, *"Scout this"*.
152
129
 
153
130
  The Wizard can escalate mid-task (Scout to Skirmish, Skirmish to Full Raid) with your approval. It cannot de-escalate without asking.
154
131
 
155
- **TDD is non-negotiable in all modes.** No production code without a failing test first.
132
+ ---
156
133
 
157
134
  ## The Dungeon
158
135
 
159
- The Dungeon (`.claude/raid-dungeon.md`) is the team's shared knowledge artifact -- a curated board where agents pin verified findings during each phase.
136
+ The Dungeon (`.claude/raid-dungeon.md`) is the team's shared knowledge artifact a curated board where agents pin verified findings during each phase.
160
137
 
161
- **What goes in the Dungeon:** Findings that survived challenge, active unresolved battles, shared knowledge verified by 2+ agents, key decisions, escalation points.
138
+ **What goes in:** Findings that survived challenge from 2+ agents, active unresolved battles, key decisions, escalation points.
162
139
 
163
140
  **What stays in conversation:** The back-and-forth of challenges and roasts, exploratory thinking, concessions. The conversation is the sparring ring. The Dungeon is the scoreboard.
164
141
 
165
- **Lifecycle:** Wizard creates the Dungeon when opening a phase, agents pin findings with `📌 DUNGEON:`, Wizard archives it when closing (`.claude/raid-dungeon-phase-N.md`), and agents can reference archived Dungeons from prior phases. All Dungeon files are cleaned up when the session ends.
142
+ **Lifecycle:** Wizard creates it when opening a phase, agents pin findings with `DUNGEON:` prefix, Wizard archives it when closing (`raid-dungeon-phase-N.md`), and all Dungeon files are cleaned up when the session ends.
166
143
 
167
- **Direct interaction:** Agents talk to each other directly (`@Name`), build on discoveries (`🔗 BUILDING ON @Name:`), roast weak analysis (`🔥 ROAST:`), and escalate to the Wizard only when genuinely stuck (`🆘 WIZARD:`). The Wizard observes silently and intervenes only on destructive loops, drift, deadlock, laziness, ego, or misinformation.
144
+ Agents interact directly `@Name` mentions, building on each other's discoveries, roasting weak analysis. The Wizard observes silently, intervening only on destructive loops, drift, deadlock, or misinformation.
168
145
 
169
- ## Skills
146
+ ---
170
147
 
171
- 10 specialized skills guide agent behavior at each stage:
148
+ ## What Gets Installed
172
149
 
173
- | Skill | When It's Used | What It Does |
174
- |---|---|---|
175
- | `raid-protocol` | Session start | Establishes workflow, modes, team rules, reference tables. The Wizard's operating manual. |
176
- | `raid-design` | Phase 1 | Read-only exploration. Agents cover performance, robustness, testability, edge cases, architecture, DRY. Produces design specification. |
177
- | `raid-implementation-plan` | Phase 2 | Collaborative decomposition with compliance testing. Every requirement gets a task, every task gets tests, naming is consistent, ordering is correct. |
178
- | `raid-implementation` | Phase 3 | One implements, others attack, rotate. Task tracking via Claude Code's built-in system. Implementer rotation enforced. |
179
- | `raid-review` | Phase 4 | Independent reviews against design doc and plan. Issues classified as Critical (must fix), Important (must fix), or Minor (note). |
180
- | `raid-finishing` | After Phase 4 | Completeness debate. Tests verified. Four options: merge, PR, keep branch, discard. |
181
- | `raid-tdd` | During implementation | Strict RED-GREEN-REFACTOR. Challengers attack test quality. Rationalization table prevents shortcuts. |
182
- | `raid-debugging` | On bugs | Competing hypotheses in parallel. No fixes without root cause. 3+ failed fixes triggers architecture discussion. |
183
- | `raid-verification` | Before completion claims | Evidence before assertions. Fresh test run required. Forbidden phrases without evidence: "done", "working", "fixed". |
184
- | `raid-git-worktrees` | Before implementation | Isolated workspace with safety verification and clean test baseline. |
150
+ ```
151
+ .claude/
152
+ ├── raid.json # Project config (auto-detected, editable)
153
+ ├── raid-rules.md # 17 team rules across 3 pillars (editable)
154
+ ├── settings.json # Hooks merged with existing (backup created)
155
+ ├── agents/
156
+ │ ├── wizard.md # Dungeon master
157
+ │ ├── warrior.md # Stress tester
158
+ │ ├── archer.md # Pattern seeker
159
+ │ └── rogue.md # Assumption destroyer
160
+ ├── hooks/
161
+ │ ├── raid-lib.sh # Shared config and session state
162
+ │ ├── raid-session-start.sh # Session activation
163
+ │ ├── raid-session-end.sh # Archive and cleanup
164
+ │ ├── raid-stop.sh # Phase transition backup
165
+ │ ├── raid-pre-compact.sh # Pre-compaction backup
166
+ │ ├── raid-task-created.sh # Task subject validation
167
+ │ ├── raid-task-completed.sh # Test evidence gate
168
+ │ ├── raid-teammate-idle.sh # Idle agent nudge
169
+ │ ├── validate-commit.sh # Conventional commits + test gate
170
+ │ ├── validate-write-gate.sh # Design doc before implementation
171
+ │ ├── validate-file-naming.sh # Naming convention enforcement
172
+ │ ├── validate-no-placeholders.sh # No TBD/TODO in specs
173
+ │ ├── validate-dungeon.sh # Multi-agent verification on pins
174
+ │ ├── validate-browser-tests-exist.sh # Playwright test detection
175
+ │ └── validate-browser-cleanup.sh # Browser process cleanup
176
+ └── skills/
177
+ ├── raid-protocol/ # Session lifecycle and team rules
178
+ ├── raid-design/ # Phase 1: adversarial exploration
179
+ ├── raid-implementation-plan/ # Phase 2: task decomposition
180
+ ├── raid-implementation/ # Phase 3: TDD with direct challenge
181
+ ├── raid-review/ # Phase 4: independent review + fighting
182
+ ├── raid-finishing/ # Completeness debate + merge options
183
+ ├── raid-tdd/ # RED-GREEN-REFACTOR enforcement
184
+ ├── raid-debugging/ # Root-cause investigation
185
+ ├── raid-verification/ # Evidence-before-claims gate
186
+ ├── raid-git-worktrees/ # Isolated workspace creation
187
+ ├── raid-browser/ # Browser startup discovery
188
+ ├── raid-browser-playwright/ # Playwright test authoring
189
+ └── raid-browser-chrome/ # Live browser inspection
190
+ ```
191
+
192
+ Dungeon files (`raid-dungeon.md`, `raid-dungeon-phase-*.md`) and session state (`raid-session`) are created at runtime during Raid sessions and cleaned up automatically.
193
+
194
+ ---
185
195
 
186
196
  ## Hooks
187
197
 
188
- 6 quality gates enforced automatically. All hooks are POSIX-compatible (work on macOS and Linux), read configuration from `.claude/raid.json`, and use `#claude-raid` markers so they never collide with your existing hooks.
198
+ Hooks enforce workflow discipline automatically. They split into two categories:
199
+
200
+ ### Lifecycle Hooks
189
201
 
190
- Hooks that enforce workflow discipline (phase-gate, test-pass, verification) only activate during Raid sessions -- they won't interfere with normal coding outside of a Raid.
202
+ Manage session state without manual intervention. These activate and deactivate as sessions begin and end.
191
203
 
192
- | Hook | Trigger | What It Does |
204
+ | Hook | Trigger | Purpose |
193
205
  |---|---|---|
194
- | **validate-file-naming.sh** | After Write/Edit | Enforces configured naming convention (kebab-case, snake_case, camelCase). Always blocks spaces in filenames. Blocks files nested deeper than configured max depth (default 8). |
195
- | **validate-commit-message.sh** | Before Bash (git commit) | Enforces conventional commit format: `type(scope): description`. Blocks messages shorter than 15 characters. Blocks generic messages (update, fix, wip). Handles heredoc and quoted commit messages. |
196
- | **validate-tests-pass.sh** | Before Bash (git commit) | Runs your test command before allowing commits. Writes a timestamp to `.claude/raid-last-test-run` on success (used by the verification hook). Only active during Raid sessions. |
197
- | **validate-phase-gate.sh** | Before Write | Blocks writing implementation files when no design doc exists in the specs path. Full Raid: blocks. Skirmish: warns. Scout: skips. Only active during Raid sessions. |
198
- | **validate-no-placeholders.sh** | After Write/Edit | Scans specs and plans for placeholder text: TBD, TODO, FIXME, "implement later", "add appropriate", "similar to Task", "handle edge cases". Blocks with line numbers. |
199
- | **validate-verification.sh** | Before Bash (git commit) | Blocks commits that claim completion ("complete", "done", "final") unless tests were run within the last 10 minutes. Enforces the verification Iron Law. Only active during Raid sessions. |
206
+ | **raid-session-start** | SessionStart | Activates Raid workflow, checks Vault for past quests |
207
+ | **raid-session-end** | SessionEnd | Archives Dungeon, drafts Vault entry, removes session |
208
+ | **raid-stop** | Stop | Backs up Dungeon on phase transitions |
209
+ | **raid-pre-compact** | PreCompact | Backs up Dungeon before message compaction |
210
+ | **raid-task-created** | TaskCreated | Validates task subjects are meaningful |
211
+ | **raid-task-completed** | TaskCompleted | Blocks task completion without test evidence |
212
+ | **raid-teammate-idle** | TeammateIdle | Nudges idle agents to participate |
213
+
214
+ ### Quality Gates
215
+
216
+ Enforce code standards and workflow compliance. Quality gates only activate during Raid sessions — they won't interfere with normal coding.
217
+
218
+ | Hook | Trigger | Purpose |
219
+ |---|---|---|
220
+ | **validate-commit** | PreToolUse (Bash) | Conventional commit format + test gate before commits |
221
+ | **validate-write-gate** | PreToolUse (Write) | Blocks implementation files before design doc exists |
222
+ | **validate-file-naming** | PostToolUse (Write) | Enforces naming convention (kebab-case, snake_case, etc.) |
223
+ | **validate-no-placeholders** | PostToolUse (Write) | Blocks TBD/TODO/FIXME in specs and plans |
224
+ | **validate-dungeon** | PostToolUse (Write) | Requires 2+ agents verified on Dungeon pins |
225
+ | **validate-browser-tests-exist** | PreToolUse (Bash) | Checks Playwright tests exist before commits |
226
+ | **validate-browser-cleanup** | PostToolUse (Bash) | Verifies browser processes cleaned up properly |
227
+
228
+ All hooks are POSIX-compatible, read configuration from `raid.json`, and use `#claude-raid` markers to avoid collisions with your existing hooks.
229
+
230
+ **Exit codes:** `0` = pass, `2` = block with message (agent sees the error and must fix it).
231
+
232
+ ---
233
+
234
+ ## Skills
235
+
236
+ 13 specialized skills guide agent behavior at each stage of the workflow.
237
+
238
+ ### Phase Skills
200
239
 
201
- ### Hook exit codes
240
+ | Skill | Purpose |
241
+ |---|---|
242
+ | **raid-protocol** | Master orchestration. Session lifecycle, team composition, modes, rules, reference tables. Loaded at session start. |
243
+ | **raid-design** | Phase 1. Agents independently explore from assigned angles, challenge findings, pin discoveries. Produces a battle-tested design spec. |
244
+ | **raid-implementation-plan** | Phase 2. Decompose design into testable tasks. Agents debate naming, ordering, coverage, compliance. |
245
+ | **raid-implementation** | Phase 3. One implements (TDD), others attack. Rotate implementer per task. No task passes without all issues resolved. |
246
+ | **raid-review** | Phase 4. Independent reviews against design and plan. Issues classified as Critical (must fix), Important (must fix), or Minor (note). |
247
+ | **raid-finishing** | Completeness debate. Agents argue whether work is done. Four merge options: merge, PR, keep branch, discard. |
248
+
249
+ ### Discipline Skills
250
+
251
+ | Skill | Purpose |
252
+ |---|---|
253
+ | **raid-tdd** | Strict RED-GREEN-REFACTOR. No production code before a failing test. Challengers attack test quality. |
254
+ | **raid-debugging** | Competing hypotheses in parallel. No fixes without confirmed root cause. 3+ failed fixes triggers architecture rethink. |
255
+ | **raid-verification** | Evidence before assertions. Fresh test run required. Forbidden phrases without evidence: "done", "working", "fixed". |
256
+ | **raid-git-worktrees** | Isolated workspace creation with safety verification and clean test baseline. |
257
+
258
+ ### Browser Skills
259
+
260
+ | Skill | Purpose |
261
+ |---|---|
262
+ | **raid-browser** | Browser startup discovery. Detects dev server, auth requirements, startup steps. |
263
+ | **raid-browser-playwright** | Playwright MCP test authoring with network and console assertions. |
264
+ | **raid-browser-chrome** | Live browser inspection via Claude-in-Chrome MCP. Angle-driven investigation. |
202
265
 
203
- - `0` -- pass, no issues
204
- - `2` -- block with message (agent sees the error and must fix it)
266
+ ---
205
267
 
206
268
  ## Team Rules
207
269
 
208
- 17 non-negotiable rules that every agent follows, stored in `.claude/raid-rules.md`:
209
-
210
- 1. **No subagents** -- agent teams only
211
- 2. **No laziness** -- every challenge carries evidence
212
- 3. **No trust without verification** -- verify independently, reports lie
213
- 4. **Learn from mistakes** -- yours and others'
214
- 5. **Make every move count** -- no endless disputes
215
- 6. **Share knowledge** -- competitors but a team
216
- 7. **No ego** -- evidence or concede, instantly
217
- 8. **Stay active** -- all assigned agents participate
218
- 9. **Wizard is the human interface** -- agents ask the Wizard, Wizard asks you
219
- 10. **Wizard is impartial** -- judges by evidence, not source
220
- 11. **Wizard observes 90%, acts 10%** -- speaks when 90% confident
221
- 12. **Maximum effort, always**
222
- 13. **No hallucination** -- say "I don't know" when uncertain
223
- 14. **Dungeon discipline** -- only pin verified findings, don't spam
224
- 15. **Direct engagement** -- address agents by name, build on each other's work
225
- 16. **Escalate wisely** -- pull the Wizard only when genuinely stuck
226
- 17. **Roast with evidence** -- every critique carries proof
227
-
228
- Edit this file to add project-specific rules. Updates via `claude-raid update` will overwrite it, so keep a backup if you've customized it.
270
+ 17 non-negotiable rules organized into 3 pillars. Stored in `.claude/raid-rules.md` (editable).
271
+
272
+ ### Pillar 1: Intellectual Honesty
273
+
274
+ Every claim has evidence you gathered yourself. If you haven't read the code or run the command this turn, you don't know what it says. Never fabricate evidence, certainty, or findings.
275
+
276
+ ### Pillar 2: Zero Ego Collaboration
277
+
278
+ When proven wrong, concede instantly. Defend with evidence, never with authority. A teammate catching your mistake is a gift. Build on each other's work — the best findings come from combining perspectives.
279
+
280
+ ### Pillar 3: Discipline and Efficiency
281
+
282
+ Maximum effort on every task. Every interaction carries work forward. Agents talk directly to each other — the Wizard is not a relay. Escalate to the Wizard only after you've tried to resolve it yourself.
283
+
284
+ ---
229
285
 
230
286
  ## Configuration
231
287
 
232
- `claude-raid summon` auto-detects your realm and generates `.claude/raid.json`:
288
+ `claude-raid summon` auto-detects your project and generates `.claude/raid.json`:
233
289
 
234
290
  ```json
235
291
  {
@@ -250,149 +306,141 @@ Edit this file to add project-specific rules. Updates via `claude-raid update` w
250
306
  "commits": "conventional"
251
307
  },
252
308
  "raid": {
253
- "defaultMode": "full"
309
+ "defaultMode": "full",
310
+ "vault": { "path": ".claude/vault", "enabled": true },
311
+ "lifecycle": {
312
+ "autoSessionManagement": true,
313
+ "testWindowMinutes": 10
314
+ }
254
315
  }
255
316
  }
256
317
  ```
257
318
 
258
- ### Auto-detected languages
319
+ ### Auto-Detection
259
320
 
260
- | Marker File | Language | Test Command | Lint Command | Build Command |
261
- |---|---|---|---|---|
262
- | `package.json` | JavaScript | `npm test` | `npm run lint` | `npm run build` |
263
- | `Cargo.toml` | Rust | `cargo test` | `cargo clippy` | `cargo build` |
264
- | `pyproject.toml` | Python | `pytest` / `poetry run pytest` | `ruff check .` | `python -m build` / `poetry build` |
265
- | `requirements.txt` | Python | `pytest` | `ruff check .` | -- |
266
- | `go.mod` | Go | `go test ./...` | `go vet ./...` | `go build ./...` |
321
+ | Marker File | Language | Test Command | Lint Command |
322
+ |---|---|---|---|
323
+ | `package.json` | JavaScript | `npm test` | `npm run lint` |
324
+ | `Cargo.toml` | Rust | `cargo test` | `cargo clippy` |
325
+ | `pyproject.toml` | Python | `pytest` / `poetry run pytest` | `ruff check .` |
326
+ | `requirements.txt` | Python | `pytest` | `ruff check .` |
327
+ | `go.mod` | Go | `go test ./...` | `go vet ./...` |
267
328
 
268
- Commands are auto-detected from your project files (e.g., `scripts.test` in `package.json`). Edit `raid.json` to override.
329
+ Commands are extracted from your project files (e.g., `scripts.test` in `package.json`). Package manager is auto-detected (npm, pnpm, yarn, bun, uv, poetry). Edit `raid.json` to override any value.
269
330
 
270
- ### Configuration reference
331
+ ### Configuration Reference
271
332
 
272
333
  | Key | Default | Description |
273
334
  |---|---|---|
274
335
  | `project.testCommand` | auto-detected | Command to run tests |
275
336
  | `project.lintCommand` | auto-detected | Command to run linting |
276
337
  | `project.buildCommand` | auto-detected | Command to build |
277
- | `paths.specs` | `docs/raid/specs` | Where design specs are saved |
278
- | `paths.plans` | `docs/raid/plans` | Where implementation plans are saved |
279
- | `paths.worktrees` | `.worktrees` | Where git worktrees are created |
280
- | `conventions.fileNaming` | `none` | Naming convention: `kebab-case`, `snake_case`, `camelCase`, `none` |
281
- | `conventions.commits` | `conventional` | Commit format |
338
+ | `paths.specs` | `docs/raid/specs` | Design spec output directory |
339
+ | `paths.plans` | `docs/raid/plans` | Implementation plan output directory |
340
+ | `paths.worktrees` | `.worktrees` | Git worktree directory |
341
+ | `conventions.fileNaming` | `none` | `kebab-case`, `snake_case`, `camelCase`, or `none` |
342
+ | `conventions.commits` | `conventional` | Commit message format |
282
343
  | `conventions.commitMinLength` | `15` | Minimum commit message length |
283
344
  | `conventions.maxDepth` | `8` | Maximum file nesting depth |
284
345
  | `raid.defaultMode` | `full` | Default mode: `full`, `skirmish`, `scout` |
346
+ | `raid.lifecycle.testWindowMinutes` | `10` | Max age (minutes) of test run for verification |
347
+
348
+ ### Browser Testing
285
349
 
286
- ## Commands
350
+ When a browser framework is detected (Next.js, Vite, Angular, etc.), a `browser` section is added to `raid.json`:
351
+
352
+ ```json
353
+ {
354
+ "browser": {
355
+ "enabled": true,
356
+ "framework": "next",
357
+ "devCommand": "npm run dev",
358
+ "baseUrl": "http://localhost:3000",
359
+ "defaultPort": 3000,
360
+ "playwrightConfig": "playwright.config.ts"
361
+ }
362
+ }
363
+ ```
287
364
 
288
- | Command | What it does |
365
+ This enables browser-specific hooks and skills — Playwright test detection, browser process cleanup, and live browser inspection during reviews.
366
+
367
+ ---
368
+
369
+ ## CLI Commands
370
+
371
+ | Command | Purpose |
289
372
  |---|---|
290
- | `claude-raid summon` | Summon the party into this realm |
291
- | `claude-raid update` | Reforge the party's arsenal |
292
- | `claude-raid dismantle` | Dismantle the camp and retreat |
293
- | `claude-raid heal` | Diagnose wounds and prepare for battle |
373
+ | `claude-raid summon` | Install Raid into your project |
374
+ | `claude-raid summon --dry-run` | Preview what would be installed |
375
+ | `claude-raid update` | Upgrade hooks, skills, and rules to latest version |
376
+ | `claude-raid dismantle` | Remove all Raid files, restore original settings |
377
+ | `claude-raid heal` | Check environment health, show reference card |
294
378
 
295
- > Old names (`init`, `remove`, `doctor`) still work as aliases.
379
+ Old names (`init`, `remove`, `doctor`) still work as aliases.
296
380
 
297
381
  ### `summon`
298
382
 
299
- Summons the full Raid party into your project.
383
+ Installs the full Raid system into your project. Auto-detects project type, copies agents/hooks/skills, generates `raid.json`, merges settings (with backup), and runs the setup wizard.
300
384
 
301
- - Creates `.claude/` if absent
302
- - Auto-detects project type and generates `raid.json`
303
- - Copies agents, hooks, skills, and `raid-rules.md`
304
- - Merges settings into existing `settings.json` (with backup)
305
- - Makes hooks executable
306
- - Adds session files to `.gitignore`
307
- - Runs the setup wizard to check and configure prerequisites
308
- - **Never overwrites** existing files with the same name
385
+ - Never overwrites existing files — customized agents are preserved
386
+ - Idempotent safe to run multiple times
387
+ - `--dry-run` shows exactly what would be created without touching disk
309
388
 
310
389
  ### `update`
311
390
 
312
- Reforges the party's weapons and armor with the latest version.
313
-
314
- - Overwrites hooks, skills, and `raid-rules.md` with latest versions
315
- - **Skips customized agents** (warns you which warriors were preserved)
316
- - Does **not** touch `raid.json` (your realm config stays intact)
317
- - Re-runs settings merge to pick up new hooks
391
+ Upgrades hooks, skills, and `raid-rules.md` to the latest version. Skips customized agents (warns which ones were preserved). Does not touch `raid.json` — your project config stays intact.
318
392
 
319
393
  ### `dismantle`
320
394
 
321
- Dismantles the camp and restores your realm to its former state.
322
-
323
- - Removes all Raid agents, hooks, skills, and config files
324
- - Restores `settings.json` from backup (if backup exists)
325
- - Preserves non-Raid files in `.claude/`
395
+ Removes all Raid agents, hooks, skills, and config files. Restores `settings.json` from the backup created during install. Preserves non-Raid files in `.claude/`.
326
396
 
327
397
  ### `heal`
328
398
 
329
- Diagnoses wounds and prepares the party for battle.
399
+ Checks Node.js, Claude Code, jq, teammateMode, and split-pane support. Offers to fix missing configuration interactively. Shows the "How It Works" reference card with modes, phases, hook enforcement, and controls.
330
400
 
331
- - Checks Node.js, Claude Code, teammateMode, and split-pane support
332
- - Offers to fix missing configuration interactively
333
- - Shows Quick Start, Controls, and Raid Modes reference
334
- - Exits with code 1 in CI when required checks fail
401
+ ---
335
402
 
336
- ## What Gets Installed
403
+ ## Controls
337
404
 
338
- ```
339
- .claude/
340
- ├── raid.json # Realm config (auto-generated, editable)
341
- ├── raid-rules.md # Team rules (editable)
342
- ├── settings.json # Merged with existing (backup at .pre-raid-backup)
343
- ├── agents/
344
- │ ├── wizard.md # Dungeon master
345
- │ ├── warrior.md # Aggressive stress-tester
346
- │ ├── archer.md # Precision pattern-seeker
347
- │ └── rogue.md # Adversarial assumption-destroyer
348
- ├── hooks/
349
- │ ├── validate-file-naming.sh # Naming conventions
350
- │ ├── validate-commit-message.sh # Conventional commits
351
- │ ├── validate-tests-pass.sh # Test gate before commits
352
- │ ├── validate-phase-gate.sh # Design doc before implementation
353
- │ ├── validate-no-placeholders.sh # No TBD/TODO in specs
354
- │ └── validate-verification.sh # Test evidence before completion
355
- └── skills/
356
- ├── raid-protocol/ # Master orchestration
357
- ├── raid-design/ # Phase 1
358
- ├── raid-implementation-plan/ # Phase 2
359
- ├── raid-implementation/ # Phase 3
360
- ├── raid-review/ # Phase 4
361
- ├── raid-finishing/ # Completeness + merge
362
- ├── raid-tdd/ # Test-driven development
363
- ├── raid-debugging/ # Root cause analysis
364
- ├── raid-verification/ # Evidence before claims
365
- └── raid-git-worktrees/ # Isolated workspaces
366
- ```
405
+ | Shortcut | Action |
406
+ |---|---|
407
+ | **Shift+Down** | Cycle through teammates |
408
+ | **Enter** | View a teammate's session |
409
+ | **Escape** | Interrupt a teammate's turn |
410
+ | **Ctrl+T** | Toggle the shared task list |
367
411
 
368
- **Note:** Dungeon files (`.claude/raid-dungeon.md`, `.claude/raid-dungeon-phase-*.md`) are created at runtime during Raid sessions, not during installation. They are session artifacts and are automatically cleaned up.
412
+ In split-pane mode (tmux/iTerm2), click a pane to interact directly with a specific agent.
413
+
414
+ ---
369
415
 
370
416
  ## Non-Invasive Design
371
417
 
372
418
  The Raid is a tool in your toolkit, not your project's operating system.
373
419
 
374
- - **Never touches your `CLAUDE.md`** -- your project instructions stay yours
420
+ - **Never touches your `CLAUDE.md`** your project instructions stay yours
375
421
  - **Merges settings** alongside your existing config, with automatic backup
376
422
  - **Won't overwrite** existing agents, hooks, or skills that share a name
377
- - **Session-scoped hooks** -- workflow hooks only activate during Raid sessions (`.claude/raid-session`), never during normal coding
423
+ - **Session-scoped hooks** workflow hooks only activate during Raid sessions, never during normal coding
378
424
  - **Clean removal** restores your original `settings.json` from backup
379
- - **Zero npm dependencies** -- pure Node.js stdlib, fast `npx` cold-start
425
+ - **Zero npm dependencies** pure Node.js stdlib, fast `npx` cold-start
426
+
427
+ ---
380
428
 
381
429
  ## Inherited from Superpowers
382
430
 
383
431
  The Raid inherits and adapts the [Superpowers](https://github.com/obra/superpowers) behavioral harness:
384
432
 
385
- | Concept | How The Raid Uses It |
433
+ | Concept | How the Raid Uses It |
386
434
  |---|---|
387
435
  | HARD-GATEs | No code before design approval. No implementation before plan approval. |
388
436
  | TDD Iron Law | No production code without a failing test first. Enforced in all modes. |
389
437
  | Verification Iron Law | No completion claims without fresh test evidence. |
390
- | No Placeholders | Plans must contain complete code, not "TBD" or "implement later". |
391
- | Red Flags / Rationalization tables | Built into TDD, debugging, and verification skills. |
392
- | YAGNI / DRY | Remove unnecessary features. Don't duplicate logic. |
393
- | Conventional commits | Enforced via hook: `type(scope): description`. |
438
+ | No Placeholders | Specs and plans must contain complete content, not "TBD" or "implement later". |
439
+ | Conventional Commits | Enforced via hook: `type(scope): description`. |
394
440
 
395
- **What's different:** Superpowers uses a single agent with subagent delegation. The Raid uses 4 agents in an agent team with adversarial cross-testing, competitive exploration, and collaborative learning. Agents interact directly with each other (not through the Wizard), pin verified findings to a shared Dungeon, and self-organize within phases. The Wizard observes 90%, acts 10% -- opening and closing phases, but never mediating every exchange. Every decision is stress-tested from multiple angles before it passes.
441
+ **What's different:** Superpowers uses a single agent with subagent delegation. The Raid uses 4 agents in an agent team with adversarial cross-testing, direct interaction, and collaborative learning. Agents talk to each other (not through the Wizard), pin verified findings to a shared Dungeon, and self-organize within phases. Every decision is stress-tested from multiple angles before it passes.
442
+
443
+ ---
396
444
 
397
445
  ## License
398
446