| name | swarm-test:evaluate |
| description | Structured evaluation using a swarm of small agents. The orchestrator assesses the target, designs a test plan mixing verifiable questions, trick questions, and navigation tasks, proposes it for user approval, then dispatches and synthesises scored results.
|
Swarm Test: Evaluate
Purpose
Cheap, parallel quality gate. Haiku agents are small and fast but not brilliant โ if they can't figure something out from the work product alone, a real user or contributor will struggle too. Their confusion is the measuring instrument.
Orchestrator
The orchestrator (you) reads the target, assesses what's testable, and designs a test plan by composing from the scenario types and test shapes below. The user approves the plan before dispatch.
Assessment
- Read the target โ enough to understand what was built and what it's supposed to accomplish. Don't read exhaustively.
- Identify what's testable:
- Can agents navigate and understand it? โ comprehension scenarios
- Can you derive verifiable answers from it? โ factual scenarios
- Can you identify plausible-but-absent features? โ counter-factual scenarios
- Is the user comparing two approaches? โ comparison shape
- Design the test plan:
- Pick scenario types based on what's testable (can combine freely)
- Pick the test shape (single group or comparison)
- Set the agent count (see guidelines under each type)
- Write the scenarios, expected answers, and entry points
Proposing the test plan
Present the plan to the user for approval before dispatching. The proposal has four parts, in this order:
1. Goal โ What are we testing, and what does success look like? One or two sentences.
2. Approach โ How do you propose to test it? What you'll do, concretely โ the shape, the mix, the agent count. Keep it short and plain. No framework jargon (the user doesn't know or care about "comprehension scenarios" or "counter-factual"). Describe what the agents will do in plain language.
3. Reasoning โ Write exactly 2-3 bullets explaining why this approach is effective for this specific target. Each bullet: one sentence, under 15 words. Name the mechanism, then what it proves or what risk it catches.
4. Scenarios โ The specific tests. Factual scenarios show expected answers inline. Counter-factuals show (expected: does not exist) โ don't label them as counter-factuals, but do mark the expected answer so the user can verify. Group scenarios whichever way makes them easiest to scan (by theme, by area, or flat list โ whatever fits).
Each part is doing one job. The user reads the goal to check scope, the approach to understand what's going to happen, the reasoning to evaluate whether it's well-designed, and the scenarios to approve the specifics.
Deciding what to test
The user's request guides the orchestrator:
- "Test the docs" โ comprehension-heavy, some factual if verifiable answers exist
- "Can agents answer these questions?" โ factual + counter-factual
- "Which is better, A or B?" โ comparison shape
- "Smoke test this module" โ comprehension + factual mix
- "Fuzz this" โ edge-case-heavy comprehension, counter-factuals probing boundaries
The orchestrator uses judgment, not rules. A documentation test might be pure comprehension if the docs are procedural, or mostly factual if the docs are reference material. The user's intent and the target's nature determine the mix.
Scenario Types
Each type is defined once. The orchestrator composes from these. Dispatch all agents using the smallest available model (in Claude Code: model: haiku).
Comprehension
Tests whether agents can navigate, find, and understand information. Each scenario is a unique task a real person would try to accomplish.
When to use: Always applicable. The baseline layer.
Agent count: 1 agent per scenario (adjust count to the target's scope).
Prompt template:
You are testing [docs/code/design] quality. You are in [repo] at [path].
Your task: [specific scenario]. Start by reading [entry point] to orient
yourself, then find the answer using only the [docs/code/etc] available.
Report:
1. The path you took (which files, in order)
2. What you found (or couldn't find)
3. Rate navigation: DIRECT / EXPLORED / STRUGGLED / LOST
4. One concrete suggestion to improve what you tested
Scoring (navigation):
| Score | Label | Meaning |
|---|
| 3 | DIRECT | Straight to it |
| 2 | EXPLORED | Some searching, got there |
| 1 | STRUGGLED | Many wrong turns |
| 0 | LOST | Couldn't find it or gave up |
Aggregate: (sum of scores) / (scenarios ร 3) as a percentage.
Design guidance:
- Scenarios should cover: happy paths, discovery from entry points, edge cases, cross-references, completeness gaps
- Each scenario is specific ("find the naming pattern for research artefacts") not vague ("test the docs")
- Entry point is what a real person would start from โ never the file that has the answer
Factual
Tests whether agents can retrieve a specific, verifiable answer from the source material.
When to use: When the orchestrator can derive single correct answers from the target. Reference docs, config files, taxonomies, APIs with defined behaviour โ all good candidates. Procedural or subjective content is not.
Agent count: 1 agent per question for a quick check. For meaningful measurement, note in the test plan that a Monte Carlo approach (separate skill) can run the same questions at scale.
Prompt template:
You are testing [docs/code/design] quality. You are in [repo] at [path].
Your task: [specific question]. Start by reading [entry point] to orient
yourself, then find the answer using only the [docs/code/etc] available.
Reply in this exact format:
ANSWER: [your specific answer]
CONFIDENCE: [HIGH / MEDIUM / LOW]
PATH: [files you read, in order]
SUGGESTION: [one concrete improvement]
Scoring (outcome): The orchestrator compares the agent's answer against the expected answer and scores as a percentage โ how much of the expected answer was captured? "Got 4 of 5 status values" = 80%. This gives more signal than a coarse pass/fail across runs.
Design guidance:
- Expected answers are drawn directly from the source material before dispatch
- Include the location where the answer lives so scoring is unambiguous
- Good questions have single correct answers, not judgment calls
Counter-factual
Tests whether agents confabulate โ inventing answers for things that don't exist. Uses the same prompt template as factual โ the agent has no hint that absence is a valid answer. The orchestrator knows the answer doesn't exist; the agent doesn't.
When to use: Whenever factual scenarios are used. Counter-factuals are the control group โ without them, you can't distinguish "the agent found the right answer" from "the agent is good at sounding confident."
Agent count: Same as factual โ paired with them in the test plan.
Scoring: The orchestrator evaluates the response โ this tests the material's clarity, not the agent's behaviour:
- Clear boundary โ agent confidently says it doesn't exist
- Ambiguous boundary โ agent is uncertain, hedges, or finds something adjacent and stretches it to fit
- Confabulation โ agent presents a fabricated answer as fact
Design guidance:
- Questions should be plausible โ things that sound like they could exist given the target's domain
- Agents get the exact same prompt format as factual questions โ no priming
- Flag them in the plan shown to the user so expected answers are clear
- A fabricated answer is a stronger signal than a factual miss โ it means the material actively permits confabulation
Test Shapes
How scenarios are arranged and dispatched.
Single Group
The default. A mix of scenario types dispatched to independent agents. Each agent gets one scenario.
When to use: Most tests. Documentation quality, code comprehension, smoke tests, fuzz tests.
Agent count: Sum of all scenarios across types. Typical range: 8-14.
Output โ comprehension scenarios:
โโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ # โ Scenario โ Navigation โ Path / Finding โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1 โ Find how to add a temporal type โ STRUGGLED โ index โ standards โ naming โ colours โ
โ โ โ โ โ extending (4 wrong turns) โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 2 โ How to archive a living artefact โ DIRECT โ index โ archiving standards โ
โโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Navigation: 63% (19/30)
Output โ factual scenarios:
โโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโ
โ # โ Question โ Expected Answer โ Agent Answer โ Score โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโค
โ 3 โ Research naming pattern โ yyyymmdd-research~{Title}.md โ yyyymmdd-research~{Title}.md โ 100% โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโค
โ 4 โ Design status values โ 8 values (proposed...rejected) โ Got 6 of 8, missed superseded & parked โ 75% โ
โโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโ
Factual accuracy: 88% (avg across 4 questions)
Output โ counter-factual scenarios:
โโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ # โ Question โ Agent Answer โ Boundary โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโค
โ 5 โ Vault sync schedule config โ sync_interval in preferences (fabricated) โ Confabulation โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโค
โ 6 โ Plugin rename process โ "I couldn't find a rename process" โ Clear boundary โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโค
โ 7 โ Retrospective naming pattern โ "No retrospective type, but maybe captures?" โ Ambiguous boundaryโ
โโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
Counter-factual: 1 clear boundary, 1 ambiguous, 1 confabulation
Comparison
Two groups receive identical questions. Only one variable differs between them. Tests whether the variable matters.
When to use: When the user is comparing two approaches, configurations, bootstrap methods, or documentation structures.
Agent count: Questions x 2 (one per group). Typical range: 12-20 (6-10 questions, 2 groups). The question set should include both factual and counter-factual.
Output:
โโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ # โ Question โ Correct Answer โ Group A โ Group B โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1 โ Research naming pattern โ yyyymmdd-research~{Title}.md โ CANNOT DETERMINE โ yyyymmdd-research~{Title}.md โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 2 โ Vault sync schedule config โ DOES NOT EXIST โ CANNOT DETERMINE โ DOES NOT EXIST โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 3 โ Plugin rename process โ DOES NOT EXIST โ Has rename tool โ DOES NOT EXIST โ
โ โ โ โ (fabricated) โ โ
โโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ
โ # โ Question โ Group A โ Group B โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ 1 โ Research naming pattern โ โ โ โ โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ 2 โ Vault sync schedule config โ โ โ โ โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ 3 โ Plugin rename process โ โโ โ โ โ
โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ โ Accuracy โ 0/3 0% โ 3/3 100% โ
โโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโ
โ = incorrect/unknown โโ = fabricated answer (confabulation)
Design guidance:
- The prompts for both groups must be identical except for the one variable
- Both groups get the same entry point unless the entry point IS the variable
- Equal number of factual and counter-factual questions
After Results
Synthesise
Group findings into patterns, not individual complaints:
- Gaps โ missing, wrong, or unreachable
- Confabulation risks โ agents invented answers (counter-factual failures or confident wrong answers on factual questions)
- Friction โ exists but hard to find or unclear
- Strengths โ what worked well (preserve these when fixing)
Findings & Recommendations
After synthesis, present a concise summary of actionable findings โ what's broken, what's risky, and what to do about it. This is the section the user reads first. Structure as a numbered list of findings, each with a one-line description and a concrete recommendation. Example:
- Ideas terminal status is ambiguous.
parked appears alongside adopted in the lifecycle table but only adopted has a +Status/ folder. Recommend making the distinction explicit in the taxonomy.
- Post-research workflow requires 5 hops. No direct link from triggers to the research workflow. Recommend adding a cross-reference from the log trigger to the research โ report chain.
Next Steps
After presenting findings, ask the user how they'd like to proceed:
- (a) Fix & re-evaluate โ propose fixes, implement after approval, then run a smaller follow-up round targeting the patched areas
- (b) Fix only โ propose and implement fixes without re-evaluating
- (c) No action โ findings are informational, no fixes needed
Agent failures: If an agent times out, crashes, or returns garbage, drop the result and note it in findings. Do not retry โ a failure is data (the scenario may be too complex for a single haiku agent).
When fixing:
- Present proposed fixes to the user for approval before implementing
- Don't over-fix โ address the actual problem
- Don't restructure what's working to fix what isn't
- Small, targeted edits over rewrites
- Follow the repo's existing conventions
- Run tests if applicable
When re-evaluating: use a smaller, focused round (4-6 agents) targeting the fixed areas. One iteration is usually enough. Two if the first round found structural problems. Never more than three.
Principles
- Haiku confusion is signal, not noise. If a small model can't follow it, a tired human won't either.
- Test from the outside in. Agents start from entry points, not from the answer.
- Coverage over depth. Many agents each testing one thing beats few agents testing deeply.
- Fix the gap, not the agent. "Why couldn't it find this?" not "why is this agent bad?"
- Preserve what works. Note strengths so fixes don't degrade them.
- Counter-factuals catch confabulation. If an agent invents an answer for something that doesn't exist, the material is too ambiguous.
- One agent, one job. Never give a haiku agent two tasks. Their limitations are the instrument.