Test case tournament for a module that must not break
For: Quality lead or engineer owning a payment, pricing or permissions module with thin tests
The pain today
The module that must not break has happy-path tests only. Writing edge cases by hand is slow, and a generated pile of tests is mostly duplicates and cases that assert nothing.
The ask
“I attached the specification and the source for our pricing module and connected our build pipeline. Generate lots of edge-case tests, throw away duplicates and tests that prove nothing, and give me the short list that finds real gaps, with the specification sentence each one protects.”
Plain words, as you would say it to a colleague. Edit it to fit your case before you send it.
What you attach or connect
- Specification or requirements for the module
- Module source and existing tests
- Build pipeline connection to run candidate tests
- Past bug reports for the module
The unit of work
One worker task per one candidate test case.
Why a swarm fits
Candidates are cheap and independent: each worker takes one rule or boundary and proposes cases. Judgement is spent on narrowing, and a judge needs only the case and the specification sentence.
Not for
A bug in one function you already understand: write the test yourself; a tournament adds cost, not insight.
The decision tree
6 typed decisions, each with an action for every answer
At fixed moments in a run, the engine puts one narrow question to a decision model. The decision model never writes text: it answers yes or no with a probability, picks from listed options, or gives a score, about a small slice of the material. The engine then does exactly what this tree says, which is what makes the run auditable. The thresholds are the template's design values, not measured results.
Planner, while planning
Scope checkYes or no, with a probability
Before work starts on a unit
Does this candidate test exercise a rule or boundary that the specification sentence it cites actually states?
Sees only: One candidate test and the specification sentence it cites
Why: Removes tests of invented requirements before any judge or pipeline time is spent.
- Yes: 0.60 or higherthenAccept
- Unsure: 0.30 up to 0.60thenAccept
- No: below 0.30thenSkip this unit
Reconciler, while merging
Conflict checkYes or no, with a probability
While reconciling
Do these two candidate tests check the same rule with the same boundary values, differing only in naming or setup?
Sees only: Two candidate tests side by side
Why: Generated piles are mostly repeats; collapsing them early keeps later rounds cheap.
- Yes: 0.80 or higherthenSkip this unit
- Unsure: 0.40 up to 0.80thenContinue
- No: below 0.40thenContinue
After workers, the judge checks
Evidence checkA choice among options
After a worker answers
According to the pipeline output, how does this candidate behave on the current code and on the deliberately broken variant?
Sees only: The pipeline output for one candidate on current code and on the broken variant
Why: A test that cannot fail protects nothing, and a test failing today may be a real defect.
- Passes now and fails on the broken variantthenAccept
- Fails on current codethenAsk a person
- Passes on both, so it cannot failthenSkip this unit
- Run errored or timed outthenReject and retry
Evidence checkA score
After a worker answers
How strongly does the cited specification sentence require the exact behaviour this test asserts?
Sees only: The test's assertion and the cited specification sentence
Why: Keeps tests that encode a judge's guess about the rules out of a suite people will trust.
- High: 0.85 or higherthenAccept
- Middle: 0.50 up to 0.85thenEscalate to a strong model
- Low: below 0.50thenSkip this unit
Run control, between rounds
Another round?Yes or no, with a probability
Between rounds
Did the last round add a surviving case for any rule or boundary that had none before?
Sees only: The table of rules against surviving cases, before and after the round
Why: Ends the tournament when more candidates only repeat what is already covered.
- Yes: 0.60 or higherthenContinue
- Unsure: 0.30 up to 0.60thenStop
- No: below 0.30thenStop
Accountable person, before anything is settled
Person decidesYes or no, with a probability
Before anything is reported as settled
Does this surviving case fail on the current code, or assert behaviour that the specification sentence leaves open to two readings?
Sees only: One surviving case, its run result and the specification sentence
Why: Only the module owner can say whether that is a defect or a wrong reading of the rules.
Accountable: The module owner decides which cases enter the suite and whether a failing case is a defect or a wrong reading of the specification.
- Yes: 0.40 or higherthenAsk a person
- Unsure: 0.15 up to 0.40thenAsk a person
- No: below 0.15thenAccept
The fleet: who does what
Model tiers by role, not brands: you choose the models. Strong reasoning models plan and reconcile, small fast models do the wide work, and the judge is a decision model from a different family, so it does not share the workers' blind spots.
Planner
A strong reasoning model splits the specification into rules, boundaries and past failure modes to target.
Decisions here:1. Scope check
Workers
Small fast workers from mixed open-weight families each write candidate cases for one rule or boundary.
Designed for 20 to 300 agents, one worker task per one candidate test case. Each worker receives only its own unit.
Judge, from a different model family
Judges from a different family than the authors score each case for specification support, novelty and a real assertion.
Decisions here:3. Evidence check4. Evidence check
Reconciler
A strong reasoning model removes near-duplicates across rounds and orders survivors by the risk they cover.
Decisions here:2. Conflict check5. Another round?
Accountable person
The module owner decides which cases enter the suite and whether a failing case is a defect or a wrong reading of the specification.
Decisions here:6. Person decides
Checked before anything is accepted
- Every surviving case cites the specification sentence it protects
- Cases are run in the pipeline; cases that cannot fail are dropped
- Cases failing on current code are flagged as possible defects, not accepted automatically
- Judges never score candidates from their own model family
What comes back
- Ranked short list of test cases with specification citations
- Suspected defects, each with its failing case
- Specification rules with no surviving test
- Rejected candidates with the reason
What to measure
- Defects found by surviving cases
- Share of candidates surviving all rounds
- Specification rules left without a test
- Cost per accepted case
Names of measures only. No result is claimed for this template.
Templates open in the workspace chat with the ask filled in. Nothing runs until you send it.
Get early accessSign in to useMore in Software engineering
Dependency and licence audit across a monorepo
For: Engineering lead or open-source compliance owner preparing a release, a sale or a customer audit
A monorepo pulls in a very long list of direct and transitive packages, each with its own licence text.
Migration impact map across services
For: Staff engineer or platform lead planning a framework, database or shared-library migration
A breaking upgrade touches modules owned by many teams.
Design review panel for an architecture proposal
For: Engineering manager or architect taking a design document to review before build starts
Design reviews depend on who shows up.