bug-red-test
Skill1 starsChanged 24 days agoMITView on GitHub
Prove a regression test actually catches the bug by watching it fail against the old behaviour before the fix ships. Use for any change that claims to fix a defect, and when the user says "add a regression test" or "verify the test fails first".
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs-syncSkill
- init-workflowSkill
- plan-startSkill
- standards-reviewSkill
- task-runSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 24
Restore the fix: Run the suite again, green.
- Distinctive: line 32
Leave the revert in place.
≈ “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
bug-red-test
A test written from a bug's description rather than its mechanism tends to pass either way. This procedure is what separates the two.
Procedure
- Name the mechanism. One sentence: the exact state and input under which the wrong behaviour occurs. If you cannot write that sentence, you do not yet understand the bug - go read, do not go write.
- Write the test against the mechanism, not the symptom. It asserts on the observable outcome the mechanism corrupts.
- Make it red. Either write the test before the fix, or - when the fix is
already applied - revert the fix (
git stashthe fix hunk, or flip the changed line back), run the suite, and watch the new test fail. - Read the failure. It must fail for the bug's reason. A failure from a missing import, a bad fixture or an unrelated assertion proves nothing - fix the test and repeat step 3.
- Restore the fix. Run the suite again, green.
- Record it in the session log: what the defect actually was, and that the test was verified failing against the old behaviour.
Do not
- Skip step 3 because the test "obviously" covers it. That belief is what this step exists to check.
- Leave the revert in place. Verify the tree is back to the fixed state before the gates run.
- Name the test after the plan or the ticket. It states the behaviour:
it("appends the username on a drop"), notit("fixes TASK-3").
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.

