claude-raid 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +295 -223
- package/bin/cli.js +16 -2
- package/package.json +1 -1
- package/src/descriptions.js +57 -0
- package/src/doctor.js +4 -29
- package/src/init.js +142 -7
- package/src/merge-settings.js +1 -1
- package/src/setup.js +45 -3
- package/src/ui.js +76 -5
- package/template/.claude/agents/archer.md +30 -0
- package/template/.claude/agents/rogue.md +30 -0
- package/template/.claude/agents/warrior.md +30 -0
- package/template/.claude/agents/wizard.md +68 -14
- package/template/.claude/hooks/raid-lib.sh +73 -55
- package/template/.claude/hooks/raid-session-end.sh +1 -1
- package/template/.claude/hooks/raid-session-start.sh +5 -8
- package/template/.claude/hooks/raid-stop.sh +11 -16
- package/template/.claude/hooks/raid-task-completed.sh +4 -0
- package/template/.claude/hooks/raid-teammate-idle.sh +9 -2
- package/template/.claude/hooks/validate-commit.sh +5 -1
- package/template/.claude/hooks/validate-dungeon.sh +11 -12
- package/template/.claude/skills/raid-design/SKILL.md +8 -3
- package/template/.claude/skills/raid-implementation/SKILL.md +24 -6
- package/template/.claude/skills/raid-protocol/SKILL.md +28 -6
|
@@ -8,7 +8,7 @@ description: "MUST use at the start of any Raid session. Establishes the 4-phase
|
|
|
8
8
|
The canonical workflow for all Raid operations. Every feature, bugfix, refactor follows this sequence.
|
|
9
9
|
|
|
10
10
|
<HARD-GATE>
|
|
11
|
-
Do NOT skip phases. Do NOT let a single agent work unchallenged (except in Scout mode). Do NOT proceed without a Wizard ruling.
|
|
11
|
+
Do NOT skip phases. Do NOT let a single agent work unchallenged (except in Scout mode). Do NOT proceed without a Wizard ruling. Agents communicate via SendMessage — do not spawn subagents.
|
|
12
12
|
</HARD-GATE>
|
|
13
13
|
|
|
14
14
|
## Session Lifecycle
|
|
@@ -20,7 +20,8 @@ digraph session {
|
|
|
20
20
|
"Create .claude/raid-session" -> "Assess task complexity";
|
|
21
21
|
"Assess task complexity" -> "Recommend mode";
|
|
22
22
|
"Recommend mode" -> "Human confirms mode?";
|
|
23
|
-
"Human confirms mode?" -> "
|
|
23
|
+
"Human confirms mode?" -> "Create team + spawn agents" [label="yes"];
|
|
24
|
+
"Create team + spawn agents" -> "Begin Phase 1";
|
|
24
25
|
"Human confirms mode?" -> "Recommend mode" [label="override"];
|
|
25
26
|
"Begin Phase 1" -> "Phase 1: Design (raid-design)";
|
|
26
27
|
"Phase 1: Design (raid-design)" -> "Phase 2: Plan (raid-implementation-plan)";
|
|
@@ -33,8 +34,8 @@ digraph session {
|
|
|
33
34
|
}
|
|
34
35
|
```
|
|
35
36
|
|
|
36
|
-
**On session start:** Create `.claude/raid-session` to activate workflow hooks.
|
|
37
|
-
**On session end:**
|
|
37
|
+
**On session start:** Create `.claude/raid-session` to activate workflow hooks. After mode approval, create team with `TeamCreate` and spawn agents — each gets their own tmux pane.
|
|
38
|
+
**On session end:** Send shutdown to teammates, remove `.claude/raid-session`, remove all Dungeon files.
|
|
38
39
|
|
|
39
40
|
Hooks that enforce workflow discipline (phase-gate, test-pass, verification) only fire when `.claude/raid-session` exists.
|
|
40
41
|
|
|
@@ -47,6 +48,27 @@ Hooks that enforce workflow discipline (phase-gate, test-pass, verification) onl
|
|
|
47
48
|
| **Archer** | Precise pattern-seeker, finds hidden connections and drift, traces ripple effects | Green |
|
|
48
49
|
| **Rogue** | Adversarial assumption-destroyer, constructs attack scenarios, weaponizes findings | Orange |
|
|
49
50
|
|
|
51
|
+
## Team Spawning
|
|
52
|
+
|
|
53
|
+
After mode approval, the Wizard creates the team and spawns agents:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
TeamCreate(team_name="raid-{mode}-{slug}")
|
|
57
|
+
Agent(subagent_type="warrior", team_name="raid-...", name="warrior")
|
|
58
|
+
Agent(subagent_type="archer", team_name="raid-...", name="archer") # Full Raid + Skirmish
|
|
59
|
+
Agent(subagent_type="rogue", team_name="raid-...", name="rogue") # Full Raid only
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Each agent gets its own tmux pane. Agents stay alive for the entire session — they go idle between turns and wake up when they receive a message.
|
|
63
|
+
|
|
64
|
+
**Communication:**
|
|
65
|
+
- `SendMessage(to="warrior", message="...")` — direct message
|
|
66
|
+
- Agents message each other directly: `SendMessage(to="archer", ...)`
|
|
67
|
+
- The Dungeon is still the shared knowledge artifact for durable findings
|
|
68
|
+
- The task list (`TaskCreate`/`TaskUpdate`) handles work coordination
|
|
69
|
+
|
|
70
|
+
**User access:** The user can click into any agent's tmux pane and interact directly. User instructions override all agents.
|
|
71
|
+
|
|
50
72
|
## Team Rules
|
|
51
73
|
|
|
52
74
|
Read and follow `.claude/raid-rules.md`. Non-negotiable. 17 rules including Dungeon discipline, direct engagement, wise escalation, and evidence-backed roasts.
|
|
@@ -177,7 +199,7 @@ Every phase follows the open/close bookend model:
|
|
|
177
199
|
|
|
178
200
|
```dot
|
|
179
201
|
digraph phase_pattern {
|
|
180
|
-
"Wizard opens (quest + angles + Dungeon)" -> "Agents self-organize";
|
|
202
|
+
"Wizard opens (quest + angles + Dungeon via SendMessage)" -> "Agents self-organize in own panes";
|
|
181
203
|
"Agents self-organize" -> "Agents explore, challenge, roast, build";
|
|
182
204
|
"Agents explore, challenge, roast, build" -> "Agents pin findings to Dungeon";
|
|
183
205
|
"Agents pin findings to Dungeon" -> "Intervention needed?" [shape=diamond];
|
|
@@ -208,7 +230,7 @@ digraph phase_pattern {
|
|
|
208
230
|
|
|
209
231
|
| Signal | Who | Meaning | Goes to Dungeon? |
|
|
210
232
|
|--------|-----|---------|------------------|
|
|
211
|
-
| `DISPATCH:` | Wizard | Opening a phase, assigning angles | No (phase opening) |
|
|
233
|
+
| `DISPATCH:` | Wizard | Opening a phase via SendMessage, assigning angles | No (phase opening) |
|
|
212
234
|
| `REDIRECT:` | Wizard | Brief course correction — one sentence, then silence | No |
|
|
213
235
|
| `RULING:` | Wizard | Phase over, binding decision | Ruling archived with Dungeon |
|
|
214
236
|
| `@Name, ...` | Any agent | Direct address to specific agent | No |
|