Contracts and invariants

Read this register before investigating or changing the project. Follow the specifications for the area you touch; they own protocol details. Workspace and scope rules belong to AGENTS.md.

Use this checklist when reviewing a change; each ID links to its limits, specifications, and checks.

ID Rule
C-01 Keep durable workflow state in the issue's workflow label and pinned JSON comment.
C-02 Orchestrator relabels leave at most one current workflow label and preserve repository labels.
C-03 Change current formats and public names only deliberately; never treat unsupported input as current.
C-04 Authenticate pinned state separately from the allowlist that controls issue and comment input.
C-05 Run pollers on one host with the same explicit WORKTREES_DIR; hold claims from first read to last write.
C-06 Treat unconfirmed writes as unknown; read back what landed before retrying publication.
C-07 Agents never push; the orchestrator never merges PRs and checks the commit and remote head before pushing.
C-08 Update reply parsers when prompts change the reply format.
C-09 Bind approval to one PR head, requirements revision, and developer report backed by passing verification.
C-10 Honor paused/backlog, each dependency hold, and each park's recorded reason for waiting for a human.
C-11 Never load a GitHub token (GITHUB_TOKEN or its aliases) from .env.
C-12 Keep logs and analytics out of decisions; read the audit log only to avoid recording a base rebase twice.
C-13 Import shared helpers from the module that defines them; read settings through orchestrator.config.
C-14 Resume sessions with their pinned command's original backend and arguments.
C-15 Never refund charges against an issue's lifetime MAX_AGENT_RUNS_PER_ISSUE budget.

Terms used here

  • Tick: one polling pass over a configured repository.
  • Pinned state: the workflow's JSON record in a dedicated comment on the GitHub issue.
  • Writer claim: a per-issue exclusive lock under WORKTREES_DIR; it only excludes pollers on the same host using the same WORKTREES_DIR.
  • Pinned command: the agent backend and command-line arguments saved in pinned state when a role first runs.
  • Park: a recorded wait for human action; its reason determines what action allows work to resume.
  • Requirements revision: a content hash identifying the issue requirements and human guidance handed to an agent.
  • Host records: local files under WORKTREES_DIR that coordinate pollers or retain recovery state.

C-01: Durable workflow state and recovery

Rule: Keep durable workflow state in the issue's workflow label and pinned JSON comment.

Why: Progress stays visible to humans without another authoritative workflow database.

Limits: Recovery also uses per-issue worktrees, host records under WORKTREES_DIR, and the audit-log read-back in C-12. Treat WORKTREES_DIR as state and follow its cleanup rules. The pinned comment admits only supported version-1 records authored by the orchestrator token account; malformed or unsupported pinned comments are preserved unchanged and never overwritten, duplicated, or silently upgraded. A captured developer completion (developer_completion) is the pinned record of one returned report alone: only its confirmed capture, or that capture read back after an unconfirmed write, carries the report and what its road froze, never a log, analytics, a native session, a trajectory, or a host record. Only the first implementation, an implementing resume, the fix a reviewer's change request hands its developer -- the run its handoff launches, and the resume that finishes its parked round -- the resume answering a pull request's human feedback, a requirements-drift resume on implementing, validating, in_review, or resolving_conflict -- the replies that remain its continuation included -- the fresh report a rewritten head's refresh asks for, and the developer revision a human's guidance buys under a late adjudication capture one, as their developer returns. The dispatcher's recovery reads a pending capture through that read-back alone. A decomposer manifest correction (decomposer_correction) is recovered from its pinned record alone -- the parser's error its correction is asked about included -- never a session id, a request fingerprint, a log, analytics, or an in-memory count, and whether its one launch started from the ledgers beside it -- the owed start, the run count and its reservation's phase, the usage meter, and the usage receipts -- so a start one of them no longer records is still read off the others, and a park over it from the receipt its notice ends on.

Specs: state, restarts.

Checks: pinned state, quota recovery, completion captures, capture recovery, captured attempts, captured fixes, captured feedback, captured drift, captured refreshes, captured revisions, correction recovery, recovered corrections.

C-02: Workflow labels and transitions

Rule: Orchestrator relabels leave at most one current workflow label and preserve repository labels.

Why: Routing stays predictable without erasing repository metadata.

Limits: A workflow label is a current WorkflowLabel member or its exact canonical string, and a control label a ControlLabel one; seven carry no prefix and are canonical as spelled: in_review, question, discussion, done, rejected, backlog, and paused. Every other name is repository metadata, an obsolete bare spelling such as ready or fixing included: it selects no stage, authorizes no artifact ownership, and survives every relabel, alone or beside the canonical label of the state it resembles. Human edits can leave multiple workflow labels; readers tolerate them. So can a crash inside the label move a dependency release or a blocked parent's return to workflow:ready makes: it adds the new label before it takes off the one it replaces, so that no hold applied meanwhile is written away, and the issue's next relabel takes the extra one off. Guard exemptions are listed in the label specification.

Specs: labels and guards, obsolete labels.

Checks: label writes, guards, resolution.

C-03: Persisted and externally consumed formats

Rule: Change current formats and public names only deliberately; never treat unsupported input as current.

Why: Live issues and external consumers depend on the formats the current release writes, and unsupported input taken as current could start work or license an irreversible effect.

Limits: Current formats include pinned-state keys (with explicit integer schema_version: 1), workflow labels, comment markers, watermarks, event formats, branch/ref names, host record formats, agent command specs, and logger names. Public Python names are the explicit __all__ exports C-13 covers: orchestrator.agents publishes its result model as AgentResult alone, orchestrator.github publishes PinnedState, built from keywords and carrying its payload as state_data alone, and the agent runner and the scheduler's submit take only their typed records, AgentRunOptions and SubmissionRequest; no keyword form or attribute beside them is a current call shape. An internal refactor changes none of them; a deliberate change updates the affected contracts, specifications, and tests with the behavior.

