Agents checklist
AI agents write much of this code. These rules are for them. People follow them too.
server/AGENTS.md sends agents here. Its hard rules are the same as Code style; this page adds how to work.
Top rule
All backend code is Rust: server, API, plugins, tools, tests, and build tools like the docs site and the token generator. The Android app stays Kotlin; the app's web page stays HTML/CSS/JS. See Code style rule 1.
Before you start
- Read the docs page for the part you change.
- Read the code it touches, and every caller.
- Check the work is not done already.
- If the task rests on something false (a file or route that is not there), stop and say so.
While you work
- Make the smallest change that fully works.
- Reuse what is in the codebase. Match nearby code.
- No new dependency for a few lines.
- Keep the safety rules. Never weaken a check to make a test pass.
- Add logs for actions, errors, skips and model calls (Logging).
- Add a test (Testing).
- Update the docs in the same change (Writing docs).
- Build and test with
-j1. The machine is low on memory.
Never
- Put secrets, tokens or personal data in code, tests, logs, docs or commits.
- Commit
data/,.tokenortarget/. - Touch another account's data, or real user data, to test.
- Deploy, delete data or send messages without the owner's yes.
- Turn off a test, a check or the Safety Gate.
- Say "done" without running the tests.
Before you say done
- [ ] Tests pass. You read the output.
- [ ] You ran the review checklist on your own diff.
- [ ] The quality bar is met.
- [ ] Logs added (Logging). App changes keep the battery rules.
- [ ] Your last line says what you did not check, and any risk.