From e6391c599dd5a849df820897be633a009d4aa7ff Mon Sep 17 00:00:00 2001 From: "Claude (Opus 4.6)" Date: Mon, 23 Mar 2026 22:44:50 +0000 Subject: [PATCH] [claude] Enforce one-agent-per-issue via labels, document auto-delete branches (#1220) (#1222) --- AGENTS.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 3f571f81..7710702a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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.