test-plan-first
Skill0 starsChanged 2 months agoMITView on GitHub
Use when starting implementation of a feature or bugfix. Write a concrete test plan and at least one failing automated test (or explicit manual cases) before changing production behavior.
In this repository9 other files it gives its agents.
- adversarial-reviewSkill
- api-compatSkill
- flaky-test-triageSkill
- incident-hotfixSkill
- perf-measure-firstSkill
- repro-firstSkill
- secrets-hygieneSkill
- skill-authorSkill
- yagni-sliceSkill
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
- Distinctive: line 27
Do not delete golden files, snapshots, or fixtures wholesale without confirmation.
- Distinctive: line 33
Write a short test plan (happy path, edge cases, failure modes).
- Distinctive: line 34
Add or sketch the failing automated test(s).
- Distinctive: line 36
Update the plan checkboxes with actual commands and results.
≈ “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.
Files
Test Plan First
When to use
- Implementing a feature, bug fix, or behavior change with testable outcomes.
- The user asks for "TDD", "tests first", or "how will we verify this?".
- You are about to edit production code without a verification story.
When not to use
- Pure docs, comments, or markdown-only changes.
- Exploratory spikes explicitly marked throwaway with no merge intent.
- Environments where no test harness exists and the user waived automated tests (still write a manual plan).
Assumptions
- Project has a known test command (e.g.
npm test,pytest,go test) or you can document manual steps. - Shell access to run tests and capture pass/fail output.
- Do not delete golden files, snapshots, or fixtures wholesale without confirmation.
- Flaky suites: stabilize or quarantine per flaky-test-triage rather than ignoring failures.
Workflow
- Restate behavior under test as inputs → expected outputs / side effects.
- Write a short test plan (happy path, edge cases, failure modes).
- Add or sketch the failing automated test(s); run to confirm red.
- Implement until green; resist expanding scope beyond the plan.
- Update the plan checkboxes with actual commands and results.
Steps
- Behavior table — List cases: normal, boundary, invalid input, and one regression risk.
- Choose level — Prefer the lowest reliable layer (unit > integration > e2e) that would catch the bug.
- Write the red test — Assert the new contract. Name it after the behavior, not the implementation.
- Run and capture — Record the failing output once so the failure reason is clear.
- Implement minimally — Only what the tests require (pair with yagni-slice).
- Green + nearest suite — Re-run the new tests and the closest existing file/package suite.
Success criteria
- A written test plan lists concrete cases before production edits.
- At least one automated test failed for the right reason before the fix (or manual cases are explicit and reproducible).
- Tests pass after implementation with recorded commands.
- Edge and failure cases from the plan are covered or consciously deferred with rationale.
- No snapshot/fixture mass-deletes without confirmation.
Out of scope
- Full coverage campaigns unrelated to the current change.
- Load/performance benchmarking (use perf-measure-first).
- Authoring a new test framework or CI system from scratch.
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.

