Skip to content

Commit 1b534f4

Browse files
ANcpLuaclaude
andauthored
feat: migrate hades, eight-gates, red-blue-review, council to Teams API (#146)
* feat(exodia/hades): migrate Teams API from vague references to explicit tool usage Replace half-baked "Create an agent team" and "MESSAGE smart-audit-deadcode" instructions with explicit TeamCreate, SendMessage, TaskCreate/TaskUpdate, and TeamDelete calls with proper parameters. Add team context preamble and shutdown_response protocol to all 4 teammate templates. Remove fallback subagent path and duplicate STEP -1 block. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: migrate council, red-blue-review, eight-gates Gate 7 to Teams API Council: researcher + synthesizer cross-pollinate via SendMessage, clarity asks live follow-ups instead of one-shot read. 10-step orchestration flow. Red-blue-review: Red attackers coordinate attacks, Blue defenders claim findings from shared task list, full TeamCreate→shutdown→TeamDelete lifecycle. Eight-gates Gate 7: removed dual Mode A/B, Teams-only execution. Lane workers coordinate via SendMessage and claim work via TaskCreate/TaskUpdate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 47e4de1 commit 1b534f4

File tree

7 files changed

+169
-78
lines changed

7 files changed

+169
-78
lines changed

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
},
5353
{
5454
"name": "exodia",
55-
"description": "Multi-agent workflow orchestration (9 commands + 2 skills: eight-gates, hades): fix, turbo-fix, fix-pipeline, tournament, mega-swarm, deep-think, batch-implement, red-blue-review, baryon-mode.",
56-
"version": "2.0.0",
55+
"description": "Multi-agent workflow orchestration (9 commands + 2 skills: eight-gates, hades): fix, turbo-fix, fix-pipeline, tournament, mega-swarm, deep-think, batch-implement, red-blue-review, baryon-mode. Hades, eight-gates, and red-blue-review use Teams API for reactive collaboration.",
56+
"version": "2.1.0",
5757
"source": "./plugins/exodia"
5858
}
5959
]

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ and the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
88

99
### Changed
1010

11-
- **`exodia/skills/hades`**: Migrated from vague Teams references to explicit Teams API usage. SKILL.md now uses `TeamCreate`, `TeamDelete`, `SendMessage` (with type shutdown_request/shutdown_response), `TaskCreate`, `TaskList`, `TaskUpdate` with explicit parameters. Removed fallback subagent path and duplicate STEP -1 block. All 4 teammate templates (auditors, eliminators, verifiers, goggles) updated: vague `MESSAGE` replaced with `SendMessage (recipient: "...")`, vague `Create tasks in shared list` replaced with `TaskCreate`/`TaskUpdate`, team context preamble and shutdown_response protocol added to each
12-
- **`exodia`**: Bumped 2.0.0 → 2.1.0
11+
- **`exodia/skills/hades`**: Migrated from vague Teams references to explicit Teams API. SKILL.md now uses `TeamCreate`, `TeamDelete`, `SendMessage` (shutdown_request/shutdown_response), `TaskCreate`/`TaskList`/`TaskUpdate` with explicit parameters. Removed fallback subagent path and duplicate STEP -1 block. All 4 teammate templates (auditors, eliminators, verifiers, goggles) updated: vague `MESSAGE` `SendMessage (recipient: "...")`, vague task list`TaskCreate`/`TaskUpdate`, team context preamble and shutdown protocol added
12+
- **`exodia/eight-gates` Gate 7 EXECUTE**: Removed dual Mode A (Task subagents) / Mode B (Agent Teams) pattern. Teams API is now the single execution mode. Lane workers coordinate via `SendMessage` and claim work via `TaskCreate`/`TaskUpdate`. Collision avoidance uses teammate messaging
1313
- **`exodia/skills/hades` allowed-tools**: Added `TeamCreate`, `TeamDelete`, `TaskCreate`, `TaskList`, `TaskUpdate`, `SendMessage` to frontmatter
14+
- **`exodia`**: Bumped 2.0.0 → 2.1.0
15+
- **`exodia/red-blue-review`**: Migrated from fire-and-forget subagents to Teams API. Red attackers coordinate attacks via `SendMessage`, Blue defenders claim findings from shared `TaskCreate`/`TaskUpdate`, re-attackers mark verdicts. Full TeamCreate→shutdown→TeamDelete lifecycle across 3 adversarial phases
16+
- **`council`**: Bumped 1.1.0 → 1.2.0. Migrated from subagents to Teams API. Researcher + synthesizer cross-pollinate via `SendMessage`. Clarity asks live follow-ups instead of one-shot read. 10-step orchestration flow. Cost profile ~2.5x → ~3x
1417

