agentleFS
MSiccDevMSiccDev/ai-context-kit/skills/ack-tdd/SKILL.md

ack-tdd

Skill13 starsChanged 5 months agoMITView on GitHub

Test-driven implementation: agree the test seams with the user before any test, then work one vertical slice per cycle, failing test first, then the minimal code to pass, then refactor. Use when implementing a task that adds or changes behavior, such as a task group in ack-loop-02-implement.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use when implementing a task that adds or changes behavior, for example inside ack-loop-02-implement.

    line 18
  2. Very specific:

    Do not use for changes with no behavior impact (documentation, formatting, a skip_specs: true change).

    line 19
  3. Distinctive:

    Red: write one test for that slice at the agreed seam.

    line 29
  4. Distinctive:

    Green: write the minimal code that makes it pass.

    line 30
  5. Distinctive:

    No test before the seams are agreed.

    line 43
  6. Distinctive:

    Do not add test dependencies without an explicit decision.

    line 45
  7. Very specific:

    Do not commit; committing belongs to ack-loop-05-commit.

    line 46

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

Purpose

Make every behavior change arrive with a test that failed before the change and passes after it, written at a seam the user agreed to. This skill adapts Matt Pocock's tdd skill.

When To Use

  • Use when implementing a task that adds or changes behavior, for example inside ack-loop-02-implement.
  • Do not use for changes with no behavior impact (documentation, formatting, a skip_specs: true change).

Required Inputs

  • The task and the behavior it must produce (from the OpenSpec change's tasks and spec deltas, when there is one).
  • The test seams named in the change's design.md, if any.
  • A way to run the project's tests.

Workflow

  1. Agree the seams first. Take the seams from design.md. If none are named, propose them with a recommended answer and get the user's agreement before writing any test.
  2. Pick one slice: the smallest piece of behavior that is visible at a seam, cutting through every layer it needs (a vertical slice).
  3. Red: write one test for that slice at the agreed seam. Run it and show that it fails, for the expected reason.
  4. Green: write the minimal code that makes it pass. Run the tests and show they pass.
  5. Refactor: clean up with all tests still passing.
  6. Repeat from step 2 until the task's behavior is covered. Then report the slices, tests and runs.

Output Expectations

  • For each slice: the test, the failing run, the passing run.
  • Tests only at agreed seams, each able to fail without the change.
  • A short report listing slices, tests and seams, ready for the implementation report.

Resources

  • Cycle rules and anti-patterns: references/cycle.md

Constraints And Safety

  • No test before the seams are agreed; no code before a failing test.
  • One slice per cycle; do not write a batch of tests first.
  • Do not add test dependencies without an explicit decision.
  • Do not commit; committing belongs to ack-loop-05-commit.

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.