agentleFS
klntskyklntsky/icare/skills/test-intentionally/SKILL.md

test-intentionally

Skill1 starsChanged 8 days agoUnlicenseView on GitHub

Helps to decide when a test is worth keeping

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    check that something is absent (a file, a css rule, a resource, and endpoint)

    line 25
  2. Distinctive:

    check constants or data layout of values that are essentially fixtures (not produced by non-trivial program behaviors)

    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 intentionally

Categorizing tests by their value

Tests can be categorized into one of three groups by their usefulness:

Valuable tests

  • those that guard invariants
  • those that observe interactions between subsystems
  • those that ensure security properties

Validation tests

  • those that prove that a certain one-off change has been implemented

Garbage tests

  • check that something is absent (a file, a css rule, a resource, and endpoint)
  • trivial tests (tests that simply mirror implementation code, in spirit of "a = 42; assertEqual(a, 42)")
  • check constants or data layout of values that are essentially fixtures (not produced by non-trivial program behaviors)
  • checks that do not involve any moving parts in the logic: any kind of input-conditional branching, looping, concurrency, etc; indirection alone does not count.

Categorization examples

  • "two users can't edit the same document" -> valuable test
  • "the backend does not error with 429 in /session anymore" -> validation test, acceptable after a fix has been made
  • "slice the number of elements in an array and keep first 30" -> asserting that the length of an array is <= 30 would be a garbage test (one off task, trivial logic)

Test preservation policy

  • valuable tests: keep checked in the repo
  • validation tests: needed for the agent to sanity-check a change, but should be removed before human review - they should not be checked into the codebase after the value they have provided has landed on the table.
  • garbage tests - should not be added in the first place, and if they accidentally are, they should be removed mercilessly

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.