agentleFS
openclosed-orgopenclosed-org/axum-harness/.agents/skills/harness-tdd/SKILL.md

harness-tdd

Skill48 starsChanged 6 months agoApache-2.0View on GitHub

Vertical-slice test-driven workflow for backend harness features and bug fixes. Use when adding or changing service, server, worker, contract, or repo-tool behavior, or when the user asks for TDD, red-green-refactor, or test-first implementation.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 12 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to add or change behavior one vertical slice at a time.

    line 11
  2. Distinctive:

    Prefer tests that survive internal refactors:

    line 19
  3. Distinctive:

    Write one failing test at the correct public seam.

    line 32
  4. Distinctive:

    Run it and confirm RED.

    line 33
  5. Distinctive:

    Write the smallest correct code to pass.

    line 34
  6. Distinctive:

    Run it and confirm GREEN.

    line 35
  7. Distinctive:

    Run relevant path-scoped gates.

    line 37
  8. Distinctive:

    Do not write all tests first and then all implementation.

    line 41
  9. Distinctive:

    Do not test private helpers when a public seam can express the behavior.

    line 42
  10. Distinctive:

    Do not mock internal collaborators you own.

    line 43
  11. Distinctive:

    Do not add speculative behavior for future tests.

    line 44
  12. Distinctive:

    Do not expose internal seams only for test convenience.

    line 45
  13. Very specific:

    After GREEN, look for shallow modules, duplicated rules, primitive obsession, hidden coupling, or oversized traits.

    line 53

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

Harness TDD

Use this skill to add or change behavior one vertical slice at a time.

Workflow skills guide process. Ownership skills still decide writable boundaries.

Philosophy

Tests should verify observable behavior through public seams, not implementation details.

Prefer tests that survive internal refactors:

  1. service public API or application seam
  2. BFF handler or HTTP route behavior
  3. worker replay, checkpoint, or projection seam
  4. contract compatibility or drift seam
  5. repo-tool CLI or validator seam

Loop

For each behavior:

  1. Pick one observable behavior.
  2. Write one failing test at the correct public seam.
  3. Run it and confirm RED.
  4. Write the smallest correct code to pass.
  5. Run it and confirm GREEN.
  6. Refactor only while GREEN.
  7. Run relevant path-scoped gates.

Anti-Patterns

  1. Do not write all tests first and then all implementation.
  2. Do not test private helpers when a public seam can express the behavior.
  3. Do not mock internal collaborators you own.
  4. Do not add speculative behavior for future tests.
  5. Do not expose internal seams only for test convenience.

Mocking Rule

Mock true externals and hard runtime boundaries. Prefer local substitutes or in-memory adapters for owned seams when they provide better behavioral evidence.

Refactor Check

After GREEN, look for shallow modules, duplicated rules, primitive obsession, hidden coupling, or oversized traits. If the fix reveals architecture friction, hand off to harness-architecture-review.

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.