The 1.0 release preparation supports current formats only: breaking changes have already landed, and earlier state has no promised conversion or continuity. Pinned-state admission accepts only version 1; records missing schema_version or carrying non-integer, float, boolean, string, or unsupported integer versions are refused, preserved unchanged, and cannot authorize work or dependent effects; ordinary dispatch refuses such an issue from the reading taken under its writer claim, before any guard, reconciliation, or handler acts, and holds every later reading it acts on to admission too. The base refresh refuses one the same way, before any route reads a branch, pull request, or recovery anchor off it, and the base fetch every worktree shares licenses nothing on its checkout or refs. Genuine new pins are stamped with version 1 on first write. Cleanup that removes a historical format, alias, or Python call signature needs no compatibility reader, migration, or final 0.x release. A contract for current output does not oblige readers to accept earlier formats, nor functions to accept callers' obsolete argument aliases. This decision sets no compatibility or deprecation policy for later releases. Historical forms the runtime still reads stay documented in their specifications until their owners remove them. Analytics and trajectory readers interpret only what current producers write: a field a producer did not report is unknown rather than inferred from another (a skill load is no evidence of its offer), and a row narrower than its query's SELECT list raises rather than reading as NULL. A current optional field's absence, an ID-less CLI run, an unpriced cost, and a malformed record's containment remain current answers. A trajectory record's request_usage is read only as its collector wrote it: absent is a run whose requests were not collected -- every record an earlier build wrote, a Codex run's included -- never an empty breakdown, and nothing infers or backfills one. The Codex request collector reads only the native session log the trajectory sink's reader hands it, which looks a log up by the session id the run returned alone, under the CODEX_HOME the launch's effective environment named, and adopts one regular file of exactly that session's name -- a resume's only the very file its launch counted, neither replaced nor shorter -- never a nearby name, a worktree, a branch, or another session: a run that returned no id, or whose launch was not observed, is looked up nowhere, and a lookup or read bound reached, or a log missing, unreadable, or found twice under any dates, is stated as such, never filled in. It attributes only what it proves: a sample is a token_count the invocation's own lines of a native session log reported, and its scope attributes a line to an invocation only under proof: the log's first line a session_meta naming the session the run returned, and the launch facts the tracked spawn observed just before the process started -- a fresh run's whole log, a resumed run's lines past the whole lines its log held at the launch -- with every stamp agreeing with that placement and the root turns it opened with stdout's turn.started lines. A resume with no count of a line or more, a log not the session's own, a log read whole that is shorter than the count, a stamp the clock contradicts, a turn stdout's count does not account for, or usage settled in no turn the invocation opened -- none at all, an earlier invocation's left open, or one a usage record names -- or a child turn started from one, attributes nothing, never a guessed suffix. A report among overlapping turns no record tells apart, a usage record naming its turn by an id the scope refused and the report after it, any usage line past a line no reading could place before a root turn opens, and any past a child turn the scope's bound refused settle in no turn, and past either no usage line or child turn's start is taken for another process's. A report settled in no turn, repeating its branch's running sum, not proven to advance it by its own counters with at least one of them moving and within what its branch's earlier requests, an earlier invocation's included, establish the sum holds, giving counters an earlier request whose usage record no report answered could repeat, on any branch while that request is left -- a record repeating its request's counters, each report of a record's own branch whose running sum rises past the most that branch's earlier reports establish answering the invocation's own earliest record whose counters it could give, else the earliest earlier one whose counters it could give, as no repeat, proven current or not, no sparser sum, no sum climbing back after shrinking, no report naming no running sum, and no report of another branch does, and a record placed on no branch none, since a late report settles in whatever turn is open, a child turn opened after it included -- or answering such a record itself, any once another branch has reported -- a report naming no running sum, or whose info is no object, included -- as a repeat of any of that branch's reports could be, short of the invocation's own record awaiting it on its branch, giving counters any record of the invocation's another branch awaits could repeat, following a running sum smaller than an earlier one or than the request reported beside it, or the first of its branch past a line no reading could place or a report no branch takes is no request, its evidence kept as a gap, so no earlier invocation's request is copied into a later one; a running sum is a checkpoint, never a request size or a compaction, reconciled with the invocation's own thread samples only where the sum it began from is proven; and neither a token_usage_record's counters nor stdout's cumulative turn.completed is ever a sample or a request size. Within the shared request-usage format a counter a sample did not observe is unknown rather than zero, a common total sums only observed non-overlapping counters and never the provider's own total, a model the stream did not establish is none rather than another conversation's or branch's or one taken from unrelated data, a coverage short of complete or complete-empty or a scan scope short of invocation never reads as the whole invocation -- a native log no proof places the invocation in covering none of it, whatever lines were read -- an output-only sample establishes no context input, and a marker or aggregate checkpoint is never a request. A Claude sample's output is final only where the message_delta closing that message, its subagent hand-back, or a modelUsage remainder the run accounting attributes to it as its model's sole open message settles it -- every request the collection holds among those it sums, and the collection's own counts of them reproducing that remainder -- and no result.usage or modelUsage total is ever divided among requests or recorded as one. A record marked stream_refused is a run whose stdout the usage parser refused: its run published no total and reconstructed no timeline, so it carries no run_usage and no steps, only the request usage collected past the refusal, which names no trajectory turn. A usage estimate prices a model only through an active price-catalogue row naming its exact ID, documented alias, or published snapshot; an unknown version, an arbitrary suffix, or a dormant row is an unpriced cost, never another row's rates. A Claude estimate prices each usage row on its own, a run and its turns alike: a cache write at the lifetime its usage block reports as a whole number, a write it reports no lifetime for at neither lifetime's rate, a block whose lifetime split contradicts its aggregate at no rate at all, and a request-tiered rate only on one API message's own prompt, never on a result total or an output-only hand-back. A Codex estimate prices a run's last usage record once, as the sum of every request it covers: on a model charging cache writes by lifetime, a write only at a lifetime the record reports, never one the CLI's flat count or its zero leaves unknown; reads and writes past the input at no rate at all; and a request-tiered row's base rates only where the record's input keeps every request at or under its threshold, the tier's rates never. An Antigravity estimate prices a run's own completed steps once, each once however often its frame repeats, as the Gemini API model its one CLI slug is documented as -- cache reads beside the input at the cached rate, thinking inside the output -- and only over a usage span one dated row is in effect for on every date it touches in any time zone: a slug no SKU is established for, such as Gemini 3.7 Flash or 3.1 Pro, another provider's model, mixed or unnamed models, a run spawning a subagent, a step reporting no count or a negative one, and a run with no span are unpriced. A usage record states what its cost and counters mean in its cost_evidence and token_evidence, which UsageMetrics, each TurnUsage, the agent_exit record, and the trajectory run_usage serialize alike: a CLI-reported amount, an explicit zero included, outranks an estimate and is labelled CLI-reported, never a verified bill; an estimate is a token-only Standard API list-price equivalent on its provider's basis; an unpriced cost states no complete amount; no-usage stays its own answer; and a counter no usage payload reported is missing evidence, never a reported zero. An unpriced cost states why as well: the estimator evaluating a new run records every reason that applies from a closed vocabulary -- a missing model price, an indeterminate request tier, and a missing cache-write count or lifetime among them -- each beside the model it concerns, which UsageMetrics, the agent_exit record, and the trajectory run_usage carry as unpriced_reasons on exactly the unpriced runs; a CLI-reported amount, an explicit zero included, leaves none. An unpriced record without them -- every one an earlier build wrote -- gives no reason and reads Reason unavailable, an entry the vocabulary does not write is none, and nothing re-estimates or backfills one. A record without that evidence -- every one an earlier build wrote -- is read with an unknown basis and completeness, its cost_usd kept under that basis, and with a cache overlap nothing establishes, so its tokens total only where no cache counter is nonzero: no provider breakdown, completeness, or overlap is inferred from its cost_source, backend, or models, and nothing backfills it. The analytics sync files that evidence on each agent_exit row as those readers read it -- an amount per basis, an estimate's rate-verification dates, the completeness, and the non-overlapping token total -- and the agent-run view, the daily rollup, and the read model's cost and token reductions sum and count those columns, never cost_source alone: a reduced cost keeps each basis apart and the weakest completeness any run states, an empty cohort stays apart from a complete zero, and a token sum keeps the runs whose total is unknown beside it. The issue cost ranking orders in SQL, ahead of its cap, on every amount an issue's runs state -- a subtotal at its known part, an issue stating none after every one that does -- and a listed or traced run reads its own row's evidence, never a figure repriced from its tokens. Each grouped breakdown -- by stage, backend, repository, and review round and role -- reduces its group's runs through those same reductions, a ratio of its cost or tokens is qualified or unavailable where either side falls short, and the cache and non-cache split of its amount is that stated amount allocated by its runs' declared token share, never a measured cache charge, the amount of a run whose total is unknown left unsplit. A row an earlier sync stored without those columns reads as unknown, its cost_usd under that basis and its token total unknown, and nothing re-derives, reprices, or converts it. An issue's pinned usage totals keep what its runs' evidence states: issue_cost_evidence is their costs reduced alike, in the shape a usage record's cost_evidence takes, and issue_total_tokens adds only non-overlapping totals, issue_total_tokens_unknown_runs counting the runs it lacks; the terminal receipt words that cost as the trajectory viewer does -- an Antigravity-only total a Gemini API token estimate, a mixed one blended with each basis's amount beside it, and a short one a subtotal -- never a merged figure. The analytics dashboard shows each amount as its figure and the short status its own runs earn -- a subtotal, an unknown completeness, or, where none is stated, unpriced, no usage, cost unknown, or no runs, never a zero -- and names bases, each basis's part of the filtered selection, the selection's runs by completeness, and its unpriced runs counted by model and recorded reason over the whole filtered selection rather than the listed runs once, in its collapsed Cost details section, where neither an estimate nor a CLI-reported amount is called a verified charge; a listed run names its own reasons beside its cost. Totals an earlier build counted keep no evidence and read as one record without it, their cost under the unknown basis and completeness and their overlap unknown, nothing inferred from issue_cost_sources; the first run counted over them folds that reading in once and keeps their number in issue_unevidenced_runs, so no later run makes them known, and no posted receipt is rewritten. A recorded requirements fingerprint (user_content_hash, observed_user_content_hash) is compared with the current fingerprint alone, which leaves bare operator controls out: a value no current reading reproduces -- one an earlier producer wrote counting a bare /orchestrator continue included -- is drift for the stage's deliberate drift or hold route, and is never recognized as covering the thread, rewritten in the current spelling, or a baseline a retry is folded into. A first drift check recording the thread it meets where no reading is recorded, and the observed reading a late adjudication keeps in a missing baseline's place, remain current initialization and recovery. Verification artifacts are read only in the compact format, their commands decoded from the hidden payload alone: a comment without it, one an earlier build published with its commands in view included, is left untouched and is no artifact for verification, a reviewer's reuse, an approval, or a recovered settlement. No missing field marks human feedback consumed or names a delivered batch, and no bounded prompt's omission counts as delivered: the PR-feedback readers count as delivered only the stretch of the issue thread a developer prompt was handed, above delivered_after_comment_id through delivered_through_comment_id -- recorded by the first prompt from the newest comment its excerpt cut, moved by a later settlement, resume, or park walk only where nothing unread stands between it and what that road read, and never by a pickup, a handoff, or a park's stamp -- while parks and resumes wait on the reply boundary last_action_comment_id alone, which counts nothing as delivered; a record missing either end counts nothing. An in_review watermark a manual relabel or an approval that could not read its pull request left unset is initialized from recorded delivery alone -- the orchestrator's own posts, that delivered stretch, and bare run-grant controls, never a comment's age nor anything above what its two thread reads prove complete -- with the review surfaces scanned from 0. A fix round's settlement moves pr_last_comment_id over nothing above what its thread and pull-request reads prove complete, so an issue reply landing between them is left to the next scan, and a /orchestrator continue replay is rebuilt only from the id lists its route recorded, a list missing or damaged replaying nothing. A captured feedback round's recovery settles only the pairs its launch froze, never a rescan, so nothing posted after the scan is recorded as delivered, and a captured drift resume's recovery settles the frozen reading its run was handed, never a newer one: an in_review resume's carry crosses the comments its prompt quoted on either surface, read back over the two stretches its launch froze -- the issue thread's above what the excerpt left out, and the pull request conversation's -- and no comment written since. An approval or permission is read only as its current writers record it whole: no approval record, an approval beside no evidence claim, a late_approved_sha with no late_approved_basis this build can read, and a rewrite permission beside an attempt record with no declared terms are each no grounds -- never an earlier producer's default -- and authorize no publication, transfer, or ready notification. An exempt commit with no semantic identity, the settlement's when fingerprinting fails, stays a current record that exempts that commit alone. A recorded decomposition outcome is read only whole, under the manifest contract its reply was held to: a split child with no stated depends_on list, a late slice with no estimated_added_lines, and a late single with no split_blocker are no outcome, so nothing is created, released, parked, or announced on one, and a park waiting on one comes down -- the candidate is adjudicated again before a split transaction begins, and once one has begun the issue parks over what it made, whatever spelling its recorded verdict is in. A split's recorded children beside no integer expected_children_count -- the count every split writes before its first create -- is no finished split: recovery parks it with every child kept, adopting, seeding, or finalizing nothing. A late pull-request hold is recognized only in the two spellings this build writes, on either side of publication; a description in any other is never rewritten, released, or restored over: its hold marker refuses capturing it as somebody's description and, on an open pull request, holds every release that would drop the preserved copy. An optional rationale, an omitted ordinary umbrella flag, an ordinary child with no budget, and no split marker at all for a split that never started remain current answers. A usage receipt ledger (issue_usage_receipts) is read only in the shape its checkpoint writes: absent is an issue that accounted nothing, and any other shape is damage, never an empty ledger, so nothing is counted on it or written over it. A run is accounted only on the pinned comment its charge was written on, never a replacement copying it, and only over a late_cycle_id that is absent or a positive whole number: a damaged one is no absent cycle. A parsed usage adding what no counter's total is spelled as -- a negative count, or a negative cost or one no float holds -- is refused, never committed as a total the next reading refuses. A captured completion (developer_completion) is read only whole, in the one shape its stage writes: absent is an issue that captured nothing, and any other shape -- null, a key too many or too few, a member out of its bound, a report the report records refuse, or a road its contract refuses -- is a damaged claim, never an absence, so nothing captures over it, retires it, or acts on it, and no delivery is bound beside it. Its READY text and VERIFIED reference stay two outcomes, a rewritten-head refresh is captured only READY, no quota stopping it, over a checkout its run left clean on the rewritten head as it returned, and a change-request or pull-request-feedback road only beside the handoff it froze. A requirements-drift resume and a late developer revision each settle the input they were handed for themselves, so the report their capture becomes carries none of it, as the recording their own tick makes carries none, and no report hands its requirements baseline on to one that supersedes it: the later report's settlement never writes an older baseline back. Only a requirements-drift resume's capture may freeze a second delivered stretch, a pull request conversation's beside the issue thread's, each in order: its recovery's cursor carry reads both back, and nothing settles from either. A decomposer manifest correction (decomposer_correction) is read only whole as well: absent is an issue that armed none, and any other shape -- null, a key too many or too few, a member out of its bound, or a correction not charged after its source on that comment and in that cycle -- is a damaged claim, never an absence, so nothing arms over it, resolves it, or launches on it, and an initial decomposition carrying one holds its tick with the claim kept and nothing launched, created, or written. Every park over an attempt ends on a hidden receipt naming the issue and the source invocation's nonce, which counts as that park's notice only on a comment of ours past the reply boundary.

