agentleFS
EstebanT1112EstebanT1112/codex-engineering-workflow/skills/tdd-workflow/SKILL.md

tdd-workflow

Skill0 starsChanged 2 months agoMITView on GitHub

Use test-driven development for behavior changes, bug fixes, and refactors when an automated test can provide meaningful regression evidence. Do not use for documentation-only work, generated artifacts, or changes where a test would merely mirror implementation.

128 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use brand-discovery, configure-ecc 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.
  • ysyecustSkill

    brand-discovery

    Use when a brand needs to discover or articulate its identity through structured multi-session interviews. Covers purpose, positioning, audience, personality, voice, narrative, and founder-brand tension across 8 modules using laddering, 5 Whys, and projective techniques. Produces a resumable session with disk-persisted state and a master brandbook (90_SYNTHESIS.md).

    Also in 6 projects that use this

  • royaluniondesign-sysSkill

    configure-ecc

    Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.

    Also in 12 projects that use this

  • junimnjwSkill

    ralphinho-rfc-pipeline

    RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.

    Also in 12 projects that use this

  • loulanyueSkill

    nuxt4-patterns

    Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.

    Also in 10 projects that use this

  • royaluniondesign-sysSkill

    content-hash-cache-pattern

    Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.

    Also in 16 projects that use this

  • RojiosSkill

    dart-flutter-patterns

    Production-ready Dart and Flutter patterns covering null safety, immutable state, async composition, widget architecture, popular state management frameworks (BLoC, Riverpod, Provider), GoRouter navigation, Dio networking, Freezed code generation, and clean architecture.

    Also in 7 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 117 edited versions we read keep these.

  • 16

    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:

    Use the repository's existing test stack to protect observable behavior.

    line 11
  2. Distinctive:

    Before editing production code:

    line 15
  3. Distinctive:

    prefer an existing nearby test pattern and runner.

    line 19
  4. Distinctive:

    avoid mocks that make the test pass without exercising the contract.

    line 20
  5. Distinctive:

    Do not add a new test framework unless the task clearly requires it and the dependency is justified.

    line 22
  6. Distinctive:

    Add or adjust one focused test for the intended behavior.

    line 26
  7. Distinctive:

    Run the narrow test.

    line 27
  8. Distinctive:

    If the behavior cannot be reproduced, investigate before changing production code.

    line 29
  9. Distinctive:

    Run the focused test again.

    line 36
  10. Distinctive:

    Do not bundle unrelated cleanup, abstractions, or future cases into the fix.

    line 37
  11. Distinctive:

    Run the relevant surrounding suite and repository-required typecheck, lint, or build.

    line 50
  12. Distinctive:

    Do not create trivial tests solely to demonstrate TDD.

    line 56
  13. Distinctive:

    Do not rewrite good tests to match a faulty implementation.

    line 57
  14. Distinctive:

    Do not declare success from a test run that predates the final code change.

    line 58
  15. Distinctive:

    Do not commit after each phase.

    line 59
  16. Distinctive:

    If a regression test is impractical, record why and use the strongest available deterministic or runtime evidence.

    line 60

“Common” is measured: kept by at least 6 in 10 of the 117 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

Test-Driven Development Workflow

Use the repository's existing test stack to protect observable behavior. Keep the cycle proportional to the change.

Decide the test boundary

Before editing production code:

  1. identify the behavior that should change or remain stable;
  2. choose the lowest-cost test that exercises that behavior through a meaningful boundary;
  3. prefer an existing nearby test pattern and runner;
  4. avoid mocks that make the test pass without exercising the contract.

Do not add a new test framework unless the task clearly requires it and the dependency is justified.

RED

  • Add or adjust one focused test for the intended behavior.
  • Run the narrow test.
  • Confirm it fails for the expected reason, rather than syntax, fixture, environment, or unrelated failures.
  • If the behavior cannot be reproduced, investigate before changing production code.

For a refactor with unchanged behavior, existing passing tests may be the baseline. Add a characterization test only when the important behavior is otherwise unprotected.

GREEN

  • Implement the smallest coherent change that satisfies the behavior.
  • Run the focused test again.
  • Do not bundle unrelated cleanup, abstractions, or future cases into the fix.

REFACTOR

Once the focused test passes:

  • improve clarity only where the current change benefits;
  • preserve the observable contract;
  • rerun the focused test after refactoring;
  • inspect the diff for accidental scope.

Broaden verification

Run the relevant surrounding suite and repository-required typecheck, lint, or build. A focused RED/GREEN cycle does not prove integration or release readiness.

Coverage thresholds come from the repository or task. Do not impose a fixed percentage. Measure coverage only when it answers a real acceptance or risk question.

Boundaries

  • Do not create trivial tests solely to demonstrate TDD.
  • Do not rewrite good tests to match a faulty implementation.
  • Do not declare success from a test run that predates the final code change.
  • Do not commit after each phase; commit remains under the user's control.
  • If a regression test is impractical, record why and use the strongest available deterministic or runtime evidence.

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.