Artifact f24d9795d01f133bfe1f2a7057a7b553d66d1c0cfa3c8f7ceb603b563f679a11:
- File docs/rfcs/0032-you-bots-and-branch-rules.md — part of check-in [363fad74ee] at 2026-11-20 14:26:11 on branch rfc-0032 — RFC 0032: you, bots and branch rules; a machine logs in as its person, five acts stay in the browser, a branch may accept green landings only (user: dmestas, size: 28179) [annotate] [blame] [check-ins using] [more...]
- Feature Name:
you-bots-and-branch-rules(a machine logs in as its person with one approval; a bot is an account of its own for unattended work; a rule on the branch, not an approval per act, is what keeps trunk safe) - Start Date: 2026-11-20
- Status: Accepted, 2026-11-20. Every decision is made (see Decisions); nothing here waits on an answer. Built in the order under Build order.
- Depends on: RFC 0007 (protected branches); RFC 0009 and 0019 (checks and runs); RFC 0006 (stacks); RFC 0021 (tokens, forge agents, run tokens); RFC 0030 (the setup start, pickup, the runner installer); RFC 0031 stages A, B, C, E, F and G
- Supersedes: the agent-as-default parts of RFC 0021, RFC 0026, RFC 0027 and RFC 0030, and RFC 0031 stage D (the land grant), each named under What this supersedes. Nothing is edited in place beyond a note on RFC 0031's status line.
- Tracks: tickets #459, #461, #467, #398 and #434.
Summary
Until now a person's coding tools reached the forge as an agent: a second account that starts with nothing and is then given rights piece by piece. Every difficulty of 2026-11-20 follows from that one choice. This RFC replaces it with three concepts.
You. quarry login on a machine gives that machine a token on
your own account. It acts as you, on everything you can reach, and is
named for the machine. What it does is recorded as you, with the
machine as the detail: "alex via mac-mini".
A bot. An account that acts as itself, for work nobody is present for: CI, mirrors, releases. It holds the role it is given on the repositories it is given, and nothing else.
Rules on branches. A protected branch may carry one rule, "this branch only accepts green landings". With it on, nothing reaches the branch except a landing whose required checks are green, whoever asks.
Logging a machine in is one tap: one page, one Approve, as with gh's
device flow. After it there are no approvals. A short fixed list of
acts stays in the browser for every token, the person's own included.
Nothing changes on the Fossil wire.
Motivation
RFC 0021 decided that an agent is always a separate account. A separate account has no rights, so it needed grants (0021), then inheritance to avoid the grants (0026), then a ceiling and a repository list to cut the inheritance back, then a way to ask for what it still lacked (0027, 0028), then a way to be created without a secret pasted into a chat (0030), then a special grant so that it could land (0031 stage D).
The one rule that guards trunk never followed any of that. A protected branch admits a check-in from its owners, and an owner is an exact account name (RFC 0007). An agent that inherits its person is still not that person, so "land on green" took a role, a token and an owner entry on three pages, and RFC 0031 proposed a fourth record to join them.
A person had about fourteen things to hold: personal or dedicated, three scopes, the inherit switch, grants, four token scopes, repository lists, ceilings, setup kinds, who an agent belongs to, pickup, sign-offs, plans, land grants and branch owners. The owner, on 2026-11-20:
We need to prioritize making it super easy for the human. I want to do one thing, be okay that it's done, and know what that is.
Other forges do not have this problem, because a personal access token there is not a second identity. It is the person, so every rule keyed on their login already applies. Quarry built the hard half with care, bots that act as themselves, and never built the easy half. The store was ready for it: a token already resolves for any account, with scopes, idle lapse and revoke.
Safety by approval also did not hold. On 2026-11-20 three requests were approved and did the wrong thing silently. A person asked to approve each act learns to tap yes. A rule checked by the forge does not tire.
The three concepts
Examples use a placeholder person alex, a repository alex/website
and a machine labelled mac-mini.
You: a token per machine
$ quarry login
Open https://zeitforge.app/setup and type KQ4T-9XWM (10 minutes)
Waiting for your approval ...
Logged in to zeitforge.app as alex, from mac-mini.
can everything you can do on the forge
cannot manage your sign-in and credentials; change branch
protection; override a failing check; delete a repository
or hand it on; act as a site admin
token in the login keychain; ends after 90 days unused
revoke https://zeitforge.app/me#machines
Next: quarry land
- What it is. A token on the person's own account, with scopes
syncandapi, no ceiling and no repository list. One credential pushes and calls the API. - One tap. The person opens
/setup, types the code, and the same page states what the machine gets in one sentence with one Approve button. That press is the whole approval: no second page, no entry to answer under Requests, no email to act on. The code is typed and never carried in a link (RFC 0030), and the token's value goes to the machine by pickup, never to a screen. - It reaches everything the person can.
quarry login --repo alex/websitenarrows it to the repositories named, for a borrowed or less trusted machine. The narrowing is not asked for by default. - What it cannot do is the table under Hard stops, and nothing else. There is no asking and no queue: a hard stop answers with the page to open.
- No browser session from it. A login token has no
webscope and cannot mint a sign-in link (RFC 0021), so it cannot turn itself into the signed-in session the hard stops require. - Revoked on the person's account page under Machines: one row a machine, one Revoke each, one "Revoke all". It lapses after 90 days unused (RFC 0026 decision 8, kept).
--repo sends repository addresses with the start. They are checked
against the address alphabet, resolved as the person who claims, and
shown as resolved names; one the person cannot see is "no such
repository", as everywhere. Because a list can only take reach away,
what an unauthenticated client typed can never widen what the Approve
gives. This amends RFC 0030 decision 23 for a login only.
A bot
$ quarry login --bot website-release --repo alex/website --role publisher
- What it is. An account that acts as itself: RFC 0026's dedicated agent and RFC 0021's run token, under one plain name. A read-only bot on one repository is quarry's deploy key.
- Created on the machine that will hold it, with one approval by
an admin of the repository, by the same start, claim and pickup. The
role is
reader,developer,publisherormaintainer;admincannot be asked for (RFC 0030 decision 11, kept). - Belongs to the repository, not to the person who approved it. It survives that person leaving and any admin there may revoke it.
- Recorded as itself: "website-release".
- Lands only where it is named among a branch's owners, and it may be named only on a branch that carries the green-landing rule.
A CI run keeps its run-scoped token (RFC 0021), and runners keep their installer (RFC 0030). Neither changes.
Rules on branches
Branch owners (RFC 0007), required checks (RFC 0009), auto-land and stacks (RFC 0006, RFC 0031 stage C) stay exactly as they are. One rule is added, under The green-landing rule. This is where safety lives now: a rule the forge checks each time, in place of a person approving each act.
The whole journey: quarry login once; then the coding agent runs
quarry land --watch; the landing lands as the person. One approval, at
login, and none after.
Hard stops
Five acts are never done on a token. They need a person signed in to a browser. This is the only place the person clicks again after login, and it is what makes a full-rights token safe to leave on a machine.
One table in the code, hardStops, holds these rows. The refusal and
the consent sentence are both generated from it, so the page a person
approves cannot promise a limit the forge does not enforce, and a new
stop cannot be enforced without appearing in the sentence.
| # | Never on a token | Ops | In the sentence |
|---|---|---|---|
| 1 | The account's own sign-in and credentials: password, email, sessions, tokens, sync token, sign-in links, answering a request | everything refuseToken guards today (RFC 0021) |
"manage your sign-in and credentials" |
| 2 | Changing branch protection: a branch's owners, its required checks, the green-landing rule | branch.protection.set, ci.checks.set |
"change branch protection" |
| 3 | Overriding a failing check | override on landing.accept, landing.auto and landing.land |
"override a failing check" |
| 4 | Deleting a repository, stopping serving it, or handing it on | repo.delete, repo.remove, repo.claim |
"delete a repository or hand it on" |
| 5 | Site admin: the flag and every act that needs it | account.siteadmin and every site-admin op |
"act as a site admin" |
Invariants, each with one test named for it:
- Every token is bound. A person's login token, a bot's token, a run token and every token minted before this RFC are refused alike. A session opened by a sign-in link is bound to its token (RFC 0021) and counts as that token here. The one exception is the one RFC 0021 already made for row 5: a forge agent's token with site scope. No row gains another.
- The refusal says where to go. 403, code
browser_only, with anext(RFC 0031) whosesayis the row's sentence and whoseopenis the address of the page where a signed-in person does it.askis false: a hard stop is never queued as a request. - One source. The consent page,
whoami, the Machines row and the email sent after a login print the "cannot" list from the table. Test: for each row, the op refuses a token with the row's id, and the sentence carries that row's clause, matched by the id in a data hook, never by its wording. - The table in this RFC is the table in the code. A test reads the rows above and fails when the two differ.
- A token cannot become a session. A login token has no
webscope, minting a sign-in link is under row 1, and a bot's token withwebscope opens a session that is bound as invariant 1 says.
Row 5 means a site admin's own machine tokens are never site admins. A leaked laptop token is a repository problem and never a forge problem. This replaces RFC 0026 decision 4, which let a personal agent opt in to its owner's site powers.
The green-landing rule
A protection row gains one switch, shown on the branch's settings as one checkbox:
This branch only accepts green landings.
With it on, for protected branch B:
- Nothing joins B over sync. A check-in or tag that would change B's membership (RFC 0007's definition) is refused at the sync front from every client and every credential, the branch's owners included. The forge's accept path is the only writer.
- A landing onto B lands only when it is green. Every required check on B is green for the exact check-in that would land. Pending, stale, never ran and conflict all refuse. Green for a rung of a stack is as RFC 0031 stage C defines it.
- Who may land does not change. An owner of B, through
landing.accept,landing.autoorlanding.land. A person on a machine token is that owner, so nothing new is granted to anyone. - It is read when the landing lands, not only when it was armed. An armed landing does not land after the rule, the checks or the owners changed against it.
- It needs something to be green. Turning it on for a branch with no required checks is refused, and so is removing the last required check while it is on. Both refusals name the page.
- Override is the way out, and it is a person's. An owner signed in to a browser may land over a failing check with a stated reason, as RFC 0009 has it; hard stop 3 keeps that from every token. The reason is kept on the landing and in the settings log.
- A bot may own only a green branch. Naming a bot among B's owners is refused unless B carries the rule, and the rule cannot be turned off while a bot is an owner.
The rule is refused on a branch that a mirror writes, since a mirror's pull is a sync write and would be refused by item 1.
Where it is on. By the owner's decision it is turned on for quarry's trunk and for the deploy branch of every deployed repository, in build step 8. Elsewhere it is a choice, offered already ticked when a branch that has required checks is first protected. A repository with a deploy environment (RFC 0019) whose deploy branch lacks the rule says so in one line on its settings.
Audit
- A landing is recorded as the person, never as an agent. Opened by, armed by and landed by all read "alex via mac-mini". A landing armed on a machine token and landed later by the forge's sweep reads the same. Only a bot's own landing reads as the bot.
- The machine is the detail. Every act that arrives on a token
stores the account and the token's id as
via, as the settings log does now. It is shown as the account and the token's label on the settings log, the forge journal, the landing and the timeline's pusher line. A revoked token keeps its label, so old lines still read. - The pusher is the verified login (RFC 0007), never the check-in's user card. A check-in's own author is unchanged.
- A person is told what their machines did. An act on a token notifies the person as another account's act would: "landed by you via mac-mini". An act in a browser does not, as now.
- A new login is announced. The person gets an email when a machine is logged in as them, naming the label and the address the start came from, with the revoke link.
- Protection changes are in the settings log and can only have been made in a browser.
- The Machines list shows each token's label, when it was made, when and from where it was last used, and its reach.
Migration
- Tokens. Every token that works today keeps working until it is revoked or lapses: agents' tokens, sync tokens, and credentials issued by hand. The hard stops apply to them from step 2.
- A person's agents are retired. No new personal agent can be
made: the call answers with
quarry loginas itsnext. Existing ones are listed as "Retired agents" with their tokens still working and one control that revokes them all and removes them. Their names stay reserved, and history keeps reading as it was written. - Agents that run unattended (a CI pusher, a mirror) are already dedicated agents. They are called bots; nothing stored changes.
- zeitgeist is narrowed to forge upkeep. It keeps its account and its site scope for deploys, mirrors, release placement and the forge's own housekeeping. It is removed from the owners of protected branches and no longer opens or lands a person's work. Coding agents that landed as zeitgeist log in as their person.
- Asking is off by default.
Quarry-Askleaves/llms.txtanddocs/agents.md. The request store stays: it is what carries a login's approval, a bot's setup and a runner's request. - Pages. "Your agents" becomes two lists, Machines and Bots.
Ceilings, token scopes, setup kinds and the inherit switch leave
every form and page. Their columns stay and implement the role
presets and
--repo. - Fossil compatibility is unchanged. No new card, artifact, pragma
or sync behaviour. A machine token is the password a stock fossil
client sends under the person's own login, as a sync token is today.
The green-landing rule refuses a direct push with the ordinary error
card and readable text, the path RFC 0007 uses, and leaves no byte
in the repository. A stock fossil user pushes a branch with fossil
and lands it with
quarry land BRANCH.
What this supersedes
| RFC | Superseded | Stands |
|---|---|---|
| 0021 | Decision 1 as the way a person's own coding agents work ("one account per agent role ... a coding assistant"); Granting (agent.grant as the common route); Creating an agent for a person's own |
Tokens; what a token may not do, extended by the hard stops; web sign-in; run tokens; forge agents; lifecycle; storage |
| 0026 | Decisions 1 to 5 (a personal agent inherits, a grant narrows, the inherit switch, site powers by inheritance, existing agents) and decision 13 (zeitgeist unchanged) | Dedicated agents (decisions 6, 7), token upkeep and idle lapse (8), the rest |
| 0027 | Asking as how a coding agent works: Asking and What may be asked no longer reach a hard stop; in Limits, asking on by default | The request, its page and its answer, as what carries a login, a bot setup and a runner request |
| 0030 | The kinds table (push, read) and "Whose agent it is" for the approver's own agents; decisions 5 and 9 where they make an agent for a person; decision 23 for a login |
The start, claim and pickup; their limits; bot setup for a repository; the runner installer; reading CI; who am I |
| 0031 | Stage D, steps 11 to 15; The land grant and its seven invariants; decisions 2, 3, 4, 10, 11, 12, 14 and 15; --for on login; "Agents are not made branch owners" |
Stages A, B, C, E, F and G, read with the changes below |
RFC 0028's plans are not superseded and are no longer in the guides.
Risks
- A coding agent's mistake with the person's full rights. Contained by the rule on the branch, not by approval: green landings only on trunk, no override on a token, protection and repository deeds in the browser only, and history that is append-only, so there is no force-push and nothing is destroyed. The worst realistic outcome is a bad branch, or a green and wrong landing that is backed out.
- Green is only as good as the checks. A run uses the workflow files of the branch it tests, so a coding agent can weaken a check in the same landing that needs it. The rule guards against mistakes, not against whoever holds the token. What bounds the rest: required check names are set in the browser only, deploy secrets reach reviewed code only (RFC 0019), and the change is in the landing for anyone to read. A required review is a later branch rule.
- A leaked machine token. It reads the person's private repositories and pushes branches until revoked. It cannot change the password, mint tokens, open a browser session, become a site admin, unprotect a branch, land over red or delete a repository. It is named for its machine, lapses when idle, and one click ends it.
- Someone sends a person a code. The approval now gives a full-rights token, so a code started on an attacker's machine is the attack. Contained as RFC 0030 contains it (a typed code, ten minutes, the miss budgets, a warning when the start came from another network, and the instruction to approve only a machine started just now) and by the announcement email, the Machines list and the hard stops.
- The label is the client's word. It is restricted to a plain alphabet, shown as data, and always beside the address the start came from. It names a token and grants nothing.
- CI is down and trunk must move. The owner overrides in a browser, or turns the rule off there. Both are logged.
- A bot that owns a branch. Only a green branch, only through the accept path, never by override, and any admin revokes it.
- A repository where strangers hold write. Owners still gate who lands. "Anyone lands on green" there wants a required review, which is a later rule and not a reason to keep approvals.
- Old agent tokens linger. They keep working by design. The retired list shows each with its last use, the hard stops bind them, and idle lapse ends the forgotten ones.
Already in flight
| Work | Counts toward |
|---|---|
Branch login-as-me |
Step 1 |
Branch stack-green-prefix: an armed stack lands its green rungs without waiting for the top |
RFC 0031 stage C; closes #467 |
| RFC 0031 stages A, B, C, E and F | Continue, as below |
Build order
Each step is one landing and lands alone. "Sign-off" marks a step that changes something a person sees: the owner approves the real output on real data before it lands. "Needs" lists earlier steps.
- Log in as you. A start of kind
logincarries a label and a pickup code; the claiming person's Approve mints a token on their own account withapiandsync, no ceiling and no repository list, named by the label and collected by pickup; one page, one Approve; the hard stops refuse it; an accept made with it is recorded withvia. Test: the minted token is the claimer's own, unlimited and labelled; a landing armed with it lands as the person and passes the owner check; each of the five stops refuses it; the claim page files nothing to answer elsewhere. Needs: none. Closes #459. - The hard-stop table as one source.
hardStops;browser_onlywithnext.open; every token and every token-bound session bound; the consent sentence generated from the table. Test: hard-stop invariants 1 to 5. Needs: 1. - The audit line, and telling the person. Sign-off. "PERSON via LABEL" on the forge journal, the landing and the timeline's pusher line; an act on a token notifies its person; the email on a new login. Test: one landing opened, armed and landed on a machine token carries the account and the token id at each of the four places; the person's attention stream has the event and a browser act adds none. Needs: 1.
- Machines. Sign-off. The list on the account page with Revoke
and "Revoke all"; a revoked token keeps its label. Test: after a
revoke the next call is refused with a
next, and an armed landing does not land; "Revoke all" ends every machine token and no session. Needs: 1. --repo. A login start may name repositories; the page shows them resolved; the token carries the list. Test: a narrowed token acts on its repository and nowhere else, forge scope included; an address the claimer cannot see reads as missing; no start widens reach. Needs: 2.- The rule on the protection row. Sign-off. Storage, the checkbox, and the refusals: no required checks, the last check removed, a branch a mirror writes. Test: rule items 5 and the mirror refusal; setting it on a token is refused by hard stop 2. Needs: 2.
- The rule enforced. The sync front and the accept path, the sweep included. Test: rule items 1 to 4 and 6. An owner's direct push from a stock fossil client is refused with the error card; an accept over a red, pending, stale or never-run check is refused on a token and in a browser without override; an override in a browser lands and is logged; a landing armed before the checks changed does not land. Needs: 6.
- Turned on, and landings land as the person. The rule is on for quarry's trunk and each deployed repository's deploy branch; zeitgeist leaves their owners; the settings line for a deploy branch without the rule. Test: on a test forge laid out the same way, a machine token lands a branch on green with no approval after login and the landing reads as the person; zeitgeist's token is refused the accept. Needs: 3, 7. Closes #461.
- Bots. Sign-off.
--bot NAME --repo R --role ROLEon the start; one approval by a repository admin; the Bots list on the repository's settings; a bot as owner only on a green branch. Test: the bot's token holds the role's letters on R and nothing elsewhere; a non-admin's Approve is refused; rule item 7. Needs: 7. - A person's agents retired. Sign-off. Making one answers with
quarry login; "Your agents" becomes Machines and Bots with the retired list and its one control; ceilings, scopes, kinds and the inherit switch leave the surface; asking off by default. Test: the refusal carries itsnext; an existing agent's token still works until revoked; no form or page takes a ceiling or a scope. Needs: 4, 9.
RFC 0031's remaining steps
Stages A, B, C and G are unchanged. Stage D is not built. Stages E and F are built as written there, with these changes:
| 0031 step | Change |
|---|---|
16, login and whoami |
login [URL] [--repo R], and --bot NAME --role ROLE after step 9 here; no --for. whoami prints the person, the label and the "cannot" list from the table. Needs step 2 here in place of 0031's stage D |
19, land |
Needs 0031 step 18 only. Does not close #461 |
| 20, the journeys | A person logging a machine in; a coding agent landing a stack; a person asking why not; a coding agent meeting a hard stop and printing the page to open. The approval count is one at login and none after |
| 22, the guides | Lead with quarry login, quarry land and quarry status. Quarry-Ask is not in them |
Done means #398's own test, for landing: a cold agent given only the forge's address lands a branch on green after one approval, and its person can read that it landed as them and from where. #398 and #434 stay open for their other items.
Not in this RFC
- No per-act approval for work done as a person, and no standing grant of any kind.
- No required-review rule. It is the next branch rule if a repository with outside writers needs one.
- No way to lift a hard stop for one token.
- No timer that revokes or deletes existing agents.
- No change to run tokens, runners, or the Fossil wire.
Decisions
Settled by the owner on 2026-11-20:
- A login reaches everything the person can.
--reponarrows it. - Four acts stay in the browser even for the person's own token: changing branch protection, overriding a failing check, deleting a repository or handing it on, and site admin. Managing sign-in and credentials stays there too, as it already is.
- The green-landing rule is turned on for quarry and for every deployed repository.
- Landings are recorded as the person, never as an agent, with the machine's label as the audit detail.
- Logging a machine in is one page with one Approve.
Decided here, reversible:
- The hard stops bind every token, bots' included, with RFC 0021's one exception for a forge agent's site scope. Reason: one rule with no per-token cases is the only kind that stays true, and a bot has no more business unprotecting a branch than a laptop has.
- Required checks count as branch protection. Reason: a token that could empty the list would have overridden every check at once.
- With the rule on, owners cannot push to the branch either. Reason: "only accepts green landings" has to be true of the branch, not of some of the people who write to it.
- The rule needs at least one required check. Reason: otherwise it reads as a guarantee and checks nothing.
- A bot may own only a green branch. Reason: it replaces the land grant's "never over red" without a second record.
- A hard stop is never askable. Reason: asking is what trained the yes; the answer is a link the person opens themselves.
--repois the client's to send, because it can only narrow. Reason: the person should not have to pick repositories on the page to get the default.- Existing agents' tokens are not revoked by this RFC. Reason: nothing should stop working on the day it lands; the retired list makes them visible and one control ends them.
- A new login is announced by email. Reason: the approval gives full rights, so the person should hear of one they did not mean.