Unsupported input cannot serve as fresh work, current evidence, or authorization to publish or delete artifacts. Neither a format change nor a refusal grants permission to discard that input or the artifacts it names; the owning specification says what a reader does with it. Close observation, recovery, and cleanup read an unsupported record as neither a fresh owner nor a cycle with nothing left owed, and write nothing for it. A parent's split seeds, recovery, and dependency release read an unsupported child as neither a fresh child to seed nor one to start, and its merge finalize, snapshot notices, and snapshot delete read one as neither a child to finalize or tell nor a consumer done with the ref: nothing is written to it, the seed, release, or notice stays uncompleted, and the ref stays. Artifact maintenance reads an unsupported record as no record at all to classify on, never as an issue that pinned nothing: every checkout and branch of its issue stays, however the issue ended, and nothing is deleted or written for it. The flat pre-namespacing layout is unsupported input too: an orchestrator/issue-<n> branch or WORKTREES_DIR/issue-<n> checkout is no repository's artifact, and no ownership, terminal, late-split, or scheduled cleanup path adopts or deletes one, whether the clone holds it or only the remote does. No live work adopts one either: the branch resolver answers only an issue's current-layout name, for fresh work and for a record pinning exactly that name, and refuses any other record before a checkout, launch, or push, inferring no flat name from a recorded pull request, taking no orchestrator/ prefix as proof, and deriving no replacement for a pin; no road works in, resumes, reuses, rebases, recovers, publishes from, or removes a checkout at the issue's path until it is proven a worktree of the clone on that branch, whatever commits the tree carries, a detached HEAD passing only where an unfinished rebase of exactly that branch accounts for it. Current-format authentication C-04, writer claims and artifact ownership C-05, guarded and uncertain-write recovery C-06, approval evidence C-09, pinned session commands C-14, lifetime run accounting C-15, and the audit-log recovery exception C-12 remain required. Optional fields the current format defines and current transactions a crash or lost write interrupted are current state, not historical compatibility.