1518
### Removed
1619

plugins/council/.claude-plugin/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "council",
3-
"version": "1.1.0",
4-
"description": "Five-agent council: Opus captain decomposes and synthesizes, researcher + synthesizer run in parallel, clarity checks their output, Haiku janitor flags bloat. Each agent identity is inlined in its agent file — passive context, zero activation cost.",
3+
"version": "1.2.0",
4+
"description": "Five-agent council using Teams API: Opus captain orchestrates, researcher + synthesizer cross-pollinate via SendMessage, clarity asks live follow-ups, Haiku janitor flags bloat. Reactive collaboration instead of fire-and-forget subagents.",
55
"author": {
66
"name": "ANcpLua",
77
"email": ""

plugins/council/commands/council.md

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: >-
33
Invoke the five-agent council on any complex task. Opus captain decomposes and synthesizes.
4-
Researcher and synthesizer run in parallel. Clarity reads their raw output.
5-
Haiku janitor flags bloat. Captain removes cuts and delivers.
4+
Researcher and synthesizer run in parallel and cross-pollinate via SendMessage.
5+
Clarity reads their output and asks follow-ups. Haiku janitor flags bloat. Captain removes cuts and delivers.
66
argument-hint: [task description]
77
---
88

@@ -20,21 +20,53 @@ Invoke the council on `[task]`.
2020
## How it runs
2121

2222
```text
23-
opus-captain receives task
23+
captain (lead) creates team "council"
2424
25-
├── sonnet-researcher (parallel) → FINDING/SOURCE/CONFIDENCE/GAPS
26-
└── sonnet-synthesizer (parallel) → REASONING/CONCLUSION/CONFIDENCE/BREAKS
25+
├── researcher (teammate, parallel) ─┐
26+
└── synthesizer (teammate, parallel) ─┤── cross-pollinate via SendMessage
27+
│ │
28+
│ captain waits for convergence │
29+
│ │
30+
└── clarity (teammate) reads task list + messages researcher/synthesizer
31+
→ flags GAPS/ASSUMPTIONS/MISALIGNMENT via SendMessage
2732
28-
└── sonnet-clarity reads researcher + synthesizer raw output
29-
→ GAPS/ASSUMPTIONS/MISALIGNMENT/RESEARCHER_SYNTHESIZER_CONFLICT
30-
31-
└── opus-captain reads all three → produces draft answer
33+
└── captain reads all messages → produces draft
3234
33-
└── haiku-janitor → BLOAT_FLAG + CUTS list
35+
└── janitor (teammate) → BLOAT_FLAG + CUTS via SendMessage
36+
37+
└── captain removes cuts → final output
3438
35-
└── opus-captain removes cuts → final output
39+
└── TeamDelete
3640
```
3741

42+
## Orchestration
43+
44+
1. **TeamCreate:** `team_name="council"`, description = "Council: [task summary]"
45+
2. **Spawn researcher + synthesizer** (both in ONE message, parallel):
46+
- `Task: team_name="council", name="researcher", subagent_type="council:sonnet-researcher"`
47+
- `Task: team_name="council", name="synthesizer", subagent_type="council:sonnet-synthesizer"`
48+
- They cross-pollinate via `SendMessage`: "My sources say X" / "That contradicts my reasoning on Y"
49+
3. **Wait for convergence** — both go idle, no new messages for sustained period
50+
4. **Spawn clarity** (researcher + synthesizer stay alive):
51+
- `Task: team_name="council", name="clarity", subagent_type="council:sonnet-clarity"`
52+
- Clarity reads team message history AND messages researcher/synthesizer for follow-ups
53+
- Researcher/synthesizer respond to clarifying questions in real time
54+
5. **When clarity converges:** shutdown researcher + synthesizer + clarity
55+
(`SendMessage type="shutdown_request"` to each)
56+
6. **Captain synthesizes** from all team messages into draft answer
57+
7. **Spawn janitor:**
58+
- `Task: team_name="council", name="janitor", subagent_type="council:haiku-janitor"`
59+
- Janitor sends `BLOAT_FLAG` + `CUTS` via `SendMessage`
60+
8. **Shutdown janitor** (`SendMessage type="shutdown_request"`)
61+
9. **Captain applies cuts** → final output
62+
10. **TeamDelete** — clean up team
63+
64+
**Why researcher + synthesizer stay alive through clarity:**
65+
Clarity's value comes from asking follow-up questions — "Your source X contradicts synthesizer's
66+
assumption Y, can you clarify?" — which requires live teammates. Shutting them down early
67+
saves tokens but eliminates the reactive collaboration that justifies using Teams over
68+
fire-and-forget subagents.
69+
3870
## Usage
3971

4072
```text
@@ -55,10 +87,11 @@ opus-captain receives task
5587
| Agent | Model | Relative cost |
5688
|-------|-------|---------------|
5789
| opus-captain | opus-4.6 | High (runs three times: dispatch + clarity read + synthesis) |
58-
| sonnet-researcher | sonnet-4.6 | Medium |
59-
| sonnet-synthesizer | sonnet-4.6 | Medium |
60-
| sonnet-clarity | sonnet-4.6 | Low — reads output, no tool calls |
90+
| sonnet-researcher | sonnet-4.6 | Medium-High (stays alive through clarity phase for follow-ups) |
91+
| sonnet-synthesizer | sonnet-4.6 | Medium-High (stays alive through clarity phase for follow-ups) |
92+
| sonnet-clarity | sonnet-4.6 | Medium — reads output, asks follow-ups, receives responses |
6193
| haiku-janitor | haiku-4.5 | Minimal |
6294

63-
Total: ~2.5x a single Opus pass. Researcher and synthesizer run in parallel,
64-
clarity and haiku are lightweight sequential passes on their output.
95+
Total: ~3x a single Opus pass. Higher than fire-and-forget (~2.5x) because researcher
96+
and synthesizer stay alive through the clarity phase. The cost buys reactive
97+
cross-pollination and real follow-up conversations instead of one-shot reads.

plugins/exodia/commands/red-blue-review.md

Lines changed: 78 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,24 @@ allowed-tools: Task, Bash, TodoWrite
3131
```text
3232
REVIEW LEAD (You — Orchestrator)
3333
34-
├─ Phase 1: RED ATTACK (3 agents parallel)
35-
│ ├── red-crash-hunter
36-
│ ├── red-security-attacker
37-
│ └── red-api-breaker
38-
│ └── GATE → validate findings
34+
│ TeamCreate: "red-blue-review"
3935
40-
├─ Phase 2: BLUE DEFENSE (1 agent per MODULE — grouped findings)
41-
│ └── blue-defender-N (one per affected module, all its findings)
42-
│ └── GATE → fixes collected
36+
├─ Phase 1: RED ATTACK (3 teammates, coordinate via SendMessage)
37+
│ ├── red-crash-hunter ──────┐
38+
│ ├── red-security-attacker ─┼── SendMessage: share attack vectors
39+
│ └── red-api-breaker ───────┘ TaskCreate: each finding → shared list
40+
│ └── GATE → validate findings, shutdown_request → Red
4341
44-
├─ Phase 3: RED RE-ATTACK (1 agent per module's fixes)
45-
│ └── red-reattacker-N (one per BLUE module)
46-
│ └── VERDICT: DEFEATED / BYPASSED / INCOMPLETE
42+
├─ Phase 2: BLUE DEFENSE (1 teammate per MODULE)
43+
│ └── blue-defender-N ── TaskUpdate: claim findings, SendMessage: cross-module fixes
44+
│ └── GATE → fixes collected, shutdown_request → Blue
4745
48-
└─ RELEASE: SAFE / BLOCK
46+
├─ Phase 3: RED RE-ATTACK (1 teammate per module)
47+
│ └── red-reattacker-N ── TaskUpdate: DEFEATED/BYPASSED/INCOMPLETE
48+
│ └── shutdown_request → re-attackers
49+
50+
├─ RELEASE: SAFE / BLOCK
51+
└─ TeamDelete
4952
```
5053

5154
---
@@ -58,13 +61,45 @@ Inject findings into Red Team prompts as attack surface hints. Do NOT give to Bl
5861

5962
**THIS IS AN ADVERSARIAL EXERCISE.**
6063

61-
1. Launch 3 Red Team agents in ONE message
62-
2. Validate findings (reject false positives), then GROUP by target module/file
63-
3. Launch 1 Blue defender per MODULE (with all that module's findings)
64-
4. Launch 1 Red re-attacker per Blue module
65-
5. Score and generate release recommendation
64+
**STEP 0 — Create Team:**
65+
TeamCreate: team_name = "red-blue-review", description = "Adversarial review: $0"
66+
67+
**STEP 1 — Red Attack Phase:**
68+
Spawn 3 Red attackers as teammates (ALL in ONE message):
69+
Task tool: team_name="red-blue-review", name="red-crash-hunter", subagent_type="deep-debugger", model="opus"
70+
Task tool: team_name="red-blue-review", name="red-security-attacker", subagent_type="general-purpose", model="opus"
71+
Task tool: team_name="red-blue-review", name="red-api-breaker", subagent_type="general-purpose", model="opus"
72+
73+
Red attackers use SendMessage to coordinate: "I found SQL injection in handler X, check for XSS too"
74+
Red attackers use TaskCreate for each finding (shared task list).
75+
76+
**STEP 2 — Validate & Transition:**
77+
When Red converges (idle, no new messages): validate findings, reject false positives.
78+
SendMessage type="shutdown_request" to all Red attackers.
79+
Group validated findings by module.
80+
81+
**STEP 3 — Blue Defense Phase:**
82+
Spawn 1 Blue defender per module as teammates:
83+
Task tool: team_name="red-blue-review", name="blue-defender-[module]", subagent_type="general-purpose", model="opus"
84+
85+
Blue defenders claim findings from shared task list via TaskUpdate.
86+
Blue defenders use SendMessage to coordinate fixes across modules.
87+
88+
**STEP 4 — Validate & Transition:**
89+
SendMessage type="shutdown_request" to all Blue defenders.
90+
91+
**STEP 5 — Red Re-Attack Phase:**
92+
Spawn 1 Red re-attacker per module:
93+
Task tool: team_name="red-blue-review", name="red-reattacker-[module]", subagent_type="deep-debugger"
94+
95+
Re-attackers use TaskUpdate to mark findings as DEFEATED/BYPASSED/INCOMPLETE.
96+
97+
**STEP 6 — Score & Cleanup:**
98+
Score results, generate release recommendation.
99+
SendMessage type="shutdown_request" to all re-attackers.
100+
TeamDelete.
66101

67-
**YOUR NEXT MESSAGE: 3 Red Team Task tool calls. NOTHING ELSE.**
102+
**YOUR NEXT MESSAGE: TeamCreate + 3 Red Team Task tool calls. NOTHING ELSE.**
68103

69104
</CRITICAL_EXECUTION_REQUIREMENT>
70105

@@ -76,24 +111,36 @@ Launch ALL 3 in ONE message.
76111

77112
### red-crash-hunter
78113

79-
> subagent: deep-debugger | model: opus
114+
> teammate: red-crash-hunter | team: red-blue-review | subagent_type: deep-debugger | model: opus
80115
> RED TEAM — Crash Hunter. TARGET: $0 | SCOPE: $1
116+
> You are a teammate in the red-blue-review team.
117+
> Use SendMessage to coordinate with other Red team members (red-security-attacker, red-api-breaker).
118+
> Use TaskCreate for each finding you discover.
119+
> When you receive a shutdown_request, approve it.
81120
> Find ways to CRASH the code: Null refs, invalid input, resource exhaustion, race conditions, overflow.
82121
> Format: CRASH-001: [title] | Severity | Reproduction | Location
83122
> Real bugs only — false alarms cost -5 points.
84123
85124
### red-security-attacker
86125

87-
> subagent: feature-dev:code-reviewer | model: opus
126+
> teammate: red-security-attacker | team: red-blue-review | subagent_type: general-purpose | model: opus
88127
> RED TEAM — Security Attacker. TARGET: $0 | SCOPE: $1
128+
> You are a teammate in the red-blue-review team.
129+
> Use SendMessage to coordinate with other Red team members (red-crash-hunter, red-api-breaker).
130+
> Use TaskCreate for each finding you discover.
131+
> When you receive a shutdown_request, approve it.
89132
> Find SECURITY vulnerabilities: Injection, path traversal, data exposure, unsafe deserialization, SSRF/CSRF.
90133
> Format: SEC-001: [title] | Severity | Attack Input | Exploitation | Impact
91134
> Proof of concept required. Theoretical issues = 0 points.
92135
93136
### red-api-breaker
94137

95-
> subagent: feature-dev:code-explorer
138+
> teammate: red-api-breaker | team: red-blue-review | subagent_type: general-purpose | model: opus
96139
> RED TEAM — API Breaker. TARGET: $0 | SCOPE: $1
140+
> You are a teammate in the red-blue-review team.
141+
> Use SendMessage to coordinate with other Red team members (red-crash-hunter, red-security-attacker).
142+
> Use TaskCreate for each finding you discover.
143+
> When you receive a shutdown_request, approve it.
97144
> Find ways to BREAK the API contract: Behavior != docs, edge cases, missing validation, breaking changes.
98145
> Format: BREAK-001: [title] | Severity | Documented | Actual | Proof
99146
> Real contract violations only, not style preferences.
@@ -108,9 +155,13 @@ Launch ONE defender per MODULE (not per finding):
108155

109156
### blue-defender-N (one per module)
110157

111-
> subagent: feature-dev:code-architect | model: opus
158+
> teammate: blue-defender-[module] | team: red-blue-review | subagent_type: general-purpose | model: opus
112159
> BLUE TEAM — Defend MODULE: [MODULE_PATH]
113160
> FINDINGS IN THIS MODULE: [PASTE ALL RED FINDINGS FOR THIS MODULE]
161+
> You are a teammate in the red-blue-review team.
162+
> Claim findings from the shared task list using TaskUpdate (set status to "in_progress").
163+
> Use SendMessage to coordinate with other Blue defenders when fixes span modules.
164+
> When you receive a shutdown_request, approve it.
114165
>
115166
> **FILE OWNERSHIP:** You own ONLY files in [MODULE_PATH]. Do not modify files outside your module.
116167
>
@@ -132,9 +183,13 @@ Launch ONE re-attacker per Blue module (mirrors Phase 2 grouping):
132183

133184
### red-reattacker-N (one per module)
134185

135-
> subagent: deep-debugger
186+
> teammate: red-reattacker-[module] | team: red-blue-review | subagent_type: deep-debugger | model: opus
136187
> RED RE-ATTACK — Try to bypass ALL fixes in MODULE: [MODULE_PATH]
137188
> BLUE FIXES: [PASTE ALL BLUE FIXES FOR THIS MODULE]
189+
> You are a teammate in the red-blue-review team.
190+
> Use TaskUpdate to mark each finding as DEFEATED/BYPASSED/INCOMPLETE.
191+
> Use SendMessage to share bypass techniques with other re-attackers.
192+
> When you receive a shutdown_request, approve it.
138193
>
139194
> For EACH fix: VERDICT: **DEFEATED** (Blue +5) | **BYPASSED** (Red +3, Blue -3) | **INCOMPLETE** (list gaps)
140195

plugins/exodia/skills/eight-gates/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Token costs tracked via OTel, not here.
214214
**FALLBACK MODES:**
215215

216216
- Smart scripts unavailable → inline checkpointing via TodoWrite
217-
- Agent Teams unavailable → Task tool with `subagent_type: general-purpose`
217+
- Teams API unavailable → fall back to `Task` tool without `team_name` (no shared task list or messaging)
218218
- Trivial scope (S estimate) → compress Gates 3-5 into minimal checkpoints
219219
(mark as "bypassed-trivial" with rationale), then proceed to Gate 6-7
220220

0 commit comments

Comments
 (0)