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
- TheLunchTrae/claude-code-configstheir own version, first seen Nov 8, 2026
- sergvss/agents-best-teamstheir own version, first seen Nov 1, 2026
- JordanCoin/codemaptheir own version, first seen Nov 1, 2026
- claude-world/director-mode-litetheir own version, first seen Nov 1, 2026
- NoobyGains/godmodetheir own version, first seen Nov 1, 2026
- bmtrnavsky/disciplined-vibe-codingtheir own version, first seen Nov 1, 2026
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.
n24q02mSkillsecurity-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
GitHubSkillrefactor
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
MicrosoftSkillapi-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
GoogleSkillcode-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
SentrySkillskill-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
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 24
- JordanCoin/codemap★ 710same name
- llopresto87/Cypress★ 119same name
- NoobyGains/godmode★ 118same name
- claude-world/director-mode-lite★ 80same name
- s-hiraoku/synapse-a2a★ 17same name
- bmtrnavsky/disciplined-vibe-coding★ 15same name
- dfedoryshchev/weftworks★ 5same name
- eeshsaxena/agent-skills★ 2same name
- sergvss/agents-best-teams★ 2same name
- atgreen/hackinator★ 1same name
14 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- clarify-requestSkill
- deliberate-devSkill
- isolated-worktreesSkill
- plan-tasksSkill
- review-deliverySkill
The file
Files
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.
- 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.
- 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.
- 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.
- 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.
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.