Specs: state, branches, refs, host records, command specs, events, loggers, evidence, dispatch admission, refresh admission, artifact admission, deployment without migration, close recovery, branch refusal, analytics readers, dashboard costs, analytics evidence, price catalogue, usage evidence, request usage, trajectory records, requirements baselines, watermark initialization, replay batches, decomposition records, late holds.

Checks: state, events, agent surface, submissions, refused closes, dispatch admission, later readings, child seeds, refresh admission, refreshed tick, snapshot consumers, artifact admission, analytics readers, stored evidence, cohort reads, issue rankings, run costs, evidence in Postgres, rankings in Postgres, grouped reads, groups in Postgres, price catalogue, Claude requests, Codex requests, Antigravity requests, cost evidence, token evidence, recorded evidence, issue totals, trajectory evidence, viewer evidence, dashboard costs, cost details, run reasons, reason counts, reasons in Postgres, request normalization, request coverage, request records, Antigravity request samples, Antigravity request coverage, Claude request captures, Claude request samples, Claude subagent requests, Claude request coverage, Codex native-log scope, Codex native turns, Codex request samples, Codex request coverage, Codex request fold state, Codex native lookups, Codex launch observations, request usage records, Claude request records, Codex request records, verification artifacts, requirements baselines, late first baselines, watermark initialization, delivered thread, timeout parks, fix settlement, replay batches, recovered batches, approval bases, rewrite permissions, split manifests, correction records, late records, unexplained singles, hold spellings, split recovery, usage receipts, completion records, completion roads, superseded drift reports, branch resolution, checkout reuse, refused drift unwind, refused drift resume, refused handoff recovery.

C-04: Authentic state and trusted input

Rule: Authenticate pinned state separately from the allowlist that controls issue and comment input.

Why: A trusted author cannot make forged state authentic, and authentic state cannot make untrusted input safe.

Limits: Authentic state requires both bot authorship and whole-comment marker verification before schema admission, and with no known bot account nothing is authentic. A comment passing authentication is admitted only if its payload is a JSON object carrying integer schema_version == 1. Authentication alone does not authorize publication or cleanup; those also require current evidence.

Specs: authentication, author trust.

Checks: state, startup refusal, fuzzed admission.

C-05: Writer claims and artifact maintenance

Rule: Run pollers on one host with the same explicit WORKTREES_DIR; hold claims from first read to last write.

Why: The claim excludes a second orchestrator writer, so code under it can rely on its own writes as checkpoints.

Limits: Do not add code that adopts, reconciles, or repairs a second orchestrator writer's changes during a claim. The default WORKTREES_DIR follows the first configured repository, so pollers with different repository lists can resolve different roots. Artifact maintenance needs exclusive access to that host's worktrees. Handle crashes, external changes, and records written before acquiring the claim; C-06 covers lost or refused writes and comment capacity. Artifact ownership is exact repository and issue attribution of the current layout only: a branch is an issue's when it is that repository's orchestrator/<slug>/issue-<n> character for character, and a checkout when it is that repository's WORKTREES_DIR/<slug>/issue-<n>, a worktree of its clone, on that branch. An orchestrator/ prefix, a flat name, or an authentic pin alone is no ownership evidence, so cleanup a record or a scan points at anything else deletes nothing, and a name two entries derive alike, a checkout standing on one, or a checkout directory two entries are handed belongs to neither. Terminal, question, and late-split teardowns ask those collision refusals themselves, and every teardown removes a checkout only where it proves the tree a worktree of the clone on the issue's exact branch, reached at its own path through no symlink below WORKTREES_DIR, so a foreign checkout keeps its files; the scheduled pass reads that identity again immediately before the removal. Close observation, recovery, and cleanup admit the record they act on from a read under the issue's claim, the poll's alongside one included; a close held in memory never stands in for that record. A parent's seed or repair of a child, an adopted one included, its merge finalize of a closed child, its snapshot notice to a consumer, its release of a group of children, and its delete of a snapshot admit each child's record from a read under that child's claim, held through the effect; an earlier family scan never stands in for it, and a release or a delete admits every child it would act on before acting on any. The base refresh admits the record it routes a worktree on from its read under the claim it holds through that route. Artifact maintenance takes each candidate's issue claim before it reads the issue, admits the record it classifies on from that read, and holds the claim through the teardown; a candidate whose claim is refused is left untouched. The scheduler barrier, host exclusivity, and every other maintenance gate stay required beside it. A captured developer completion is decided from a read under the dispatch claim, and its checkout is held out of the base refresh under the refresh's claim until a transaction owns its report or a guarded invalidation retires it; it grants no checkout adoption, reset, or deletion, so a checkout not proven the issue's own, or whose head is no commit the store holds, holds it.

Specs: ownership, claims, artifact ownership, poller setup, family writes.

Checks: dispatch claims, claimed admission, refresh claims, maintenance claims, branch attribution, flat-layout preservation, terminal cleanup, teardown ownership, removal races, host exclusion, claimed release, claimed finalize, capture freeze.

C-06: Guarded writes and recoverable effects

Rule: Treat unconfirmed writes as unknown; read back what landed before retrying publication.

Why: An unconfirmed write proves neither success nor absence of an effect.

