Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when deciding what to cover with a unit test vs a golden test, when writing a NEW golden test or fixture, or after a bug escaped to production/a real repo and you are asking why the tests missed it. Fires on: "write a golden test", "нужен golden на это", "add a fixture", "what should this test assert", "почему тесты это не поймали", "unit or golden?". Produces the split, a fixture that can actually fail, and structure-not-text assertions. To *run* existing goldens, use `run-goldens` instead.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -13% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-21 | ✗→✓ | ▲ Improved | 10% | 0% |
Two different tools, constantly confused:
every PR, asserts exact behaviour.
enrichment pass) against a real model. Opt-in, excluded from CI, slow, asserts structure, not text.
Put in a unit test everything that does not need a model: parsing, tree building, prompt construction (not its answer), digests and cache keys, triviality gates, ordering, rendering, pruning. Most of a pipeline is this, and it should be — pure functions are where cheap certainty lives.
Put in a golden test only what a model's behaviour decides: does retrieval rank the right thing, does the pass produce a well-formed artifact, does the router pick the right agent, does the JSON parse.
If you find yourself wanting a golden to check something deterministic, extract the deterministic part into a pure function and unit-test that. A golden is the most expensive test you own — spend it only where a real model is the thing under test.
A fixture that only contains shapes the code already handles proves nothing. This is the single most common way a suite passes while the code is broken: the sample repo/document/payload is small, flat and friendly, and every hard case lives only in production data.
Real example: a documentation pipeline had a small flat fixture repo. Three defects shipped anyway and only surfaced on a 148-class codebase — an aggregate step ran on the wrong size budget (the fixture's inputs were never big enough to overflow), a model swap silently skipped regeneration (the fixture was never re-run under a second model), and a deep nesting chain cost N redundant calls (the fixture was two levels deep).
So when you build one, deliberately include:
container, a leaf at the top level, a cycle if the domain allows one.
size must be reachable, or the budget is untested by construction.
to prove incremental keys invalidate instead of silently skipping.
Ask out loud: "which shape, if it appeared in real data, would break this code?" Then put that shape in the fixture.
A model's wording changes between runs and versions; asserting it makes the test flaky and worthless. Assert instead:
bounds;
Never assert a full generated sentence. If you need semantic quality, assert a required token the answer cannot be right without (a domain identifier), and accept anything around it.
golden. Split the thing in two if it is both.
the new shape would distort the old assertions — then add a second, named for the shape it carries (…-deep-chain, …-oversized).
you cannot name one, you are writing a test that can only pass.
of CI and does not need a model on a laptop.
have not seen pass — an unverified golden is worse than none, because it looks like coverage. If no engine is available right now, say so explicitly and record it as pending rather than merging it green-by-assumption.
so the next person knows what they are opting into.
Should fire: "нужен golden на новый пайплайн" · "unit or golden for this?" · "почему фикстура это не поймала". Should NOT fire: "прогони голдены" (that is run-goldens) · "this golden is flaky, rerun it" (running/diagnosing, not authoring).
Other measured skills in the registry, with their headline benchmark lift.