agentleFS
jahongashtamcjahongashtamc/hallwright/.agents/skills/test-driven-development/SKILL.md

test-driven-development

Skill1 starsChanged 13 days agoMITView on GitHub

Strict Test-Driven Development (TDD) cycle: write a failing test first (Red), write minimal implementation to make it pass (Green), then refactor to perfection.

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 179 edited versions we read keep these.

  • 4

    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:

    Write a unit or integration test that precisely tests the intended behavior or edge case.

    line 13
  2. Distinctive:

    Run the test suite and confirm the test fails for the expected reason (not due to syntax or import issues).

    line 14
  3. Distinctive:

    Write the cleanest, most direct code necessary to make the failing test pass.

    line 17
  4. Distinctive:

    Avoid over-engineering during this step.

    line 18

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

🧪 Strict Test-Driven Development (TDD)

In the Hallwright protocol, untested code is incomplete code. We adhere strictly to the Red-Green-Refactor discipline.

TDD Lifecycle:

  1. 🔴 Red Phase (Failing Test First):
    • Write a unit or integration test that precisely tests the intended behavior or edge case.
    • Run the test suite and confirm the test fails for the expected reason (not due to syntax or import issues).
  2. 🟢 Green Phase (Minimal Passing Implementation):
    • Write the cleanest, most direct code necessary to make the failing test pass.
    • Avoid over-engineering during this step. Run the test and confirm it passes.
  3. 🔵 Refactor Phase (Craftsmanship & Polish):
    • Clean up architecture, eliminate duplication, optimize performance, and improve variable naming.
    • Re-run all tests to guarantee zero regressions.

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.