Limits: Recovery rechecks prerequisites. An unreadable record or artifact does not prove the write failed, and an incomplete one proves nothing landed: recovery finishes a current transaction from its whole record -- a debt with its basis, a rewrite permission bound to its attempt's declared terms, a late split from a recorded verdict that reads back whole -- and refuses one missing any of it; a split transaction in flight over a result that no longer answers, a verdict no build reads included, parks rather than buying a second verdict beside the children it made. Close recovery answers a record admission refuses as an unreadable one: the close it read is kept, and nothing is posted, marked, or reclaimed over it. Snapshot recovery over a ref already gone tells no consumer admission refuses and keeps that notice owed rather than recording it delivered. A refused or unconfirmed write stops the steps that depend on it; a later tick reads state afresh. Guarded commits and direct writes check admission: neither writer may overwrite an unsupported or malformed authoritative comment, create a replacement beside it, or silently stamp it as current, whatever comment id its caller holds, and neither sends a state the next reading would refuse; strict edits remain non-creating and land only on a comment still the issue's record, never one a record ahead of it has displaced, and a direct write over such a comment raises, so the steps depending on it stop. A usage checkpoint reads its invocation's receipt back before anything it sends, so one left unconfirmed settles nothing until that read-back, and asking again adds nothing where it landed; a refused checkpoint, an unreadable read-back, or a receipt read back beside a damaged counter licenses nothing that depends on the accounting. A completion's capture, transfer, and retirement each read the capture back first, so one left unconfirmed withholds the caller's state and settles nothing until read back, and asking again records nothing twice; any of them answered or refused over a comment that moved since its caller read it withholds that caller too, so its whole-state write never puts back a delivery, retirement, or damaged claim it did not hold. The transfer records the delivered report and hands the capture off in one commit, what the capture's road retires with the report -- a change request it answers -- riding it, so the report has one durable owner either way; a pending capture is retired only by a guarded invalidation, never behind a transfer nobody confirmed, and a handed-off one is neither replaced nor retired until the transaction its delivery becomes settles, the binding holding that delivery to the commit the capture reported on -- save by a later capture carrying it while that delivery stands unbound, which holds the delivery the same way and, invalidated, retires still carrying it. A capture's settlement of what its tick staged rides its transfer's own commit, so neither lands without the other. A transfer's read-back or retry, and a capture's or retirement's retry finding the capture past pending, hands its caller the delivery that landed. A pending capture is handed on only over readings that admit it, its road's own prerequisites included, and its road's own reading of the recorded pull request -- a discussion plan the implementing road reads as one is none of the run's, merged or not -- retired only by a guarded invalidation a reading proved, held to that very reading whole so a comment that moved since -- a missing field restored included -- refuses it, and held with nothing written where a reading fails or the claim is damaged: an unreadable prerequisite never discards it, a record its handoff froze moved into a spelling its own reader refuses, or moved with no reader registered for it, included, and a cancelled or restarted cycle never inherits it. A rewritten-head refresh is handed on only where its debt, the commit it reported on, and the pull request's head are one commit, as that refresh's own road requires, and one entered over a proved squash or docs lineage only once that lineage proves again and the approved report re-reads intact where it settled: a refutation or a report moved out of reach retires it, and a tree, descent, or location nobody could read holds it. A late developer revision's report is handed on only in the very commit that re-measures the candidate it describes -- the generation advanced, the guidance it was handed consumed, the replies it owed repaid, the park answered, and an operator's authorization withdrawn riding it, a member the re-measurement dropped carried as a removal -- so a write never confirmed lands all of it or none, and a read-back finds each of them once. A comment with no room for that commit gets none of it: the capture stays pending, the guidance unread and the generation unadvanced, until room is freed and a later reading hands it on; a report no capture holds -- one the comment had no room to capture -- goes through the delivery's own recording in that write, recorded or parked with the report owed, never dropped. A park over a clean commit its reconciliation only could not measure hands the report on in that same kind of commit, since the bare continue answering it re-measures that commit with no run to report. Any other park lands its own write -- the guidance consumed and the owed read claimed -- with the capture still pending, and withdraws the capture only behind it, so a write lost between the two leaves the capture for its recovery rather than a retired one beside unread guidance. While the capture is pending that write is a guarded commit decided, as the handoff is, on every record the handoff was frozen over, so a generation advanced meanwhile refuses it, and on a recovery the strict edit asks the admission, the comment once more, the admission again, and the close latch last, behind its own walk to the comment and each behind the requests of the one before it, as the handoff and the withdrawal do, so a hold, a close a poll latched or any of the recovery's own fetches read -- the admission's included -- or a move landing meanwhile writes no park and consumes nothing, the close cancelling the cycle in that dispatch, so a reopening revives nothing of the capture; a cancellation the comment read again does not confirm leaves that close latched for the cycle, for every later barrier to end it on. A revision over a post-publication generation is admitted while the pull request still stands on the head that publication pushed. The handoff is frozen over the split's children and ledgers at the launch, so one recorded since retires the capture, and a head read again as anything but the commit the capture froze reconciles nothing. Behind a settled capture, the recovery's whole-state writes land as guarded commits decided on what the handoff froze and asked the issue's controls again, and its owner read asks of the issue it fetches: an obligation recorded since, or a control or a relabel on an open issue, writes and says nothing more, and a close outranks any hold: it ends the cycle in that dispatch, over the comment read again where a hold kept the write out, so a reopening resumes nothing. Each notice its settlement says, the unreadable owner's park included, goes out only behind that settlement's own write, over the issue read once more as open and unheld, and otherwise stays owed. It is finished from the reading its run was handed, taken again off the thread cut where that reading counted, held to the late comment watermark and owed replies that selected what its prompt quoted and to the route bookkeeping a hold on the pair owes, so an obligation or handoff added since retires it and stands, and a cut that reads as no longer that reading, or a thread nobody could read, holds it. A developer the revision spawns fresh, or that replaces a poisoned session, is re-grounded with the conversation rendered off that same reading, so no reply its requirements do not count reaches the run. A capture is taken only where it, and then that transfer, its binding, and its settlement, still fit the comment with every terminator escaped; the transfer, and the binding and settlement of a captured report, are measured that way again over the comment each lands on, and refused for room with the report kept. A refusal leaves the run's usage checkpoint to land or not on its own, and a park the binding takes over a capture is decided on that capture. A decomposer manifest correction's arming, exhaustion, and retirement each read the attempt back over the caller's comment first, own that field alone, and send only a record that reads back as itself: one sent and never confirmed withholds the caller's state and grants nothing until a read-back says what landed, and so does one landing over a comment that moved since the caller read it; asking again records nothing twice, a resolved attempt covers every charge it was resolved across so nothing it covers -- its correction's own answer included -- arms one again after a restart, a resolution is refused wherever no readable count covers every charge its ledgers record rather than landing a floor below a charge taken, and a retirement for a moved context is held to a reading that proves the move, so a baseline or pin nobody can read retires nothing; a tick's own reset it rests on is written only over the comment the retirement read, and no fresh decomposer is charged behind an attempt whose retirement did not land. Its launch is granted only where the charge counts read and the comment has room for the charge and start it leaves beside the attempt's widest resolution. The rejection that arms one writes the rejected run's own disposition first, strictly over the comment its caller last synced with, and arms only behind that landing write, so the session and baseline it is held to are durable and no session or cycle written meanwhile is put back; a comment moved since, a write nobody confirmed, or an arming left withholding the caller arms or launches nothing. Its launch's charge and start land only over the readings they were decided on, each asking the issue and the comment once more immediately before it leaves -- the comment by its id as well as its record, so one posted in its place with the same record holds it too -- so a session pinned while the issue is asked behind either is never written back over and resumed, and a spent budget's park before that launch is written only over the comment the tick read and an issue still standing, and announced only where both still stand behind the notice's thread read. Every other park over an attempt -- its correction's answer parked, one given up, or one a later tick recovers -- is written and announced only over a comment read back as the tick's own, still carrying the attempt bound to its record and cycle, holds its words on the record before its post -- cut to fit, its latest error quoted to a bound and the last of them cut, where the comment cannot hold them whole -- is posted only where that comment, read once more behind the issue's requests, is still the tick's own, lands only over the comment that write synced with and only while the issue, read right before that edit, still stands, and lands before the attempt is resolved: a usable answer is acted on only behind an exhaustion that landed and left the caller's state its own, over a comment read behind it as the tick's own, so a lost exhaustion leaves a park standing over a pending attempt and never children beside one, and a park whose write did not land is recorded over the notice its receipt finds rather than said twice -- ahead of the next tick's drift check and bounded, so a reply written meanwhile stays the saved session's rather than reading as an edit, and in the words the record held for it, so a post that never landed loses neither its error nor its answer; a notice held so is posted only where the comment and the issue, read afresh behind the write holding it, still stand, and is otherwise left owed. A recovery that reads the requirements moved spends the attempt and decides the rest of its tick on the issue it read them off, so the drift road's fresh decomposition reads what moved, and an exhausted attempt whose split transaction stands on the parent is the split recovery's to finish, never parked in its place. A notice held for an attempt a move or a close then spends or retires is dropped behind that resolution, strictly, rather than left on the comment for the stages behind -- or, where that drop did not land, before a later tick's run -- and no resume or fresh decomposer is charged beside an attempt whose exhaustion did not land; a notice is posted whole only where one comment carries it as GitHub receives it, receipt and comment marker included. Writer exclusion comes from C-05.

