agentleFS
Cody-SimsCody-Sims/agent-skills/skills/verification-discipline/SKILL.md

verification-discipline

Skill0 starsChanged 4 months agoMITView on GitHub

Audits and hardens existing tests and validation so green results are meaningful by detecting vacuous assertions, copied production logic, unbounded checks, unenforced invariants, and build impurity. Use when reviewing suspicious green tests, repairing test credibility, or hardening CI gates; do not use for ordinary test-first feature implementation or routine final gate selection.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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:

    Read the repository and path-specific testing instructions before editing tests.

    line 18
  2. Distinctive:

    Run the narrow existing test or command first to understand the baseline.

    line 20
  3. Distinctive:

    Never weaken or mock away an assertion to make the suite green.

    line 32
  4. Distinctive:

    Do not copy the production implementation into the test.

    line 34
  5. Distinctive:

    Put durable invariants in tests that run under a required gate, not in scripts that no gate invokes.

    line 38
  6. Distinctive:

    Treat build dirtiness as a defect or an explicit gate decision: compare the worktree before and after build commands and inspect generated …

    line 42
  7. Distinctive:

    Run the focused proof, then the repository's relevant full gate.

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Verification Discipline

Make validation credible: a green test must be able to catch the bug it claims to cover, and a failing test is a finding rather than a nuisance.

Start

  1. Read the repository and path-specific testing instructions before editing tests.
  2. Identify the behavior, invariant, or build property that must be protected.
  3. Run the narrow existing test or command first to understand the baseline.
  4. Load references/red-green-proof.md when adding or strengthening a test.
  5. Load references/invariant-and-gate-patterns.md when turning scripts into CI-enforced checks, adding timeouts, adopting report-only gates, or checking build purity.

Rules

  • Prove the test can fail: temporarily break the production behavior, confirm the focused test goes red, restore the behavior, and report the proof.
  • Never weaken or mock away an assertion to make the suite green. A failing test is evidence to investigate.
  • Do not copy the production implementation into the test. Assert externally visible behavior, fixed examples, independent fixtures, or invariants.
  • Strengthen weak assertions before trusting them. Checking only that an action returned a name or avoided a throw often misses the actual behavior.
  • Put durable invariants in tests that run under a required gate, not in scripts that no gate invokes.
  • Give CPU-bound tests explicit timeouts so parallel load does not create spurious failures.
  • Treat build dirtiness as a defect or an explicit gate decision: compare the worktree before and after build commands and inspect generated tracked output.

Finish

Run the focused proof, then the repository's relevant full gate. Report the red-green proof, any assertion that exposed a production bug, any timeout or report-only gate added, and whether the build left the worktree clean.

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.