agentleFS
jscott3201jscott3201/yet-more-skills/skills/behavior-first-implementation/SKILL.md

behavior-first-implementation

Skill4 starsChanged 2 months agoApache-2.0View on GitHub

Implement an authorized change with test-first vertical red-green-refactor cycles when TDD is requested or required. Use observable behavior; not diagnosis-only work or a mandate to replace existing tests.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use TDD inside the requested change.

    line 12
  2. Distinctive:

    Test relevant failure and lifecycle cases as well as the happy path.

    line 26
  3. Distinctive:

    Run focused acceptance checks and the appropriate repository-required broader validation.

    line 30
  4. Distinctive:

    Ask only when a consequential public contract or owner decision remains unresolved.

    line 32

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

Behavior-First Implementation

Use TDD inside the requested change. An explicit request to fix or implement supplies the task scope; a separate planning packet or orchestrator is not required. Follow repository test conventions and preserve unrelated work.

Choose the observable behavior

Find a stable seam where a caller can observe the requested result, error, or state transition. Read the implementation and consumers before inventing an interface. Prefer meaningful existing unit, integration, or contract seams over forcing every check into the highest possible layer.

Derive expected results from a specification, independently worked example, trustworthy fixture, or independent implementation. A round-trip or duplicated algorithm can agree with the same bug. Use test doubles at true external boundaries or to control nondeterminism, not to lock tests to private call order.

Work vertically

For one behavior, write the smallest useful failing test and run it. Confirm it fails for the intended missing behavior, not a broken fixture, import error, or unrelated environment problem. Make the smallest correct production change, rerun the focused test, and refactor within scope while it remains green.

Then add the next behavior the implementation has made clear. Avoid a large speculative batch of tests for interfaces that are still being designed. For legacy behavior, a characterization test may begin green; label it honestly rather than claiming a red-green cycle occurred.

Test relevant failure and lifecycle cases as well as the happy path. Reuse deterministic fixtures and the repository's runner. For Rust, preserve nextest selection semantics and separate required doctests. For bindings, include Python-visible evidence rather than only native tests.

Finish with evidence

Run focused acceptance checks and the appropriate repository-required broader validation. Report what actually ran and what remains unrun. Do not disable flaky checks or overwrite expected results merely to obtain green output.

Ask only when a consequential public contract or owner decision remains unresolved. Routine implementation discoveries do not require a new approval loop. Commit, publish, or merge only when separately covered by the request and policy.

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.