aos-tdd
Skill1 starsChanged 7 months agoMITView on GitHub
Test-driven workflow for adding or changing behavior — write a failing test first, make it pass, then refactor. Use proactively when implementing new business logic, a service method, a bug fix that needs a regression test, or any change where correctness matters. Also use when the user asks to "add tests", improve coverage, or write tests for existing code.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- aos-auditSkill
- aos-ciSkill
- aos-codereviewSkill
- aos-debuggingSkill
- aos-featureSkill
- aos-frontendSkill
- aos-generateSkill
- aos-hardeningSkill
- aos-implementing-featuresSkill
- aos-pragmaticSkill
- aos-qaSkill
- aos-refactorSkill
- aos-reviewSkill
- aos-scaffoldSkill
- aos-setupSkill
- aos-uxSkill
- aos-vuetifySkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 13
Run it; confirm it fails for the right reason.
- Distinctive: line 33
If you reach for an e2e test to cover logic a unit test could catch, push it down.
- Distinctive: line 37
Write the failing regression test *first* (it reproduces the bug), then fix.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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-driven development
This is a model-invoked discipline. When the change is behavioral, drive it with tests.
The loop: red → green → refactor
- Red — write one failing test that describes the next small increment of behavior. Run it; confirm it fails for the right reason.
- Green — write the minimum code to make it pass. Don't gold-plate.
- Refactor — clean up names, duplication, and structure with the test as your net. Re-run; stay green.
Repeat in small steps. Each step is one behavior, not one whole feature.
Test quality rules (ArchitectOS)
- Name tests by behavior:
should throw ConflictError when email is already registered— nottest1, nottestCreate. - Mock only at boundaries — HTTP, DB, external APIs. Don't mock the unit under test.
- Cover error paths and edges, not just the happy path. Every
throwdeserves a test. - Keep tests isolated — no shared mutable state, no order dependence, no real network.
- Arrange-Act-Assert structure; one logical assertion per test.
- Test the contract, not the implementation — avoid asserting on private internals.
The test pyramid
Favor many fast unit tests, fewer integration tests, very few end-to-end tests. If you reach for an e2e test to cover logic a unit test could catch, push it down.
When fixing a bug
Write the failing regression test first (it reproduces the bug), then fix. See aos-debugging for the full diagnosis loop.
On-demand suite audit
For a full review of an existing test suite's balance, naming, isolation, and coverage,
use /aos-qa.
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.

