tests
Installation
SKILL.md
Testing
Prefer the test that would have caught it
Acceptance first, then integration, then unit — the inverse of the usual advice. Bugs that reach production are rarely wrong arithmetic inside a function; they are a route wired to the wrong use case, a missing plugin, a serializer that renamed a field, an adapter whose query does not match the port. A unit test cannot see any of those, which is how a service ends up with 400 green tests and a 500 on the first request.
Not a ban. Logic with a table of inputs — parsing, clamping, date arithmetic — is slow and unreadable driven through HTTP. Write those as units and one acceptance test proving the feature is reachable.
Where each kind lives
A test lives in the module of the code it tests. Acceptance tests belong to no single module, so they get their own.