- Feature Name:
one-goal-one-consent(a person runsquarry loginonce on a machine and approves once; after that any agent on that machine pushes, opens, arms and lands on green as that person, and the forge says what each landing waits on) - Start Date: 2026-11-20
- Status: Accepted, 2026-11-20, and amended the same day: the land grant of the first text is replaced by a token that acts as the person (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 and 0026 (agents, tokens); RFC 0027 and 0028 (asking your person, requests); RFC 0030 (setup by approval, pickup, the runner installer)
- Amends: RFC 0030 (setup gains kind
me, which makes no agent and mints a token on the approving person's own account with both sync and api scopes; decision 5 stands for agents). RFC 0021 and 0026 stand, and a person's coding agent no longer needs an agent account. - Tracks: tickets #398, #434, #458, #459, #460, #461, #462, #463, #464, #466, #467 and danmestas/zit#356.
Summary
Landing a branch through the forge works, and takes too much knowing and too many approvals. A person's coding agent needed a named agent account, a role, a token per scope and a sign-off for most steps.
This RFC makes the forge work the way gh auth login and
gh pr merge --auto do. quarry login runs once per machine: the
browser shows one page with one Approve, and a token that acts as
the person is stored in that machine's keychain. Any agent on the
machine then pushes, opens landings, arms them and lands on green as
the person, with no further approval. The person's own rights are the
ceiling, a red check is never overridden by a token, and each
machine's token is one row in the person's token list, revocable
alone.
Around that: every refusal names the next step, every open landing
says what it waits on in one sentence the forge composes, a stack is
tested once at its top, and a small client, quarry, has five verbs:
login, whoami, land, status and api. The guides lead with
the client, and each line of them that names a command or a permission
is run by a test.
Nothing changes on the Fossil wire.
Motivation
On 2026-11-20 one agent tried to push a stack to a repository and land it on green for its person. What it met:
- Its push credential, made by setup kind
push, could not call the API. The API answered a bare 401, counted each retry as a failed sign-in, and locked the address out (#458). - A second token, minted with the repository written
OWNER/NAME, reached no repository and failed the same silent way (#462). - A read credential could not open a landing, and nothing short of three grants let the agent arm one (#459, #461).
- Three arming requests were approved and armed nothing: the call
without
ondisarms, and the approval read as success (#463). - A merge conflict arrived as a failed check with no run id (#460).
- The landings had been opened locally and never pushed (danmestas/zit#356).
- A stack of five queued about ten runs of eight minutes each on a runner that takes one at a time (#464).
- An armed landing that was only behind its target sat until someone updated it by hand, and a green rung held by its stack said nothing (#466, #467).
The owner, that morning:
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.
The first text of this RFC answered with a narrow standing grant per agent, repository and branch. The owner accepted it, used the forge for the rest of the day, and then said:
I accepted everything and I'm getting frustrated with this. In gh I just tell my agent to land on green CI and it does so as me, so we need a plan to make this at least as seamless. All of these approvals and stuff are no bueno, and I'm getting too many named agents to follow.
So the bar is gh: one sign-in per machine, then the agent acts as
its person. A grant per goal is still an approval per goal and a named
agent per repository, and both are what went wrong.
The other causes stand:
- No client owns the forge workflow. zit is a version-control
tool; its
landing acceptis the store's merge and knows nothing of the forge's gates. Every agent re-implements the guide's curl. - Refusals state a fact and stop.
- Nothing composes "what is it waiting on". The facts are spread
over
unmet,neverRan,stale,untested,autoBy,autoWaiting,stackArmedByandlanding.conflicts. - Prose is written beside the code.
docs/api.mdis generated and tested;/llms.txtanddocs/agents.mdare written by hand and drift.
Principles
Each is a rule a change passes or fails, with the test that holds it and the build step it lands with.
- Every refusal names the next step. A 401, 403, 404 on a known
route, 409 or 429 body carries
next. Test: a walk of the op registry fails for a refusal path without one (step 12). - One consent per machine, one place to revoke. Test: the journey counts approvals; a machine that takes more than one to push, open, arm and land fails (step 5).
- One sentence, said everywhere. What a machine's token may and
may not do is generated from the token's record. Test: the approval
page,
whoamiand the token's row carry the identical string (step 3). - The person's own rights are the ceiling. The token is the person less a fixed list, never more. Test: for every op, a call on a machine token is admitted only where the same person signed in would be (step 1).
- Asking never makes things worse. A valid credential at the wrong door is told what it is and is not counted as a failed sign-in (landed, #458).
- Every wait names who or what it waits on. Test: over a matrix
of landing states, no open landing lacks
waiting.onand a non-emptynext(step 6). - A command finishes the goal or says what is left. No exit 0
with a silent second step. Test: each client verb's journey ends in
"done" or in a
nextline (step 5). - What the client does, curl can do. The client holds the token
and calls zit; rules and sentences live in the forge. Test: the
client prints the server's
nextandwaiting.saybyte for byte, and a build check refuses a sentence template under the client's package (step 3). - A doc line that names a command or a permission is run by a
test (steps 14 and 15). A
nextnames a client command only once the client has that verb. - Answer on the surface already in hand. This RFC adds no page: every step names the existing page, op or download it changes. Held in review, not by a test.
- The forge tells the asker; nobody polls the person. When a
landing is armed, lands or stops, or a request is decided, the
account that acted is told on its own
me.attentionstream at once, with what took effect and which token did it.quarry status --watchandquarry land --watchfollow that stream, never a polling loop. Test: for each landing transition in the step 6 matrix the stream carries one event naming the new state, and the client's watch exits on it (steps 4 and 6).
Design
quarry is the client. Each example shows the whole output. The
repository dmestas/website and the machine mac-mini are
placeholders.
Acting as the person
quarry login is the forge's gh auth login.
$ quarry login
Open https://zeitforge.app/setup/KQ4T-9XWM and approve (10 minutes)
Waiting for your approval ...
Signed in to zeitforge.app as dmestas, on mac-mini.
may what you may: push, open landings, arm them, land on green
may not override a failed check; change your password or tokens;
approve requests
token "mac-mini" in the login keychain; ends after 90 days unused
revoke https://zeitforge.app/me
Next: quarry land
One approval. The client makes a pickup key and starts a setup of
kind me (setup/start, RFC 0030), sending a label. The link opens
one page for a signed-in person: the code to compare with the
terminal, the label, the sentence, one Approve. There is no agent
name, no repository to pick and no second request to approve. The
token is collected by pickup and never shown in a browser or printed.
The token. One token on the person's own account.
- Scopes:
syncandapi, sozit push,fossil pushand the API all work with the one credential. - Reach: every repository the person may reach, including ones made
later, as
me.sync.tokenreaches today. - Label: the machine or the terminal session it was made for, such
as
mac-miniorpi-c. The client offers the host name;--labelor the approval page changes it. One label, one live token: logging in again under a label replaces that token. - Store: the OS keychain, or a 0600 file where there is none. Every
agent on the machine uses it through
quarryand through zit's saved remote. - Life: it ends after 90 days unused.
Acting. A call on the token is a call by the person. Roles, branch ownership and repository visibility are read for the person at every call, so the token never outlives or exceeds them. Landings it opens are the person's; arming and accepting are the person's.
Limits. A machine token cannot:
- override a failed, stale or missing required check, or use
overrideon any call; - write a protected branch that has required checks over sync: there it lands through the forge's accept path, and a pushed merge is refused with that hint;
- change the account's password, email or sign-in methods;
- mint, replace or revoke tokens, other than ending itself;
- approve a request, a sign-off or a setup code;
- sign in to the web;
- administer the site or delete a repository.
Each refusal carries a next naming the signed-in page where the
person does it themselves.
One list, one revoke. /me already lists the person's tokens
(me.sync.token.list). Each machine token is a row there: label,
scopes, made, last used, and Revoke (me.sync.token.revoke with its
id). Revoking one leaves the rest working, takes effect on the next
call, and disarms the landings that token armed.
Audit. Every write made with a machine token records the person and the token: "accepted by dmestas via mac-mini token" on the landing, the timeline and the settings log. It is never recorded as an agent account.
Named agents. An agent account is for an unattended bot that must
not be a person: a CI runner, the forge's own agent. Nothing creates
one by default, and quarry login never does. Setup kinds push and
read, agents and Quarry-Ask sign-offs (RFC 0027, 0028, 0030)
remain for a credential deliberately narrower than its person. They
are no longer how a person's coding agent works.
Migration. Agents that were made per repository only so a person's
coding agent could push or land are retired by that person once the
machine has run quarry login: Your agents lists each with its last
use, and retiring one revokes its tokens. Nothing is retired
automatically. docs/agents.md carries the note (step 15).
Security invariants
Each has one test named for it, landed with the step given. Step 2 ends with a reviewer who did not write steps 1 and 2 trying each one; every finding becomes a test.
- A landing is recorded as the person. A landing accepted or armed with a machine token names that person, with the token's label as the audit detail, never an agent account (step 2).
- The person's rights are the ceiling. No op admits a machine token where it would refuse the same person signed in, and a right the person loses is lost by the token at the next call (step 1).
- It never lands over red. An accept by a machine token needs
every required check on the target green for the exact check-in
that would land. Pending, stale, never-ran and conflict all refuse,
overrideis refused, and the sweep re-reads the checks, the person's right and the token when an armed landing lands (step 2). - It never writes a checked branch over sync. On a protected branch with required checks, a machine token's pushed merge is refused as a non-owner's is (step 2).
- It cannot widen or keep itself. It cannot change the account's password, email or sign-in methods, mint or replace a token, approve anything, or sign in to the web (step 1).
- It is revocable in one place. One row, one Revoke; the next call is refused and what the token armed does not land (step 2).
- Every action names its token. No write made with a machine token is recorded without the token's id and label (step 2).
Unchanged and relied on: a token value is never printed or passed through a person, approval happens only in a signed-in browser or the phone app, and a start lapses ten minutes after it is made.
Refusals carry next
writeError and writeCodedError take an optional object:
{"error": "this is a sync token; the API takes an api token",
"code": "wrong_scope",
"next": {"say": "Sign this machine in once; it then pushes and calls the API as you.",
"call": "POST /api/v1/setup/start",
"cmd": "quarry login",
"ask": false,
"help": "/llms.txt#credentials"}}
say is one sentence. call is the API call that takes the next
step. cmd is the client command for it, present once that verb
ships. ask says whether the same call sent with Quarry-Ask would
be admitted. help is an anchor, never the top of a page.
- Wrong scope and the 429 hold are landed (#458): a valid token at the wrong door is told so and not counted as a miss.
- Empty reach. A token whose stored repositories match none gets a 403 that says so (landed, #462).
- 403. The capability sentence gains
askand the call that asks; for a machine token at one of its limits, the page where the person does it. - 404 on
landing/{64 hex}. Says the landing may exist only in a local store, and to push. - Sync refusal on a protected branch. Told "land it on the forge", with the call.
What a landing is waiting on
landing.get and landing.list gain
"waiting": {"on": "checks", "say": "check \"test\" is running, 2m",
"who": "", "next": {...}}
on is one of checks, conflict, approval, stale, never_ran,
stack, protection, nothing. The server composes it from fields
that exist. The landing page's header, the email and the push
notification print say.
- A conflict is a state of its own with its files, never a failed
check, and
landing.updatesays before writing that the merge would conflict and where. - Every check carries its
runId. - An armed landing that is only behind its target updates itself when
the merge is clean, and re-runs its checks (#466).
staleis shown only when it could not.
$ quarry status !43
!43 parse-docs -> trunk open, not landing
blocked conflicts with trunk in internal/web/web.go, docs/api.md
next zit merge trunk, resolve, zit commit, quarry land
A stack is tested once
An open stack gets one run: its top merged onto the stack's target. When that passes, every rung is green by inclusion. Branch runs and pair runs of the rungs below are not queued. A moved rung restarts the top's run and no other.
Green by inclusion holds only for landing the stack whole. A rung that
is to land without the rungs above it, or that leaves the stack, gets
its own run against the target first, and waiting says so (stack,
then checks), so a held rung is never silent (#467) and no check-in
reaches a branch that was not tested as the thing that landed.
The client
Five verbs in a new internal/forgeclient beside
internal/pickupclient, in the quarry binary and in the small
static download the forge serves at /runner/. That download becomes
quarry, a client-only build; quarry-runner stays as an alias.
| Verb | Does |
|---|---|
login [URL] [--label NAME] |
Makes a pickup key, starts a setup of kind me, prints the link, waits, collects, stores the token in the keychain, saves the zit remote and login |
whoami |
me.account and the sentence: who, which token, may not, token life, revoke link |
land [BRANCH\|!N] [--stack] [--watch] |
Pushes if the forge lacks the tip, opens a landing if none is open, arms it, says what it waits on |
status [!N] [--watch] [--log] |
Prints what the landing waits on; --watch follows the event stream to the outcome; --log prints the failed step's tail |
api METHOD PATH [-d JSON] |
Any op with the stored token, never on the command line |
$ quarry land --stack
Pushed 3 branches to dmestas/website.
!41 parse-fix -> trunk opened
!42 parse-tests -> !41 opened
!43 parse-docs -> !42 opened
Armed. The stack lands itself when its top is green (build, test).
Follow it: quarry status !43 --watch
Rules:
- No logic the API lacks. Errors print the server's
next; status prints the server'swaiting.say. - No approving from the terminal. The one approval is in the browser, where a signed-in person is proven.
--helpon each verb fits one screen and ends with an example.-F jsonon every verb. Exit codes followpickupclient: 0 done, 1 refused, 2 usage, 3 still waiting.landexits 0 once armed; with--watchit exits non-zero if the landing does not land.- Five verbs. A sixth needs a journey that fails without it.
zit lists login, land and status as pass-throughs, the way
zit ui runs quarry ui. The code is quarry's: zit carries no forge
call, no token store and no pickup, and a stock fossil user lands
without zit.
Guides proven by code
/llms.txtopens withquarry login,quarry landandquarry status. The wire format moves behind one link, to anchors in the generateddocs/api.md, and stays tested.- Commands in
/llms.txtanddocs/agents.mdare extracted and run against a test forge. "Who may" claims are a table checked against the registry'sCapsandAuth. GET /api/v1gains each op's needed letter, whether a machine token may call it, and whether an agent may ask for it.docs/landings.mdnames the forge path first and no longer giveszit landing acceptas the way to land on a forge.
Fossil compatibility
No wire change: no new card, artifact, pragma or sync behaviour. A
machine token is a login and a password to a Fossil client, as a push
token is today, and its limits, waiting, next and the stack run
are forge records and API fields outside the repository. The one sync
decision added is a refusal a stock client already meets: a pushed
merge onto a protected branch, refused with a readable message. A
stock fossil user pushes a branch with fossil and runs quarry land
BRANCH.
Landed
Not repeated as steps:
| Work | Holds |
|---|---|
next on errors; wrong_scope and the 429 hold carry it; a wrong-door token is not counted toward the lockout (#458) |
Principles 1 and 5 |
OWNER/NAME resolves on token and grant ops; empty reach is a 403 that says so (#462) |
Principle 1 |
landing.auto requires on; a decided request says what happened, in the past tense (#463) |
Principle 11 |
| A token is replaced with one approval; a repository-limited token reads its own sign-offs | Narrower credentials |
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; a step with none can start now.
Stage A. Acting as the person
- A person mints a token as themselves, by pickup. Sign-off for
the approval page.
setup/starttakes kindmeand a label and makes no agent; one page with one Approve mints a token on the approving person's account, scopessyncandapi, labelled, collected by pickup; the fixed limits on the account, tokens, approvals and site administration; the token is a row inme.sync.token.listwith its label, revocable by id. Test: an approved start yields a token whoseme.accountis the person, that pushes with zit and calls the API; invariants 2 and 5; revoking it leaves the person's other tokens working. Needs: none. Closes #459. - Recorded as the person; never over red. "accepted by PERSON via
LABEL token" on the landing, the timeline and the settings log;
overrideand a pushed merge onto a checked branch refused; the sweep re-reads checks, right and token; a revoke disarms. Then the review of the invariants. Test: invariants 1, 3, 4, 6 and 7. Needs: 1. forgeclient, the client-only build,loginandwhoami. The/runner/download becomesquarrywithquarry-runneras an alias. From here anextmay carrycmd. Test: against a test forge,loginends with a stored token and no value on the terminal; principle 3; principle 8's build check. Needs: 1.landandstatus.statusprints the landing's state and checks as the server gives them, andwaiting.sayonce step 6 lands. Test: from a checkout with an unpushed branch, one command ends with the landing open and armed as the person;--stackopens a chain and arms it;--watchexits when the landing lands; a refusal prints the server'snext. Needs: 2, 3. Closes #461.- The journey runs in CI. A cold machine given only the forge's
address:
login, one approval,land, landed on green, recorded as the person. Approvals counted. Test: principles 2 and 7. Needs: 4.
Stage B. What it is waiting on
waitingonlanding.getandlanding.list. Test: the matrix of principles 6 and 11. Needs: none.- Conflict as a state, the update preflight, and
runIdon every check. Test: a conflicting branch readswaiting.on: conflictwith its files and has no failed check;landing.updaterefuses beforehand and names them; every check has a run id that fetches its log. Needs: 6. Closes #460. - An armed landing updates itself when the merge is clean. In
flight. Test: an armed landing three check-ins behind lands with no
call from anyone; one that conflicts reads
conflict. Needs: none. Closes #466. - The landing page, email and push print
waiting.say. Sign-off. Test: one landing in each state shows the same string on all three, by data hook. Needs: 6, 7.
Stage C. A stack is tested once
- One run at the top. In flight. Rungs green by inclusion; branch and pair runs of lower rungs not queued; a moved rung restarts only the top's run. Test: a five-rung stack queues one run; moving rung two cancels and queues one. Needs: none.
- A rung landing alone is tested alone, and a held rung says so.
In flight. Test: accepting rung one of a green stack by itself
does not land until its own run is green; a rung held by its stack
reads
waiting.on: stack. Needs: 6, 10. Closes #464 and #467.
Stage D. The rest of the refusals, and api
askon a 403, the local-only and forge-path hints, and no refusal withoutnext. Test: the registry walk of principle 1; the 404 on a 64-hex landing id and the sync refusal on a protected branch each carry theirnext. Needs: none.quarry api. Test: a call lands with the stored token, and the token never appears in the process list. Needs: 3.
Stage E. Guides proven by code
GET /api/v1carries letters, machine-token reach and askability; the permission table test. Test: changing an op'sCapswithout the guide fails. Needs: 1.- The guides lead with the client, and the migration note.
/llms.txt,docs/agents.mdanddocs/landings.mdas under Guides proven by code; when an agent account is still right, and how to retire the per-repository ones. Test: extracted commands run green;/llms.txtis shorter than at the start of this RFC. Needs: 5, 14.
Stage F. The zit seam (landed in zit's repository, tracked there)
zit landing openpushes, or says plainly that it has not. danmestas/zit#356. Needs: none.zit landing acceptwith a saved remote says it merged locally and that no forge gate was consulted. Needs: none.zit login,zit landandzit statuspass through toquarry. Needs: 4.
Done means #398's own test, for landing: a cold agent given only the forge's address lands a branch on green as its person, with one approval and no question to anyone. #398 and #434 stay open for their other items.
Not in this RFC
- No land grant, no setup kind
land, and no standing-approval engine. The person's token replaces them. - No agent account is made for a person's coding agent, and agents are not made branch owners as a way to land.
- No scopes to choose at login. One kind of machine token; a narrower credential is an agent's.
- No forge call, token store or pickup in zit.
- The client does not mirror the API: five verbs, one of them
api. - No MCP server, SDK, TUI, dashboard or second documentation site.
- The sign-in limiter is not loosened in general.
- A new confusion is not answered with more prose in
/llms.txt: the refusal is fixed, or the line is generated.
Decisions
Settled by the owner on 2026-11-20 ("Yes, build it all"), and standing:
- The forge workflow lives in a small quarry client. zit lists
login,landandstatusas pass-throughs, the wayzit uiruns quarry. - A valid token at the wrong door is not counted as a failed sign-in.
- The verbs are
login,whoami,land,statusandapi. The download isquarry, client-only, withquarry-runnerkept as an alias. - No approving from the terminal. Approval stays on the web or the phone; the terminal prints the link, waits, and prints the outcome.
/llms.txtleads with the client; the wire format is one link away and still tested.
Settled by the owner later on 2026-11-20, superseding the first text's
decisions 2, 3 and 4 (the land grant, what it covers, setup kind
land) and its decisions 10, 11, 12, 14 and 15, which only served
them:
- The gh model.
quarry loginruns once per machine with one browser approval and mints a token that acts as the person, with sync and api scopes, kept in that machine's keychain and labelled by machine or session. Any agent on the machine pushes, opens, arms and lands on green as the person with no further approval. - The person's own rights apply and are the ceiling. Protected branches still need their required checks green, and nothing overrides a red check unless the person does it themselves, signed in.
- Landings land as the person. A landing accepted or armed with a machine token is recorded as that person, with the token and machine as the audit detail, never as an agent account.
- A person's machine tokens are one list under their account, each revocable alone.
- Named agent accounts are for unattended bots that must not be a
person. Nothing creates them by default. Per-repository agents
made for a person's coding agent are retired, with a migration
note; narrower credentials and
Quarry-Asksign-offs remain for what they alone do.
Decided here, reversible:
nextcarries the API call from the start and the client command only once the verb exists. Reason: a refusal must not name a command nobody can run.- A machine token cannot change its account's password, email or sign-in methods, mint or revoke other tokens, approve requests, or sign in to the web. Reason: a token copied off one machine must not be able to keep the account or approve its own asks.
- A machine token does not administer the site or delete a
repository. Reason: neither is part of pushing and landing, and
ghleaves deleting a repository out of its default sign-in too. - A machine token lands on a protected branch with required checks only through the forge, never by a pushed merge. Reason: otherwise "never over red" holds on one door and not the other.
- Revoking a token disarms what it armed, and the checks, the person's right and the token are re-read when an armed landing lands. Reason: a token is revoked because its machine is no longer trusted.
- One label holds one live token; logging in again replaces it. Reason: the list stays one row per machine.
- Testing a stack once (#464) is its own stage. Reason: "green" for a rung has to mean one thing before anything lands on it unasked.