Specs: transactions, publication evidence, base-rebase recovery, base-rewrite finalization, ready-ping publication, ready decision.

Checks: guarded commits, strict edits, usage checkpoints, displaced records, completion handoffs, refusals behind a read, completion capacity, captured sources, capture recovery, frozen handoffs, captured lineage refreshes, recovered revisions, effect re-reads, retirement tick, recovery checkpoints, captured-run abandonment, finalization checkpoints, ready-ping recovery, refused close recovery, admitted read-back, ready recovery, split recovery, in-flight splits, correction writes, correction resolutions, correction dispositions, unconfirmed corrections, corrections against moves, held correction notices.

C-07: Publication authority and exact revisions

Rule: Agents never push; the orchestrator never merges PRs and checks the commit and remote head before pushing.

Why: Humans decide which PRs merge. Checking the inspected commit and expected remote branch head protects intervening work.

Limits: Human maintainers may push; their changes to the remote branch are external changes the orchestrator must handle. The publication protocol defines the commit and remote branch head checks and commit-selection fallbacks. The orchestrator publishes only to an issue's current-layout branch the live resolver names: a recorded pull request whose branch is missing, invalid, flat, another repository's, or otherwise not that name stops before any checkout, agent launch, or push, and no newly derived branch is substituted for it. Each push, and each rebase, rebase abort, reset, clean, squash, or subject amendment that rewrites or discards what a checkout stands on, is made only once that checkout is proven the issue's own again, behind the reads, writes, fetches, and agent runs on its road — a lease no caller pinned is read ahead of that proof and handed to the transport rather than read inside the push, and a push's last proof is asked by the transport itself, behind its own preparation — and so is each pull request opened, edited, or adopted. The handoff past a landed push is proven again on the far side of the push and of the write carrying its receipt, and the initial publication's, a conflict round's, and an accepted verdict's handoffs again behind their own writes, immediately before the label, so a tree switched onto the flat branch meanwhile is neither published, rewritten, cleaned, nor handed on by them. A refusal before the step leaves the intent, approval, anchor, or marker a crash there would leave; one after a landed push keeps the push, the intent or receipt recording it, and any handoff it owes, and withholds only what follows. Current unpushed work, a current pull request's restoration from its remote head, uncertain remote reads, and exact-head pushes keep their protocols. A captured completion publishes nothing of its own: its recovery hands an admitted capture to its road's owner, whose publication keeps every gate above, and the base refresh -- an interrupted rebase's recovery included -- rewrites no captured source before that recovery has decided on it. While a report a capture handed off is owed, the size gate holds the head to the commit that capture reported on, beside any candidate a record names, so a checkout moved off it -- or a recorded candidate naming another commit -- is neither measured, pushed, nor opened as a pull request. Credential filtering does not enforce push authority; see C-11.

Specs: pushes, human merges, branch refusal.

Checks: transport, rewrite publication, human merge handoff, refused publication, refused seam push, refused resume, refused refresh, refused adjudication, switched initial publication, switched seam push, switched accepted verdict, switched verdict label, switched plan publication, switched plan handoff, switched squash, switched squash rollback, switched conflict rebase, switched docs amendment, switched drift unwind, switched refresh abort, switched refresh clean, switched conflict handoff, captured source, anchored capture, captured source, captured source beside a record.

C-08: Agent reply protocols

Rule: Update reply parsers when prompts change the reply format.

Why: Replies must mean what the prompt requested.

Limits: Malformed replies follow the role's policy for retries or human guidance. An initial decomposer's manifest the parser refuses with a concrete error, from a completed, accounted, read-only run, earns one correction asked under the very output contract the decompose prompt closes on, beside that exact error, and the correction's answer is read by the same parser and earns none of its own; a question, silence, or a failed, incomplete, timed-out, interrupted, or dirty run earns none, and no dependency list is inferred from a child's prose. Session identity is covered by C-14.

Specs: reply protocols.

Checks: report prompts, manifest contract, correction eligibility, manifest corrections, fuzzed manifests.

C-09: Reports, review subjects, and verification

Rule: Bind approval to one PR head, requirements revision, and developer report backed by passing verification.

Why: Changed requirements or reports invalidate approval even on an unchanged head.

Limits: Evidence and approval may carry across a rewrite only when the verification protocol proves they apply to the new revision. An approval stands only on its own records read whole -- the subject it covers and the evidence claim it was proved over -- so one missing either is handed back for review, with no squash publication, move, docs pass, or ready ping over it. The ready ping announces an approval only over current passing evidence proved at the ping, or, over a final docs pass's recorded completion, only over that completion proved whole at the ping. Evidence is what an artifact comment of ours carries in its hidden payload, the whole body re-rendering exactly in the current format; the commands a comment shows count for nothing, and one without the payload binds no approval and settles no transaction. A developer report, captured or not, names the requirements revision its run was handed -- a /orchestrator continue retry, which hands none, the baseline the issue records -- never an edit the run did not see.

