agentleFS
DanMcInerneyDanMcInerney/architect-loop/skills/tdd/SKILL.md

tdd

Skill626 starsChanged 4 months agoMITView on GitHub

Test-driven development for factory builders. Use when a ship job implements at the issue's pre-agreed seams — the red -> green loop, one test then one minimal implementation per cycle, never a refactor while RED.

194 other projects use a version of this, 57 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use capture-learning-tools, design-frontend-dev and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • The-Vibe-CompanySkill

    capture-learning-tools

    Turn technical conversations, bugs, CI failures, review comments,

    Also in 5 projects that use this

  • The-Vibe-CompanySkill

    design-frontend-dev

    Clean Impeccable frontend design skill. Use when the user wants to

    Also in 5 projects that use this

  • tristanphvnSkill

    ketchup-video

    Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.

    Also in 14 projects that use this

  • jaydubya818Skill

    figure-it-out

    Use when novel or multi-phase work needs an auditable workflow and no narrower playbook fits.

    Also in 54 projects that use this

  • jaydubya818Skill

    principle-laziness-protocol

    Apply when a refactor is adding wrappers or abstractions instead of simplifying.

    Also in 45 projects that use this

  • +2 more from The-Vibe-Company
  • +5 more from jaydubya818

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 186 edited versions we read keep these.

  • 2

    Distinctive

    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:

    Red before green: Write the failing test first, then only enough code to pass it.

    line 50
  2. Distinctive:

    Never your own modules.

    line 57

“Common” is measured: kept by at least 6 in 10 of the 186 edited versions of this file we could read. “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
<!-- Adapted from mattpocock/skills (MIT). -->

Test-Driven Development

TDD is the red -> green loop. This skill is the reference that makes that loop produce tests worth keeping. Consult it before and during the loop, not after. Name things with the codebase-design vocabulary (skills/codebase-design/SKILL.md), preloaded beside this skill.

Seams are pre-agreed, not interviewed

A seam is the public boundary you test at — the interface where you observe behavior without reaching inside. In this factory the seams are already agreed before you start: they're named in the issue body and the spec. A builder never interviews a user to find seams; if an issue names none, that's a spec gap to report, not a prompt to go ask someone.

Frozen checks under docs/checks/ are read-only grading — not your tests. They verify the slice from outside, after the fact. Write your own tests at the issue's named seams and run them yourself before you report. A green frozen check with no tests of your own is not done.

What a good test is

Tests verify behavior through the seam, not implementation details. A good test reads like a specification and survives refactors because it doesn't care about internal structure. See tests.md for examples and mocking.md for mocking guidance.

Anti-patterns

  • Implementation-coupled — mocks internal collaborators, tests private methods, or verifies through a side channel. Tell: it breaks on refactor with no behavior change.
  • Tautological — the assertion recomputes the expected value the way the implementation does, so it passes by construction. Expected values come from an independent source: a known-good literal, a worked example, the spec.
  • Horizontal slicing — writing every test first, then all implementation. Work in vertical slices instead: one test -> one minimal implementation -> repeat, each test a tracer bullet answering what the last cycle taught you.

Rules of the loop

  • Red before green. Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.
  • One slice at a time. One seam, one test, one minimal implementation per cycle.
  • Never refactor while RED. Refactoring belongs to review, not the red -> green cycle.
  • Mock at system boundaries only — external systems, time, randomness. Never your own modules.

Report only what you proved

Evidence-ground every claim: report only what a tool result from this session actually shows — the command output and exit code from a test you ran, not a claim of passing without the run behind it.

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.