agentleFS
voyager67voyager67/AgentFieldkit/skills/test-driven-change/SKILL.md

test-driven-change

Skill0 starsChanged 13 days agoMITView on GitHub

Implement a behavior change with tests that demonstrate the requirement and protect regressions. Use for bug fixes, new features, and changes with observable inputs and outputs.

1 other project uses 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:

    Write or adapt the smallest test that captures the desired behavior.

    line 14
  2. Distinctive:

    Run the targeted test and record the initial result.

    line 15
  3. Distinctive:

    Add edge cases around boundaries, invalid input, empty states, errors, and backwards compatibility where relevant.

    line 17
  4. Distinctive:

    Run targeted tests, then the appropriate broader suite, formatter, linter, and type checker when available.

    line 18
  5. Distinctive:

    Do not weaken assertions, skip failing tests, or mock away the behavior under test just to obtain a green result.

    line 25
  6. Distinctive:

    Do not claim a test passed if it was not executed.

    line 26
  7. Distinctive:

    If the repository has no test infrastructure, propose the smallest useful check and disclose the limitation.

    line 27

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

Operating rule

A test is evidence only if it can fail for the defect or missing behavior being addressed. Do not add tests that merely repeat the implementation.

Procedure

  1. Find the project's existing test framework and nearest representative tests. Preserve local conventions.
  2. Write or adapt the smallest test that captures the desired behavior. For a reported bug, make sure it fails before the fix when practical.
  3. Run the targeted test and record the initial result. If it does not fail, explain why and improve the test.
  4. Implement the smallest production change that makes the test pass. Avoid unrelated refactors in the same diff.
  5. Add edge cases around boundaries, invalid input, empty states, errors, and backwards compatibility where relevant.
  6. Run targeted tests, then the appropriate broader suite, formatter, linter, and type checker when available.
  7. Inspect the final diff for changed behavior not covered by tests.

Evidence to report

State which tests were run, their actual results, and any checks not run. Include commands when useful.

Boundaries

  • Do not weaken assertions, skip failing tests, or mock away the behavior under test just to obtain a green result.
  • Do not claim a test passed if it was not executed.
  • If the repository has no test infrastructure, propose the smallest useful check and disclose the limitation.

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.

Reviews can't be read right now.

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.