The final-documentation exception records a docs pass apart from the approval it followed: the approved review subject, the settled report and its source commit, and the evidence the approval rests on stay as they were, and the head the pass completed on is verified on its own -- unchanged, by that evidence with its own provenance; changed, by a run of exactly that head this orchestrator executed; changed under an empty VERIFY_COMMANDS, by nothing, recorded as no evidence that anything passed. Only that recorded completion lets the run answer for the approved review, and only bound to the settled report's publication at that head; it is also the only thing that qualifies such a head for the ready ping, which a docs stamp on it never does. No record says the reviewer was handed the docs commit or that checks ran on another commit, and a completion missing, malformed, or moved; an approval or its evidence claim that no longer reads as the one the completion followed; requirements, a report, or a publication that changed, an edit or a push landing while the proof reads included; the evidence that claim names no longer published as it settled; a lineage from the approved commit not proved; or a run owed, failed, or incomplete authorizes nothing, and evidence or an issue nobody could read holds it. Every final docs pass that finishes records that completion and goes straight to review: documentation alone buys no fresh review, developer report, or review round, and a docs commit the configured run does not pass on is offered to nobody.

Specs: reports, verification, readiness, final-documentation records.

Checks: subjects, unrecorded approvals, unapproved squash recoveries, claimless approvals, verification, readiness, final documentation, final-head runs, final-docs completion, captured retry requirements, artifact recovery.

C-10: Pauses and parks

Rule: Honor paused/backlog, each dependency hold, and each park's recorded reason for waiting for a human.

Why: Resuming work requires the action that answers the specific hold or park.

Limits: A hold does not undo earlier writes or commits. A dependency hold is an issue on workflow:blocked, and only its parent's release, once the recorded prerequisites permit it, answers it. An edit made meanwhile is not read: nothing hashes it, records or replaces a baseline, or reroutes the issue, so its baseline, decomposition records, dependency graph, and tracked children stand, and its requirements are compared on the legitimate entry to workflow:ready that release makes, before anything implements it. The hold stops no dependency progress: a blocked parent's walk still releases eligible children, and still finishes waiting, through the existing claims, admission, and lineage checks, and an umbrella keeps its own drift route. Neither an edit nor a finished prerequisite lifts or works past paused/backlog: a held child is not released, a held parent is neither polled nor handed back to workflow:ready, and the ready decision stops at either control or at a relabel back to workflow:blocked. The release and the parent's return move only the workflow label, and the walk reads the parent's controls again in front of every release, so a hold applied while the poll runs is never written away or worked past. A hold a finished agent run meets, or an accounting checkpoint of it that neither landed nor read back, permits that run's usage accounting alone, beside a quota retirement it owes and, on the first implementation, an implementing resume, a reviewer's change request's fix, a pull request feedback round, a requirements-drift resume, a rewritten head's report refresh, or a late adjudication's developer revision, the capture of the report the run finished on: the exit is counted once, as it returns, and nothing else of the run -- a publication, a label, a park, a consumed input, a session pin, a further launch -- is written or made, nor does the count give any stage outcome a replay; the hold the run's return first read is the one honored, whatever a later fetch sees. A captured completion waits through paused/backlog, a dependency hold, the ready decision, and a spent run ledger's park, none released, re-baselined, or cleared by it -- an interrupted auto rebase's anchor beside it included, which the anchor's own hold answers without moving the captured checkout -- and its recovery charges no run and grants no invocation; one whose run's accounting checkpoint neither landed nor read back is handed on to no road until that run's receipt reads back, and the issue's controls, label, state, and requirements, its checkout, and its pull request are read again right before the capture is retired or handed on, so a hold applied, or a close, reopening, edit, or source moved or put back, while its readings were taken writes nothing; a landed retirement ends its tick, so no stage runs on the snapshot its readings outdated. An applicable capture of an implementing road, of a change request's fix, of a pull request feedback round, of a requirements-drift resume, of a rewritten head's report refresh, or of a late developer revision is finished with no developer launched: only what that run was handed and its session are settled -- a refresh's report recorded under the requirements, debt, receipt, head, and any approved or docs lineage it was entered under, its debt left for the transaction's settlement to pay, and no verification, approval, docs pass, or readiness inferred -- a late revision's guidance consumed once, its candidate re-measured once under a fresh generation, and its report handed on in that very commit, the owner's close latch and the obligations a split already acted on asked again first, and no verdict, child, label, authorization, or publication made of it -- a feedback round's frozen batch, reset round, and cleared bookmarks, later feedback left unread, and a drift resume's frozen reading, recorded as the baseline only by its report's handoff or its stage's own write, beside the round its stage's drift disposition spends, resets, or hands on, the lease a conflict round's caller proved, and no baseline a dependency hold defers, its handoff or withdrawal made only once its admission reads again behind every request that disposition and the write itself took, the strict edit's walk to the comment last, right before the edit goes out, the head the run left taken from the capture rather than read again, and a status read that establishes nothing -- taken ahead of the handoff, after any branch proof and within it -- a branch proof of a run that committed nothing or an implementing branch count that did not return -- a drift park's reply or continue included -- or an in_review carry that cannot read keeping it -- and its report goes through the existing delivery, size gate, and publication -- a change request's retired in the very commit that hands its report on, and its round spent once, only over its reviewed subject read again save the head its run moved and the issue's controls and requirements, its checkout, and its pull request's head read again behind it, damage there -- a settled report and its handoff that no longer agree included, judged ahead of the revision reviewed -- or a push meanwhile holding it rather than proving it stale, its report recorded decided on that subject and on the park's flags as those reads took them, so a record moved or damaged, or a park recorded -- a spent run ledger's among them -- while they ran holds it too, a handed request never dropped or launched again beside a capture nothing has decided, and a reading that did not return holding the capture rather than discarding it. A trusted reply to a parked initial decomposition is that park's answer: measured against what the park had already read, it resumes the pinned decomposer session rather than reading as an edit, while a changed title, body, or already-read comment re-decomposes beside any reply, quoting that same read, and an untrusted reply or an unreadable thread does neither. A park over a split resumes only where no reading shows a child of it: a damaged count, a child recorded, or an issue this orchestrator's account opened since the parent that carries no whole receipt, or carries this split's anywhere, keeps the park a human's, so no decomposer run splits over it again. A spent spawn budget refusing the fresh decomposition an edit buys consumes no reply, nor does the repair of a lost write behind its notice, and those replies are no answer to that park; the continuation that answers it consumes none of them either, and the fresh decomposition it buys is handed them whole. The boundary and requirements baseline move only behind a run that read the thread, and every park that run's disposition takes, a split's included, records the thread read through our own comments and no further. A decomposer manifest correction's launch is held to its pinned comment's saved session, command, and baseline, and to the issue read afresh -- ahead of its daily retry, behind its charge, and on the reading its start is written over -- and so is its answer, before it is used or parked, before a later tick recovers a park owed to it, and once more behind the write that spends it, each check judging the controls and requirements off the issue fetched last: a paused/backlog hold, a close, a label other than workflow:decomposing, requirements that read as neither the whole thread nor the stretch through the settled reply boundary, where one stands, as the revision its rejected run was handed, a session, command, or baseline pinned in place of the ones it was armed under, or an issue GitHub would not answer for invokes nothing and makes no child, split marker, label, or park on the owner it moved to -- a hold landing while its charge's or start's edit walks to the comment included, a charge already taken staying reserved for that same launch, and a recovery that finds the issue closed or relabelled spending the attempt and ending the tick. An attempt its comment no longer grants a launch -- started, crowded, unproved, or resolved -- asks no retry, so no retry_cap park is taken or said for it. A reply written past the boundary the rejected run settled stays that run's session's, before a launch a later tick owes -- that tick freezing its read as a parked one does, wherever a boundary stands -- and during it, whose parks are bounded by that read, as are those of a correction launched on its rejected run's own tick wherever that run's boundary is the one its baseline was settled through; an edit is answered by the drift reset's fresh decomposition, the attempt resolved rather than replenished; with no boundary, every reply is such an edit. A spent daily budget parks its launch on retry_cap, whose continuation retires the session and with it the attempt; a spent lifetime ledger parks it on agent_run_limit, whose grant alone buys that launch. A correction a hold, an unresolved accounting, an interruption, or a lost write left unanswered is never launched again: the next tick parks for a human, the session left for their reply to resume. Lifetime agent-run charges and the grant that permits further runs are covered by C-15.

