Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Relayfile runtime changes that write provider records must keep

Full rule: `.claude/rules/relayfile-integration-digests.md`.

<!-- prpm:snippet:start @agent-relay/merge-train-snippet@1.0.1 -->
<!-- prpm:snippet:start @agent-relay/merge-train-snippet@1.0.2 -->
## Merging: `trunk` + the `mergeable` label

CI suites do **not** run automatically on feature branches. They run only on
Expand All @@ -220,28 +220,36 @@ agent batches ready PRs into `trunk`, gets that one PR green, and merges it.
2. No CI runs on your PR, so verify locally before calling it ready: run the
typecheck, tests and lint this repo uses, and list the exact commands and
results in the PR body.
3. If the repo has numbered migrations, re-derive the migration floor (the
highest number on `trunk`) right before pushing. Renumber a migration? Push
the renumbered branch immediately; an unpushed reservation is invisible to
every check.

**When the PR is ready**
3. Add the label **`mergeable`** once all of these are true:
4. Add the label **`mergeable`** once all of these are true:
- The change is complete and the local checks above pass.
- Review feedback (human and bot) is addressed or answered.
- It is not a draft and does not depend on an unmerged PR.
4. Remove `mergeable` if the PR stops being ready (new work, a failing check, a
5. Remove `mergeable` if the PR stops being ready (new work, a failing check, a
blocking question). The label is read live from GitHub on every sweep.

**What you must not do**
- Do not merge your own PR, and never merge into or push to `trunk` or `main`
directly.
- Do not re-enable CI for feature branches or edit the `trunk` gates in
`.github/workflows/`.
- Never add `mergeable` to a PR you did not author without a human
maintainer's explicit approval.
- Never add `mergeable` to an external contributor's PR (anyone outside the
org without write access, including fork PRs). Only a maintainer labels
those, after reviewing the exact head: the merge train merges an external PR
only with a maintainer's APPROVED review on its head and `mergeable` added by
a maintainer after the last push.

**The merge agent** sweeps open `mergeable` PRs with base `trunk` about every
10 minutes. It reads each PR's linked sessions (the `Agent Relay sessions`
block in the PR body, then the session summary) for context, merges them into
`trunk`, opens or updates the `trunk` → `main` PR, fixes CI there, merges when
green, and posts a summary. If your PR conflicts with `trunk`, it may ask you
to rebase on `trunk`; do so and keep the label.

> Interim: the sweep worker is not deployed yet. Until it is, a human or a
> designated agent performs the merge-agent steps manually. Labelling is unchanged.
<!-- prpm:snippet:end @agent-relay/merge-train-snippet@1.0.1 -->
<!-- prpm:snippet:end @agent-relay/merge-train-snippet@1.0.2 -->
8 changes: 4 additions & 4 deletions prpm.lock
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@
"installedPath": ".opencode/skills/running-headless-orchestrator/SKILL.md"
},
"@agent-relay/merge-train-snippet#agents.md:AGENTS.md": {
"version": "1.0.1",
"resolved": "https://registry.prpm.dev/api/v1/packages/%40agent-relay%2Fmerge-train-snippet/1.0.1.tar.gz",
"integrity": "sha256-b993f4fd7a737b5788f10fca8b02d6eea02c803b1d4483f6536f3cfd3f85126e",
"version": "1.0.2",
"resolved": "https://registry.prpm.dev/api/v1/packages/%40agent-relay%2Fmerge-train-snippet/1.0.2.tar.gz",
"integrity": "sha256-1f05ddc23e4553e185f5988fe69b88989b96ad57e38e7e39aafeab45fc735959",
"format": "agents.md",
"subtype": "snippet",
"sourceFormat": "generic",
Expand All @@ -172,7 +172,7 @@
}
}
},
"generated": "2026-10-08T23:07:22.828Z",
"generated": "2026-10-09T15:26:06.695Z",
"collections": {
"agent-relay-starter": {
"name_slug": "agent-relay-starter",
Expand Down
Loading