agentleFS
pesappesap/skills/tdd-pesap/SKILL.md

tdd-pesap

Skill1 starsChanged 3 months agoMITView on GitHub

Use tests to discover and protect observable behavior, not to freeze internal implementation. Work in small vertical slices and keep the feedback loop tight. - Test behavior through the narrowest useful public interface. - Name tests after capabilities or outcomes, not helpers or implementation details. - Derive expected values independently from the implementation: literals, worked examples, specifications, or trusted fixtures. - Prefer real domain components. Mock only boundaries such as network services, processes, clocks, randomness, or other expensive/unsafe external effects.…

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    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:

    Use tests to discover and protect observable behavior, not to freeze internal implementation.

    line 15
  2. Distinctive:

    Test behavior through the narrowest useful public interface.

    line 20
  3. Distinctive:

    Prefer real domain components.

    line 25
  4. Distinctive:

    Prefer deep modules: keep the public surface small and put complexity behind it.

    line 28
  5. Distinctive:

    Add regression tests for bugs before fixing them.

    line 30
  6. Distinctive:

    Do not write the entire test suite before implementation, anticipate behavior that has not been requested, or refactor while the test is …

    line 41
  7. Distinctive:

    When a test is hard to write, first question the interface and seam rather than adding more mocking or test-only hooks.

    line 54
  8. Distinctive:

    Before the first test, identify the smallest public behavior and the relevant project vocabulary.

    line 59
  9. Distinctive:

    After each cycle, run the narrowest relevant validation.

    line 63
  10. Distinctive:

    Read the matching reference before applying tool- or language-specific rules:

    line 69

≈ “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

TDD pesap

Use tests to discover and protect observable behavior, not to freeze internal implementation. Work in small vertical slices and keep the feedback loop tight.

Core doctrine

  • Test behavior through the narrowest useful public interface.
  • Name tests after capabilities or outcomes, not helpers or implementation details.
  • Derive expected values independently from the implementation: literals, worked examples, specifications, or trusted fixtures.
  • Prefer real domain components. Mock only boundaries such as network services, processes, clocks, randomness, or other expensive/unsafe external effects.
  • Design small, explicit interfaces that make the behavior easy to exercise.
  • Prefer deep modules: keep the public surface small and put complexity behind it.
  • Add regression tests for bugs before fixing them.

The vertical-slice loop

For each behavior, complete one cycle before starting the next:

  1. RED — write one test for one observable behavior and confirm it fails for the intended reason.
  2. GREEN — implement only enough production code to pass that test.
  3. REFACTOR — improve the design while all relevant tests remain green.

Do not write the entire test suite before implementation, anticipate behavior that has not been requested, or refactor while the test is red.

Test quality bar

Reject tests that:

  • assert private methods, internal call order, or implementation-shaped data;
  • mock collaborators owned by the system under test without a boundary reason;
  • compute the expected result using the same algorithm as production;
  • pass without proving a meaningful behavior;
  • break when internals are renamed or reorganized without a behavior change.

When a test is hard to write, first question the interface and seam rather than adding more mocking or test-only hooks.

Planning and completion

Before the first test, identify the smallest public behavior and the relevant project vocabulary. Ask at most one blocking clarification when the next test would encode a risky assumption.

After each cycle, run the narrowest relevant validation. Before reporting done, run the broader checks required by the project and report commands, results, and remaining gaps.

Language guidance

Read the matching reference before applying tool- or language-specific rules:

  • Python
  • TypeScript
  • Rust
  • C

For another language, preserve this core doctrine and follow the repository's native test runner, type checker, formatter, and lint rules.

Output

  • Behavior covered in each cycle.
  • Tests and production files changed.
  • Validation commands and results.
  • Remaining gaps, assumptions, and the next behavior if work continues.

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.