agentleFS
lgzarturolgzarturo/codeconductor/.agents/skills/testing-tdd/SKILL.md

testing-tdd

Skill0 starsChanged 2 months agoMITView on GitHub

Red (failing test) → Green (minimal code) → Refactor. Evidence comes from captureTddSuiteEvidence, not handmade JSON. NOT for docs-only changes or when the Task Card forbids tests. 1. Write the failing test that encodes one acceptance criterion. Run the suite. It MUST fail (suiteFails === true). 2. Implement the minimum that turns it green. Do not expand scope. 3. Refactor only with a green suite. 4. Capture evidence via the verification runner (openspec done on test/implement when TDD is required).…

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

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    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. Very specific:

    Write the failing test that encodes one acceptance criterion.

    line 24

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

Overview

Red (failing test) → Green (minimal code) → Refactor. Evidence comes from captureTddSuiteEvidence, not handmade JSON.

When to Use

  • /cc-tdd-cycle, new behavior, bug fixes, TDD-required OpenSpec items

NOT for docs-only changes or when the Task Card forbids tests.

Process

  1. Write the failing test that encodes one acceptance criterion. Run the suite. It MUST fail (suiteFails === true).
  2. Implement the minimum that turns it green. Do not expand scope.
  3. Refactor only with a green suite.
  4. Capture evidence via the verification runner (openspec done on test/implement when TDD is required).
  5. Cover happy path, edge, and error for each behavior.

Local: bun run dev. Pyramid default: many unit, fewer integration, rare E2E.

Common Rationalizations

RationalizationReality
I'll add tests laterLater means never. Red first.
This is too small to testIf it can break, it needs a failing test first.
I'll write the evidence JSONHandmade TDD JSON is rejected.

Red Flags

  • Tests that assert implementation details instead of behavior
  • Green without a recorded red
  • Skipping error cases

Verification

  • Suite failed before implement
  • Suite passed after implement
  • Runner evidence exists (not handmade)
  • Optional: bun run dev scorecard suite-run --suite workflow-gates

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.