Resolve disagreements between agents or approaches using test-based adjudication...
Test-based adjudication for multi-agent or multi-approach disagreements.
Design rationale: This skill uses the orchestrator-subagent pattern because test-based adjudication involves substantial cognitive work: position gathering, discriminating test design, test execution, and evidence-based adjudication. Each phase benefits from fresh context to prevent anchoring bias. See
docs/guides/ORCHESTRATOR_SUBAGENT_PATTERN.md.
| Signal | Action |
|---|---|
| Multiple agents disagree | Run full protocol |
| Multiple valid approaches | Run full protocol |
| User asks "which approach" | Run full protocol |
| Architectural decision needed | Run full protocol |
| User says "/resolve" | Run full protocol |
"Tests are the medium of disagreement, not rhetoric." β DebateCoder
Research backing:
research/003-debate-or-vote.md: Voting beats extended debateresearch/041-debatecoder.md: Tests adjudicate better than argumentsresearch/042-rankef.md: Selection beats unguided reasoningKey principles:
| Tool | Purpose |
|---|---|
Read(context_paths) |
Read relevant code/docs |
Write(file_path, content) |
Write position/test reports |
Grep(pattern) |
Search codebase for patterns |
| Command | Purpose |
|---|---|
pytest tests/... |
Run discriminating tests |
npm test |
Run JS/TS tests |
A discriminating test is one where:
| Outcome | When | Action |
|---|---|---|
| Clear winner | Tests discriminate (2-1 or better) | Document decision |
| No winner | Tests don't discriminate | Preserve dissent, ask user |
| Value tradeoff | Equal test results | Present options to user |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RESOLVE ORCHESTRATOR β
β - Creates session: sessions/resolve-{timestamp}/ β
β - Manages TodoWrite state β
β - Spawns subagents with isolated context (prevents anchoring) β
β - Passes test results, not arguments, between phases β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Positions β β Test Generate β β Test Execute β
β agents/ β β agents/ β β agents/ β
β positions.md β β tests.md β β execute.md β
ββββββββββ¬βββββββββ ββββββββββ¬βββββββββ ββββββββββ¬βββββββββ
β β β
01_positions.md 02_tests.md 03_results.md
β β β
ββββββββββββββββββββββΌβββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Adjudicate β β Decision or user choice
β agents/ β
β adjudicate.md β
ββββββββββ¬βββββββββ
β
04_decision.md
| Phase | Agent | Input | Output |
|---|---|---|---|
| 1 | agents/positions.md |
question, context | positions A, B, C... |
| 2 | agents/tests.md |
positions | discriminating tests |
| 3 | agents/execute.md |
tests, positions | test results matrix |
| 4 | agents/adjudicate.md |
results | decision or preserved dissent |
1. Create session directory:
mkdir -p sessions/resolve-{timestamp}
2. Initialize TodoWrite with phases:
- [ ] Phase 1: Gather Positions
- [ ] Phase 2: Generate Discriminating Tests
- [ ] Phase 3: Execute Tests
- [ ] Phase 4: Adjudicate
3. Gather inputs:
- question: What is being decided?
- context: Relevant code/docs
- participants: Agents or approaches involved
Spawn: agents/positions.md
Input:
{
"session_dir": "sessions/resolve-{timestamp}",
"question": "Should we use JWT or session tokens for auth?",
"context_paths": ["src/auth/**", "PLAN/requirements.md"]
}
Output:
{
"report_path": "sessions/.../01_positions.md",
"positions": [
{"id": "A", "approach": "JWT tokens", "rationale": "Stateless, scalable"},
{"id": "B", "approach": "Session tokens", "rationale": "Revocable, simpler"}
]
}
Spawn: agents/tests.md
Input:
{
"session_dir": "sessions/resolve-{timestamp}",
"positions_path": "<from Phase 1>"
}
Output:
{
"report_path": "sessions/.../02_tests.md",
"tests": [
{"id": "T1", "name": "test_immediate_revocation", "discriminates": "A fails, B passes"},
{"id": "T2", "name": "test_horizontal_scaling", "discriminates": "A passes, B fails"},
{"id": "T3", "name": "test_offline_validation", "discriminates": "A passes, B fails"}
]
}
Spawn: agents/execute.md
Input:
{
"session_dir": "sessions/resolve-{timestamp}",
"tests_path": "<from Phase 2>",
"positions_path": "<from Phase 1>"
}
Output:
{
"report_path": "sessions/.../03_results.md",
"results_matrix": {
"T1": {"A": "FAIL", "B": "PASS"},
"T2": {"A": "PASS", "B": "FAIL"},
"T3": {"A": "PASS", "B": "FAIL"}
},
"a_wins": 2,
"b_wins": 1
}
Spawn: agents/adjudicate.md
Input:
{
"session_dir": "sessions/resolve-{timestamp}",
"results_path": "<from Phase 3>",
"positions_path": "<from Phase 1>"
}
Output:
{
"report_path": "sessions/.../04_decision.md",
"winner": "A",
"confidence": "HIGH",
"rationale": "JWT wins 2-1 on discriminating tests",
"preserved_dissent": "Revocation concern validβconsider short expiry",
"user_decision_needed": false
}
If tests pass/fail equally for all positions:
{
"winner": null,
"confidence": "LOW",
"rationale": "Tests don't discriminateβthis is a value tradeoff",
"preserved_dissent": [
{"position": "A", "for": "Scalability priority"},
{"position": "B", "for": "Simplicity priority"}
],
"user_decision_needed": true,
"question_for_user": "Do you prioritize horizontal scaling or immediate revocation?"
}
| Don't | Why |
|---|---|
| Extended rhetorical debate | Research shows it degrades outcomes |
| Compromise positions | Evidence picks winner, no averaging |
| Skip test generation | Rhetoric without tests is noise |
| Force consensus | Preserve dissent for user |
| More than 2 rounds without tests | Escalate to user instead |
agents/ β Subagent definitionsdocs/guides/ORCHESTRATOR_SUBAGENT_PATTERN.md β Pattern documentationresearch/041-debatecoder.md β Test-based adjudication researchresearch/003-debate-or-vote.md β Why debate degrades