docs: add one-agent-per-issue convention and auto-delete branch docs to AGENTS.md
Some checks failed
Tests / lint (pull_request) Failing after 16s
Tests / test (pull_request) Has been skipped

Documents the assigned-{agent} label convention to prevent duplicate branches
from multiple agents working the same issue simultaneously. Also documents that
auto-delete merged branches is enabled on the repo.

Created Gitea labels: assigned-claude, assigned-gemini, assigned-kimi, assigned-manus.

Fixes #1220

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexander Whitestone
2026-03-23 18:44:13 -04:00
parent 31c260cc95
commit c0b6d5b8d6

View File

@@ -34,6 +34,44 @@ Read [`CLAUDE.md`](CLAUDE.md) for architecture patterns and conventions.
---
## One-Agent-Per-Issue Convention
**An issue must only be worked by one agent at a time.** Duplicate branches from
multiple agents on the same issue cause merge conflicts, redundant code, and wasted compute.
### Labels
When an agent picks up an issue, add the corresponding label:
| Label | Meaning |
|-------|---------|
| `assigned-claude` | Claude is actively working this issue |
| `assigned-gemini` | Gemini is actively working this issue |
| `assigned-kimi` | Kimi is actively working this issue |
| `assigned-manus` | Manus is actively working this issue |
### Rules
1. **Before starting an issue**, check that none of the `assigned-*` labels are present.
If one is, skip the issue — another agent owns it.
2. **When you start**, add the label matching your agent (e.g. `assigned-claude`).
3. **When your PR is merged or closed**, remove the label (or it auto-clears when
the branch is deleted — see Auto-Delete below).
4. **Never assign the same issue to two agents simultaneously.**
### Auto-Delete Merged Branches
`default_delete_branch_after_merge` is **enabled** on this repo. Branches are
automatically deleted after a PR merges — no manual cleanup needed and no stale
`claude/*`, `gemini/*`, or `kimi/*` branches accumulate.
If you discover stale merged branches, they can be pruned with:
```bash
git fetch --prune
```
---
## Merge Policy (PR-Only)
**Gitea branch protection is active on `main`.** This is not a suggestion.