celestial-skills / test-first-development-engineering
AGENTS.md1 starsChanged 18 days agoApache-2.0View on GitHub
Write a failing test for one small behaviour, make it pass with the least code, then tidy up, so every line you ship is already proven. Generated from the Celestial engineering practice “Test-first development”.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository182 other files it gives its agents.
- skills/accessibility-audit-engineering/AGENTS.mdAGENTS.md
- skills/angular-app-engineering/AGENTS.mdAGENTS.md
- skills/aspnet-core-api-engineering/AGENTS.mdAGENTS.md
- skills/chrome-extension-engineering/AGENTS.mdAGENTS.md
- skills/ci-cd-pipelines-engineering/AGENTS.mdAGENTS.md
- skills/code-review-engineering/AGENTS.mdAGENTS.md
- skills/compose-android-app-engineering/AGENTS.mdAGENTS.md
- skills/context-engineering-engineering/AGENTS.mdAGENTS.md
- skills/database-migrations-engineering/AGENTS.mdAGENTS.md
- skills/dbt-analytics-engineering/AGENTS.mdAGENTS.md
- skills/dependency-supply-chain-engineering/AGENTS.mdAGENTS.md
- skills/deprecation-and-removal-engineering/AGENTS.mdAGENTS.md
- skills/design-tokens-to-code-engineering/AGENTS.mdAGENTS.md
- skills/django-app-engineering/AGENTS.mdAGENTS.md
- skills/end-to-end-testing-engineering/AGENTS.mdAGENTS.md
- skills/expo-react-native-app-engineering/AGENTS.mdAGENTS.md
- skills/fastapi-service-engineering/AGENTS.mdAGENTS.md
- skills/fastify-api-engineering/AGENTS.mdAGENTS.md
- skills/feature-flags-engineering/AGENTS.mdAGENTS.md
- skills/flutter-app-engineering/AGENTS.mdAGENTS.md
- skills/framework-upgrades-engineering/AGENTS.mdAGENTS.md
- skills/git-workflow-engineering/AGENTS.mdAGENTS.md
- skills/go-http-service-engineering/AGENTS.mdAGENTS.md
- skills/graphql-api-engineering/AGENTS.mdAGENTS.md
- skills/incident-response-engineering/AGENTS.mdAGENTS.md
- skills/incremental-implementation-engineering/AGENTS.mdAGENTS.md
- skills/internationalisation-engineering/AGENTS.mdAGENTS.md
- skills/kubernetes-helm-engineering/AGENTS.mdAGENTS.md
- skills/laravel-app-engineering/AGENTS.mdAGENTS.md
- skills/launch-readiness-engineering/AGENTS.mdAGENTS.md
- skills/llm-features-and-evals-engineering/AGENTS.mdAGENTS.md
- skills/marketing-site-engineering/AGENTS.mdAGENTS.md
- skills/nestjs-service-engineering/AGENTS.mdAGENTS.md
- skills/nextjs-app-engineering/AGENTS.mdAGENTS.md
- skills/nuxt-app-engineering/AGENTS.mdAGENTS.md
- skills/observability-engineering/AGENTS.mdAGENTS.md
- skills/privacy-by-design-engineering/AGENTS.mdAGENTS.md
- skills/python-ml-service-engineering/AGENTS.mdAGENTS.md
- skills/rails-app-engineering/AGENTS.mdAGENTS.md
- skills/react-web-app-engineering/AGENTS.mdAGENTS.md
- skills/release-and-versioning-engineering/AGENTS.mdAGENTS.md
- skills/requirements-interview-engineering/AGENTS.mdAGENTS.md
- skills/rest-api-design-engineering/AGENTS.mdAGENTS.md
- skills/rust-axum-service-engineering/AGENTS.mdAGENTS.md
- skills/rust-cli-tool-engineering/AGENTS.mdAGENTS.md
- skills/safe-refactoring-engineering/AGENTS.mdAGENTS.md
- skills/secure-code-review-engineering/AGENTS.mdAGENTS.md
- skills/source-grounded-development-engineering/AGENTS.mdAGENTS.md
- skills/spec-before-code-engineering/AGENTS.mdAGENTS.md
- skills/spec-driven-development-engineering/AGENTS.mdAGENTS.md
- skills/spring-boot-service-engineering/AGENTS.mdAGENTS.md
- skills/sveltekit-app-engineering/AGENTS.mdAGENTS.md
- skills/swiftui-ios-app-engineering/AGENTS.mdAGENTS.md
- skills/systematic-debugging-engineering/AGENTS.mdAGENTS.md
- skills/task-breakdown-engineering/AGENTS.mdAGENTS.md
- skills/tauri-desktop-app-engineering/AGENTS.mdAGENTS.md
- skills/technical-documentation-engineering/AGENTS.mdAGENTS.md
- skills/terraform-infrastructure-engineering/AGENTS.mdAGENTS.md
- skills/threat-modelling-engineering/AGENTS.mdAGENTS.md
- skills/typescript-library-engineering/AGENTS.mdAGENTS.md
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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 3
Write a failing test for one small behaviour, make it pass with the least code, then tidy up, so every line you ship is already proven.
- Distinctive: line 24
Never write production code without a failing test that demands it.
- Distinctive: line 25
Keep each red-green-refactor cycle under about ten minutes.
- Distinctive: line 26
Write a test for each error path and boundary value, not only the happy path.
- Distinctive: line 28
Keep unit tests fast enough that the affected suite runs in seconds.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
AGENTS.md — Test-first development
Write a failing test for one small behaviour, make it pass with the least code, then tidy up, so every line you ship is already proven.
How to do it
- List the behaviours — Before touching code, write a short list of the observable behaviours the change needs, ordered from simplest to hardest. Each item is one sentence a test name could carry.
- Pick one vertical slice — Take the next item from the list. A slice crosses only the layers it needs to produce one visible outcome; do not write all tests up front.
- Write one failing test — Call the code the way a real caller would, assert on the outcome rather than internals, and name the test after the behaviour.
- Watch it fail for the right reason — Run only that test. Confirm the failure message points at the missing behaviour, not at a typo, import error or broken fixture. Fix the test until it fails cleanly.
- Make it pass with the least code — Write the simplest code that turns the test green, even if it looks naive. Do not add branches no test asks for.
- Run the whole suite — Run every test in the affected module. A green new test with a red old test is not progress.
- Refactor while green — Remove duplication, rename for clarity and extract functions in both production and test code, re-running tests after each change. Behaviour must not change in this step.
- Commit and repeat — Commit the slice with its test, cross the item off the list, and add any new cases you discovered as new list items.
Checklist (before a pull request)
- Every new behaviour has a test that was seen failing before the code existed
- Each test asserts on observable output or side effects, not private state
- No production branch exists without a test that exercises it
- The full test suite passes locally and in CI
- Test names read as a description of the behaviour
- Refactoring commits change no test expectations
Rules
- Never write production code without a failing test that demands it. (Code written ahead of a test is code nobody has proven is needed or correct.)
- Keep each red-green-refactor cycle under about ten minutes; split the behaviour if it takes longer. (Short cycles keep failures easy to locate and the design easy to change.)
- Write a test for each error path and boundary value, not only the happy path. (Edge cases are where defects cluster and where tests pay back the most.)
- Mock only at boundaries you do not own, such as the network, clock or file system. (Mocking your own modules couples tests to structure and makes refactoring painful.)
- Keep unit tests fast enough that the affected suite runs in seconds. (Slow tests get skipped, which ends the practice.)
Checks
| Gate | Tool | Threshold | When |
| Changed-line coverage | Coverage report on the diff | At least 90% of changed lines covered | Every pull request |
| Mutation check on changed code | Mutation testing tool for the stack, scoped to changed files | No surviving mutants in new logic | Pull requests that add business logic |
Generated from the Celestial engineering practice “Test-first development”.
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.

