agentleFS
Zaheer-verseZaheer-verse/deliberate-dev-claude/skills/test-first/SKILL.md

test-first

Skill0 starsChanged 2 months agoMITView on GitHub

Implement a planned software task using failing behavioral tests before implementation, then passing tests and regression checks. Use inside an assigned task worktree for Deliberate Dev coding or bug fixes.

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-sweep, refactor and 3 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.
  • n24q02mSkill

    security-sweep

    Graph-driven security sweep -- scan for dangerous sinks, then rank each finding by whether an entry point can actually reach it, and triage the rest into suppressions.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 4 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 4 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 3 projects that use this

The file

Files
SKILL.md

Test before implementation

Start in the task's assigned isolated worktree, with clarified acceptance criteria and the reviewed dependency baseline. Set that absolute path as the working directory of every command. Inspect the existing test conventions and run the relevant baseline before edits. If it already fails, distinguish the existing failure from the new task; repair or report the prerequisite instead of using it as the task's red result.

  1. Red: write a test of the required externally observable behavior before writing its implementation. For a bug, reproduce the failure. Include meaningful negative cases. Run it and inspect the output. It must fail because the requested behavior is absent or wrong. A missing test runner, syntax error, network outage or unrelated failure does not satisfy this step. If a test passes immediately, it does not demonstrate missing behavior; refine the case or conclude the behavior already exists.
  2. Preserve the test-only state as a local commit when authorized by the development task. Stage only task-owned test files; never sweep up unrelated changes. Record task ID, working directory, exact command, exit code, timestamp with timezone, test identity, relevant output, the test-only revision, and why this is the expected failure. Redact secrets in logs.
  3. Green: implement the smallest correct change in owned paths to satisfy the test. Run the same test, then relevant regressions. Do not delete assertions, skip the test or weaken its expectation to obtain a pass. If the requirement changes, update the brief and tests explicitly.
  4. Refactor: improve structure only while preserving behavior. Rerun affected tests after changes. Commit the final task state, run the final checks from that revision and record the passing command, output, exit code, timestamp and revision. Repeat red/green for additional behaviors before their implementation; retain per-cycle evidence in the task report. The run JSON summarizes the task's initial relevant red and final green evidence.

Use suitable tests: unit tests for logic, integration tests for boundaries, and browser/API checks for user flows where needed. A documentation/configuration task still needs a meaningful acceptance check written before the edit, such as parsing a config or validating a referenced file. Do not add tests that merely repeat the implementation's constants or prose.

Run existing project-required checks in addition to task tests. Do not report unexecuted checks as passed. If tests cannot run, preserve the authored tests and explain the exact blocker; this strict workflow cannot mark the task complete. Hand the final revision and real evidence to review-delivery. Any later code change invalidates that revision's passing/review evidence until checks are rerun.

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.