test-hardening
Skill17 starsChanged 15 days agoMITView on GitHub
Strengthen tests — strengthen an area's existing tests unit by unit with mutation checks before and after, changing tests only, and recording any real bug found instead of fixing it. Use for /haechi:test-hardening, when the user asks to strengthen or harden the tests of a folder or feature.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- EnsoDynamics/enso-methodtheir own version, first seen Oct 11, 2026
- 0disoft/mcp-security-proxytheir own version, first seen Jul 7, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- EnsoDynamics/enso-method★ 6same name
- 0disoft/mcp-security-proxy★ 2same name
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 repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- aboutSkill
- answerSkill
- attack-testsSkill
- audit-experimentSkill
- bugSkill
- ci-watchSkill
- commitSkill
- contextSkill
- delegateSkill
- documentSkill
- evalSkill
- featureSkill
- impact-mapSkill
- implement-workSkill
- mrSkill
- mutation-checkSkill
- perfSkill
- previewSkill
- refactorSkill
- requestSkill
- review-diffSkill
- reviewSkill
- run-experimentSkill
- screen-designSkill
- screen-paritySkill
- setupSkill
- sibling-path-mapSkill
- specSkill
- sweepSkill
- verify-workSkill
- work-graphSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Run mutation-check before changing anything, with a per-file limit and --lines 1-<last line of the file>.
- Very specific: line 30
Run mutation-check again after, with the same --lines as before.
- Distinctive: line 31
Review each unit as it finishes: Check:
- Distinctive: line 33
no mocks of the unit's own internals, no render snapshots.
≈ “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
Strengthen an area’s tests
Apply the common work contract within the authorized scope. It owns required implementation, verification, review and completion obligations; this skill supplies methods. Use /haechi:delegate for a bounded worker task when independent execution helps. Existing step names below are compatible delegation entry points, not an exclusive workflow state.
The main session runs these steps. Scope, delegation, authorization and completion requirements are in the session rules. Use /haechi:mutation-check for each unit and a worker with /haechi:attack-tests when separate context or independent challenge helps. Use /haechi:sweep for useful independent units. This file adds only what is specific to hardening an area. Principle files are two levels above this skill's folder (<this skill's folder>/../../principles/<name>.md): behavior-tests and sibling-paths apply.
Task focus
Establish the area's mutation results, or say "not measured" if unknown. The easy mistake is scope: "harden the tests" with no folder can mean the whole repo. Example: "src/invoices not measured; formatDate.ts has no test file."
Steps
- Clarify the task. Establish the area's current mutation results and the intended improvement. Consider /haechi:spec using its description while establishing the scope and success criteria; preserve the tests-only boundary. Only tests change; source code stays unchanged. Show mutation results before and after per unit and passing tests. Fixed labels and tables are optional.
- Choose units. Work directly for a tightly coupled area, or use /haechi:sweep when independent units benefit from separate context. A unit can be a source file plus its tests. Order:
- files under
riskPathsin.haechi.json; - files with many recent bug fixes (
git log --oneline --grep=fix -- <file>, or the repo's commit convention for fixes); - files without tests;
- the rest. For the cost preview, estimate mutants per file (the mutation-check limit, default 20) times the unit's test run time.
- files under
- Harden each unit. Work directly or give a worker with /haechi:attack-tests this brief when independent challenge is useful:
- Run mutation-check before changing anything, with a per-file limit and
--lines 1-<last line of the file>. Without--linesit mutates only lines changed against HEAD, which on a committed file is nothing. - Judge each surviving mutant: a real gap gets a stronger assertion or a new case; an equivalent mutant (behavior cannot change) gets a one-line reason and is excluded.
- Touch existing tests in exactly two cases: a mutant survived, or a test is tied to internals and gets rewritten against observable results. Each new test catches a different mutant or path. A file with no tests gets new behavior-based tests.
- A real bug found: do not fix the source. Record it the repo's way (AGENTS.md; otherwise a skipped test named
BUG: <expected behavior>). The user decides what happens to it. - Run mutation-check again after, with the same
--linesas before.
- Run mutation-check before changing anything, with a per-file limit and
- Review each unit as it finishes. Check:
- tests assert behavior a caller observes, not internal calls;
- no mocks of the unit's own internals, no render snapshots;
- time and randomness are fixed;
- fixtures are synthetic. Then commit the completed unit.
Report. Give the before/after results, equivalent mutants, test changes and bugs found for each unit. An optional table:
Unit Survived before → after Equivalent Tests added / changed Bugs found src/utils/formatDate.ts4 → 1 1 2 / 1 —
Extra DONE evidence
Mutation results before and after for every unit, the equivalent mutants with their reasons, and the test run passing. No source file in the diff.
Delegation contracts
These compatible entries identify delegated methods, not an exclusive workflow or a mandatory agent sequence. Packet assembly also supplies the canonical common work contract. The main session fills the named context fields and task-specific acceptance criteria; detailed procedures and principle bodies stay in their referenced files. read-only means repository files remain unchanged; authorized temporary or report outputs must be named separately in artifactPaths.
{
"attack": {
"skills": [
"attack-tests",
"sibling-path-map",
"mutation-check"
],
"principles": [
"sibling-paths",
"behavior-tests"
],
"checks": [],
"writeScope": "scoped",
"contextRequired": [
"repository",
"requirements",
"changedFiles",
"ownership"
],
"completion": [
"Demonstrate that tests detect the targeted defects without weakening expected behavior."
]
},
"review": {
"skills": [
"verify-work",
"review-diff",
"impact-map"
],
"principles": [
"evidence-levels",
"behavior-tests"
],
"checks": [
"agent-defects",
"sibling-paths",
"dry",
"yagni",
"kiss"
],
"writeScope": "read-only",
"contextRequired": [
"repository",
"requirements",
"base",
"changedFiles",
"priorEvidence"
],
"completion": [
"Report concrete defects with expected and observed behavior and affected consumers.",
"Distinguish passing checks, failures, missing proof and unresolved expectations."
]
}
}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.

