agentleFS
mblaubergmblauberg/provenant/skills/test-design/SKILL.md

test-design

Skill1 starsChanged 4 days agoMITView on GitHub

Use for TDD and choosing, keeping, merging or deleting tests: acceptance, property, contract, golden and end-to-end. Not for behaviour-preserving refactors or root cause; use refactor or diagnose.

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diff-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MidnightDarlingSkill

    diff-review

    使用场景:按 raw.review.md 清单改完稿后,对 raw.md(OCR 原始)和 final.md(定稿)做对比。说"看我改了哪些""对比一下""diff""校对完了让我看看""我到底接受了哪些建议""我漏改了啥""改动统计""核对一下改动""闭环检查"都走这个 skill。生成段落级 HTML diff,关联 raw.review.md 的 A/B/C 标注,一目了然:接受了哪些 agent 建议、拒绝了哪些、清单外修正了哪些、agent 标过但漏改了哪些。主动触发,不必等用户说 "diff-review"。

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 3

    Distinctive

    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:

    Use one contract test per public behaviour, property tests for invariants, golden tests for stable wire formats, and end-to-end tests for a …

    line 13
  2. Distinctive:

    Search existing tests first and extend one when appropriate.

    line 14
  3. Distinctive:

    Run focused tests locally and the project's exact-head CI gates.

    line 20

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “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 design

Choose evidence for observable behaviour and keep the suite economical. For a bug or core logic, write the spec-derived failing test first and witness the reported failure. For substantial work, have an independent author derive acceptance tests from the approved spec. Deleting and trimming tests is normal work. When a test fails on your change, decide whether it caught a defect or only pins the implementation: fix the code in the first case, and rewrite or delete the test in the second. Do not loosen an assertion that encodes a spec clause your change breaks; raise the conflict with the scope owner. Report every removed or weakened test and its reason.

Choose and prune

  1. Make illegal states unrepresentable where possible. Do not test states excluded by types, schemas or lint; identify the enforcing check.
  2. Use one contract test per public behaviour, property tests for invariants, golden tests for stable wire formats, and end-to-end tests for a few real paths. Choose the lowest boundary that proves the behaviour.
  3. Search existing tests first and extend one when appropriate. Budget at most one new test per new behaviour; name the plausible defect only it catches.
  4. On touch, delete duplicates, type-impossible cases and prose assertions; merge overlapping cases and rewrite tests coupled to implementation at the public boundary. A test that fails on a pure refactor needs repair.
  5. Mock only process, network, clock and randomness edges. Use real owned collaborators. See boundaries and judgement contrasts.

Apply the safeguards in judgement whenever you add, keep or prune tests.

Run focused tests locally and the project's exact-head CI gates. For risky logic, run mutation testing on the changed surface and investigate survivors. Report net tests added and removed in the PR, and identify unverified evidence.

How it runs

For substantial work, use provenant run --use review.tests --file review.md --explain with a pinned writer commit. Arrange an independent acceptance-test author separately.

For pruning, use explore over crates, then batch with disjoint writer worktrees and write_scope bindings into one integration branch (orchestrate). Inspect provenant run --use batch --file batch.toml --explain before submission.

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.