Best for
- A task benefits from a second agent reviewing before apply — safety,
- A plan has clear, independent slices that can be worked on in
- A solution space is broad enough that multiple candidate
event4u-app/agent-config/src/skills/subagent-orchestration/SKILL.md
Use when orchestrating implementer/judge subagents — form gate + nine modes (do-and-judge ±two-stage, steps/parallel/worktrees, competitively, debate, live-app-judge, adversarial-council).
Decision brief
Use when orchestrating implementer/judge subagents — form gate + nine modes (do-and-judge ±two-stage, steps/parallel/worktrees, competitively, debate, live-app-judge, adversarial-council).
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/subagent-orchestration"Inspect the Agent Skill "subagent-orchestration" from https://github.com/event4u-app/agent-config/blob/0adf49a8ae84b0ff6e2de8759eea43257e020eff/src/skills/subagent-orchestration/SKILL.md at commit 0adf49a8ae84b0ff6e2de8759eea43257e020eff. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Implementer produces a diff; two judges run sequentially — spec compliance first, code quality second. Stage-one BLOCKED shortcuts the loop (no point quality-reviewing a diff that misses the spec). Stage routing + why-two-stages rationale → modes-detail § Mode 2.
A panel of N (default 2) distinct-model skeptics red-teams a real, already-verified change through the judge- lenses — each prompted to break it. Returns reconcile deterministically (lib/adversarialreconcile.ts) into one findings-by-severity envelope with provenance + cross-mode…
Before picking a mode, check:
A task benefits from a second agent reviewing before apply — safety, regression risk, cross-layer change A plan has clear, independent slices that can be worked on in parallel — unrelated bug fixes, multi-file migrations A solution space is broad enough that multiple candidate i…
Land a verified change (or set of changes) by combining implementer and judge subagents in a mode chosen deliberately, with model pairing read from .agent-settings.yml — never silently improvised.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 96/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Do NOT use when:
token-optimizer index branchLand a verified change (or set of changes) by combining implementer
and judge subagents in a mode chosen deliberately, with model pairing
read from .agent-settings.yml — never silently improvised.
NO JUDGE ON THE SAME MODEL AS THE IMPLEMENTER ON THE SAME CONTEXT.
Same model + same context = same blind spots. The whole point of a
judge is a fresh pair of eyes. If .agent-settings.yml resolves to
identical implementer and judge models, surface the mismatch before
running — do not silently continue.
Within the Reasoning Discipline Protocol, dispatch independent subtasks to
parallel subagents by default and keep working while they run (async), rather
than blocking on each return — intervene only if one goes off track. Engage per
rdp-gate.
"By default" is governed by the delegation-policy
rule — the single source of the auto-trigger. It gates on the activation context
(auto-orchestration-activation):
dispatch only when subagents.enabled, subagents.auto != off, the host
manifest reports subagent_spawn: true, and the task is classified delegable.
auto: ask → ask once; auto: on → surface mode + per-subtask tiers in one
line; any gate failing → in-session no-op. Never lifts a safety floor.
Every dispatched worker prompt obeys five rules that prevent the two classic
handoff failures (lossy re-summarization dropping the user's requirements;
over-scripted prompts that break on first contingency): (a) user
constraints verbatim, (b) describe the goal — don't script the approach,
(c) translate environment paths into the worker's sandbox, (d) pre-declare
check-in conditions, (e) attach relevant knowledge read-only (auto-surface,
never auto-write — ADR-098 floor). The five rules verbatim:
subagent-spawn-contract § Worker-prompt rules.
When to delegate at all is delegation-policy;
the spawn boundary is the subagent-spawn-contract.
Ordered / fan-out hand-offs embed each step's return verbatim in the next prompt and state what to do with it (never "continue from before" — the lossy re-summarization failure). Two worked shapes: subagent-spawn-contract § Hand-off worked examples.
With auto-dispatch on by default (ADR-117), mode selection happens without a human in the loop — so the FORM is decided by a static table first, and only then is the specific mode picked inside that form. Static table only: no learned routing, no self-modifying selector (rejected, stays rejected).
| Task shape (structural signal) | Form | Modes in the form |
|---|---|---|
| ≥ 2 independent, verifiable slices | parallel | do-in-parallel, do-competitively |
| Multi-step cross-wing chain needing filesystem isolation | worktrees | do-in-worktrees |
| Ordered steps with declared dependencies | steps | do-in-steps |
| Single change with non-trivial risk / contested spec / decision | judge | do-and-judge, do-and-judge-two-stage, judge-with-debate, do-with-live-app-judge |
| High-risk change needing defect-FINDING coverage (opt-in, advisory) | verify-council | adversarial-verification-council (default-off; subagents.adversarial_council) |
| Single slice below the delegability floor, unstructured, or frontier-priced | none | no dispatch — run in-session |
Rules:
auto_dispatch.ts::classifyTask (slice count, dependency declarations,
size floor) — it never re-interprets the task text on vibes.none (in-session), never a speculative spawn — the
delegation-policy default.dispatch_mode field, mode id
or none) so the gate's value is measurable inside the ADR-117
prove-or-drop window.Incident-style severity tiers (Critical / High / Medium / Low) refine
composition and activation within the form the static gate already
picked — severity never overrides the form gate, the Iron Law, or any
safety floor. Guidance, not a new object class (persona-catalog
disposition). Severity→composition table + escalation rule →
subagent-modes-detail § Severity-conditioned team composition.
Each mode has a decision row: when to use, when not, and the expected
model pairing. Defaults come from
subagent-configuration.
Descriptive lookup material (per-mode topology table, anti-drift default,
glossary) lives in
subagent-topologies —
pull it for capacity planning; it is metadata, not runtime-enforced.
Per-mode decision rows (when to use / when not / model pairing) and the
mode-2 stage-routing contract live in
subagent-modes-detail § Modes 1–6 —
pull them at dispatch time.
Implementer produces a diff; judge reviews; loop applies, revises, or hands off. Hard ceiling: two revision cycles, then stop and hand back to the user.
Implementer produces a diff; two judges run sequentially — spec
compliance first, code quality second. Stage-one BLOCKED shortcuts the
loop (no point quality-reviewing a diff that misses the spec). Stage
routing + why-two-stages rationale → modes-detail § Mode 2.
Plan is split into N steps; judge runs between steps. A step that fails judgment is revised before the next step starts. Used for multi-file changes where a mid-plan mistake would cascade.
Independent slices run concurrently. No judge per slice — judge runs
once on the aggregated result. Parallelism capped by
subagents.max_parallel in .agent-settings.yml.
Multiple implementers produce candidate diffs for the same slice. Judge picks the winner and rejects the losers. Expensive — use only when the solution space is genuinely broad.
Two judges each produce a verdict; a meta-judge reconciles disagreements. Used for high-stakes changes (security, data migration, public API) where a single judge is too easy to fool.
Mode 6 = go/no-go (strict-er verdict wins); for defect-FINDING coverage (the union of what diverse models catch) use Mode 9.
Cross-wing or cross-skill chain executed across isolated git worktrees —
each handoff runs in its own worktree so one step's workspace state never
leaks into the next. Use for a multi-step cross-wing chain (≥2 senior
skills, each ≥30 min); not for fast iteration under 30 min (overhead
dominates). Full handoff shape, example chain, competitive per-candidate
isolation, and the no-auto-merge Hard Floor →
subagent-modes-detail § Mode 7.
Implementer ships the change AND starts the dev server; the judge drives
the RUNNING app (Playwright / browser) against a written rubric, never
reading the diff. Use for UI-heavy change where "looks right in the diff"
≠ "works in the app"; not for backend/logic (a diff judge is cheaper).
Experimental until verdict_changed_outcome telemetry proves it. Rubric,
adoption gate, and the async-verifier future candidate →
subagent-modes-detail § Mode 8.
A panel of N (default 2) distinct-model skeptics red-teams a real,
already-verified change through the judge-* lenses — each prompted to break
it. Returns reconcile deterministically
(_lib/adversarial_reconcile.ts)
into one findings-by-severity envelope with provenance + cross-model confidence
(schemas/adversarial-findings.json). Unlike
Mode 6 it emits a findings-union, not a go/no-go verdict. Advisory only —
never auto-gates (Hard Floor). Default-off (subagents.adversarial_council);
opt-in high-risk changes only; registered claim + high-risk tier need
cross-vendor skeptics. Invariants, skeptic prompt, reconciliation, prove-or-drop
gate → subagent-modes-detail § Mode 9
Disposition (2026-07-28, honest null). The adversarial-council finding- coverage benchmark resolved as a published null (see
docs/benchmark.md) — this mode is NOT sold as a defect-detection capability. It stays default-off bound to that null; scheduled for removal at the next major unless external evidence (a consumer-filed case where the panel surfaced a real defect the single verifier missed) appears first. Its remaining honest value is perspective diversity + decision documentation, nothing more. (ADR-122).
Every implementer or judge return must conform to
schemas/subagent-status.json. Exactly
four statuses — DONE · DONE_WITH_CONCERNS · NEEDS_CONTEXT ·
BLOCKED — no free-form alternatives; orchestrators route on status
mechanically. Meaning/required-keys table, why-fixed rationale, and the
NEEDS_CONTEXT-vs-BLOCKED distinction →
subagent-modes-detail § Status taxonomy.
Each mode's literal dispatch template lives under
prompts/{mode}.md. The orchestrator loads the
matching prompt at dispatch time and substitutes {{placeholders}}.
Edits to a prompt do not bloat this skill against the 400-line sunset
trigger. Eight prompt files cover modes 1–7 and 9 (the standalone judge
reuses prompts/do-and-judge.md; mode 8's
live-app rubric lives in
subagent-modes-detail § Mode 8);
each prompt cites all four taxonomy statuses — see
prompts/README.md.
Before picking a mode, check:
Do not pick a mode until these four questions have concrete answers.
Read .agent-settings.yml:
subagents.implementer_model → empty = session modelsubagents.judge_model → empty = one tier above implementersubagents.max_parallel → integer, default 3If resolution produces an unknown alias or implementer == judge in the same context, stop and report. Do not improvise.
Run the form gate first, then match task shape to one of the nine modes. When two modes could fit,
prefer the cheaper one (do-and-judge < do-and-judge-two-stage <
do-in-steps < do-in-parallel < do-competitively <
judge-with-debate < do-in-worktrees).
Mode 6 (do-in-worktrees) is gated by worktrees.mode from
.agent-settings.yml (default: ask). Resolve before picking:
worktrees.mode | Mode 6 |
|---|---|
ask | Eligible. using-git-worktrees will run the per-creation permission ask. |
on | Eligible. Per-creation ask suppressed. |
off | Not eligible. Fall back to mode 3 (do-in-steps) — same step-by-step chain, in-place on the current branch. Unless the user explicitly asked this turn for a worktree chain, in which case proceed with mode 6 and acknowledge the override per using-git-worktrees § Pre-flight. |
Use the matching dispatch prompt and orchestrate inline via this skill. Describe each dispatch step explicitly in chat so the user can follow it.
do-and-judge → prompts/do-and-judge.mddo-and-judge-two-stage → prompts/do-and-judge-two-stage.mddo-in-steps → prompts/do-in-steps.mddo-in-parallel → prompts/do-in-parallel.mddo-competitively → prompts/do-competitively.mdjudge-with-debate → prompts/judge-with-debate.mddo-in-worktrees → prompts/do-in-worktrees.mdadversarial-verification-council → prompts/adversarial-verification-council.mdprompts/do-and-judge.mdFollow the output format below. Never merge a diff without reporting the judge verdict.
After every auto-dispatched run, write one audit-log-v1 line
(input_kind: "orchestration") via the orchestration_record recorder —
never hand-author the JSON. Line shape, field semantics, recorder
invocation, and token_delta sourcing priority →
orchestration-telemetry § Emit procedure.
Skip emit when subagents.enabled: false or spawn_count == 0
(in-session run).
do-and-judge; then hand back to the user.do-in-parallel on overlapping slices — race conditions,
conflicting diffs. Verify independence before splitting.do-competitively — N implementers + 1 judge =
N+1 subagent calls for one slice. Confirm budget before dispatch.do-and-judge without user
consentdo-in-parallel on slices that touch shared files| Task | Skill / command |
|---|---|
| Configuration reference | subagent-configuration |
| Do-and-judge loop | Inline — see prompts/do-and-judge.md |
| Stepwise plan with judge gates | Inline — see prompts/do-in-steps.md |
| Standalone judge on an existing diff | Inline — see judge prompt in prompts/do-and-judge.md |
| External / networked second opinion | ai-council |
| Cross-model review WITH repo access | /team (collaborative; subagents are in-session same-weights) |
| Verifying completeness | verify-before-complete |
| What a subagent owns vs never owns | subagent-boundary |