farley-tdd
Skill3 starsChanged 3 months agoMITView on GitHub
Audit and score an existing test suite against Dave Farley's Properties of Good Tests using the Farley Index. Use when tests already exist and the question is whether they can be trusted — flaky runs, slow CI, brittle tests, or validating that TDD was actually practised. For writing new code test-first use `test-driven-development`; for reviewing specific tests or a diff use `test-design-review`. Triggers on: 'farley', 'farley index', 'test quality', 'test suite audit', 'flaky tests', 'am I really doing TDD'.
In this repository86 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adrSkill
- adzic-bddSkill
- agent-md-refactorSkill
- agent-muxSkill
- agent-role-impersonatorSkill
- agilquest-reservationsSkill
- ai-text-humanizerSkill
- architecture-decision-recordsSkill
- ast-grepSkill
- atacSkill
- aws-cliSkill
- bart-adversarial-reviewerSkill
- bddSkill
- branch-doctorSkill
- c4-architectureSkill
- c4Skill
- claude-sub-agentSkill
- codemap-config-setupSkill
- codemap-exploreSkill
- codemap-handoffSkill
- codemap-hub-safetySkill
- codemapSkill
- commitSkill
- copilot-sub-agentSkill
- daily-standupSkill
- daily-statusSkill
- debugSkill
- design-thinkingSkill
- doctorSkill
- docx-word-processorSkill
- forensicsSkill
- gemini-sub-agentSkill
- git-commit-formatterSkill
- git-forensicsSkill
- github-actions-permissionsSkill
- github-cliSkill
- git-repo-discoverySkill
- git-safety-guardrailsSkill
- harness-idpSkill
- humanizeSkill
- iteration-plannerSkill
- jira-issue-managerSkill
- justfile-assistantSkill
- kiro-sub-agentSkill
- lessons-learnedSkill
- lessonsSkill
- lisa-planning-agentSkill
- lovejoy-release-agentSkill
- lsp-code-analysisSkill
- macro-to-microSkill
- marge-product-agentSkill
- meeting-notesSkill
- mermaid-diagram-generatorSkill
- modern-cli-overridesSkill
- native-web-searchSkill
- obsidian-notetakerSkill
- outlook-headlessSkill
- pdf-document-processorSkill
- pi-sub-agentSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Red: Write a failing test that defines the required behavior.
- Distinctive: line 27
Green: Write the minimal production code necessary to pass the test.
- Distinctive: line 36
Speculative Tests: Do not write all tests upfront.
- Distinctive: line 40
All tests written must embody Farley's properties: Fast, Maintainable, Repeatable, Atomic, Necessary, Understandable.
- Very specific: line 61
Read the full reference spec at docs/reference/farley-index.md.
≈ “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.
Files
Farley Test-Driven Development (TDD)
This skill provides comprehensive guidance on practicing Test-Driven Development (TDD) and evaluating test quality using Dave Farley's Properties of Good Tests.
What Good TDD Looks Like
Reference criteria for judging whether TDD was actually practised. To do TDD
on new code, use test-driven-development — this section is the yardstick, not
the workflow.
The Red-Green-Refactor cycle:
- Red: Write a failing test that defines the required behavior.
- Green: Write the minimal production code necessary to pass the test.
- Refactor: Improve the code structure without altering behavior.
A suite where Refactor was routinely skipped shows up as duplication across test setup and production code that no test ever forced out. Score it under Maintainable and Understandable.
Canon TDD Pitfalls (via Kent Beck) — evidence of these in the history or the suite means the cycle was not followed:
- Speculative Tests: Do not write all tests upfront. Convert exactly one item from your test list into a concrete test, make it pass, then move to the next.
- Mixing Interface & Implementation: The "Red" phase is for designing the interface. The "Refactor" phase is for designing the implementation. Do not mix them.
- Abstracting Too Soon: In the "Refactor" phase, remember that duplication is a hint, not a command. Don't over-abstract prematurely.
All tests written must embody Farley's properties: Fast, Maintainable, Repeatable, Atomic, Necessary, Understandable.
Note: For tactical guidance on writing good assertions and avoiding brittle setup patterns, use the
test-design-reviewskill.
The Farley Index Evaluator
A quantitative diagnostic tool that scores an automated test suite against these six Properties of Good Tests. It shifts the question from "Do we have tests?" to "Can we trust our tests?"
When to Use This Skill
| Trigger Scenario | Primary Property to Evaluate | Reason |
| Onboarding a new developer | Understandable | Tests should be clear, living specifications. |
| Planning a refactor | Maintainable | Tests must survive internal changes without breaking. |
| CI/CD pipeline is too slow | Fast | Identify tests that hit real I/O and slow the pipeline. |
| Debugging flaky test runs | Atomic / Repeatable | Expose shared state and non-deterministic dependencies. |
| Pre-release quality audit | Repeatable / Atomic | Confirm tests are trustworthy under parallel execution. |
| Validating TDD practices | Necessary | Every line of production code must be demanded by a test. |
Instructions
- Read the full reference spec at
docs/reference/farley-index.md. - Collect inputs from the user (source path, test path; optionally logs and VCS flag).
- Execute the evaluation protocol defined in the reference spec.
- Output the
farley_index_score, per-dimensionmetrics,red_flags, andrecommendations. - Tailor the depth of analysis to the requesting agent's role:
- Bart → focus on red flags and blockers (Refactor Judge mode).
- Ralph → focus on Necessary + Fast to validate TDD hygiene.
- Lisa → focus on Maintainable + Atomic to inform architecture decisions.
- Lovejoy → focus on Repeatable as a release-gate signal.
- Marge → translate score into plain-language user-impact summary.
Triggers
- "farley"
- "farley index"
- "farley-index"
- "test quality"
- "test health"
- "brittle tests"
- "mock tautology"
- "test theatre"
- "flaky tests"
- "test suite audit"
- "TDD validation"
- "test coupling"
- "am I really doing TDD"
Not this skill
| If the user wants to… | Use |
| Write new code test-first | test-driven-development |
| Review specific tests or a diff | test-design-review |
| Burn down a TODO.md backlog | ralph-build-agent |
| Evaluate Gherkin/BDD specs | adzic-bdd |
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
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.

