diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b336c85..41623da 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -25,7 +25,7 @@ Closes # ## Checklist -- [ ] I claimed the linked issue before starting, and the claim was still mine when I opened this pull request. +- [ ] I claimed the linked issue with a reply before starting, and nobody else held a live claim on it. - [ ] I reviewed the changes and disclosed material AI assistance below, if applicable. - [ ] The change preserves native ARM64 and Metal-first requirements. - [ ] I added relevant tests or explained why they are not applicable. diff --git a/.github/agent-queue.json b/.github/agent-queue.json index 83a1f2c..100a227 100644 --- a/.github/agent-queue.json +++ b/.github/agent-queue.json @@ -1,5 +1,5 @@ { - "lease_hours": 24, + "lease_hours": 168, "upstream": "ranveersoni98/Xenora", "maintainers": ["ranveersoni98"], "contributors": { diff --git a/AGENTS.md b/AGENTS.md index 930d93c..8c115e0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,16 +47,16 @@ Read docs/interfaces.md and docs/progress.md before implementation. ## Claiming work before you start -Several people and coding agents work on this repository at the same time. An issue with no visible claim is the only signal that a task is free, so claim before you edit anything. +Several people and coding agents work on this repository at the same time. Claim an issue before you edit anything, and never take work someone else has claimed. -1. **Check.** Read the issue's comments, assignees and labels, its linked pull requests, and open pull requests that touch the same files. If someone holds a live claim, pick another task. Do not start parallel work on a claimed task. -2. **Claim.** Comment `/claim` on the issue (or run `scripts/agent-queue.sh claim `). Where the claim workflow is enabled, wait for its grant comment and the `claimed-by:` label; a refusal names the reason. Where it is not enabled yet, your comment is the claim and the earliest valid claim comment wins. One issue per claim; claim follow-up tasks separately. -3. **Respect file ownership.** Two claimed tasks never edit the same files at the same time. If the issue lists files, edit only those; ask the maintainer before widening the list. -4. **Keep it alive.** A claim lapses 24 hours after the latest grant, `/progress ` comment, or push to the linked pull request. Post `/progress` at least once a day while you work. Lapsed tasks return to the queue and may be claimed by anyone. -5. **Release.** If you stop, comment `/release` so the task returns to the queue. Use `/blocked ` instead if you are waiting on another task. -6. **Link.** Open the pull request from a branch named `task/-` with `Closes #` in its description. +1. **Check.** Read every comment on the issue and look for open pull requests that link it. A claim is any comment in which someone says they are taking the issue, in any words (for example "I'll take this" or `/claim`). If a claim exists and is not stale (step 4), pick another issue. +2. **Claim.** Reply on the issue in plain words, for example: "I'm taking this. Plan: …". No command, label or bot step is needed. The earliest claim wins. Claim one issue per comment. +3. **Stay in scope.** If the issue lists files, edit only those, and ask on the issue before widening the list. Do not start work that edits the same files as another claimed issue. +4. **Stale claims.** A claim is stale when the claimer has not opened a pull request for the issue within about one week (7 days) of the claim. Only then may someone else take it, by replying on the issue, for example: "Taking this over: @name's claim from has no pull request after 7 days." A claim with an open pull request is never stale; ask the claimer or the maintainer instead. +5. **Release.** If you stop working on an issue, say so on the issue so others can take it. +6. **Link.** Put `Closes #` in the pull request description. -An agent acting for a contributor claims in that contributor's name and must not claim work for areas that contributor may not claim (`.github/agent-queue.json`). Never remove, overwrite or ignore another person's claim; ask the maintainer to `/reassign` instead. See `docs/coordination/agent-tasks.md` when present. +A coding agent claims in the name of the person it works for and follows the same rules. It must read the comments before claiming, and must never claim over, remove or ignore another person's claim. The optional task-queue commands in `docs/coordination/agent-tasks.md` do not replace these rules: a plain-reply claim counts even though the bot does not track it. ## Changelog maintenance diff --git a/CHANGELOG.md b/CHANGELOG.md index 8165941..76efdbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ remains unsupported. ### Changed +- Simplified the claim rules in `AGENTS.md`, `CONTRIBUTING.md` and the pull request template at the maintainer's request: claim an issue by replying on it in plain words, never claim over an existing claim, and treat a claim as stale only after about one week without a pull request. The task-queue lease (`lease_hours` in `.github/agent-queue.json`) is now 168 hours to match, and `docs/coordination/agent-tasks.md` marks the queue commands as optional. - The static PE probe now marks x86-64 SIB memory addressing as DBT-supported, matching the native DBT. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f75725..7ca86ae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Xenora is an experimental Xbox Series X|S recompilation framework for Apple Sili - Read `README.md` and, when present, `AGENTS.md`, `docs/interfaces.md`, `docs/status.toml` and the relevant architecture decisions. - Discuss substantial changes in an issue before implementing them; small fixes do not require prior approval. -- Claim an issue before working on it by commenting `/claim`, and check that nobody else holds a live claim first. Claims lapse after 24 hours without a `/progress` comment or a push; comment `/release` if you stop. Coding agents follow the same rules; see "Claiming work before you start" in `AGENTS.md`. +- Claim an issue before working on it by replying on it in plain words, after checking its comments for an existing claim. Never claim over someone else. A claim with no pull request after about one week may be taken over with a reply saying so. Coding agents follow the same rules; see "Claiming work before you start" in `AGENTS.md`. - Use a native ARM64 macOS environment with Rust and the appropriate Xcode/Metal tools. LLVM AMDGPU tools are needed for ISA fixture generation; extra tooling depends on the subsystem. - Keep changes focused and preserve existing public interfaces unless a change is justified and documented. diff --git a/docs/coordination/agent-tasks.md b/docs/coordination/agent-tasks.md index 1bc5eb8..7479f28 100644 --- a/docs/coordination/agent-tasks.md +++ b/docs/coordination/agent-tasks.md @@ -1,7 +1,11 @@ # Agent task queue Work items are GitHub issues. Contributors and coding agents claim them with a comment, work in -their own branch, and open a pull request that is checked against the claim. The queue is +their own branch, and open a pull request that is checked against the claim. The claim rules for +everyone are in `AGENTS.md` ("Claiming work before you start"): a plain reply is a valid claim, and +a claim goes stale after about one week without a pull request. The commands below are an optional +layer for contributors listed in `.github/agent-queue.json`; the bot only sees `/claim` comments, so +read the issue's comments before using it and never `/claim` over a plain-reply claim. The queue is deterministic: the rules live in `scripts/agent_queue/` (standard-library Python, no network, no model or external service), and GitHub Actions and the shell helpers only call it. @@ -58,7 +62,7 @@ done 4. `scripts/agent-queue.sh start ` creates branch `task/-` from `upstream/main` in a separate worktree `../xenora-task-` (`--here` uses the current clean checkout instead). 5. Keep the lease alive with `scripts/agent-queue.sh progress "what changed"`. A claim lapses - `lease_hours` (24) after the latest of: the grant, your `/progress` comment, a push to your + `lease_hours` (168, one week) after the latest of: the grant, your `/progress` comment, a push to your linked pull request. Other people's comments never renew it. A lapsed task returns to the queue. 6. Open the pull request with `Closes #` and a DCO sign-off (`git commit -s`). 7. A different person (not the author, not the task holder) who is a maintainer or has `qa`