Specs: controls, waiting for human action, dependency holds, deferred drift, retry budget, held accounting.

Checks: live holds, held accounting, held developer runs, held resumes, ready holds, decomposition replies, decomposition edits, decomposition continuations, dependency holds, held releases, review parks, retry-cap parks, held captures, ready captures, held fixes, held fix resumes, held feedback rounds, held drift resumes, held drift continuations, held drift replies, held in_review drift, held conflict drift, held refreshes, held revisions, closes over held revisions, held correction launches, held corrections, capped corrections.

C-11: Credentials and execution boundaries

Rule: Never load a GitHub token (GITHUB_TOKEN or its aliases) from .env.

Why: A checkout's .env sits beside agent worktrees, so keeping tokens out removes an easy leak; this is defense in depth, not isolation.

Limits: There is no exception for .env loading. Environment filtering does not isolate agents or verification commands: they run as the orchestrator's OS user and can read its credential files. Isolation comes from the host, container, or VM.

Specs: tokens, push authentication, filtering.

Checks: .env loading, resolution, transport.

C-12: Observation and the audit recovery exception

Rule: Keep logs and analytics out of decisions; read the audit log only to avoid recording a base rebase twice.

Why: Logs and analytics must not become a second workflow database.

Limits: The base-rewrite finish reads the configured audit log and its rotated copies to avoid duplicate base_rebased events, which record rebases onto the updated base branch. An unreadable log holds that finish. Deleting a rotated copy or truncating the log without keeping a copy while a finish awaits retry can emit base_rebased twice. The per-issue usage counters are the accounting checkpoint's alone: an exit no usable checkpoint landed is not counted, and nothing reconstructs it from the analytics or audit sinks. The request usage samples, markers, and checkpoints a trajectory record carries are observation alone: no price, usage total, accounting recovery, or workflow decision reads one. Only the opt-in trajectory write collects them, apart from the trajectory parse and behind a failure boundary of its own -- a Codex run's native session log looked up and read inside it -- so a request collector, lookup, or read that fails costs neither the trajectory, the baseline agent_exit record, nor the run's accounting. The tracked spawn observes a Codex launch for that collection alone, before the process starts and behind a fail-open guard, changing nothing the CLI is launched with; with the trajectory sink off no launch is observed, no native log is looked up or read, and no collector runs. A stream the usage parser refuses still writes no agent_exit record and publishes no total; its request usage alone is recorded, on a trajectory record marked stream_refused.

Specs: audit recovery, request usage, request collection.

Checks: rewrite events, rotation, request isolation, Codex launch handoff, request usage records, Claude request records, Codex request records, trajectory parsing.

C-13: Module ownership and public surfaces

Rule: Import shared helpers from the module that defines them; read settings through orchestrator.config.

Why: Importing from one module keeps test patches and runtime calls on the same implementation.

Limits: Declared public exports are the supported entry points, changed only as C-03 allows; importing workflow labels must still leave the workflow engine unloaded. Where an owner defines the typed request or context an entry is driven by -- an agent run's options, a scheduler submission, a dev resume, a base-sync route -- callers build that record and the entry takes it as its one signature, so a test patching the owner and a caller reaching it meet the same parameters.

Specs: ownership, development conventions.

Checks: imports, exports, owner patching.

C-14: Pinned session commands

Rule: Resume sessions with their pinned command's original backend and arguments.

Why: A configuration change must not retarget an existing conversation or discard its model and reasoning settings.

Limits: Reviewers start fresh with current configuration. A plain codex or claude is a current command spec, kept as pinned with no arguments. Resumes, rotation, failure retirement, and a failed developer conversation's replacement keep the pinned command, and a recovered captured completion pins the command its run ran under. A decomposer manifest correction resumes the session its rejected run saved under the command pinned beside it, backend and arguments alike, whatever DECOMPOSE_AGENT says now and whichever tick launches it; a pinned command that does not parse, or a session never saved, not the one that run itself returned, or not one token no CLI reads as an option, earns no correction and no replacement conversation, and a recorded attempt carrying such a session is never launched. Only dev_agent and dev_session_id lock a developer session; no other key is resumed, converted, or cleared as one.

Specs: session commands.

Checks: session pins, session reads, retirements, decomposer resumes, correction resumes, fresh reviewers.

C-15: Lifetime agent-run budget

Rule: Never refund charges against an issue's lifetime MAX_AGENT_RUNS_PER_ISSUE budget.

Why: Crashes, retries, and restarts must not let an issue evade its lifetime run limit.

Limits: Only a trusted /orchestrator add-agent-runs N grants more runs to an issue parked at its lifetime limit; other budgets have their own rules. The count is never read below the issue_agent_runs usage meter, whose every counted exit was a launch charged first, so a count that is missing or unreadable refunds nothing that meter saw. Session rotation and retirement touch neither meter. Usage accounting charges, refunds, and parks nothing: an exit is accounted under the identity of the process it came from -- the charge that process was started under and a random nonce, never the request's fingerprint -- and a receipt, or the floor receipts retire under, covers that identity, so a settlement asked again never moves the meter past the charges it counts. A decomposer manifest correction's one launch is charged before it runs like any other launch, owed once at its source's charge, and accounted once as it returns: a start its ledgers show or cannot rule out is never launched again, and nothing about it -- its answer, a park, or the agent_run_limit park its launch takes -- refunds or grants a run. The daily retry its launch pays is staged in the write reserving that charge, refusing the charge with nothing written where that reading has no slot left, and a charge reserved and never started is started by that same launch -- its request names no retry count -- in whatever daily window, paying neither the charge nor the retry again. A spent lifetime ledger's agent_run_limit park refusing that launch is written only over the reading it was refused on and announced only where that reading and the issue still stand, so a session pinned meanwhile is never put back. A launch that owes nothing beside its charge is reserved, and parked, exactly as before.

Specs: run budget, charging before launch, usage receipts.

Checks: charging, meter floor, accounting once, correction launches, correction retries, corrections counted once.

Maintaining the contracts

Update affected contracts, specifications, implementation, and behavioral tests together. Keep IDs and section titles stable: links use the full heading anchor, so renaming a title breaks them even when the ID stays the same. Never reuse retired IDs. Keep each checklist row identical to its section's Rule. Keep each contract section in Rule / Why / Limits / Specs / Checks order, with one central rule; Limits covers scope, exceptions, and additional obligations. Protocol details and decision history belong in the linked specifications.

Linked tests are representative checks, not proof of every clause. Documentation checks validate links, navigation, the required-reading route from AGENTS.md, the instruction pages' links to C-03, and the route to the deployment procedure. They also hold this register's IDs and heading anchors, each checklist row against its section's Rule, and the section order; they do not verify behavioral claims.