Principles
- One issue, one branch, one pull request.
- A worker claims exactly one claimable issue before editing code.
- A reviewer never approves work produced by the same agent.
- The repository and GitHub API are the only coordination state.
- Every role has explicit GitHub permissions and explicit prohibitions.
- Failed checks and requested changes stay with the current issue.
- The loop changes its own prompts one measured change at a time, and never its own judge.
Role boundaries
Every session adopts exactly one role. The orchestrator decides which role a new session should adopt by reading repository state; every other role then works within its own boundary alone.
| Role | Claims? | Reviews? | Purpose |
|---|---|---|---|
| Orchestrator | No | No | Reads repository state and recommends what to run next. |
| Planner | No | No | Keeps an ordered, well-scoped backlog. |
| Worker | Exactly one | Never own work | Ships one issue as one pull request. |
| Reviewer | No | Yes | Judges the current revision against the issue and repository rules. |
| Tester | Its own filed gap | No | Finds the weakest coverage area and closes one gap. |
| Fixer | No | No | Addresses review feedback on an existing pull request branch. |
| Janitor | No | No | Repairs GitHub coordination state: stale claims, orphaned refs, leases. |
| Merger | No | No | Verifies CI and the verdict, merges, and reconciles the claim. |
| Improver | Its own filed change | Never own work | Proposes one measured change to a tunable role prompt, then keeps or reverts it on the evidence. |
Labels
Labels are state, and their names are configurable in .rallypoint/config.json. An open issue is claimable unless something holds it back: no assignee and none of status:claimed, status:blocked, status:deferred or needs:human. There is no readiness label.
| Label | Config key | On | Meaning |
|---|---|---|---|
| status:claimed | claimed | issue | Reserved by one worker right now. |
| status:blocked | blocked | issue | Waiting on another issue, named in a Blocked-By: trailer. |
| status:deferred | deferred | issue | A deliberate hold that will not clear on its own. |
| needs:human | human | issue or PR | Requires an owner decision or a protected action. |
| review:approved | approved | pull request | Reviewer verdict on a pull request, bound to its head SHA. |
| status:changes-requested | changesRequested | pull request | A reviewer asked for changes and they are outstanding. |
| merged:unreviewed | mergedUnreviewed | pull request | Merged without an approve verdict at its head. |
| prio:p1 | prio:p0 … prio:p9 | issue | Priority. claim.mjs orders the claimable pool by this number and nothing else. |
Self-improvement
Rallypoint is a self-improving graph. The improver reads the loop’s own history, proposes one change to one role prompt labelled loop:improvement, and keeps it only when improvement.mjs evaluate finds the named metric improved over equal samples before and after the merge, with the named counter-metric and unreviewed merges no worse. Scripts, .rallypoint/config.json, the protocol documents and the reviewer’s, merger’s and improver’s prompts are frozen to it; what “better” means stays with the repository’s owners.
| Step | Owned by | What happens |
|---|---|---|
| Measure | improvement.mjs retro | Reads merged and closed agent pull requests and the verdicts recorded on them: first-pass approval, review rounds, abandoned work, escalations, time to merge, and the notes reviewers keep repeating. |
| Propose | loop:improvement | One small change to one role prompt, as an ordinary pull request that names the metric it should move and a counter-metric it could harm. |
| Gate | improvement.mjs check | Refuses a change that touches a frozen path or arrives while the last one is still being measured. Independent review still applies. |
| Evaluate | improvement.mjs evaluate | Compares equal samples before and after the merge. Kept only if the target improved and no guard worsened; otherwise it is reverted. |
Install
Rallypoint’s CLI reads its own checksummed manifest and writes each file to an explicit repository-root path. It stops on conflicts rather than overwriting anything silently. An existing AGENTS.md gets special handling: it is left untouched, the rest of the loop still installs, and the CLI suggests adding a one-line @AGENTIC_LOOP.md reference to it.
npx rallypoint@latest view loopnpx rallypoint@latest add loopnpx rallypoint@latest initinit requires the GitHub CLI, installed and authenticated. It syncs the configured integration branch to the repository’s default branch, creates the labels the loop reads and writes, and reports — without changing — whether the default branch has protection rules.
Prompting
A role is one file, so at minimum, prompting an agent to become that role means pointing a fresh session at AGENTS.md and exactly one file under .rallypoint/roles/. The table below is that literal minimum — the shortest instruction an agent needs, stripped of anything a person would normally say.
Don’t know what should happen next? Prompt the orchestrator first. It reads the same queue every other role reads and names the next role and target, so you know exactly what to prompt a fresh session with.
Read AGENTS.md, then read .rallypoint/roles/orchestrator.md. Decide which role should run next and name the exact issue or pull request it targets.| Role | Prompt |
|---|---|
| Orchestrator | Read AGENTS.md, then read .rallypoint/roles/orchestrator.md. Decide which role should run next and name the exact issue or pull request it targets. |
| Planner | Read AGENTS.md, then read .rallypoint/roles/planner.md and follow it exactly. |
| Worker | Read AGENTS.md, then read .rallypoint/roles/worker.md and follow it exactly. |
| Reviewer | Read AGENTS.md, then read .rallypoint/roles/reviewer.md and follow it exactly. |
| Tester | Read AGENTS.md, then read .rallypoint/roles/tester.md and follow it exactly. |
| Fixer | Read AGENTS.md, then read .rallypoint/roles/fixer.md and follow it exactly. |
| Janitor | Read AGENTS.md, then read .rallypoint/roles/janitor.md and follow it exactly. |
| Merger | Read AGENTS.md, then read .rallypoint/roles/merger.md and follow it exactly. |
| Improver | Read AGENTS.md, then read .rallypoint/roles/improver.md and follow it exactly. |
How a person actually asks
Nobody talks like the table above. People say please, add context the role file doesn’t need, chain two or three asks into one message, run several roles at once, or set the whole thing on a schedule. None of that breaks the loop — the role files are boundaries, not scripts, so any of these land the same as the literal prompts above.
A simple, polite ask
Could you grab the next ready issue and ship it? Thanks!
With extra context the role file doesn’t need
A couple of users got stuck on the auth step in yesterday's onboarding call — can you check the backlog reflects that, add whatever's missing, and reprioritize anything blocking a fix?
Chained into one message
Run the planner to top up the backlog, then have a worker pick up whatever's highest priority, and kick off review as soon as that PR is open.
Several roles at once
Spin up three workers in parallel on the three oldest ready issues, and have a reviewer standing by for whichever one finishes first.
On a schedule
Set this up to loop: run the janitor every morning to clear stale claims, and have the orchestrator check in every few hours to tell me what's next.
Swarm
Rallypoint Swarm is the next tier, installed on top of the loop. GitHub still owns the work; a Supabase project you own holds the memory (sessions, progress, retros, messages, referee results, buried ideas and concepts). Sessions pick their own role, finishing first, and a referee gates every change: a score that must beat main, checks that must pass, or independent review alone when there is nothing to measure. The full picture, requirements and setup are on the Swarm page; the wizard writes your config.
npx rallypoint@latest add swarmnpx rallypoint@latest swarm doctorEvery command runs as npx rallypoint swarm <command>, accepts --json, and exits 0 ok, 1 error, 2 misuse, 3 referee failed, 4 nothing to do.
| Command | What it does |
|---|---|
doctor | Checks env, gh, git, the config, Supabase reachability, the schema version and the secret. |
init | After doctor: creates target:<name> labels and stores the goal and visibility in swarm_settings. |
prepare [--agent name] | Opens a session (a row plus .git/rallypoint-swarm/session.json). |
next [target] [--only r1,r2] | Picks the role, finishing first: merger → fixer → reviewer → improver → worker → planner → janitor. Prints ROLE, TARGET and READ. |
log "<note>" | Appends a progress note and refreshes last_seen_at. |
say --kind <kind> [--ref #n] [--thread id] "<body>" | Posts a message. |
inbox [--ref #n] | Reads recent messages. |
referee [--target t] [--baseline <ref>] | Runs measure.command on HEAD and on the baseline, compares by direction and margin, records the result. Exits 0 or 3. |
bury --idea … --reason … --lesson … [--concept c] [--target t] | Records a buried idea with its numbers (the latest result). |
ship --version v… [--target t] [--pr n] | Records a shipped version with its score (merger only, after merge). |
concept add <id> "<name>" "<description>" | Adds a concept the swarm can try on any target. |
concept trial <id> --target t --outcome gained|lost|neutral [--delta d] | Records one trial of a concept on a target. |
plan <plan.json> | Opens GitHub issues from [{title, body, target, concept, type, prio}]. |
brief | The strategist’s digest: goal, targets, versions, buried ideas, concept trials, open work. |
metrics | The swarm_metrics row. |
retro --well … --friction … --suggest … | Writes the retro and ends the session. |
status | A JSON snapshot for the conductor. |