tests
Skill0 starsChanged 7 days agoMITView on GitHub
Decide the kind of test before writing any, using a six-step decision guide with generic patterns and the project's own rules; TDD for business rules; e2e only for listed user flows; and the tools that keep the suite honest (test-guard, test-run, test-health). Use before writing or changing a test, when fixing a bug found while testing, when tests are slow or flaky, or when asked whether a test is worth keeping.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- element-hq/element-x-iostheir own version, first seen Nov 29, 2026
- monicahq/monicatheir own version, first seen Nov 29, 2026
- sidfeels/claude-code-configtheir own version, first seen Nov 29, 2026
- TsukiNi22/skillstheir own version, first seen Nov 16, 2026
- TsukiNi22/ai-utilstheir own version, first seen Nov 16, 2026
- GastonGelhorn/jevmatetheir own version, first seen Oct 25, 2026
Used with
Projects with it also use comments and coverage.
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.
AnthropicSkillcomments
Review open NPRM comment periods, log decisions, track deadlines. Use when an NPRM has a comment window open and you need to surface deadlines, decide whether to file, or record a filing / not-filing / waived decision (--decide CMT-ID).
Also in 3 projects that use this
PydanticSkillcoverage
Fetch coverage diff from Codecov for the current branch or a specific PR. Shows uncovered lines, patch coverage, and overall coverage change.
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- vuetifyjs/vuetify★ 41ksame name
- monicahq/monica★ 26ksame name
- typescript-eslint/typescript-eslint★ 16ksame name
- scalar/scalar★ 16ksame name
- dotnet/android★ 2.2ksame name
- SonarSource/SonarJS★ 1.3ksame name
- trezor/trezor-suite★ 1.1ksame name
- element-hq/element-x-ios★ 976same name
- Moosync/Moosync★ 265same name
- cirne/agent-skills★ 3same name
7 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 repository13 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- templates/CLAUDE.mdCLAUDE.md
- commitSkill
- exploreSkill
- integrateSkill
- memorySkill
- no-commentsSkill
- relaySkill
- resumeSkill
- sessionsSkill
- styleSkill
- ui-checkSkill
- workSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
3
Distinctive
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 12
If you cannot fill it in, do not write the test.
- Distinctive: line 25
Red: write the test and run it.
- Distinctive: line 26
Green: write the least code that makes it pass.
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
tests
Before any test, write one line
tier: unit (rule 2) · covers S3 · file: tests/test_discounts.pyIf you cannot fill it in, do not write the test.
Decision order: stop at the first yes
| # | Question | Then |
| 1 | Can the code make the mistake impossible? (shared component, type, database constraint) | Do that. No test. |
| 2 | Does it compute or decide something? (money, stock, permissions, state changes, dates) | Unit test, TDD. |
| 3 | Does it depend on two actors, time or retries? (concurrency, idempotency, queues) | Unit test against the real database, TDD. Never e2e. |
| 4 | Is it about how it looks? | ui-check. No test. |
| 5 | Does it break a whole user flow listed in .arp/flows.toml? | e2e tagged @flow <id>, plus @critical when that flow has critical = true (the integrator runs only @critical). Extend that flow's test before adding one. |
| 6 | None of the above. | No test. A break shows on the first click. |
TDD
- Red: write the test and run it. It must fail, for the reason you expect.
- Green: write the least code that makes it pass.
- Refactor: clean up while it stays green.
A test that passes the moment it is written proves nothing. Fix the test.
Patterns
First look for this project's own cases: the business rules listed under ## Working charter in AGENTS.md, and the flows in .arp/flows.toml. Use the patterns below for anything they do not cover. They are generic on purpose and fit any product.
| Pattern | For example | Decision |
| A calculation | a discount, a tax, a commission, a due date, a balance | Unit, TDD (2) |
| A permission | a role must not see or change something | Unit on the API (2). Hiding it in the UI is not the protection |
| A state change | an item cannot go from cancelled back to active | Unit, TDD (2) |
| Two actors at once | two requests for the last unit, two people editing one record | Unit against the real database, TDD (3) |
| A retry or a duplicate | an offline client resends, a webhook arrives twice | Unit with an idempotency key (3) |
| An external service fails | the provider times out or returns garbage | Unit with a fake at the boundary (3), plus one manual sandbox run |
| A data transformation | an import or an export, parsing a file | Unit on the function (2) |
| A double submit | a second click creates a second record | Structural (1): the shared button disables while pending, plus the idempotency unit test |
| An empty, long or loading state | a blank page, cut-off text | Structural (1) in the shared component, then ui-check |
| How it looks | a repeated title, uneven spacing, dark mode | ui-check (4) |
| A flow wired wrong | each part works alone, but the screen calls the wrong endpoint | e2e @flow <id> (5): extend that flow's test |
| Simple create, read, update or delete | a screen that edits one field | No test (6). ui-check for the look |
| A migration | a new column or index | No test. The integrator rebuilds the database from migrations |
| Copy | a label or a typo | No test |
| A flaky test | fails one run in ten | Fix the cause or delete it. Never add retries |
Fix rule for bugs found while testing
| Kind | Fix |
| A business rule | a unit test first, then the fix |
| A UI detail | a structural fix in the shared component, no test |
| A broken flow | an e2e test for that flow |
Tools
| Command | What it does |
arp test-guard | Runs inside the quick verify and the integrator. Fails on an e2e test with no @flow, an unknown flow, a flow over tests.e2e_per_flow, or configured retries. --baseline accepts today's offenders in an existing project, so only new ones fail. |
arp test-run --tier <t> --runner session -- <cmd> | Wraps a test command and records its results in the shared local database. |
arp test-health | Report: cost, flaky tests, value, suspects, duplicates, trend. --all compares projects. |
arp test-health --mutate <test> | Checks a suspect with mutation testing. A test that no mutant breaks is a delete candidate, and the owner approves each deletion. |
arp test-report | The periodic report. Every tests.report_every_days (default 7), the session-start hook writes it in the background to ~/.local/share/agent-core/reports/<project>-<id>/ and the next session tells the owner what changed: new suspects, flaky tests. Publish the page as a private artifact when the owner wants to see it. |
Adding a user flow
A flow is one sentence in .arp/flows.toml. Add one only for a new end-to-end path the owner cares about. The integration report shows it to them.
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.

