agentleFS
90184479018447/julia-pro-p/skills/playbook-test-spec/SKILL.md

playbook-test-spec

Skill0 starsChanged 4 days agoMITView on GitHub

Design or repair a Julia test suite. Use for Julia test layout, unit and integration coverage, Aqua and JET gates, regression cases, and assertion-review discipline.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Done when: every level has at least one case, or its absence is written down with a reason.

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Test suite design

Tests exist to make a change safe, so the suite is judged by what it catches, not by its line count.

1. Layout

test/runtests.jl includes one file per concern; each file holds @testset blocks named after the behaviour, not the function. test/Project.toml carries the test-only dependencies, so Test, Aqua, JET, BenchmarkTools stay out of [deps] (principle-runtime-surface).

Done when: julia --project -e 'using Pkg; Pkg.test()' runs the whole suite from a clean depot.

2. The four levels, and what each one catches

LevelCatchesShape
unita formula, a boundary, a unit conversion@test f(x) ≈ expected rtol=1e-12
propertyan invariant over generated inputs@test entropy(u) >= 0 across random states
integrationa pipeline whose parts disagreeone short end-to-end run against a stored reference
regressionthe specific bug that already happenedthe minimal reproduction from playbook-debug

@test_broken marks a known bug and keeps the suite green; it is a promise, tracked in the issue it names. @test_skip marks a platform or dependency gap. Neither one counts as a fix.

Done when: every level has at least one case, or its absence is written down with a reason.

3. Quality gates

  • Aqua.test_all(MyPkg): ambiguities, piracy, stale deps, compat bounds.
  • JET.test_package(MyPkg): type errors on the public surface.
  • doctests, when docstrings carry examples.
  • an allocation or timing assertion on the one hot path that matters.

Done when: each gate runs in CI and fails the build.

4. The suppression rule

An assertion that is rewritten to match current output has removed a test rather than fixed a bug, and the suite now certifies the wrong answer. Mark such edits, report them separately from fixes, and require an explicit request before making one.

Done when: the run report separates fixed failures from assertion rewrites, or states that there were none.

5. Iteration bound

A fix loop runs at most N rounds (10 is generous) and stops on two rounds without progress. Unbounded iteration is an unbounded number of chances to launder a bug into green.

Done when: the run ends in one of: all pass, partial with the remaining failures listed, or plateau with the diagnosis.

Topics this playbook opens

Load one at the step named. The table exists so you do not read all of them up front.

TopicThe step that needs itWhat it settles
numerical-methods-implementation2 The four levelsa manufactured solution, the only convergence test that states its order
differential-equations2 The four levelsa solver test asserting a tolerance rather than a number
fem-fea2 The four levelsa patch test separating a bad element from a bad mesh
julia-ml-and-dl2 The four levelsa leakage test that fails when the split is wrong
package-development-workflow3 Quality gatesAqua, JET, and compat bounds as the gate a suite runs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.