This is also enforced outside this file: Gitea branch protection on `main` and a deny rule in `.claude/settings.json`.
1. Start every change from a fresh `main`: `git fetch origin && git switch -c <type>/<short-name> origin/main` (e.g. `fix/duplicate-ids`, `docs/readme`).
2. Commit on that branch; run `npm test` before every push.
3. Push the branch and open a PR against `main` (see "Gitea API" below).
4. Review it with `/code-review <branch>`. Always name the branch: with no target, the review diffs against the just-pushed upstream and sees nothing.
5. Post the result as a PR comment. Its first line is **Approved** or **Needs fixes**, its second is `_Automated self-review by Claude; not an independent review._`, then the findings.
6. If it needs fixes, fix the correctness findings on the same branch and repeat steps 2–5. At most 2 fix rounds: after that, post what's left and hand off to the human.
7. Stop there. Do not merge the PR, even if approved; tell the human it's ready.
### Gitea API
No `gh`/`tea`: use `curl` with `$GITEA_TOKEN` (set in the git-ignored `.claude/settings.local.json`). If it's unset, stop and ask the human; don't work around it.