{"modulePath":"github.com/intentdriven/abcd","version":"v0.17.1","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package loop\n\nPackage loop is the implement loop's engine (itd-2609201916151817, spc-2609202134338445): the state file a run lives in, the checks that decide whether a run may start, and the step interface a driving host calls. \\`abcd build \\\u003citd-N\u003e\\` starts a run; \\`abcd implement step\\` performs the next stage of the current lane and exits; \\`abcd implement receipt \\\u003cpath\u003e\\` hands back what an agent stage waited on; \\`abcd implement status\\` renders the state. Nothing here holds a run in memory between invocations: every call reads the state file first, does at most one stage, writes the state file last and returns (decisions 1 and 2), so a killed process loses only the stage it was in, which the next call repeats.\n\nThe state lives in the checkout's local tier:\n\n\t.abcd/.work.local/run/\u003crun-id\u003e/state.json   the run: its key, lanes, clock and record\n\t.abcd/.work.local/run/.lock                 the advisory lock every mutation takes\n\nThe tier is never created here: only a repository abcd manages has it, which is what keeps a run managed-only without a check of its own to drift from (internal/core/mode draws the same line). The run directories beneath it are created one level at a time and proved real (fsutil.EnsureRealDirAll), and the state is written through the package's one atomic writer inside an os.Root, so a symlinked component is refused rather than followed.\n\nThe lane's stages are a sequence (Sequence), and each stage's body is a Handler the piece of the spec that delivers it registers in DefaultStages: the worktree (piece 6, lane.go), the brief (piece 5, brief.go), the implement stage and its receipt's verifier (piece 7, receipt.go), the validators (piece 8) and the landing (piece 9). A stage whose body this build does not carry is refused by name, with the piece that delivers it, and the run is left unchanged. A lane's files live in its own directory of the run:\n\n\t.abcd/.work.local/run/\u003crun-id\u003e/\u003clane-id\u003e/brief.md      the brief the loop renders\n\t.abcd/.work.local/run/\u003crun-id\u003e/\u003clane-id\u003e/receipt.json  the implementer's receipt\n\nand its worktree in the machine-scoped store, ~/.abcd.noindex/worktrees/\\\u003croot-sha\u003e/\\\u003crun-id\u003e-\\\u003clane-id\u003e. The process driver (piece 3, drive.go) is the same loop: Drive performs the next stage and, when it hands the lane to a role routed to a command-line runner (itd-2609201916056194), starts that agent through the runner and hands its receipt back through Receipt.\n\nCore never writes to stdout; the CLI front door formats what these functions return.\n\n## Constants\n\n```go\nconst (\n\tLensDesign = \"design\"\n\tLensRecord = \"record\"\n)\n```\nThe two lenses of the plan review, one fresh reviewer each (the adversarial-review principle's proven pair).\n\n```go\nconst (\n\tBriefFileName   = \"brief.md\"\n\tReceiptFileName = \"receipt.json\"\n\tReportFileName  = \"report.md\"\n\tDoDFileName     = \"dod.log\"\n)\n```\nThe files of a lane's directory, .abcd/.work.local/run/\\\u003crun-id\u003e/\\\u003clane-id\u003e/. The loop writes the brief; the implementer writes the other three.\n\n```go\nconst (\n\tCheckKey           = \"key\"\n\tCheckReady         = \"ready\"\n\tCheckOpenQuestions = intent.StartCheckOpenQuestions\n\tCheckClaimSections = intent.StartCheckClaimSections\n\tCheckHold          = intent.StartCheckHold\n\tCheckBlocked       = intent.StartCheckBlocked\n\tCheckSteps         = intent.StartCheckSteps\n\tCheckPeers         = \"peers\"\n\t// CheckEligible is an issue key's row: the drained repository's own rule\n\t// takes the issue (itd-82 scope 2; decision 10 on the parent).\n\tCheckEligible = \"eligible\"\n)\n```\nCheck names, in the fixed order Check reports them.\n\n```go\nconst (\n\tMergeableConflicting = \"CONFLICTING\"\n\tMergeableUnknown     = \"UNKNOWN\"\n)\n```\nThe forge's mergeable verdicts.\n\n```go\nconst (\n\t// ControlFileName is the record, under the run's directory.\n\tControlFileName = \"control.json\"\n\n\t// StageDriver is the refusal stage and the record's stage for the driver.\n\tStageDriver = \"driver\"\n)\n```\n\n```go\nconst (\n\t// DrainStoppedCap: the drain opened --max lanes.\n\tDrainStoppedCap = \"cap\"\n\t// DrainStoppedEmpty: no eligible issue is left that this drain has not\n\t// taken, held by another or not; with held work left the drain waits\n\t// (drain_wait.go).\n\tDrainStoppedEmpty = \"empty\"\n)\n```\nWhy a drain ended.\n\n```go\nconst (\n\tDrainLaneInProgress = \"in-progress\"\n\t// DrainLanePullRequest: the landing opened the lane's pull request and\n\t// armed it or left it open; the merge is a person's gate.\n\tDrainLanePullRequest = \"pull-request\"\n\tDrainLaneHandedBack  = \"handed-back\"\n\t// DrainLaneDone: the run is complete.\n\tDrainLaneDone = \"done\"\n\t// DrainLaneHalted is a lane a person's stop halted, which a drive passed over: it\n\t// waits for an explicit take-over, and the drain goes on to other work.\n\tDrainLaneHalted = \"halted\"\n\t// DrainLaneTakenOver is such a lane once a person has taken its run over: the run is\n\t// theirs to drive, and the drain leaves it to them.\n\tDrainLaneTakenOver = \"taken-over\"\n)\n```\nThe outcomes of a lane the drain opened, as the drain reads its run.\n\n```go\nconst (\n\t// RoutePromoted: a user moment, promoted to an intent draft with\n\t// `capture promote`; the issue gains the draft in related_intents and\n\t// nothing else is written.\n\tRoutePromoted = \"promoted\"\n\t// RouteDecisionRecord: a rule about trust or safety, flagged as needing a\n\t// decision record with the question stated, in the summary and as the\n\t// `decision_needed:` marker on the open issue (itd-82 decision 10), which\n\t// is the only write; nothing is minted.\n\tRouteDecisionRecord = \"decision-record\"\n\t// RouteRule: above the rule's severity, outside its categories, or held\n\t// by another of its rules; flagged naming the rule.\n\tRouteRule = \"rule\"\n\t// RouteHome: anything else, flagged with the home the decision belongs in.\n\tRouteHome = \"home\"\n)\n```\nThe routes a hand-back takes, by kind (scope 5).\n\n```go\nconst (\n\tParkedWaiting     = \"waiting\"\n\tParkedConflicting = \"conflicting\"\n\tParkedClosed      = \"closed\"\n\tParkedMerged      = \"merged\"\n\tParkedUnread      = \"unread\"\n\t// ParkedSyncing: the pull request conflicts only on files origin's\n\t// default branch declares generated, or not at all as this checkout\n\t// merges, so the lane went back through its sync (step 13).\n\tParkedSyncing = \"syncing\"\n\t// ParkedDropped: the armed pull request left the merge queue disarmed (a\n\t// failed merge-group check, named in the note), or its head moved under\n\t// it, or the loop's own toggle of its arming left it disarmed (the\n\t// refusal, naming the command that re-arms it, is the note), so it will\n\t// not merge on its own (iss-2610090642376032). It is still\n\t// renewed: a person re-arms it, and a release's hold, which withdraws\n\t// armed merges and re-arms them after, reads the same in the listing.\n\tParkedDropped = \"dropped\"\n\t// ParkedStopHolds: a stop's mark stands on the run, so the move did nothing for it,\n\t// whatever its pull request says; the note says what takes it up.\n\tParkedStopHolds = \"stop-holds\"\n)\n```\nWhat a move read a parked lane's pull request as.\n\n```go\nconst (\n\t// DrainOriginFetch: the fetch from origin failed.\n\tDrainOriginFetch = \"fetch\"\n\t// DrainOriginDefaultBranch: the fetch could not read origin's default\n\t// branch (renamed since this checkout last knew it), or its commit could\n\t// not be resolved.\n\tDrainOriginDefaultBranch = \"default-branch\"\n\t// DrainOriginHead: this checkout names no default branch of origin (no\n\t// origin/HEAD, and no origin/main, master, trunk or develop).\n\tDrainOriginHead = \"origin-head\"\n)\n```\nWhy a drain move could not read origin: the kinds an origin wait records.\n\n```go\nconst (\n\t// DrainWaitCap: the drain's holder is at the cap of live reservations.\n\tDrainWaitCap = \"cap\"\n\t// DrainWaitHeld: every eligible issue left is held by another.\n\tDrainWaitHeld = \"held\"\n)\n```\nThe waits a drain makes, in waiting.\n\n```go\nconst (\n\tStageRunner   = \"runner\"\n\tStageFallback = \"fallback\"\n)\n```\nStageRunner is the record's stage for a role a runner ran, and StageFallback for one a runner did not.\n\n```go\nconst (\n\tFindingApplied  = \"applied\"\n\tFindingRejected = \"rejected\"\n\tFindingUnknown  = \"unknown\"\n)\n```\nThe statuses a fix report gives a finding.\n\n```go\nconst (\n\tDrainJudgementRequestRel = RunRelDir + \"/drain-judgement.request.md\"\n\tDrainJudgementAnswerRel  = RunRelDir + \"/drain-judgement.json\"\n)\n```\nDrainJudgementRequestRel is the request the drain writes for the host, and DrainJudgementAnswerRel where the host writes its answer. One judgement is awaited at a time, so each is one file beside the drain's state.\n\n```go\nconst (\n\t// JudgementYes: the remedy changes what a user sees or a trust boundary;\n\t// the issue is handed back.\n\tJudgementYes = \"yes\"\n\t// JudgementNo: it changes neither; the lane opens.\n\tJudgementNo = \"no\"\n)\n```\nThe answers to the one question.\n\n```go\nconst (\n\t// Remote is the remote a lane lands through: the one the default branch\n\t// is read from.\n\tRemote = \"origin\"\n\t// LandDirName is the lane's directory the landing writes into.\n\tLandDirName = \"land\"\n\t// PRBodyFileName is the pull request's body as the loop composed it, and\n\t// PRStrippedFileName the body re-read from the forge and stripped.\n\tPRBodyFileName     = \"pr-body.md\"\n\tPRStrippedFileName = \"pr-body.stripped.md\"\n)\n```\nThe landing's fixed names.\n\n```go\nconst (\n\t// SeriesStoppedCap: the series made --max picks.\n\tSeriesStoppedCap = \"cap\"\n\t// SeriesStoppedEmpty: no candidate is left.\n\tSeriesStoppedEmpty = \"empty\"\n)\n```\nWhy a series ended.\n\n```go\nconst (\n\tSeriesPickInProgress = \"in-progress\"\n\t// SeriesPickDelivered: the run is complete.\n\tSeriesPickDelivered = \"delivered\"\n\t// SeriesPickHandedBack: a lane of the run was handed back, so the lane\n\t// stopped; the run stays for the person.\n\tSeriesPickHandedBack = \"handed-back\"\n\t// SeriesPickRemoved: the run's directory was removed, the way out of a\n\t// handed-back run.\n\tSeriesPickRemoved = \"removed\"\n)\n```\nWhat a series' pick has come to, as the series reads its run.\n\n```go\nconst (\n\tStageOutage        = \"outage\"\n\tDrainStoppedOutage = \"outage\"\n)\n```\nStageOutage is the refusal stage of a run that gave up on an outage, and DrainStoppedOutage why a drain ended on one.\n\n```go\nconst (\n\tBundledWorkMinutes  = 120\n\tBundledPauseMinutes = 0\n\tBundledSubAgents    = 2\n)\n```\nThe bundled pace: 120 minutes of work, no pause, two lanes (decision 5, the product thinker's numbers for this repository's runs on 2026-09-20, with the pause removed by the product thinker's ruling of 2026-10-10). A repository that wants a pause writes its own under \\`pace\\` in its .abcd/config.json.\n\n```go\nconst (\n\tStageRateLimit  = \"rate-limit\"\n\tStageCheckpoint = \"checkpoint\"\n)\n```\nStageRateLimit is the run record's stage for a rate-limit response, and StageCheckpoint for a lane it checkpointed.\n\n```go\nconst (\n\tHandBackUserVisible   = \"user-visible\"\n\tHandBackTrustRule     = \"trust-rule\"\n\tHandBackDesignFinding = \"design-finding\"\n\tHandBackSecondPackage = \"second-package\"\n)\n```\nThe kinds a lane hands an issue back as (itd-82: a reviewer's design finding, a second package, a user-visible change the remedy did not name, and a rule about trust or safety).\n\n```go\nconst (\n\tStageTranscript = \"transcript\"\n\tStageRecord     = \"record\"\n)\n```\nStageTranscript is the run record's stage for a captured transcript, and StageRecord the refusal stage of the record's own verb.\n\n```go\nconst (\n\tStageReservationRenewed     = \"reservation_renewed\"\n\tStageReservationRenewFailed = \"reservation_renew_failed\"\n\t// StageReservationReleased is a step's release of an issue run's\n\t// reservation when its lane is handed back.\n\tStageReservationReleased = \"reservation_released\"\n\t// StageReservationReleaseFailed is a step's release of an issue run's\n\t// reservation that could not push the tombstone: the drain routing the\n\t// hand-back tries it again.\n\tStageReservationReleaseFailed = \"reservation_release_failed\"\n)\n```\nThe run record's stages for the run's reservation.\n\n```go\nconst (\n\tStageReservation = \"reservation\"\n\tCheckReservation = \"reservation\"\n)\n```\nStageReservation is the refusal stage, and the run record's stage, of a run's start that reserves its key; CheckReservation is the check a drain names when it passes over an issue another holds.\n\n```go\nconst (\n\tAsideDirName   = \"aside\"\n\tAsideFileName  = \"aside.json\"\n\tAsidePatchName = \"changes.patch\"\n)\n```\nThe aside a restart saves, under the lane's directory of the run: \\\u003clane-dir\u003e/aside/\\\u003cUTC stamp\u003e/.\n\n```go\nconst (\n\tWhyDied = \"agent died\"\n\n\t// NetworkLinePrefix opens the line an agent yielding on a network failure\n\t// hands back.\n\tNetworkLinePrefix = \"NETWORK:\"\n)\n```\nThe reasons a restart records.\n\n```go\nconst (\n\tClassResearch = \"research\"\n\tClassTop      = \"top\"\n\tClassDefault  = \"default\"\n\tClassSmall    = \"small\"\n)\n```\nThe model classes, strongest first, named for what each is for (itd-2611101419006280 decision 1): research, top, default and small. They renamed the scale of iss-2610140652230444's ruling of 2026-10-14 one for one (top, middle, below and smallest), and the old names are refused, never aliased, since the old top and the new top are different classes.\n\n```go\nconst (\n\tJudgeWaiting = \"waiting\"\n\tJudgeActive  = \"active\"\n)\n```\nThe statuses a judge is stored with.\n\n```go\nconst (\n\tStageRetry  = \"retry\"\n\tStagePaused = \"paused\"\n)\n```\nStageRetry is the record's stage for a held role retried on its runner, and StagePaused for a role its runner failed to start.\n\n```go\nconst (\n\tHoldBeforePush = \"push\"\n\tHoldBeforeArm  = \"arm\"\n)\n```\nThe landing steps a hold stops before.\n\n```go\nconst (\n\tModelAsked    = \"asked\"\n\tModelReported = \"reported\"\n\tModelUnsent   = \"unsent\"\n)\n```\nThe statuses of a reviewer's model.\n\n```go\nconst (\n\tComparisonAgree    = \"agree\"\n\tComparisonDisagree = \"disagree\"\n\tComparisonNone     = \"none\"\n)\n```\nThe outcomes of a comparison.\n\n```go\nconst (\n\tBundledStuckRefusals = 3\n\tBundledStuckMinutes  = 60\n)\n```\nThe bundled stuck bounds (dcn-2610161040382067): three identical refusals, or sixty minutes refusing at one stage. A repository sets its own under \\`pace\\` in .abcd/config.json, a machine in ~/.abcd.noindex/config.json.\n\n```go\nconst (\n\t// TerminalStopped: a stop was asked for.\n\tTerminalStopped = \"stop\"\n\t// TerminalOutage: failures ran through the outage schedule to its limit.\n\tTerminalOutage = \"runner-outage\"\n\t// TerminalWall: a wall checked before a stage no longer held.\n\tTerminalWall = \"wall\"\n\t// TerminalRefused: a move refused in a way the run cannot go past.\n\tTerminalRefused = \"refused\"\n\t// TerminalHalted: a stop set from outside this terminal holds, or one a run\n\t// keeps stands against it (itd-2611041549471712). What the run holds is that\n\t// stop's to let go.\n\tTerminalHalted = \"halted\"\n\t// TerminalLimited: the account's rate limit outlasts what a drive waits.\n\tTerminalLimited = \"rate-limited\"\n\t// TerminalWaited: nothing moved for as long as a drive waits.\n\tTerminalWaited = \"waited\"\n\t// TerminalUntil: the bound the person set with --until has passed.\n\tTerminalUntil = \"until\"\n\t// TerminalKilled: the context ended, a second signal: the agent's process\n\t// group was killed, and what it held lapses on its own unless a load-gate\n\t// waiter in this copy renews it (gateWaiterRenews).\n\tTerminalKilled = \"killed\"\n\t// TerminalPassedLanes: the only lanes the drain has left in progress are ones the\n\t// drive passed over, since it may not save them (PassedLane): the drain stays open,\n\t// and a drive that may save them takes them up.\n\tTerminalPassedLanes = \"passed-lanes\"\n)\n```\nWhy a terminal run ended that the drain's own Stopped does not say.\n\n```go\nconst (\n\tUnattendedBuild = \"build\"\n\tUnattendedDrain = \"drain\"\n)\n```\nThe kinds of unattended work.\n\n```go\nconst (\n\tRoleRuthless = \"ruthless-reviewer\"\n\tRoleSecurity = \"security-reviewer\"\n\tRoleAuditor  = \"intent-auditor\"\n)\n```\nThe validators, by the agent definition each is started as.\n\n```go\nconst (\n\tValidateDirName      = \"validate\"\n\tFixDirName           = \"fix\"\n\tReturnFileName       = \"return.md\"\n\tVerdictFileName      = \"verdict.json\"\n\tAuditRequestFileName = \"request.md\"\n)\n```\nThe files of a validation round.\n\n```go\nconst AcceptConfigFlag = \"--accept-config-change\"\n```\nAcceptConfigFlag is the \\`implement step\\` flag that accepts a changed configuration once the person has looked at it.\n\n```go\nconst BranchPrefix = \"build/\"\n```\nBranchPrefix is the namespace every lane branch is cut under.\n\n```go\nconst BundledBundleMax = 1\n```\nBundledBundleMax is the most issues one drain lane takes when nothing sets drain.bundle\\_max: 1, so a drain bundles only where a person sets the key, until the split and the drain's figures exist (decision 12).\n\n```go\nconst BundledEffort = \"high\"\n```\nBundledEffort is every class's effort when the machine names none.\n\n```go\nconst BundledFixRounds = 3\n```\nBundledFixRounds is the fix rounds a lane may take before it is handed back when nothing sets it (ruling DR1 of 2026-09-29: \"tied to the pace settings, a per-run value set alongside --pace, default 3\"; itd-50 decision 2).\n\n```go\nconst BundledJudge = ClassTop\n```\nBundledJudge is the bundled judge's class: the class between the pair. It runs only once a judge agent has cleared itd-81's calibration gate, and until then a run starts with it waiting (decision 5).\n\n```go\nconst (\n\tBundledMaxReviewers = 2\n)\n```\nBundledMaxReviewers is the ceiling on reviewers per role when the machine sets none, and maxReviewers the most any ceiling may be.\n\n```go\nconst CheckBudget = \"budget\"\n```\nCheckBudget is the budget check's row among the start's checks, and the run record's stage for it.\n\n```go\nconst CheckFootprint = \"footprint\"\n```\nCheckFootprint is the exclusion of a planned intent whose spec names no footprint packages to reserve it with, or names one by prose rather than by its path, in a checkout with a remote named origin: its start would be refused at the reservation.\n\n```go\nconst CheckLapsed = \"lapsed\"\n```\nCheckLapsed is the pass-over of an issue whose judgement request lapsed unanswered, while its cool-down runs.\n\n```go\nconst CheckNeedsPerson = \"needs-a-person\"\n```\nCheckNeedsPerson is the pass-over of an issue a drive may not work.\n\n```go\nconst CheckOverlap = \"overlap\"\n```\nCheckOverlap is the exclusion of a planned intent whose start-time footprint shares a path with another copy's live reservation of another record, as this checkout last fetched them: its start would be refused at the reservation (iss-2611182334466021).\n\n```go\nconst CheckRun = \"run\"\n```\nCheckRun is the exclusion of a planned intent this checkout already has a run in progress for: the pick starts a run, never resumes one.\n\n```go\nconst CheckSeries = \"series\"\n```\nCheckSeries is the exclusion of a planned intent the series in progress has already picked: a series picks each intent once, whatever its run came to.\n\n```go\nconst CheckSkipped = \"skipped\"\n```\nCheckSkipped is the pass-over of an issue the drain's skip list holds back.\n\n```go\nconst ConfigFingerprintFileName = \"config-fingerprint.json\"\n```\nConfigFingerprintFileName is the tripwire's file, beside the run's state.\n\n```go\nconst ConventionsFile = \"AGENTS.md\"\n```\nConventionsFile is the file a brief's conventions are read from.\n\n```go\nconst DrainFromJudgement = \"judgement\"\n```\nDrainFromJudgement marks a hand-back the host judgement made, in a DrainRoute's From.\n\n```go\nconst DrainFromReservation = \"reservation\"\n```\nDrainFromReservation is a hand-back's From when the drain could not reserve the issue: its found\\_at names no path to reserve it with.\n\n```go\nconst DrainJudgementSchemaVersion = 1\n```\nDrainJudgementSchemaVersion is the answer's shape.\n\n```go\nconst DrainSchemaVersion = 4\n```\nDrainSchemaVersion is the drain state's shape.\n\nVersion 2 added a route's pins and override to a routed judge's stored route: a judgement's route carries the pin and sealed configuration's SHA-256 of a pinned opencode run (\\`provider\\_pin\\`, \\`pin\\_config\\_sha256\\`), a route to a model on this machine its local pin, what its server reported and that it is local (\\`local\\_pin\\`, \\`local\\_served\\`, \\`local\\`), and the route record's \\`override\\`, as the run state's version 16 does. The field comes with the route record the two share; no drain flag sets it. Version 1 is its strict subset, read as a drain whose judge was pointed at no pin and carries no override, and written back at version 2; a file of version 1 carrying any of them is not one its version wrote, and is refused naming the key. v0.15.1 reads no version first, so it refuses a version-2 file as one that does not parse; releases after it that write version 1 refuse it as a newer abcd's before any strict decode.\n\nVersion 3 added a judge fallback receipt's \\`spent\\`, as the run state's version 19 does (iss-2611021751406429): what a judge's launch killed past its time spent. Versions 1 and 2 are its strict subsets, read as a drain no killed judge fell back from, and written back at version 3; a file of version 2 or lower carrying it is refused naming it. Releases that write version 2 refuse a version-3 file as a newer abcd's before any strict decode.\n\nVersion 4 is a drain that bundles issues (itd-2611201450052326), defined whole at once so no later step raises it again: the drain's \\`bundle\\_max\\`, the cap it started with, with its layer and origin; a lane's \\`bundle\\`, the members it took, and \\`split\\`, a bundle the drain split; the drain's \\`forming\\`, the bundle its moves are forming; and a lane's \\`ci\\_minutes\\`, the time its pull request's checks ran. Each is written only by the step that uses it. Version 3 and lower are its strict subsets, read as a drain that started with the bundled cap, its layer recorded as \\`bundled\\`, and opened no bundle, and written back at version 4; a file of version 3 or lower carrying any of them is refused naming it. Releases that write version 3 refuse a version-4 file as a newer abcd's before any strict decode.\n\n```go\nconst DrainStateRel = RunRelDir + \"/drain.json\"\n```\nDrainStateRel is the drain's state file, beside the runs. Its name is not a run id, so the run listing never reads it as one.\n\n```go\nconst DrainStoppedOrigin = \"origin\"\n```\nDrainStoppedOrigin is why a drain ended that waited on origin through the outage schedule's hourly stage and gave up.\n\n```go\nconst FindingStruck = \"struck\"\n```\nFindingStruck is the status of a finding the round's judge struck.\n\n```go\nconst HandBackClosed = claim.HandBackClosed\n```\nHandBackClosed is the kind a parked lane whose pull request was closed unmerged is handed back as; a lane's receipt cannot name it.\n\n```go\nconst HandBackNotPlanned = \"not-planned\"\n```\nHandBackNotPlanned is the verdict an auto-plan lane is handed back with: the substitute did not hold, so the draft is the person's to plan.\n\n```go\nconst HandBackStuck = claim.HandBackStuck\n```\nHandBackStuck is the kind a stuck lane is handed back as; a lane's receipt cannot name it.\n\n```go\nconst HeldBackRel = \".abcd/.work.local/logs/drive-held-back.log\"\n```\nHeldBackRel is the file that keeps what a drive held back.\n\n```go\nconst JudgeDirName = \"judge\"\n```\nJudgeDirName is the judge's directory in a round.\n\n```go\nconst NextSeriesRel = RunRelDir + \"/next.json\"\n```\nNextSeriesRel is the series' state file, beside the runs. Its name is not a run id, so the run listing never reads it as one.\n\n```go\nconst NextSeriesSchemaVersion = 1\n```\nNextSeriesSchemaVersion is the series state's shape.\n\n```go\nconst PlanReviewDirName = \"plan-review\"\n```\nPlanReviewDirName is the lane's directory of plan reviews.\n\n```go\nconst QueueStateQuery = `query($o:String!,$r:String!,$n:Int!){repository(owner:$o,name:$r){pullRequest(number:$n){id state headRefOid isInMergeQueue mergeQueueEntry{state position} autoMergeRequest{mergeMethod enabledAt} mergeStateStatus timelineItems(last:1,itemTypes:[REMOVED_FROM_MERGE_QUEUE_EVENT]){nodes{... on RemovedFromMergeQueueEvent{createdAt reason}}}}}}`\n```\nQueueStateQuery is the forge's GraphQL query for an armed pull request's place in the merge queue: \\`gh pr view --json\\` has no merge-queue field, so it is read through the forge's API, as \\`abcd land\\` reads it. It reads the node id the enqueue call names, the head (the queue and a re-arm are pinned to it), whether it is queued, the arming and its age, the merge state, and the last removal from the queue with the forge's reason. Every field is pinned in internal/ghcontract.\n\n```go\nconst ReceiptSchemaVersion = 1\n```\nReceiptSchemaVersion is the receipt's shape.\n\n```go\nconst ReviewRequestFileName = \"request.md\"\n```\nReviewRequestFileName is the request a reviewer route is sent, beside the reviewer's brief.\n\n```go\nconst ReviewerModelPrefix = \"Reviewer model:\"\n```\nReviewerModelPrefix opens the line a reviewer's return names the model it ran on with.\n\n```go\nconst RoleDrainJudge = \"drain-judge\"\n```\nRoleDrainJudge is the drain's judge, the role roles.drain-judge.runner routes.\n\n```go\nconst RoleImplementer = \"implementer\"\n```\nRoleImplementer is the agent the implement stage hands a lane to.\n\n```go\nconst RoleJudge = \"review-judge\"\n```\nRoleJudge is the role a review set's judge is handed out as.\n\n```go\nconst RunIDFamily = \"run\"\n```\nRunIDFamily is the run id's prefix; the id is minted through the record-id seam (adr-45), so two checkouts starting runs in one second draw distinct ids.\n\n```go\nconst RunRelDir = TierRelDir + \"/run\"\n```\nRunRelDir is the directory every run of this checkout lives under.\n\n```go\nconst SchemaVersion = 31\n```\nSchemaVersion is the state file's shape. A file carrying a version this build does not know is refused rather than read as this one: a field a later build added and this one would drop on its next write is a run silently losing state.\n\nVersion 2 added the run's pace (itd-2609201925079472). Version 1 is its strict subset, so a version-1 file is read as a run started before the loop paced a run: it carries no pace, runs unpaced, and is written back at version 2 by its next mutation. A version-1 file carrying a pace is not one version 1 wrote, and is refused.\n\nVersion 3 added the pick \\`abcd build next\\` made (itd-2609211116005482): the run's \\`pick\\` and a lane's \\`pick\\_sha\\`. Versions 1 and 2 are its strict subsets, read as runs no pick started and written back at version 3; one of them carrying a pick is not one its version wrote, and is refused.\n\nVersion 4 renamed the lane's stage (BU1, iss-2609291313276243): a lane's and a record line's \\`step\\` became \\`stage\\`, so the word \"step\" names only the spec's steps. Versions 1 to 3 wrote \\`step\\`, and are migrated on read: the read carries each \\`step\\` over to \\`stage\\` and writes nothing, and the run's next mutation writes the file back at version 4, as it does for the versions before. One of them that already says \\`stage\\` is not one its version wrote, and is refused.\n\nVersion 5 added the validate stage's record (spc-2609202134338445 piece 8): a lane's \\`validation\\`, its rounds and the verdicts the loop recorded. Version 4 is its strict subset, read as a run no validator has judged yet and written back at version 5; a version-4 file carrying a validation is not one version 4 wrote, and is refused.\n\nVersion 6 added the fix-round cap (ruling DR1, 2026-09-29): the pace's \\`fix\\_rounds\\`, and a lane's \\`hand\\_back\\` when it takes its cap of fix rounds without passing. Version 5 is its strict subset, read as a run started before the pace carried the cap, which runs on the bundled one, and written back at version 6; a version-5 file carrying either is not one version 5 wrote, and is refused.\n\nVersion 7 added the landing and the run record's transcripts (spc-2609202134338445 pieces 9 and 10): a lane's \\`landing\\`, the captures its receipts declared fixed (\\`resolves\\`) and the receipts it verified (\\`receipts\\`, each with the model its runner reported), and the run's \\`transcripts\\`. Version 6 is its strict subset, read as a run nothing has landed yet and written back at version 7; a version-6 file carrying any of them is not one version 6 wrote, and is refused.\n\nVersion 8 added the runner's record (itd-2609201916056194, spc-2609202134338445 piece 3): the run's \\`fallbacks\\`, one receipt per role a runner did not run, and the \\`route\\` a verified receipt or a validator's return names when a runner, not the host, ran its agent. Version 7 is its strict subset, read as a run the host ran every agent of and written back at the current version; a version-7 file carrying either is not one version 7 wrote, and is refused.\n\nVersion 9 made a run work in parallel up to its ceiling (ruling DR6, spc-2609202134341288): a lane's \\`awaits\\`, a list replacing the one \\`awaiting\\`, the run's \\`waiting\\`, a lane's \\`syncs\\` and \\`hold\\`, a pending step's \\`needs\\`, and the lane stages \\`held\\` and \\`discarded\\`. A file of version 8 or lower reads as a run whose lanes each await zero or one agent (its \\`awaiting\\` becomes a one-entry \\`awaits\\`) and is written back at version 9; a landing's \\`check\\_wait\\_since\\` (ruling DR6d-2) is version 9's too, added before any release wrote the version; one of them carrying anything only version 9 writes is refused, and so is a file of version 9 or later carrying \\`awaiting\\`, which no version since 8 writes.\n\nVersion 10 added an await's \\`kept\\` (iss-2610100913086397): why a rate-limit checkpoint kept the await when it could not save the gone agent's return aside, which \\`--restart\\` re-tells. Version 9 is its strict subset, read as a run no rate limit kept an await of and written back at version 10; a file of version 9 or lower carrying \\`kept\\` is not one its version wrote, and is refused. Releases that write version 9 (up to v0.13.4) decode a newer file strictly before they check its version: a version-10 file carrying \\`kept\\` reaches them as a file that does not parse, with a remedy to restore it or remove the run directory, and one without \\`kept\\` as a version they do not know.\n\nVersion 11 added the run's reservation on the shared remote (itd-2609091034175565, spc-2610031753359849 spec 2): the run's \\`reserved\\_at\\`, which \\`implement step\\` renews, fences and tombstones. Version 10 is its strict subset, read as a run that holds no reservation and written back at the current version; a file of version 10 or lower carrying \\`reserved\\_at\\` is not one its version wrote, and is refused.\n\nVersion 12 added an await's \\`answered\\` (itd-6): the reviewer route and the SHA-256 of the answer its step placed at the await's return path, under the run's lock, so the receipt records the review as the route's when the return its verifier reads is that answer. Version 11 is its strict subset, read as a run no route placed an answer for, its \\`reserved\\_at\\` kept, and written back at version 12; a file of version 11 or lower carrying \\`answered\\` is not one its version wrote, and is refused. Releases that write version 10 (v0.14.0 and v0.14.1), and builds that write version 11, decode a newer file strictly before they check its version: a version-12 file carrying \\`answered\\` or \\`reserved\\_at\\` reaches them as a file that does not parse (\\`unknown field\\`), with a remedy to restore it or remove the run directory, which would throw the run away; the run is intact, and the newer abcd that wrote it reads it. A version-12 file carrying neither reaches them as a version they do not know. From version 12 on, decodeState refuses a version above its own before any strict decode, so whatever a later version adds is read as a newer abcd's file, never as one that does not parse.\n\nVersion 13 added a lane's \\`refused\\` (spc-2610161044461448 step 5): an issue run's lane logs its run of refused steps, which a drain reads to hand a stuck lane back. Version 12 is its strict subset, read as a run whose lanes have refused nothing and written back at the current version; a file of version 12 or lower carrying \\`refused\\` is not one its version wrote, and is refused. Releases that write version 12 refuse a version-13 file as a newer abcd's.\n\nVersion 14 added both sides of a run (itd-166): a runner's route record on a verified receipt or a validator's return carries the model the runner asked for, the prompt's hash, the served models, provider, finish reason and harness version the harness reported, the token counts and cost, and the fields it could not pin (runner.Sides). Version 13 is its strict subset, read as a run whose routes recorded neither side, its lanes' \\`refused\\` kept, and written back at the current version; a file of version 13 or lower carrying either side is not one its version wrote, and is refused. Releases that write version 13 (v0.15.1) refuse a version-14 file as a newer abcd's before any strict decode.\n\nVersion 15 added the run's review set (itd-2610240922461281, spc-2610240951109420 step 1): the run's \\`review\\`, each role's reviewers at their model classes, the judge and the ceiling, with the layer of each. Version 14 is its strict subset, read as a run started before review sets, which carries none, and written back at the current version; a file of version 14 or lower carrying \\`review\\` is not one its version wrote, and is refused. Releases that write version 14 refuse a version-15 file as a newer abcd's.\n\nVersion 16 added a route's pins: a pinned opencode run's route carries its pin and the SHA-256 of the sealed configuration that held it (\\`provider\\_pin\\`, \\`pin\\_config\\_sha256\\`, iss-2610161734413178), and a route to a model on this machine its local pin, what its server reported and that it is local (\\`local\\_pin\\`, \\`local\\_served\\`, \\`local\\`, iss-2610161734428291). Version 15 is its strict subset, read as a run whose routes were pointed at no pin, its review set kept, and written back at version 16; a file of version 14 or 15 carrying any of them is not one its version wrote, and is refused naming the key, and one of version 13 or lower carrying any of them is refused with the sides it carries. Releases that write version 15 refuse a version-16 file as a newer abcd's before any strict decode. A route record's \\`override\\` (iss-2610161801358637), the \\`implement step --route\\` text verbatim on the verified receipt or the validator's return a runner ran under it, is version 16's too: it joined version 16 before any release wrote that version, so a file of version 15 or lower carrying it is not one its version wrote, and is refused naming the key. So is a validation round's \\`routes\\` (spc-2609251028149555, AC 10): the tier each role of the round ran at, the tier a failed round moved it up from, and the failing gate output that caused the switch.\n\nVersion 17 added a lane's \\`auto\\_plan\\` (spc-2609202134338445 step 11, adr-2610310235000654): the \\`abcd build --auto-plan\\` lane's draft and its digest, its two plan reviews with the verdicts the loop recorded, and the planned record and spec, beside the stages \\`plan-review\\` and \\`plan\\`. Version 16 is its strict subset, read as a run with no auto-plan lane and written back at version 17; a file of version 16 or lower carrying \\`auto\\_plan\\` is not one its version wrote, and is refused naming it. Releases that write version 16 refuse a version-17 file as a newer abcd's before any strict decode.\n\nVersion 18 added an await's \\`paused\\` and \\`running\\` (iss-2611012047534449, dcn-2611012113432054): why a role waits for the runner that failed to start it, rather than being handed to the host, and the runner a step started for it, claimed so no second step starts another. Version 17 is its strict subset, read as a run no runner paused and none holds, and written back at version 18; a file of version 17 or lower carrying either is not one its version wrote, and is refused naming it. Releases that write version 17 refuse a version-18 file as a newer abcd's before any strict decode.\n\nVersion 19 added a fallback receipt's \\`spent\\` (iss-2611021751406429): what a launch killed past its time or with its step spent, read from its transcript, or the agent run it is charged when that shows no cost. Version 18 is its strict subset, read as a run no killed launch fell back from, and written back at version 19; a file of version 18 or lower carrying it is not one its version wrote, and is refused naming it. Releases that write version 18 refuse a version-19 file as a newer abcd's before any strict decode.\n\nVersion 20 keyed a round by reviewer (itd-2610240922461281, spc-2610240951109420 step 3): a validator's \\`reviewer\\` index among its role's reviewers, the \\`class\\` the run's review set asked it for, the \\`model\\` the class resolved to and its \\`model\\_status\\` (asked, reported by the runner that ran it, or unsent when the reviewer route answered); an await's \\`reviewer\\`, \\`class\\` and \\`model\\`; and a round's \\`comparisons\\`, how each role's reviewers compared once all of them returned. Version 19 is its strict subset, read as a run whose rounds each ran one reviewer per role: that reviewer is index 0, at the path index 0 still takes, and asked for no class. It is written back at version 20; a file of version 19 or lower carrying any of them is not one its version wrote, and is refused naming it. Releases that write version 19 refuse a version-20 file as a newer abcd's before any strict decode.\n\nVersion 21 kept what a round was shown and how long a gate went unread: a round's \\`resolves\\_shown\\` and a landing's \\`gate\\_unread\\_since\\`. Version 20 is its strict subset, read as a run whose rounds were shown nothing, so a records commit from one goes to a person; a file of version 20 or lower carrying either is not one its version wrote, and is refused naming it. Releases that write version 20 refuse a version-21 file as a newer abcd's before any strict decode.\n\nVersion 22 kept the profile a drive runs the run on: the run's \\`profile\\`. Version 21 is its strict subset, read as a run no drive named one for; a file of version 21 or lower carrying one is not one its version wrote, and is refused naming it. Releases that write version 21 refuse a version-22 file as a newer abcd's before any strict decode.\n\nVersion 23 added a landing's \\`spec\\_settled\\`: the first step took an uncommitted change to the lane's own spec record, which its records commit carries. Version 22 is its strict subset, read as a landing that took none; a file of version 22 or lower carrying it is not one its version wrote, and is refused naming it. Releases that write version 22 refuse a version-23 file as a newer abcd's before any strict decode.\n\nVersion 24 kept each reviewer's located findings (itd-2610240922461281, spc-2610240951109420 step 4): a validator's \\`located\\` count and its \\`findings\\`, each a file and line with the fix report's \\`status\\` and the reviewers of the round citing it (\\`cited\\_by\\`). Version 23 is its strict subset, read as a run whose verdicts were recorded with no findings read; a file of version 23 or lower carrying them is not one its version wrote, and is refused naming them. Releases that write version 23 refuse a version-24 file as a newer abcd's before any strict decode.\n\nVersion 25 renamed the model classes for what each is for (itd-2611101419006280, spc-2611101423523725): a stored class label is one of research, top, default and small, where version 24 and earlier stored top, middle, below and smallest for the same classes; and a stored judge carries its \\`status\\`, waiting or active, fixed when the run started. A file of version 24 or lower is migrated on read: each label takes its new name (renamedClasses), each reviewer keeps the model it was resolved to, and a stored judge, which those versions kept only once its calibration had cleared, is active. Such a file carrying a label outside the four old names, or a judge's status, is not one its version wrote, and is refused. Releases that write version 24 refuse a version-25 file as a newer abcd's before any strict decode.\n\nVersion 26 added the run's \\`admitted\\` (itd-2610301850454860): the rule its lanes were admitted under, which each records commit carries as its \\`Admitted-by:\\` trailer. Version 25 is its strict subset, read as a run that recorded no admission, whose records step is refused naming the field; a file of version 25 or lower carrying one is not one its version wrote, and is refused naming it. Releases that write version 25 refuse a version-26 file as a newer abcd's before any strict decode.\n\nVersion 27 added the writers' and the reviewer's models (itd-2610301750162657, spc-2610301925429250 step 4): a reviewer's \\`writer\\_models\\`, every model that wrote into the lane up to the round, in the order they wrote; \\`reviewer\\_model\\`, the model it was asked for, or the one its runner reported once it returned; \\`reviewer\\_named\\`, the model its return named where that is not the same model; and \\`models\\_unrecorded\\`, set when a file of an earlier version is read on a reviewer it had already handed out. The review set gained \\`classes\\`, the whole class map the run started on, from which a reviewer whose class holds a writer's model takes another, and \\`unlaunchable\\`, the classes a drive's runners could not launch for each role when the run started. A receipt record gained \\`named\\`, the model its receipt named before the landing replaced it, and a lane \\`writers\\_launched\\`, each model a runner was started on for a role that writes into it. Version 26 is its strict subset, read as a run whose reviewers were dispatched before the comparison, and written back at version 27; a file of version 26 or lower carrying any of them is not one its version wrote, and is refused naming it. Releases that write version 26 refuse a version-27 file as a newer abcd's before any strict decode, and leave the run to the abcd that wrote it.\n\nVersion 28 added the review set's judge (itd-2610240922461281, spc-2610240951109420 step 5): a round's \\`judge\\`, the roles whose reviewers disagreed, the class, model and effort the run's active judge resolved to, its brief and return, whether it \\`ruled\\` and how many locations it \\`struck\\`, or why it was \\`unlaunched\\`; and a finding's \\`struck\\` status with the judge's \\`reason\\`. Version 27 is its strict subset, read as a run no judge ruled in, and written back at version 28; a file of version 27 or lower carrying either is not one its version wrote, and is refused naming it. Releases that write version 27 refuse a version-28 file as a newer abcd's before any strict decode.\n\nVersion 29 kept each location a round's judge struck, with its reason, on the judge (iss-2611182238519860): a round's judge's \\`strikes\\`, which outlive the round's findings once the next round opens. Version 28 is its strict subset, read as a run whose judges kept no strike, and written back at version 29: a ruled judge whose round still keeps its findings takes its strikes from them as the file is read, and one whose round's findings were dropped keeps its count alone. A file of version 28 or lower carrying a judge's strikes is not one its version wrote, and is refused naming them. Releases that write version 28 refuse a version-29 file as a newer abcd's before any strict decode.\n\nVersion 30 let a run carry members (itd-2611201450052326, spc-2611201455051897 step 1): an issue run's \\`bundle\\`, each member issue beside the lead with its footprint, its \\`reserved\\_at\\`, its \\`hand\\_back\\` once it is handed back alone and \\`split\\` once the drain has split the run; the run's \\`lead\\_hand\\_back\\`, the lead's own hand-back while its members go on; and a record line's \\`issue\\`, the issue a reservation line is for, written only in a run with members. A run with no members writes none of them, so its file differs from version 29's only in its version. Version 29 is its strict subset, read as a run with no members and written back at version 30; a file of version 29 or lower carrying any of them is not one its version wrote, and is refused naming it. Releases that write version 29 refuse a version-30 file as a newer abcd's before any strict decode.\n\nVersion 31 kept the digest of each validator's return as the loop read it when it recorded the verdict: a validator's \\`return\\_sha256\\`, which the landing holds every later read of that return to (recordedReturn). Version 30 is its strict subset, read as a run whose verdicts were recorded with no digest, whose returns the landing reads as they stand, and written back at version 31; a file of version 30 or lower carrying a digest is not one its version wrote, and is refused naming it. Releases that write version 30 refuse a version-31 file as a newer abcd's before any strict decode.\n\nA version raises when the abcd driving the run writes it. A lane's own abcd may be a version ahead of its driver, and what it saves leaves the version where it was (mutateReservation, iss-2611020719494343).\n\n```go\nconst StageAdmitted = \"admitted\"\n```\nStageAdmitted is the run record's stage for the rule the run's lanes were admitted under.\n\n```go\nconst StageClaim = \"claim\"\n```\nStageClaim is the refusal stage of a start whose shared-run claim is refused for a reason of the caller's own (a session that has not joined, a bound).\n\n```go\nconst StageConfig = \"config\"\n```\nStageConfig is the refusal stage of a step the run tripwire stopped.\n\n```go\nconst StageDrain = \"drain\"\n```\nStageDrain is the refusal stage of the drain run.\n\n```go\nconst StageDriveReleaseFailed = \"drive_release_failed\"\n```\nStageDriveReleaseFailed is the run record's stage for a release that did not reach origin: its note is the tip it left and nothing else.\n\n```go\nconst StageDriveReleased = \"drive_released\"\n```\nStageDriveReleased is the run record's stage for a reservation a drive let go as it ended, which the drive that takes the lane up reserves again.\n\n```go\nconst StageKilled = \"killed\"\n```\nStageKilled is the record's stage for a role killed after its work stood: the lane is kept at its stage for its receipt, not paused.\n\n```go\nconst StagePace = \"pace\"\n```\nStagePace is the refusal stage of a pace or ceiling the loop cannot run on.\n\n```go\nconst StagePick = \"pick\"\n```\nStagePick is the refusal stage of a pick that takes nothing.\n\n```go\nconst StageProfile = \"profile\"\n```\nStageProfile is the run record's stage for a drive marking a run that named no profile with its own.\n\n```go\nconst StageRefused = \"refused\"\n```\nStageRefused is the run record's stage for a lane's refused step.\n\n```go\nconst StageReleasedOver = \"drive_released_over\"\n```\nStageReleasedOver is the run record's stage for the record a drive's release let go of: its note is that record's blob on origin's default branch and nothing else, so the take-up can tell what the issue asks now from what the lane was working to.\n\n```go\nconst StageReservationLost = \"reservation_lost\"\n```\nStageReservationLost is the run record's stage for a reservation the view shows held by another person or copy.\n\n```go\nconst StageResume = \"resume\"\n```\nStageResume is the refusal stage and the run record's stage for a take-over.\n\n```go\nconst StageReview = \"review\"\n```\nStageReview is the refusal stage of the reviewer route.\n\n```go\nconst StageRoute = \"route\"\n```\nStageRoute is the record's stage for a --route the step did not use.\n\n```go\nconst StageRouting = \"routing\"\n```\nStageRouting is the refusal stage of a routing table or provider configuration the step cannot read.\n\n```go\nconst StageStop = \"stop\"\n```\nStageStop is the refusal stage and the run record's stage for a stop.\n\n```go\nconst StageTrial = \"trial\"\n```\nStageTrial is the run record's stage for the line a trial run's start writes.\n\n```go\nconst StageUnpaused = \"unpaused\"\n```\nStageUnpaused is the record's stage for a paused role the person has since routed to the host: the pause is cleared and the host's agent takes it.\n\n```go\nconst StageWidenedTo = \"reservation_widened_to\"\n```\nStageWidenedTo is the run record's stage for a path a lane's reservation was widened to; its note is the path and nothing else. A reservation made again names these beside the found\\_at (widenedPaths), so they outlive a deleted tip.\n\n```go\nconst StateFileName = \"state.json\"\n```\nStateFileName is the name of a run's state file inside its directory.\n\n```go\nconst SyncDirName = \"sync\"\n```\nSyncDirName is the lane's directory a sync's brief and receipt live in.\n\n```go\nconst TerminalResumeCommand = \"abcd drain --drive\"\n```\nTerminalResumeCommand resumes a run that left a lane.\n\n```go\nconst TerminalWaitFloor = 30 * time.Second\n```\nTerminalWaitFloor is the shortest wait the terminal loop makes: no wait a move names, and no retry, comes sooner.\n\n```go\nconst TierRelDir = landing.TierRelDir\n```\nTierRelDir is the local-ephemeral tier the run state lives in, the tier the preflight's receipts live in too (landing.TierRelDir). It is never created here.\n\n```go\nconst UnlessRunRenewed = \"unless a step or `abcd drain` run in this copy, or a load-gate waiter in this copy, renews it\"\n```\nUnlessRunRenewed is the clause a lapse says of a live reservation this copy's last push takes and a lane's run still in progress holds: a step or \\`abcd drain\\` run in this copy renews it (advanceWith; renewInProgress, or for a lane parked at its pull request renewParkedDue), as a load-gate waiter does. \\`abcd implement status\\` is not named: its renewal (RenewRunsIn) passes over a lane parked at its pull request (renewsWhereItWaits), and a lane named here may be one. A run handed back, stopped or let go keeps unlessWaiterRenews.\n\n```go\nconst VerdictCellFailed = \"cell-failed\"\n```\nVerdictCellFailed is the verdict a trial's lane is handed back with when the runner of the cell under test failed, refused or answered unparsably: the cell's failure, scored as such and run nowhere else.\n\n```go\nconst VerdictUnachievable = \"unachievable\"\n```\nVerdictUnachievable is the verdict a lane is handed back with: the run's fix rounds could not bring it to a passing round (itd-50's UNACHIEVABLE).\n\n## Variables\n\n```go\nvar BundledClasses = map[string]string{\n\tClassResearch: \"anthropic/claude-fable-5\",\n\tClassTop:      \"anthropic/claude-opus-5-5\",\n\tClassDefault:  \"anthropic/claude-sonnet-5-5\",\n\tClassSmall:    \"anthropic/claude-haiku-4-5\",\n}\n```\nBundledClasses is the bundled class map: one vendor's models, a default and not part of the rule (decision 3). For that vendor today the classes are Fable, Opus, Sonnet and Haiku (iss-2610140652230444).\n\n```go\nvar BundledReviewers = []string{ClassResearch, ClassDefault}\n```\nBundledReviewers is the bundled list each role runs: the research class and the default class, the widest spread between two reviewers (itd-2611101419006280 decision 4, reversing the top and default pair of itd-2610240922461281 decision 1).\n\n```go\nvar Classes = []string{ClassResearch, ClassTop, ClassDefault, ClassSmall}\n```\nClasses are the class names the class map carries, strongest first.\n\n```go\nvar DriveGates = []string{\"Makefile\", \"GNUmakefile\", \"makefile\", \"scripts/\", \".githooks/\", \"hooks/\", \".github/\",\n\t\".abcd/rules.json\", \".abcd/guard.json\", \".abcd/config.json\", \".abcd/config/\",\n\t\".abcd/.work.local/preflight-receipts/\", \".abcd/.work.local/approvals/\", \".abcd/.work.local/review-receipts/\",\n\t\".abcd/.work.local/reservation/\"}\n```\nDriveGates are what a lane's preflight, the driver's own git and the forge's workflows run, and abcd's own configuration, receipts and approvals, as paths: a change to one is a change to what judges the lane. They are kept in this one place for everything that names them: \\`abcd drain --drive\\`, which lands no lane that changes one and passes over an issue on one; and the issue brief, which names them to the implementer. A directory ends in a slash. The files under .abcd are the ones a drive's stage may not write either.\n\n```go\nvar EffortLevels = runner.EffortLevels\n```\nEffortLevels are the levels models.effort takes, lowest first: the five the harness takes (decision 6), the runner's own list, which refuses a request at any other.\n\n```go\nvar LaneOpened func()\n```\nLaneOpened, when set, is called once the worktree stage has made a lane's worktree, for a build's lane and a drain's alike, and not when it adopts one it made before. The front door sets it to ask for the Go build cache's trim, since a lane is what fills the cache, and it must return at once: it runs in the stage, under the run's lock. Nil calls nothing, so the loop's own tests start no trim.\n\n```go\nvar PlanSequence = []Stage{StagePlanReview, StagePlan}\n```\nPlanSequence is an auto-plan lane's stages (autoplan.go): its two plan reviews, then the plan.\n\n```go\nvar Sequence = []Stage{StageWorktree, StageBrief, StageImplement, StageValidate, StageLand}\n```\nSequence is the lane's stages in the order the loop performs them: make the lane's worktree, render its brief, hand it to an implementer and take the receipt, run the validators, land it. A lane past its last stage is StageDone.\n\n## Functions\n\n```go\nfunc AcceptConfigChange(repoRoot, runID string, o Options) ([]string, error)\n```\nAcceptConfigChange re-records the run's fingerprint from the repository as it stands, on the person's word once they have looked at what changed (\\`abcd implement step --accept-config-change\\`), and names in the run record each key or file it accepted. It returns those names; nothing changed (or a run with no fingerprint yet) accepts nothing and records the fingerprint alone.\n\n```go\nfunc ArmedLine(pr int) string\n```\nArmedLine says what a stop leaves of a pull request armed before it, which nothing disarms on its own.\n\n```go\nfunc AutoSweepForTest(ctx context.Context, repoRoot string) string\n```\nAutoSweepForTest is autoSweep, for a front door's test to prove that the sweep it installs is the one the loop runs.\n\n```go\nfunc CapDrainInProgress(repoRoot string, lanes int) error\n```\nCapDrainInProgress gives a drain in progress that has no cap one: lanes more than it has opened. A drive is always bounded (adr-2610222222326104), and a cap is otherwise set only when a drain starts.\n\n```go\nfunc CheckReviewersLaunch(o Options, repoRoot string) error\n```\nCheckReviewersLaunch refuses a review set o's runners cannot launch (iss-2611080057001367): each reviewer of each role, at its class's model, is put to the runner configuration's CanLaunch, the admission the dispatch makes, with no host session, as a drive has none. o.Runners is the configuration the lanes will launch on, a drive's walled one. A drive asks it before it takes its checkout or opens a lane, so a reviewer no route on this machine can run is refused there, naming the role, the model and the configuration to set, rather than waiting at review for ever. A review set that does not resolve is refused in the review stage's own words.\n\n```go\nfunc ClaimDriver(repoRoot, runID string, o Options) error\n```\nClaimDriver is the one call a driver makes before it steps a run: it records the host process this call runs under as the run's live driver, and refuses at exit 3 while another driver's process is alive (iss-2611022247128872). One gone is replaced, with an entry in the run's record, and so, for a drive's claim, is the process the drive's shell runs under where only shells run beneath it besides the drive, what it runs under and what it started (startedUnder). A table that cannot be read claims nothing and refuses nothing: a step is never stopped by the machine's process listing. A walk that names no host is a loop its session left behind (iss-2611022247128872): it claims nothing, and backs off from a live driver. Under a stop it claims nothing either: the stop is settled by the driver the run's agents ran under, and the move that follows gets the stop's refusal. Nor does it claim a run a stop halted, after the lift as before it: a step cannot move that run, and a session that tried must not stand in the way of the take-over the run waits for. The same holds of a run a drive stopped on (drive\\_stop.go), which no step moves either.\n\n```go\nfunc ClassRoutes(roots layered.Roots) ([]string, error)\n```\nClassRoutes is the routes the class map resolves on roots, the machine's models.classes over the bundled map, in class order (Classes): the routes a drive's walled launch of the claude harness may take by name (runner.Config.WithClassRoutes). A map that does not resolve is refused in the review stage's own words.\n\n```go\nfunc ConfigTripwire(repoRoot string) error\n```\nConfigTripwire checks every run in progress in the checkout, as a step would, for a git step taken outside a run's own step (the shared network probe \\`abcd implement outage probe\\` runs): the first changed run refuses it.\n\n```go\nfunc CurrentOutage(repoRoot string) (*implement.Outage, error)\n```\nCurrentOutage is the shared run's outage in force for the checkout, nil when there is none or the checkout has no shared run state. It writes nothing.\n\n```go\nfunc DrainSummaryLine(r DrainRoute) string\n```\nDrainSummaryLine is a route in one line, for the text surfaces.\n\n```go\nfunc DriveGate(path string, hooksPaths ...string) bool\n```\nDriveGate reports whether path, relative to the checkout, is one of DriveGates, or at, under or above one of the hooks paths the repository configures, hooksPaths (DriveHooksPaths): a change list names no directory, so a path above a hooks path is an entry, such as a link, standing where one of its parents was. A directory counts with or without its trailing slash. Each part of the name is compared as a case-folding filesystem compares it, whatever this machine's filesystem does (fsutil.FoldedPathMatch). A hooks path of the tree's top makes every path a gate, as a hooks directory counts with all below it, and an empty one names none. An empty path names nothing.\n\n```go\nfunc DriveHooksPaths(dir string) ([]string, error)\n```\nDriveHooksPaths are the paths, relative to dir, that gate the hooks the repository at dir configures: nil for none or a value outside dir. A relative value is taken from dir, where git runs hooks from. The value is placed as its text reads, cleaned, and as the filesystem resolves it, one part at a time (hooksHops): each link met on the way is a path, named by its own place, and so is where the walk ends, so a chain of links, a link above the hooks directory and a \"..\" after a link each name what git reaches. Every place is compared as this machine's filesystem compares names (fsutil.RelWithin), each one inside dir is one of the paths, and the same place is named once. It is read in the person's own environment, where what lands is pushed (personEnv): git saying the key is not set (exit 1, nothing written) is none; any other failure, a read that did not finish, or an answer abcd does not take is an error naming the read, so a caller never takes a hooks directory it could not read for none.\n\n```go\nfunc EstimateRuns(o Options, repoRoot string, lanes int) (int, error)\n```\nEstimateRuns is the agent runs a drive of lanes lanes may start, by the budget check's estimate.\n\n```go\nfunc HeldWorktrees(repoRoot string) (worktree.Held, error)\n```\nHeldWorktrees is what the build loop holds in the worktree store, for the store's prune (spc-2609301811532881): every lane of a run whose state is not complete, by the name laneName gives it in the store, read across the local tier of every checkout git lists for the repository, because a run's state lives in the checkout that started it. A state file that cannot be read holds every worktree named after its run; a run directory that cannot be listed fails the read, so prune removes nothing. It is a worktree.HeldReader.\n\n```go\nfunc JudgementSummary(j DrainJudgement) string\n```\nJudgementSummary is a judgement in one line, for the text surfaces.\n\n```go\nfunc LaneBranch(name string) bool\n```\nLaneBranch reports whether name is a branch with exactly the shape the loop gives a lane: BranchPrefix followed by \\\u003crun-id\u003e-\\\u003clane-id\u003e, each id one the loop mints (ValidRunID, ValidLaneID), as laneName composes them. A person's own branch under the prefix is not one.\n\n```go\nfunc LatestRun(repoRoot string) (string, error)\n```\nLatestRun names the run a record read addresses when none is named: the one run in progress when there is one, else the most recently started run in this checkout. Several runs in progress are refused, naming them; a handed-back issue run a newer run of the issue followed is not one (superseded).\n\n```go\nfunc ListHostRole(ctx context.Context, repoRoot, runID string, res StepResult, cfg *runner.Config)\n```\nListHostRole writes the launch ledger's placeholder for the role res leaves with the host, once DriveReview has had its turn, so the ledger never names a host that did not see the role. A route's answer comes back with the route named on it, and a fallback as the result Drive handed out, with none.\n\n```go\nfunc LoadRunners(r layered.Roots) (*runner.Config, error)\n```\nLoadRunners reads the runner configuration (runner.Load) at the roots a lane starts from, and refuses in the loop's refusal shape on any fault, a model route its provider's allowlist does not admit included, before a run is created or a runner launched (itd-2609201916056194 criterion 5). The configuration's diagnostics are the caller's to print.\n\n```go\nfunc OnAnotherProfile(l LaneOnProfile, profile string) string\n```\nOnAnotherProfile says why a drive on profile does not take l up, and what the person may do instead.\n\n```go\nfunc ReleaseReservation(repoRoot, key string, o Options) (claim.Result, error)\n```\nReleaseReservation is \\`abcd build \\\u003cid\u003e --release\\`: it pushes a tombstone over this person's reservation on id from this copy, and changes nothing in any run's state; a later step of the run meets the release at the land fence (C36). A key that is not an intent or issue id is refused by name.\n\n```go\nfunc Resolve(repoRoot, runID string) (string, error)\n```\nResolve names the run a call addresses. An explicit id is checked for shape and presence; no id addresses the one run in this checkout that is not complete, and is refused naming them when there are several, or none. An issue run handed back that a newer run of the issue has followed (superseded) is not counted: the newer run is the issue's.\n\n```go\nfunc RunCountRefusal(max int) error\n```\nRunCountRefusal is the pick's refusal of a --max below 1, which names no run count. Next refuses a negative Max with it; Max reads 0 when --max is not given, so a front door refuses an explicit --max 0 with it before calling Next, rather than let it read as no count (iss-2610121210280182).\n\n```go\nfunc SetAutoSweeper(f AutoSweeper) (restore func())\n```\nSetAutoSweeper installs f as the automatic sweep and answers a restore of the one before. nil installs none: nothing is swept.\n\n```go\nfunc StateRelPath(runID string) string\n```\nStateRelPath is a run's state file, relative to the checkout root.\n\n```go\nfunc StatusLanes(repoRoot string) ([]statusblock.Started, error)\n```\nStatusLanes is the state file read the status block's Now takes (itd-2609212103568351): one entry per run in progress, naming its intent and every lane of it alive (ruling DR6) — each lane's next stage and the roles it waits on, a held lane included — or, while no lane is alive and a spec step still waits, the run with its stage \"pending\". A complete run is not in a lane. An absent tier or run directory holds none. It is a statusblock.LaneReader.\n\n```go\nfunc StatusPeers(repoRoot string) (statusblock.HeldBy, error)\n```\nStatusPeers is the peers read the status block's head takes (ruling CC1 of 2026-09-29): build next's own peers check, read once for the block and judged per intent, so the board's \"next up\" passes over exactly the intents another checkout holds that the pick passes over. It judges on behalf of no session, so every live claim is a peer's. A peer the listing cannot read fails closed on each record, as it does for the pick. An intent whose start-time footprint shares a path with another copy's live reservation is passed over too, by the pick's own overlap judgement (overlapHeld, iss-2611182334466021), and so is one whose footprint the spec cannot name, the pick's footprint exclusion. It is a statusblock.PeerReader.\n\n```go\nfunc ValidLaneID(id string) bool\n```\nValidLaneID reports whether id is a lane id the loop opens.\n\n```go\nfunc ValidRunID(id string) bool\n```\nValidRunID reports whether id is a run id this package mints.\n\n```go\nfunc WaitOutProof(ctx context.Context, repoRoot string, o TerminalOptions, first error, prove func(context.Context) error) (string, error)\n```\nWaitOutProof waits out what stopped the drive's live proof short of a verdict: a limit, on the schedule any agent's limit waits on, or a launch that came to none, on the outage's unless it named its own wait. Each time it may go on it proves again. It returns why the wait ended the run, \"\" when prove has run clean or come to a verdict, and then what prove said. Nothing has started: what it may renew is what an earlier run left held.\n\n## Types\n\n```go\ntype Admitted = landings.Admitted\n```\nAdmitted is the rule a run's lanes were admitted under, in the grammar of the \\`Admitted-by:\\` trailer its records commits carry (landings.Admitted).\n\n```go\ntype AgentState string\n```\nAgentState is what the record can say of an agent a lane awaits.\n\n```go\nconst (\n\t// AgentAlive is an agent its own process, as its launch's ledger entry names\n\t// it, a recorded launch's process, or its runner claim's term, says is running.\n\tAgentAlive AgentState = \"alive\"\n\t// AgentLost is one whose own process the ledger names has gone, whose claim's\n\t// term has ended or whose driver is gone, or a host's agent with no recorded\n\t// driver older than one reservation lease.\n\tAgentLost AgentState = \"lost\"\n\t// AgentUnknown is one no process of its own is recorded for and nothing yet\n\t// says is gone, so it is taken to be in its call: it is never restarted, and a\n\t// stop waits for it.\n\tAgentUnknown AgentState = \"unknown\"\n\t// AgentPaused is a role waiting for its runner: no agent is out.\n\tAgentPaused AgentState = \"paused\"\n)\n```\n\n```go\ntype AliveLane struct {\n\tLane     string  `json:\"lane\"`\n\tSpecStep int     `json:\"spec_step\"`\n\tStage    Stage   `json:\"stage\"`\n\tAwaits   []Await `json:\"awaits\"`\n\tHold     *Hold   `json:\"hold,omitempty\"`\n\t// Waiting is the lane's wait for its full check, with the time it began\n\t// (ruling DR6d-2); empty when it waits for none.\n\tWaiting string `json:\"waiting,omitempty\"`\n}\n```\nAliveLane is one lane of a run with anything left, as a result reports it.\n\n```go\ntype AuditRun struct {\n\tReceiptID string `json:\"receipt_id\"`\n\tRequest   string `json:\"request\"`\n\t// BaseSHA..HeadSHA is the whole delivery: from the base of the run's first\n\t// lane to this lane's head.\n\tBaseSHA string `json:\"base_sha\"`\n\tHeadSHA string `json:\"head_sha\"`\n\t// Worst, NotMet and Inconclusive are read from the verdict.\n\tWorst        string   `json:\"worst,omitempty\"`\n\tNotMet       []string `json:\"not_met,omitempty\"`\n\tInconclusive []string `json:\"inconclusive,omitempty\"`\n}\n```\nAuditRun is the fidelity audit the lane that closes the spec takes, once, over the whole delivery (ruling AI): the receipt the close parks for the same record, the request, the range it reads, and what the loop read from the verdict. The verdict itself is the return the run names; the close consumes it (piece 9).\n\n```go\ntype AutoPlan struct {\n\t// Draft is the draft's path when the run started, relative to the\n\t// checkout root, and Digest the \"sha256:\u003chex\u003e\" of its bytes then.\n\tDraft  string `json:\"draft\"`\n\tDigest string `json:\"digest\"`\n\t// Checkout is the \"sha256:\u003chex\u003e\" of the checkout as the start found it:\n\t// its HEAD, its index's entries and their flags, and its working tree\n\t// outside the local tier (checkoutDigest).\n\tCheckout string `json:\"checkout\"`\n\t// Reviews are the two reviews, the design lens first.\n\tReviews []PlanReview `json:\"reviews\"`\n\t// Planned and Spec are the planned record's path and the spec plan\n\t// minted; empty until the plan stage ran.\n\tPlanned string `json:\"planned,omitempty\"`\n\tSpec    string `json:\"spec,omitempty\"`\n\t// UncopiedIndex is why the start's checkout digest did not copy the\n\t// checkout's index (indexNotRegular, indexReplaced or indexPastBound), and\n\t// empty when it copied it. A digest of an uncopied index never matches\n\t// again, so the end check could only hand the lane back: the lane's first\n\t// step hands it back at once, before any plan review is handed out.\n\tUncopiedIndex string `json:\"uncopied_index,omitempty\"`\n\t// PlanStarted is written, with both reviews passing and the substitute\n\t// checked again, by the plan stage's first step, before the step that\n\t// runs `intent plan`. Only a begun plan records what it made; a record\n\t// found in planned/ is never taken as this run's plan, and the mark only\n\t// says, in the hand-back, whether this run might have made it.\n\tPlanStarted bool `json:\"plan_started,omitempty\"`\n}\n```\nAutoPlan is an auto-plan lane's record: the draft as the start checked it, each review with the verdict the loop parsed from its return, and what the plan made.\n\n```go\ntype AutoSweeper func(ctx context.Context, repoRoot string) string\n```\nAutoSweeper runs the automatic sweep of the repository at repoRoot under ctx and answers the line the act it follows reports, \"\" for none. It reads its own setting: off, it removes nothing.\n\n```go\ntype Await struct {\n\t// Role is the agent the host starts: an implementer, or a validator that\n\t// did not implement.\n\tRole string `json:\"role\"`\n\t// Brief is the file the agent is handed.\n\tBrief string `json:\"brief\"`\n\t// Receipt is where the agent writes its receipt; `implement receipt` is\n\t// called with this path.\n\tReceipt string    `json:\"receipt\"`\n\tSince   time.Time `json:\"since\"`\n\t// Kept is why a rate-limit checkpoint kept the await: its agent is gone,\n\t// but what it left could not be saved aside (ratelimit.go). A restart\n\t// re-tells an await so marked; \"\" for every other await.\n\tKept string `json:\"kept,omitempty\"`\n\t// Answered is the reviewer route's answer its step placed at Receipt\n\t// (itd-6), recorded under the run's lock as it placed it; nil for every\n\t// other await, the host's included.\n\tAnswered *RouteAnswer `json:\"answered,omitempty\"`\n\t// Paused is why the role waits for its runner, which failed to start it\n\t// (runner_pause.go): it is handed to no one, the host included, and a\n\t// later step retries it; nil for every other await.\n\tPaused *RunnerPause `json:\"paused,omitempty\"`\n\t// Running is the runner a step started for the role, claimed under the\n\t// lock so no other step starts a second one; nil when none is running.\n\tRunning *RunnerClaim `json:\"running,omitempty\"`\n\t// Reviewer, Class and Model name a review set's reviewer (reviewers.go):\n\t// its index among its role's reviewers, the class it is asked for and the\n\t// \u003cprovider\u003e/\u003cmodel\u003e route the class resolves to, which a runner is\n\t// handed as the request's model and a host is asked to start the agent\n\t// on. Nil and empty for every other await.\n\tReviewer *int   `json:\"reviewer,omitempty\"`\n\tClass    string `json:\"class,omitempty\"`\n\tModel    string `json:\"model,omitempty\"`\n\t// Effort is the class's effort the reviewer is asked to run at, which a\n\t// runner that can pass it is handed and a host is asked for; empty for\n\t// every other await and for a run started before efforts.\n\tEffort string `json:\"effort,omitempty\"`\n}\n```\nAwait is what a lane waits on: the agent a host must start, the brief it is handed and the receipt it writes.\n\n```go\ntype CandidateSet struct {\n\t// Candidates pass every check, in the pick order.\n\tCandidates []intent.PickCandidate `json:\"candidates\"`\n\t// Excluded fail one, in record order.\n\tExcluded []Excluded `json:\"excluded\"`\n}\n```\nCandidateSet is the pick's view of the planned intents.\n\n```go\ntype CheckResult struct {\n\tKey    string     `json:\"key\"`\n\tIntent string     `json:\"intent,omitempty\"`\n\tSpec   string     `json:\"spec,omitempty\"`\n\tOK     bool       `json:\"ok\"`\n\tChecks []CheckRow `json:\"checks\"`\n\t// contains filtered or unexported fields\n}\n```\nCheckResult is every pre-start check for one key.\n\n```go\nfunc Check(repoRoot, key string) (CheckResult, error)\n```\nCheck runs the pre-start checks for key against the checkout at repoRoot. It returns an error only for a fault in reading this checkout (the store will not load, git will not answer); a record that may not start is a result with OK false.\n\nThe rows, in order:\n\n  - key: an intent id, or an issue id (decision 10's key). An issue key takes two rows after it and no others: eligible (the drained repository's own rule takes the issue, as \\`abcd drain\\` reads it) and peers (no peer holds it out of open/, and no session claims it).\n  - ready: the implement-readiness gate (intent.Ready) — planned, criteria, the spec linked and written, and the spec not saying it is not ready (spec.Unsettled, iss-2611101318042398). Its advisory rows stay advisory here.\n  - open\\_questions: no open question under \\`## Open Questions\\` (intent.StartChecksIn: every list item, less the settled markers).\n  - claim\\_sections: no unanswered claim section — the mechanism prompt answered or the section absent, the scope conditions recorded.\n  - hold: no \\`held:\\` on the record (iss-2609200830076665).\n  - blocked: nothing the record or its open spec names in \\`blocked\\_by\\` is unshipped (itd-2609211116005482: an intent with an unshipped blocker is not one a run may take); a superseded blocker is followed along \\`superseded\\_by\\` to its replacement, transitively (ruling BZ2 of 2026-09-29).\n  - steps: the spec's \\`## Steps\\` reads, and leaves a step to build.\n  - peers: no peer holds the record — no sibling worktree or local branch holds it in another bucket having changed it since its merge-base with this checkout (a branch no worktree has checked out holding nothing, iss-2611090125008163), no session holds a live claim on it, and, for an intent, no other copy holds a reservation on it on origin as this checkout last fetched them (read from disk alone).\n\n```go\ntype CheckRow struct {\n\tName   string `json:\"name\"`\n\tOK     bool   `json:\"ok\"`\n\tDetail string `json:\"detail\"`\n\tRemedy string `json:\"remedy,omitempty\"`\n\t// contains filtered or unexported fields\n}\n```\nCheckRow is one pre-start check's verdict.\n\n```go\ntype Checkpoint struct {\n\tLane   string `json:\"lane\"`\n\tBranch string `json:\"branch\"`\n\t// Head is the branch's last commit, \"\" when git cannot name it.\n\tHead string `json:\"head\"`\n\t// Aside is where the rate-limited agent's uncommitted work and partial\n\t// receipt were saved, relative to the checkout root; \"\" for a lane whose\n\t// agents were not the ones limited.\n\tAside string `json:\"aside,omitempty\"`\n\t// Out are the roles of the lane's agents still out after the checkpoint,\n\t// each of which may hand back its receipt inside the pause.\n\tOut []string `json:\"out\"`\n\t// Kept is why the limited agent's await was kept and its worktree left as\n\t// it was (the save aside was refused); \"\" when it was not.\n\tKept string `json:\"kept,omitempty\"`\n}\n```\nCheckpoint is one lane with work in flight, as a rate limit left it.\n\n```go\ntype Citer struct {\n\tRole     string `json:\"role\"`\n\tReviewer int    `json:\"reviewer\"`\n}\n```\nCiter is one reviewer of a round: its role and its index among the role's reviewers.\n\n```go\ntype ClosedLane struct {\n\tLane string `json:\"lane\"`\n\tPR   int    `json:\"pr\"`\n\t// Merged is the default branch's commit the landing records.\n\tMerged string `json:\"merged\"`\n}\n```\nClosedLane is a lane a build closed because its pull request had merged.\n\n```go\ntype Comparison struct {\n\tRole      string `json:\"role\"`\n\tReviewers int    `json:\"reviewers\"`\n\tOutcome   string `json:\"outcome\"`\n\t// Verdicts are the role's verdicts, in reviewer order, as the loop\n\t// recorded them.\n\tVerdicts []string `json:\"verdicts\"`\n}\n```\nComparison is how one role's reviewers in a round compared once every one of them had returned (reviewers.go): Outcome is ComparisonAgree, ComparisonDisagree (one verdict passes and another fails), or ComparisonNone when the role ran one reviewer, so no comparison was made. The round's verdict does not hang on it: any failing reviewer fails the round, which is the stricter verdict.\n\n```go\ntype Context struct {\n\tRepoRoot string\n\t// RunDir is the run's directory, relative to RepoRoot.\n\tRunDir string\n\tState  State\n\tNow    time.Time\n\t// Await is the await a verifier is handed the receipt of; nil for a body.\n\tAwait *Await\n\t// Route is the route that ran the agent whose receipt a verifier is\n\t// handed, when a runner ran it, with the model the runner reported; nil\n\t// for a body, a host-run agent and a placed answer (iss-2611022247103872).\n\tRoute *runner.RouteRecord\n\t// contains filtered or unexported fields\n}\n```\nContext is what a stage's body is handed: where the checkout and the run live, the run as it stood before the stage, and the clock.\n\n```go\ntype DoDRun struct {\n\tCommand  string `json:\"command\"`\n\tExitCode *int   `json:\"exit_code\"`\n\t// Output is the run's whole output, a path inside the lane's directory.\n\tOutput string `json:\"output\"`\n}\n```\nDoDRun is one run of the definition of done.\n\n```go\ntype DrainBundlePreview struct {\n\tLead    string   `json:\"lead\"`\n\tMembers []string `json:\"members\"`\n}\n```\nDrainBundlePreview is one lane the next moves would open with members, as \\`abcd drain --dry-run\\` shows it: the lead, and the members it would take.\n\n```go\ntype DrainCounts struct {\n\tLanesOpened int `json:\"lanes_opened\"`\n\tInProgress  int `json:\"in_progress\"`\n\t// PullRequests are the lanes whose landing opened a pull request, done\n\t// or not; whether one merged is a person's gate, and not counted.\n\tPullRequests    int `json:\"pull_requests\"`\n\tLanesHandedBack int `json:\"lanes_handed_back\"`\n\t// Promotions, DecisionRecords and Homes are the hand-backs the drain\n\t// routed, from its lanes and from the host judgement, by route.\n\tPromotions      int `json:\"promotions\"`\n\tDecisionRecords int `json:\"decision_records\"`\n\tHomes           int `json:\"homes\"`\n\t// RuleFlags are the rule's hand-backs over the ledger as this call read it,\n\t// less the issues this drain promoted itself, which Promotions counts.\n\tRuleFlags  int        `json:\"rule_flags\"`\n\tJudgements int        `json:\"judgements\"`\n\tPassed     int        `json:\"passed\"`\n\tSpend      DrainSpend `json:\"spend\"`\n\t// HandBacksByPR are the hand-backs per pull request the drain's lanes\n\t// opened (itd-2610301750162657): one entry for each pull request, in the\n\t// order its lane opened, none left out for having no hand-back.\n\t// HandBacksNoPR counts the hand-backs no pull request carries: the\n\t// judgement's, a reservation's, a field hand-back's, and a lane's that\n\t// opened none.\n\tHandBacksByPR []DrainPRHandBacks `json:\"hand_backs_by_pr\"`\n\tHandBacksNoPR int                `json:\"hand_backs_without_pr\"`\n}\n```\nDrainCounts are the drain's totals (itd-82 scope 8): its lanes by outcome, the pull requests they opened, its hand-backs by route, the rule's flags, the host judgements, the issues this call passed over, and the spend.\n\n```go\ntype DrainFinished struct {\n\tIssue string `json:\"issue\"`\n\tRunID string `json:\"run_id\"`\n\tPR    int    `json:\"pr,omitempty\"`\n\tDone  bool   `json:\"done\"`\n\tNote  string `json:\"note\"`\n}\n```\nDrainFinished is one merged lane a drain move took the landing's last step for: Done when its worktree and branch were removed and the lane marked done, otherwise Note says why the landing refused.\n\n```go\ntype DrainForming struct {\n\tLead    string               `json:\"lead\"`\n\tHold    *DrainHold           `json:\"hold,omitempty\"`\n\tMembers []DrainFormingMember `json:\"members\"`\n}\n```\nDrainForming is a bundle the drain is forming across its moves: the lead, whose judgement answered no, and each member a judgement has taken since, with the hold the drain took on each to judge it.\n\n```go\ntype DrainFormingMember struct {\n\tIssue string     `json:\"issue\"`\n\tHold  *DrainHold `json:\"hold,omitempty\"`\n}\n```\nDrainFormingMember is one member of a forming bundle and its hold.\n\n```go\ntype DrainHold struct {\n\tCommit        string    `json:\"commit\"`\n\tClaimedAt     time.Time `json:\"claimed_at\"`\n\tExpiresAt     time.Time `json:\"expires_at\"`\n\tForkUnchecked string    `json:\"fork_unchecked,omitempty\"`\n\tForkAllowed   string    `json:\"fork_allowed,omitempty\"`\n}\n```\nDrainHold is a reservation the drain took on an issue to judge it: the commit its push made, and when it was claimed and lapses. The drain releases that commit and no other, so a reservation this person made or renewed by hand since is left as it stands. ForkUnchecked and ForkAllowed are the fork check the act could not make or waived (claim's Result), kept so the lane a no opens on the hold says so as a lane that reserved for itself does (spc-2610161044461448 step 10).\n\n```go\ntype DrainJudgement struct {\n\tIssue        string    `json:\"issue\"`\n\tRemedySHA256 string    `json:\"remedy_sha256\"`\n\tAnswer       string    `json:\"answer\"`\n\tKind         string    `json:\"kind,omitempty\"`\n\tReason       string    `json:\"reason\"`\n\tApplied      bool      `json:\"applied\"`\n\tNote         string    `json:\"note,omitempty\"`\n\tAt           time.Time `json:\"at\"`\n\t// Hold is the reservation the answer was asked on, nil when the drain\n\t// took none: the lane a no opens on it, in this move or a later one,\n\t// names the fork check it could not make or waived.\n\tHold *DrainHold `json:\"hold,omitempty\"`\n\t// Route is the runner that answered, when the drain's judge is routed to\n\t// one (drain_judge.go); nil for the host's answer.\n\tRoute *runner.RouteRecord `json:\"route,omitempty\"`\n}\n```\nDrainJudgement is one answer the drain took: the question's answer, the kind a yes names, the host's reason, and whether it decided the issue's disposition (Applied) or, the issue having left the eligible set since the request, decided nothing (Note says why).\n\n```go\ntype DrainJudging struct {\n\tIssue        string    `json:\"issue\"`\n\tRemedySHA256 string    `json:\"remedy_sha256\"`\n\tRequest      string    `json:\"request\"`\n\tAnswer       string    `json:\"answer\"`\n\tRequestedAt  time.Time `json:\"requested_at\"`\n\t// Hold is the reservation the drain took on the issue to ask this\n\t// judgement; nil when it took none (no origin, or this person already\n\t// held the issue from this copy, which is theirs and never the drain's\n\t// to release).\n\tHold *DrainHold `json:\"hold,omitempty\"`\n\t// RoutedAsked and AdapterAsked mark who was asked this request and did\n\t// not answer, so the polls that follow while the host's request stands\n\t// ask neither again. RoutedAsked is the judge routed to a runner, true\n\t// once its runner was started (drain_judge.go): a judge that never\n\t// started (its directory not made, its request refused before any\n\t// launch) leaves it false, so the next move starts it. AdapterAsked is\n\t// the decision adapter, with eligibility-residual turned on, true once\n\t// it was asked and gave no answer the move could take (drain_decide.go).\n\t// Each is marked alone, so a failed adapter never stands for a runner\n\t// that never started.\n\tRoutedAsked  bool `json:\"routed_asked,omitempty\"`\n\tAdapterAsked bool `json:\"adapter_asked,omitempty\"`\n}\n```\nDrainJudging is the judgement the drain awaits before it opens an issue's lane: the issue, the digest of the remedy the request showed, and where the request and the answer are.\n\n```go\ntype DrainLane struct {\n\tIssue    string    `json:\"issue\"`\n\tRunID    string    `json:\"run_id\"`\n\tOpenedAt time.Time `json:\"opened_at\"`\n\tOutcome  string    `json:\"outcome\"`\n\tPR       int       `json:\"pr,omitempty\"`\n\t// Bundle is the members the lane took beside its issue, the lead; empty\n\t// for a lane of one issue. Split marks a bundle the drain split after it\n\t// failed, its issues taken up again alone.\n\tBundle []string `json:\"bundle,omitempty\"`\n\tSplit  bool     `json:\"split,omitempty\"`\n\t// CIMinutes is the time the lane's merged pull request's checks ran, in\n\t// minutes; nil until it is read.\n\tCIMinutes *float64 `json:\"ci_minutes,omitempty\"`\n}\n```\nDrainLane is one issue the drain handed to a lane.\n\n```go\ntype DrainLapse struct {\n\tIssue       string    `json:\"issue\"`\n\tRequestedAt time.Time `json:\"requested_at\"`\n\tLapsedAt    time.Time `json:\"lapsed_at\"`\n\tDroppedAt   time.Time `json:\"dropped_at\"`\n}\n```\nDrainLapse is a judgement request the drain dropped unanswered: its issue, when it was asked, when the hold taken for it lapsed, and when the move that dropped it released that hold. The issue is not asked again before its cool-down has passed (coolDownEnds), so another account has a window to take it, and then only after the drain's other eligible work; the entry is pruned once the issue is asked again or answered.\n\n```go\ntype DrainOptions struct {\n\t// Max is --max as typed; 0 when not given, which is all.\n\tMax int\n\t// Judgement is --judgement: the path of the host's answer to the\n\t// judgement the drain awaits; empty when not given.\n\tJudgement string\n\t// Transcripts is where a routed judge's transcript lands\n\t// (drain_judge.go); nil leaves the judgement on the host's request,\n\t// routed or not.\n\tTranscripts runner.TranscriptStore\n\t// JudgeTimeout bounds one routed judgement; drainJudgeTimeout when zero.\n\tJudgeTimeout time.Duration\n\t// Context ends the move's routed judge: the front door ends it on an\n\t// interrupt or a termination. context.Background when nil.\n\tContext context.Context\n\t// PassOver says why an issue, given its id and found_at, is passed over\n\t// rather than opened; \"\" opens it. Nil passes nothing over.\n\tPassOver func(id, foundAt string) string\n\t// JudgeOutcome, when set, receives what became of a routed judgement.\n\tJudgeOutcome *JudgeOutcome\n\t// AskJudgeAgain asks the routed judge once per move rather than once per\n\t// request: a terminal drive has no host for the request to fall to, so a\n\t// judge that did not answer is asked again (terminal.go).\n\tAskJudgeAgain bool\n\t// KeepWaiting keeps waiting on origin, and on an outage the shared run gave\n\t// up on, for as long as the caller lasts: a drive under --until has a bound\n\t// of its own, so neither ends the drain (terminal.go).\n\tKeepWaiting bool\n\t// Skip are --skip's targets, issue ids or paths, held back for now with\n\t// SkipReason, --reason; Unskip are --unskip's, taken off the list\n\t// (drain_skip.go).\n\tSkip       []string\n\tSkipReason string\n\tUnskip     []string\n\t// PassedLanes are the run ids of lanes a drive passed over this run, each a run\n\t// whose file states another schema version that the drive may not save\n\t// (terminal.go): the move writes nothing for such a lane, neither halting it\n\t// under a stop, admitting, pacing, renewing, finishing nor handing it back as\n\t// stuck, never picks it as the lane in progress, and does not stop the drain at\n\t// its cap or as empty while one is in progress, so a later drive takes it up.\n\t// The outage and origin stops end the drain as before. Held in the drive's\n\t// memory alone, never written.\n\tPassedLanes []string\n\t// contains filtered or unexported fields\n}\n```\nDrainOptions are the drain's own flags.\n\n```go\ntype DrainOrigin struct {\n\t// Ref is the branch as a person names it (origin/main), and Commit its\n\t// commit as fetched.\n\tRef    string `json:\"ref\"`\n\tCommit string `json:\"commit\"`\n\t// FetchedAt is when abcd last fetched here, nil when nothing here stamped\n\t// a fetch; AgeMinutes is the view's age then, at the plan's time.\n\tFetchedAt  *time.Time `json:\"fetched_at\"`\n\tAgeMinutes int        `json:\"age_minutes\"`\n\t// Behind counts the commits of Ref this checkout's HEAD lacks.\n\tBehind int `json:\"behind\"`\n\t// Finished are the issues open in this checkout's ledger that Ref holds\n\t// resolved or wontfix: the work a stale checkout would repeat.\n\tFinished []string `json:\"finished\"`\n}\n```\nDrainOrigin is the view of origin's default branch a plan was read from.\n\n```go\ntype DrainOriginWait struct {\n\tSince       time.Time `json:\"since\"`\n\tKind        string    `json:\"kind\"`\n\tProbes      int       `json:\"probes\"`\n\tNextProbeAt time.Time `json:\"next_probe_at\"`\n\t// HourlySince is the probe that began the hourly stage, nil before it.\n\tHourlySince *time.Time `json:\"hourly_since,omitempty\"`\n}\n```\nDrainOriginWait is a drain waiting on origin: since when, why (one of the DrainOrigin\\* kinds), the probes that failed, and when the next is due.\n\n```go\ntype DrainPRHandBacks struct {\n\tPR        int      `json:\"pr\"`\n\tIssue     string   `json:\"issue\"`\n\tHandBacks int      `json:\"hand_backs\"`\n\tKinds     []string `json:\"kinds\"`\n}\n```\nDrainPRHandBacks is one pull request's hand-backs: its lane's issue, how many hand-backs its lane routed and their kinds, each named once, in the order first routed.\n\n```go\ntype DrainParked struct {\n\tIssue string `json:\"issue\"`\n\tRunID string `json:\"run_id\"`\n\tPR    int    `json:\"pr\"`\n\tState string `json:\"state\"`\n\tNote  string `json:\"note\"`\n}\n```\nDrainParked is one lane parked at land whose head is not on the default branch, as the move read its pull request (spc-2610161044461448 step 8).\n\n```go\ntype DrainPendingHandBack struct {\n\tIssue string    `json:\"issue\"`\n\tKind  string    `json:\"kind\"`\n\tBlob  string    `json:\"blob,omitempty\"`\n\tWhy   string    `json:\"why\"`\n\tAt    time.Time `json:\"at\"`\n}\n```\nDrainPendingHandBack is a hand-back a yes routed that the move could not publish on origin: its issue, its kind, the blob of the issue's record on origin's default branch the yes was judged over (\"\" when it could not be read), why it is pending, and when it was routed.\n\n```go\ntype DrainPreview struct {\n\tcapture.DrainPlan\n\tOrigin       *DrainOrigin `json:\"origin\"`\n\tOriginUnread string       `json:\"origin_unread,omitempty\"`\n\t// OrderDrawnAtFirstMove is true when this copy has no key yet, so the\n\t// preview takes each group oldest first: this copy's own order within\n\t// each group is drawn at its first move, which mints the key, and the\n\t// dry run, which writes nothing, mints none.\n\tOrderDrawnAtFirstMove bool `json:\"order_drawn_at_first_move\"`\n\t// BundleMax is the cap the next move bundles under: a running drain's\n\t// own, or the one a drain started now would take from the files.\n\t// Bundles are the lanes with members the plan would open under it, each\n\t// leading issue with the members its next lane would take, and\n\t// BundleNote what may make each smaller; both empty under a cap of 1\n\t// (drain_bundle.go).\n\tBundleMax  PaceValue            `json:\"bundle_max\"`\n\tBundles    []DrainBundlePreview `json:\"bundles,omitempty\"`\n\tBundleNote string               `json:\"bundle_note,omitempty\"`\n\t// BundleMaxIgnored names a repository's drain.bundle_max above the cap\n\t// it may only lower, which the files' cap ignored; \"\" when none was.\n\tBundleMaxIgnored string `json:\"bundle_max_ignored,omitempty\"`\n}\n```\nDrainPreview is \\`abcd drain --dry-run\\`: the plan, and the view of origin it was read from. Origin is nil in two cases, and the plan is then the checkout's own ledger: in a checkout with no remote named origin, where OriginUnread is empty, since there is no origin to read; and when origin's default branch as last fetched cannot be read (this checkout names none, or its commit does not resolve), where OriginUnread says why.\n\n```go\nfunc DrainDryRun(repoRoot string, now time.Time) (DrainPreview, error)\n```\nDrainDryRun plans the drain as its next move would, from origin's default branch as last fetched, and fetches and writes nothing.\n\n```go\ntype DrainProgress struct {\n\tLive  bool\n\tMax   int\n\tLanes int\n}\n```\nDrainProgress is the drain in progress in this checkout, as a drive reads it before its yes.\n\n```go\nfunc ReadDrainProgress(repoRoot string) (DrainProgress, error)\n```\nReadDrainProgress reads the drain in progress, if any.\n\n```go\ntype DrainResult struct {\n\tState string `json:\"state\"`\n\t// Started is true when this invocation began a new drain.\n\tStarted  bool     `json:\"started\"`\n\tRule     string   `json:\"rule\"`\n\tLoosened []string `json:\"loosened\"`\n\tOrder    string   `json:\"order\"`\n\tMax      int      `json:\"max\"`\n\tPace     *Pace    `json:\"pace\"`\n\t// Lanes are every lane the drain opened, with its outcome as last read.\n\tLanes []DrainLane `json:\"lanes\"`\n\t// Lane is the lane in progress after this call, if any.\n\tLane *DrainLane `json:\"lane\"`\n\t// Start is the run this call started, when it opened a lane.\n\tStart *StartResult `json:\"start\"`\n\t// Routed are the hand-backs this call routed; HandBacks every one the\n\t// drain has routed; Flags the rule's hand-backs over the ledger as this\n\t// call read it, each naming its rule, written nowhere, less the issues\n\t// this drain promoted itself (fieldFlags).\n\tRouted    []DrainRoute `json:\"routed\"`\n\tHandBacks []DrainRoute `json:\"hand_backs\"`\n\tFlags     []DrainRoute `json:\"flags\"`\n\t// Judging is the host judgement the drain awaits after this call, if any;\n\t// Judged the answer this call took; Judgements every answer the drain\n\t// has taken, each with whether it decided the issue's disposition.\n\tJudging    *DrainJudging    `json:\"judging\"`\n\tJudged     *DrainJudgement  `json:\"judged,omitempty\"`\n\tJudgements []DrainJudgement `json:\"judgements\"`\n\t// Passed are eligible issues this call did not take, each with why.\n\tPassed         []Excluded             `json:\"passed\"`\n\tDispositions   []capture.DrainVerdict `json:\"dispositions\"`\n\tNextEligibleAt *time.Time             `json:\"next_eligible_at\"`\n\t// WaitingUntil is when a drain waiting at the cap, or on held work alone,\n\t// looks again, and Waiting which it waits on (drain_wait.go).\n\tWaitingUntil *time.Time `json:\"waiting_until\"`\n\tWaiting      string     `json:\"waiting,omitempty\"`\n\tStopped      string     `json:\"stopped,omitempty\"`\n\tComplete     bool       `json:\"complete\"`\n\t// Finished are the merged lanes this call took the landing's last step\n\t// for, outside the window clock (drain_finish.go).\n\tFinished []DrainFinished `json:\"finished\"`\n\t// Parked are the lanes parked at land whose head is not on the default\n\t// branch, each as its pull request read (drain_finish.go).\n\tParked []DrainParked `json:\"parked\"`\n\t// Counts are the drain's totals as this call leaves it (scope 8).\n\tCounts DrainCounts `json:\"counts\"`\n\tNext   string      `json:\"next\"`\n\t// Origin is the view of origin's default branch this move planned from,\n\t// and OriginWait the wait a move that could not read it is in\n\t// (drain_origin.go); both nil in a checkout with no remote named origin.\n\tOrigin     *DrainOrigin     `json:\"origin,omitempty\"`\n\tOriginWait *DrainOriginWait `json:\"origin_wait,omitempty\"`\n\t// PendingHandBacks are the hand-backs routed and not yet published on\n\t// origin, as this call leaves them (drain_pending.go).\n\tPendingHandBacks []DrainPendingHandBack `json:\"pending_hand_backs,omitempty\"`\n\t// Skips is the drain's skip list as this call leaves it: empty once the\n\t// drain has ended, which clears it (drain_skip.go).\n\tSkips []DrainSkip `json:\"skips\"`\n\t// contains filtered or unexported fields\n}\n```\nDrainResult is one drain invocation's summary.\n\n```go\nfunc Drain(repoRoot string, o Options, d DrainOptions) (DrainResult, error)\n```\nDrain performs one move of the drain run: it begins a drain when none is in progress, honours the window clock, routes the last lane's outcome, and opens the next eligible issue's lane, or says why it opens none. A drain without the repository's rule is refused before anything is written.\n\nA move that finished a merged lane (finishMerged), or that ended the drain, then sweeps on its own once (autosweep.go), the sweep's line joining the move's Next; a drive's move that ends the drain leaves that to the drive's own end. A refused move sweeps nothing, and the sweep never refuses one.\n\n```go\ntype DrainRoute struct {\n\tIssue string `json:\"issue\"`\n\t// From is \"lane\" for a lane's hand-back, \"judgement\" for the host\n\t// judgement's before any lane opened, \"reservation\" for an issue the\n\t// drain could not reserve (its found_at names no path), \"field\" for the\n\t// rule's.\n\tFrom  string `json:\"from\"`\n\tKind  string `json:\"kind\"`\n\tRoute string `json:\"route\"`\n\t// Draft is the intent draft a promotion made; Question the question a\n\t// decision-record flag states; Rule the rule a field hand-back names; Home\n\t// the home a flag names.\n\tDraft    string `json:\"draft,omitempty\"`\n\tQuestion string `json:\"question,omitempty\"`\n\tRule     string `json:\"rule,omitempty\"`\n\tHome     string `json:\"home,omitempty\"`\n\tReason   string `json:\"reason\"`\n\t// Wrote is the record change the route made, in words; \"nothing\" for a\n\t// flag.\n\tWrote string     `json:\"wrote\"`\n\tAt    *time.Time `json:\"at,omitempty\"`\n\t// Blob is the blob id of the issue's record on origin's default branch\n\t// when the hand-back was routed, \"\" without origin: once that record\n\t// changes, the drain takes the issue up again (drain_readmit.go).\n\tBlob string `json:\"blob,omitempty\"`\n}\n```\nDrainRoute is one hand-back and where it went.\n\n```go\ntype DrainSkip struct {\n\tTarget string    `json:\"target\"`\n\tReason string    `json:\"reason\"`\n\tAt     time.Time `json:\"at\"`\n}\n```\nDrainSkip is one entry of the drain's skip list: an issue id, or a repository-relative path that holds back every issue whose found\\_at path lies in it or contains it, with the person's reason and when it was given.\n\n```go\ntype DrainSpend struct {\n\tAgentRuns    int      `json:\"agent_runs\"`\n\tImplementers int      `json:\"implementers\"`\n\tValidators   int      `json:\"validators\"`\n\tUnread       []string `json:\"unread\"`\n}\n```\nDrainSpend is what the drain's lanes have spent, in agent runs, the unit the budget check estimates a run in: each implementer's receipt the loop verified (the implement stage's, each fix round's, a hand-back's) and each validator's return it parsed a verdict from. No runner reports tokens or money, so neither is counted. Unread names a lane's run whose state could not be read, which makes the counts a floor.\n\n```go\ntype DrainState struct {\n\tSchemaVersion int       `json:\"schema_version\"`\n\tStartedAt     time.Time `json:\"started_at\"`\n\tUpdatedAt     time.Time `json:\"updated_at\"`\n\t// Rule is the decision record the rule was read from when the drain began.\n\tRule string `json:\"rule\"`\n\t// Max is the cap on lanes the drain opens; 0 is all (the default).\n\tMax int `json:\"max\"`\n\t// Pace is the pace the drain started on; its window and pause bound the\n\t// drain as they bound a run.\n\tPace            *Pace        `json:\"pace\"`\n\tWindowStartedAt *time.Time   `json:\"window_started_at,omitempty\"`\n\tNextEligibleAt  *time.Time   `json:\"next_eligible_at,omitempty\"`\n\tLanes           []DrainLane  `json:\"lanes\"`\n\tHandBacks       []DrainRoute `json:\"hand_backs\"`\n\t// Judging is the host judgement the drain awaits before it opens the next\n\t// issue's lane (scope 3), and Judgements every answer it has taken.\n\tJudging    *DrainJudging    `json:\"judging,omitempty\"`\n\tJudgements []DrainJudgement `json:\"judgements,omitempty\"`\n\t// JudgeFallbacks are the receipts of every routed judgement a runner did\n\t// not answer, each left to the host's request (drain_judge.go).\n\tJudgeFallbacks []runner.FallbackReceipt `json:\"judge_fallbacks,omitempty\"`\n\t// Lapsed are the judgement requests dropped unanswered once the hold the\n\t// drain took for them lapsed, the latest last; their issues are asked\n\t// again only once a cool-down has passed, and then only after the\n\t// drain's other eligible work (drain_hold.go).\n\tLapsed []DrainLapse `json:\"lapsed,omitempty\"`\n\t// PendingHandBacks are the hand-backs a yes routed whose tombstone the\n\t// move could not publish (drain_pending.go); each is published over the\n\t// issue's next release on origin, and carried into the next drain.\n\tPendingHandBacks []DrainPendingHandBack `json:\"pending_hand_backs,omitempty\"`\n\t// Stopped says why the drain ended, and EndedAt when; empty while it runs.\n\tStopped string     `json:\"stopped,omitempty\"`\n\tEndedAt *time.Time `json:\"ended_at,omitempty\"`\n\t// OriginWait is the wait on origin a move that could not read it began\n\t// (drain_origin.go); nil while origin answers.\n\tOriginWait *DrainOriginWait `json:\"origin_wait,omitempty\"`\n\t// WaitingUntil is when a drain waiting at its holder's cap, or on work\n\t// others hold alone, looks again, and Waiting which of the two it waits\n\t// on (DrainWaitCap, DrainWaitHeld); both empty otherwise. It is kept\n\t// apart from NextEligibleAt, so a wait never resets the pace window\n\t// (drain_wait.go).\n\tWaitingUntil *time.Time `json:\"waiting_until,omitempty\"`\n\tWaiting      string     `json:\"waiting,omitempty\"`\n\t// Skips are the issues and paths a person holds back for now, each with\n\t// its reason; the list clears when the drain ends (drain_skip.go).\n\tSkips []DrainSkip `json:\"skips,omitempty\"`\n\t// BundleMax is drain.bundle_max as the drain started with it, the layer\n\t// and origin it came from: the most issues one lane takes. A running\n\t// drain keeps it, whatever the files say by then (drain_bundle.go). Nil\n\t// reads as the bundled cap.\n\tBundleMax *PaceValue `json:\"bundle_max,omitempty\"`\n\t// Forming is the bundle the drain's moves are forming, its lead and the\n\t// members judged so far, each with its hold; nil while none forms.\n\tForming *DrainForming `json:\"forming,omitempty\"`\n}\n```\nDrainState is one drain, between invocations.\n\n```go\ntype Driver string\n```\nDriver names what drives the loop. The host session is decision 5's default; the process driver is piece 3's, opt-in by configuration.\n\n```go\nconst DriverHost Driver = \"host\"\n```\nDriverHost is a host session calling \\`implement step\\` and \\`implement receipt\\` itself.\n\n```go\ntype Entry struct {\n\tAt   time.Time `json:\"at\"`\n\tLane string    `json:\"lane,omitempty\"`\n\t// Stage is the stage the entry records: a lane stage, \"start\", \"open\" (a\n\t// later lane opened for its spec step) or \"receipt\".\n\tStage string `json:\"stage\"`\n\tNote  string `json:\"note,omitempty\"`\n\t// Issue is the issue a reservation line is for, written only in a run with\n\t// members (itd-2611201450052326), so one issue's line is never read as\n\t// another's; a run with members reads a reservation line naming none as\n\t// the lead's (lineIssue).\n\tIssue string `json:\"issue,omitempty\"`\n}\n```\nEntry is one line of the run record.\n\n```go\ntype Excluded struct {\n\tID     string `json:\"id\"`\n\tCheck  string `json:\"check\"`\n\tReason string `json:\"reason\"`\n}\n```\nExcluded is a planned intent the pick did not consider, with the first check that excluded it.\n\n```go\ntype Finding struct {\n\t// File is the path the finding cites, relative to the lane's worktree,\n\t// and Line the line, from 1.\n\tFile string `json:\"file\"`\n\tLine int    `json:\"line\"`\n\t// Status is what the round's fix report says of it: FindingApplied,\n\t// FindingRejected or FindingUnknown; empty until a fix report is\n\t// verified, and on the findings of a reviewer that passed the round,\n\t// which no fix brief hands on.\n\tStatus string `json:\"status,omitempty\"`\n\t// Reason is the round's judge's reason for striking the finding, set\n\t// exactly where Status is FindingStruck (judge.go).\n\tReason string `json:\"reason,omitempty\"`\n\t// CitedBy names every reviewer of the round citing the same file and\n\t// line, this one included, in the round's validator order; absent when\n\t// only this reviewer cites it.\n\tCitedBy []Citer `json:\"cited_by,omitempty\"`\n}\n```\nFinding is one located finding a reviewer's return cites.\n\n```go\ntype ForgeState string\n```\nForgeState is what the forge says of a lane's pull request.\n\n```go\nconst (\n\tForgeOpen        ForgeState = \"open\"\n\tForgeArmed       ForgeState = \"armed\"\n\tForgeConflicting ForgeState = \"conflicting\"\n\tForgeMerged      ForgeState = \"merged\"\n\tForgeClosed      ForgeState = \"closed\"\n\tForgeUnread      ForgeState = \"unread\"\n)\n```\nThe states a take-over reads a lane's pull request in.\n\n```go\ntype HandBack struct {\n\tAt time.Time `json:\"at\"`\n\t// Kind, Reason and Home are set when the lane's own receipt handed the work\n\t// back (itd-82 scope 5): the kind of decision it found, what it found, and\n\t// where the decision belongs. Discarded is the lane's head the loop\n\t// discarded with its worktree and branch. The fields below are then empty.\n\tKind      string `json:\"kind,omitempty\"`\n\tReason    string `json:\"reason,omitempty\"`\n\tHome      string `json:\"home,omitempty\"`\n\tDiscarded string `json:\"discarded,omitempty\"`\n\t// Verdict is VerdictUnachievable.\n\tVerdict string `json:\"verdict,omitempty\"`\n\t// Round is the round that did not pass once the cap was reached, and\n\t// FixRounds the cap the run held the lane to.\n\tRound     int `json:\"round,omitempty\"`\n\tFixRounds int `json:\"fix_rounds,omitempty\"`\n\t// Verdicts is the last round's verdicts as the loop recorded them, and\n\t// Findings the returns of the validators that did not pass, relative to\n\t// the checkout root.\n\tVerdicts string   `json:\"verdicts,omitempty\"`\n\tFindings []string `json:\"findings,omitempty\"`\n\t// NotMet and Undecided name the criteria the last audit judged not met and\n\t// could not decide, when the lane took the audit.\n\tNotMet    []string `json:\"not_met,omitempty\"`\n\tUndecided []string `json:\"undecided,omitempty\"`\n}\n```\nHandBack is a lane stopped and handed back to the person, with what the last round found (ruling DR1 on itd-50's criterion 2).\n\n```go\ntype Handler func(c Context, lane *Lane) (Outcome, error)\n```\nHandler performs one stage for a lane, writing what it made into lane. It must be idempotent: a process killed after the body's effect and before the state write runs the body again on the next call, so a body finds what it made last time rather than making it twice. An error leaves the state as it was; a \\*Refusal error is passed to the caller as the refusal.\n\n```go\ntype Hold struct {\n\tSince    time.Time `json:\"since\"`\n\tCause    string    `json:\"cause\"`\n\tHead     string    `json:\"head\"`\n\tBefore   string    `json:\"before\"`\n\tReleased bool      `json:\"released,omitempty\"`\n}\n```\nHold is a lane held after a sibling's hand-back (ruling DR6c): when, the handed-back lane that caused it, the head its passing round judged, and the landing step it stopped before (HoldBeforePush or HoldBeforeArm). Released is set once the person released it to land as it is.\n\n```go\ntype IssueHandBack struct {\n\tIssue  string `json:\"issue\"`\n\tKind   string `json:\"kind\"`\n\tReason string `json:\"reason\"`\n\tHome   string `json:\"home,omitempty\"`\n}\n```\nIssueHandBack is one issue of a run with members handed back alone in a receipt's \\`handbacks\\`: the issue, then the kind, reason and home a lane's own hand-back carries (LaneHandBack), each checked as handBackGaps checks that one.\n\n```go\ntype JudgeKind int\n```\nJudgeKind is what became of a routed judgement.\n\n```go\nconst (\n\t// JudgeNoOutcome: no routed judge was asked.\n\tJudgeNoOutcome JudgeKind = iota\n\t// JudgeNoAnswer: its runner ran it and it answered nothing usable.\n\tJudgeNoAnswer\n\t// JudgeRunnerFailed: its runner did not run it.\n\tJudgeRunnerFailed\n\t// JudgeLimited: the account's rate limit stopped it.\n\tJudgeLimited\n)\n```\nThe ends a routed judgement comes to that give no answer.\n\n```go\ntype JudgeOutcome struct {\n\tKind JudgeKind\n\t// ResetsAt is when a limit resets, zero when none was reported.\n\tResetsAt time.Time\n}\n```\nJudgeOutcome is what became of a routed judgement.\n\n```go\ntype JudgeStrike struct {\n\tFile   string `json:\"file\"`\n\tLine   int    `json:\"line\"`\n\tReason string `json:\"reason\"`\n}\n```\nJudgeStrike is one location a round's judge struck, with its reason.\n\n```go\ntype JudgementAnswer struct {\n\tSchemaVersion int    `json:\"schema_version\"`\n\tIssue         string `json:\"issue\"`\n\tRemedySHA256  string `json:\"remedy_sha256\"`\n\tAnswer        string `json:\"answer\"`\n\tKind          string `json:\"kind,omitempty\"`\n\tReason        string `json:\"reason\"`\n}\n```\nJudgementAnswer is the host's answer file, read strictly: any other field refuses it.\n\n```go\ntype Landing struct {\n\t// Closes is whether this lane's landing closes the spec (and ships the\n\t// intent): the lane that took the fidelity audit.\n\tCloses bool `json:\"closes\"`\n\t// MarkStep is the spec step whose `- landed:` line the records write on\n\t// the open spec (iss-2610110918418459): the lane's step, on an intent lane\n\t// of a spec that lists its steps; 0 when there is none to mark.\n\tMarkStep int `json:\"mark_step,omitempty\"`\n\t// Records is the loop's records commit on the lane's branch, and\n\t// RecordsDone is set once it is made, or once there was nothing to record.\n\tRecords     string `json:\"records,omitempty\"`\n\tRecordsDone bool   `json:\"records_done\"`\n\t// SpecSettled says the first step took an uncommitted change to the lane's own\n\t// spec record, so the records commit has that to carry whatever else it holds.\n\tSpecSettled bool `json:\"spec_settled,omitempty\"`\n\t// PreflightReceipt is the preflight receipt that named the pushed head,\n\t// home-redacted, and Pushed the head the loop pushed.\n\tPreflightReceipt string `json:\"preflight_receipt,omitempty\"`\n\tPushed           string `json:\"pushed,omitempty\"`\n\t// Body is the pull request's body as the loop composed it, relative to the\n\t// checkout root; PRURL is the pull request, and BodyChecked is set once the\n\t// body the forge holds was re-read and found clean.\n\tBody        string `json:\"body,omitempty\"`\n\tPRURL       string `json:\"pr_url,omitempty\"`\n\tBodyChecked bool   `json:\"body_checked\"`\n\t// Merge is the merge rule the ruleset gave, and Armed whether auto-merge\n\t// was armed by it. Nothing is pushed to the lane once Merge is set.\n\tMerge string `json:\"merge,omitempty\"`\n\tArmed bool   `json:\"armed\"`\n\t// Toggles counts how many times the watch toggled the arming at the pushed\n\t// head, which maxToggles bounds.\n\tToggles int `json:\"toggles,omitempty\"`\n\t// Merged is the default branch's tip, as the remote held it, that carried\n\t// the pushed head when the landing cleaned the lane up.\n\tMerged string `json:\"merged,omitempty\"`\n\t// GateUnreadSince is when the merge gate first could not read what it asks at\n\t// the arming; set by the call that finds it, and cleared once it reads.\n\tGateUnreadSince *time.Time `json:\"gate_unread_since,omitempty\"`\n\t// CheckWaitSince is when the landing began waiting for its full check: the\n\t// preflight receipt naming the head it pushes (ruling DR6d-2). It is set\n\t// by the first call that finds no receipt, kept until the push, and\n\t// cleared by it.\n\tCheckWaitSince *time.Time `json:\"check_wait_since,omitempty\"`\n}\n```\nLanding is the land stage's progress on one lane.\n\n```go\ntype Lane struct {\n\t// ID is the lane's name inside the run: lane-1, lane-2, ….\n\tID string `json:\"id\"`\n\t// Key is the record the lane delivers: itd-N, or iss-N (decision 10).\n\tKey string `json:\"key\"`\n\t// SpecStep is the number of the spec step the lane lands, and StepTitle its\n\t// title. An unstepped spec is one implicit step, number 1.\n\tSpecStep  int    `json:\"spec_step\"`\n\tStepTitle string `json:\"step_title\"`\n\t// Stage is the next stage the loop performs for this lane; StageDone when the\n\t// lane has nothing left.\n\tStage Stage `json:\"stage\"`\n\t// Awaits are the agents the lane waits on: one while its implementer\n\t// works, one per validator while its round is out. Each is a slot of the\n\t// run's ceiling until its receipt is verified (criterion 8, ruling DR6).\n\tAwaits []Await `json:\"awaits,omitempty\"`\n\t// Syncs are the merges of the default branch into the lane after a sibling\n\t// landed; Hold is set while the lane is held after a sibling's hand-back.\n\tSyncs []Sync `json:\"syncs,omitempty\"`\n\tHold  *Hold  `json:\"hold,omitempty\"`\n\t// The lane's footprint, filled by the stages that make it.\n\tBranch   string `json:\"branch,omitempty\"`\n\tBaseSHA  string `json:\"base_sha,omitempty\"`\n\tHeadSHA  string `json:\"head_sha,omitempty\"`\n\tWorktree string `json:\"worktree,omitempty\"`\n\tBrief    string `json:\"brief,omitempty\"`\n\tReceipt  string `json:\"receipt,omitempty\"`\n\tPR       int    `json:\"pr,omitempty\"`\n\t// PickSHA is the record-only commit at the branch base carrying the run's\n\t// pick entry, on the lane a picked run commits it on; the receipt verifier\n\t// counts the implementer's commits from after it.\n\tPickSHA string `json:\"pick_sha,omitempty\"`\n\t// Validation is the validate stage's record (piece 8): one round per head\n\t// the validators judged, the last the current one. Only the loop writes a\n\t// verdict into it, parsed from the validator's own return (itd-58).\n\tValidation []ValidationRound `json:\"validation,omitempty\"`\n\t// HandBack is set when the lane was stopped and handed back to the person:\n\t// its Stage is then StageHandedBack.\n\tHandBack *HandBack `json:\"hand_back,omitempty\"`\n\t// Receipts are the implementers' receipts the loop verified for the lane,\n\t// the implement stage's and each fix round's, with the model each runner\n\t// reported (criterion 10).\n\tReceipts []ReceiptRecord `json:\"receipts,omitempty\"`\n\t// Launched are the models a runner was started on for the lane's\n\t// implementer, fix and conflict-resolution roles, each with how many of\n\t// the lane's receipts were verified before it was started (reviewers.go):\n\t// every one is a writer of the lane from its next receipt on, whether or\n\t// not a receipt came back from it.\n\tLaunched []LaunchedWriter `json:\"writers_launched,omitempty\"`\n\t// Resolves are the captures the lane's receipts declared fixed, each with\n\t// the lane's commit that fixed it; the landing resolves each (piece 9).\n\tResolves []Resolution `json:\"resolves,omitempty\"`\n\t// Landing is the landing stage's progress (piece 9): each of its steps is\n\t// recorded as it completes, so a killed landing resumes at the step that\n\t// did not.\n\tLanding *Landing `json:\"landing,omitempty\"`\n\t// Refused is the lane's run of refused steps in an issue run (stuck.go):\n\t// the stage, check and reason of the last, how many in a row were the\n\t// same, and since when the lane has refused at that stage. Nil while the\n\t// lane's steps succeed, and in an intent's run.\n\tRefused *LaneRefused `json:\"refused,omitempty\"`\n\t// AutoPlan is the `abcd build --auto-plan` lane's record (autoplan.go):\n\t// the draft as the start checked it, its two plan reviews and what the\n\t// plan made. Nil on every other lane.\n\tAutoPlan *AutoPlan `json:\"auto_plan,omitempty\"`\n}\n```\nLane is one lane: one spec step, one branch, one pull request.\n\n```go\nfunc (l Lane) CheckWait() string\n```\nCheckWait is the lane's wait for its full check, as the status shows it, or \"\" when it waits for none: a landing whose push found no preflight receipt naming its head.\n\n```go\ntype LaneAwait struct {\n\tLane  string\n\tAwait Await\n}\n```\nLaneAwait is one outstanding await with the lane it belongs to.\n\n```go\ntype LaneForge struct {\n\tState ForgeState `json:\"state\"`\n\tNote  string     `json:\"note\"`\n}\n```\nLaneForge is a lane's pull request as the forge's one listing shows it.\n\n```go\ntype LaneHandBack struct {\n\tKind   string `json:\"kind\"`\n\tReason string `json:\"reason\"`\n\tHome   string `json:\"home,omitempty\"`\n}\n```\nLaneHandBack is a lane's own hand-back: the kind of decision it found, the reason in a sentence, and, for the kinds routed to a home, where the decision belongs.\n\n```go\ntype LaneOnProfile struct {\n\tRunID, Issue, Profile string\n}\n```\nLaneOnProfile is a lane a drive would take up and the profile its run started on.\n\n```go\nfunc LanesOnAnotherProfile(repoRoot, profile string) ([]LaneOnProfile, error)\n```\nLanesOnAnotherProfile names each lane this checkout's drain would drive next that started on another profile than this one: its lanes in progress, while the drain is live. Only a drain's own move rewrites the outcome it stored, so the run says too: one a session finished, or at its pull request, needs no agent until it comes back, and a drain that ended takes nothing up. A run that names no profile holds to none yet.\n\n```go\ntype LaneReceipt struct {\n\tSchemaVersion int    `json:\"schema_version\"`\n\tRunID         string `json:\"run_id\"`\n\tLane          string `json:\"lane\"`\n\tBranch        string `json:\"branch\"`\n\t// Commits are the full object names of the commits the implementer made on\n\t// the lane's branch.\n\tCommits []string `json:\"commits\"`\n\t// DefinitionOfDone is the repository's definition of done as the\n\t// implementer ran it.\n\tDefinitionOfDone *DoDRun `json:\"definition_of_done\"`\n\t// Report is the implementer's report, a path inside the lane's directory.\n\tReport string `json:\"report\"`\n\t// Model is the model the implementer's harness reported, as reported: the\n\t// binary cannot verify it.\n\tModel string `json:\"model,omitempty\"`\n\t// Resolves are the captures the lane fixed, each with the commit of the\n\t// lane that fixed it and the judgements a resolution records; the landing\n\t// resolves each with `capture resolve` (spec piece 9).\n\tResolves []Resolution `json:\"resolves,omitempty\"`\n\t// HandBack stops the lane: the implementer found a decision inside the\n\t// work and hands it back rather than deciding it (itd-82 scope 5, the\n\t// `handback:` of decision 10 on the parent). The loop reads it before the\n\t// validators, discards the lane's work and ends the lane with it. A run\n\t// with members takes none: it hands back each issue in HandBacks.\n\tHandBack *LaneHandBack `json:\"handback,omitempty\"`\n\t// HandBacks are the issues of a run with members the implementer hands\n\t// back alone, each with its kind, reason and home as a lane's hand-back\n\t// carries them (itd-2611201450052326, spc-2611201455051897 step 2): the\n\t// loop hands that issue back to a person and lands the others. Every\n\t// receipt of a run with members names each issue the run still holds once,\n\t// in Resolves or here; a run without members takes none.\n\tHandBacks []IssueHandBack `json:\"handbacks,omitempty\"`\n}\n```\nLaneReceipt is the file an implementer writes when its lane is built.\n\n```go\ntype LaneRefused struct {\n\tStage  string    `json:\"stage\"`\n\tCheck  string    `json:\"check,omitempty\"`\n\tReason string    `json:\"reason\"`\n\tCount  int       `json:\"count\"`\n\tSince  time.Time `json:\"since\"`\n\tLast   time.Time `json:\"last\"`\n\tFinal  string    `json:\"final,omitempty\"`\n}\n```\nLaneRefused is a lane's run of refused steps: the stage, check and reason of the last refusal, how many in a row were that same refusal, since when the lane has refused at that stage with no quiet longer than stuckGap, and when it last refused. Final names why the refusal cannot change, \"\" when it can. Count is 0 on a wait on another holder's path (Refusal.pathHeld), which counts toward the minutes bound alone.\n\n```go\ntype LaneWorktree struct {\n\t// Home is the caller's home, the base the store is proved real from.\n\tHome string\n\t// RootSHA keys the store on the repository.\n\tRootSHA string\n\t// StoreRel is the lane's store directory, relative to Home.\n\tStoreRel string\n\t// Path is the worktree, Home/StoreRel/\u003cname\u003e.\n\tPath string\n\t// Branch is the lane's branch, build/\u003cname\u003e.\n\tBranch string\n\t// contains filtered or unexported fields\n}\n```\nLaneWorktree is where a lane's worktree lives and what it is called.\n\n```go\ntype Launch struct {\n\tLane      string    `json:\"lane\"`\n\tRole      string    `json:\"role\"`\n\tRunner    string    `json:\"runner\"`\n\tRoute     string    `json:\"route,omitempty\"`\n\tSession   string    `json:\"session\"`\n\tPID       int       `json:\"pid,omitempty\"`\n\tStartUnix int64     `json:\"start_unix,omitempty\"`\n\tSlackMS   int64     `json:\"slack_ms,omitempty\"`\n\tAt        time.Time `json:\"at\"`\n}\n```\nLaunch is one in-flight launch: an agent a step started through a runner, the route it runs on, and the process that started it. It stands while the await names the same runner claim; a launch's own process is what says it is alive.\n\n```go\ntype LaunchedWriter struct {\n\tModel string `json:\"model\"`\n\tAfter int    `json:\"after\"`\n}\n```\nLaunchedWriter is one model a runner was started on for a role that writes into the lane, and After how many of the lane's receipts were verified before it was started.\n\n```go\ntype ListedAgent struct {\n\tRole  string     `json:\"role\"`\n\tState AgentState `json:\"state\"`\n\t// Receipt is the path its receipt lands at, and ReceiptArrived whether a file\n\t// stands there uncollected.\n\tReceipt        string `json:\"receipt\"`\n\tReceiptArrived bool   `json:\"receipt_arrived\"`\n\t// Route names the runner a recorded launch started it on; \"\" for the host's.\n\tRoute string `json:\"route,omitempty\"`\n\t// Launch is the launch ledger's entry for the agent's launch, and Process the\n\t// agent's own process as that entry names it, which State is judged by (alive\n\t// while it runs, lost once it has gone); \"\" and 0 when the ledger names\n\t// neither, and State is then the run's own record's word. An entry that names\n\t// only its launcher has a Launch and no Process (spc-2611050505250705 step 2).\n\tLaunch  string `json:\"launch,omitempty\"`\n\tProcess int    `json:\"process,omitempty\"`\n}\n```\nListedAgent is one agent a lane awaits, as the record can judge it.\n\n```go\ntype ListedDrain struct {\n\tCheckout string `json:\"checkout\"`\n\t// Judging is the issue a judgement is awaited over, \"\" for none.\n\tJudging string `json:\"judging,omitempty\"`\n\tNext    string `json:\"next\"`\n}\n```\nListedDrain is a checkout's drain in progress.\n\n```go\ntype ListedDriver struct {\n\tSession string `json:\"session,omitempty\"`\n\tPID     int    `json:\"pid\"`\n\t// State is alive, gone, or unknown when the process table could not be read.\n\tState string    `json:\"state\"`\n\tAt    time.Time `json:\"at\"`\n}\n```\nListedDriver is a run's recorded driver, with whether its process still runs.\n\n```go\ntype ListedLane struct {\n\tID     string        `json:\"id\"`\n\tStage  Stage         `json:\"stage\"`\n\tBranch string        `json:\"branch,omitempty\"`\n\tAgents []ListedAgent `json:\"agents\"`\n\t// PR is the lane's pull request as the state names it; 0 for none.\n\tPR int `json:\"pr,omitempty\"`\n\t// BaseMoved is how many commits origin's default branch, as last fetched, is\n\t// past the lane's base; nil when that cannot be told.\n\tBaseMoved *int `json:\"base_moved,omitempty\"`\n\t// Uncommitted is how many files the lane's worktree holds uncommitted; nil\n\t// when it was not read, with UnreadWhy saying why.\n\tUncommitted *int   `json:\"uncommitted,omitempty\"`\n\tUnreadWhy   string `json:\"unread_why,omitempty\"`\n\t// Asides are the saved-aside directories of the lane, oldest first.\n\tAsides []string `json:\"asides,omitempty\"`\n\t// Forge is what the forge says of the lane's pull request, read by a take-over\n\t// only; nil in the bare listing, which uses no network, and for no pull request.\n\tForge *LaneForge `json:\"forge,omitempty\"`\n}\n```\nListedLane is one lane with anything left.\n\n```go\ntype ListedRun struct {\n\tCheckout string        `json:\"checkout\"`\n\tRunID    string        `json:\"run_id\"`\n\tKey      string        `json:\"key\"`\n\tDriver   *ListedDriver `json:\"driver,omitempty\"`\n\t// Profile names the profile a drive runs it on, \"\" for a run no drive has driven.\n\tProfile string `json:\"profile,omitempty\"`\n\t// Reserved says the run holds its record's reservation as its state has it.\n\tReserved bool `json:\"reserved\"`\n\t// ReleaseFailed says the run let its reservation go and the release did not reach\n\t// origin, so the tip stands until a renewal takes it up or its lease lapses.\n\tReleaseFailed bool `json:\"release_failed,omitempty\"`\n\t// Stop is what a stop did to the run, and left.\n\tStop  *RunStop     `json:\"stop,omitempty\"`\n\tLanes []ListedLane `json:\"lanes\"`\n\t// Next is the one move this run wants of whoever reads the listing.\n\tNext string `json:\"next\"`\n}\n```\nListedRun is one run with anything left.\n\n```go\ntype Listing struct {\n\tRuns   []ListedRun   `json:\"runs\"`\n\tDrains []ListedDrain `json:\"drains,omitempty\"`\n\t// Stop is the stop in force; Refused names each file the read refused.\n\tStop    *runstop.Stop `json:\"stop,omitempty\"`\n\tRefused []string      `json:\"refused,omitempty\"`\n\t// Unreadable names each run state that could not be read, and why.\n\tUnreadable []string `json:\"unreadable,omitempty\"`\n\t// Notices names each stop another account left, which is not honoured here.\n\tNotices []string `json:\"notices,omitempty\"`\n}\n```\nListing is \\`abcd implement resume\\`: every run this account can read on the machine with anything left. The record is the whole of it, so a session that lost its context needs nothing else.\n\n```go\nfunc ListRuns(repoRoot, only string, o Options) (Listing, error)\n```\nListRuns reads every run this account can on the machine: this repository's worktrees and each checkout a driver noted. It changes nothing and uses no network. One naming run keeps to that run.\n\n```go\ntype LiveDriver struct {\n\t// Session is the host session's id where the session-start hook recorded\n\t// one; \"\" for a plain terminal.\n\tSession   string    `json:\"session,omitempty\"`\n\tPID       int       `json:\"pid\"`\n\tStartUnix int64     `json:\"start_unix\"`\n\tSlackMS   int64     `json:\"slack_ms,omitempty\"`\n\tAt        time.Time `json:\"at\"`\n}\n```\nLiveDriver is the process driving a run: the host session a step runs under, or the plain terminal's own.\n\n```go\ntype Member struct {\n\tIssue      string     `json:\"issue\"`\n\tFootprint  []string   `json:\"footprint\"`\n\tReservedAt *time.Time `json:\"reserved_at,omitempty\"`\n\tHandBack   *HandBack  `json:\"hand_back,omitempty\"`\n\tSplit      bool       `json:\"split,omitempty\"`\n}\n```\nMember is one issue a run carries beside its lead (itd-2611201450052326, spc-2611201455051897 step 1): its id, the footprint it is reserved with, when the run reserved it on the shared remote, its hand-back once it is handed back alone, and whether the drain has split the run.\n\n```go\ntype NextOptions struct {\n\t// Max is --max as typed; 0 when not given. An explicit --max 0 is told\n\t// apart from an absent flag only at the front door, which refuses it with\n\t// RunCountRefusal.\n\tMax int\n\t// UntilEmpty is --until-empty.\n\tUntilEmpty bool\n}\n```\nNextOptions are the run count the caller asked for.\n\n```go\ntype NextResult struct {\n\tCandidateSet\n\tPick   *intent.Pick  `json:\"pick\"`\n\tEntry  string        `json:\"entry\"`\n\tStart  *StartResult  `json:\"start\"`\n\tSeries *SeriesResult `json:\"series\"`\n\tNext   string        `json:\"next\"`\n}\n```\nNextResult is what Next returns: the candidate set, the pick, the entry it writes, and the run it started; Pick and Start are nil when a series' move picked nothing (its last pick is in progress, its window has elapsed, or it ended). Series is the series the call moved, nil for the default single pick; Next is the move to make.\n\n```go\nfunc Next(repoRoot string, o Options, n NextOptions) (NextResult, error)\n```\nNext picks the readiest planned intent and starts its run. An empty candidate set is refused naming every excluded intent and its check, and writes nothing. With --max above 1 or --until-empty it begins a series (nextseries.go); while a series is in progress every call continues it, and a count other than the series' own is refused. The pick's entry is checked against the grounds writer's own gate before the run starts, so a pick never starts a run whose reason it cannot write.\n\n```go\ntype NextSeries struct {\n\tSchemaVersion int       `json:\"schema_version\"`\n\tStartedAt     time.Time `json:\"started_at\"`\n\tUpdatedAt     time.Time `json:\"updated_at\"`\n\t// Max is the cap on picks; 0 with UntilEmpty, which picks until no\n\t// candidate is left.\n\tMax        int  `json:\"max\"`\n\tUntilEmpty bool `json:\"until_empty\"`\n\t// Flags are the pace flags as typed when the series began; every run the\n\t// series starts is started with them, so each runs on the series' pace.\n\tFlags SeriesFlags `json:\"flags\"`\n\t// Pace is the pace the series began on; its window and pause bound when\n\t// the series picks.\n\tPace            *Pace        `json:\"pace\"`\n\tWindowStartedAt *time.Time   `json:\"window_started_at,omitempty\"`\n\tNextEligibleAt  *time.Time   `json:\"next_eligible_at,omitempty\"`\n\tPicks           []SeriesPick `json:\"picks\"`\n\t// Stopped says why the series ended, and EndedAt when; empty while it\n\t// runs.\n\tStopped string     `json:\"stopped,omitempty\"`\n\tEndedAt *time.Time `json:\"ended_at,omitempty\"`\n}\n```\nNextSeries is one series of picks, between invocations.\n\n```go\ntype Options struct {\n\t// ReceiptOwn, on a drive, says whether a preflight receipt for a head is one\n\t// the driver's own preflight minted; nil takes any.\n\tReceiptOwn func(sha string) bool\n\t// RunStateWatch has a walled launch compare what the driver wrote with what\n\t// stands after the launch.\n\tRunStateWatch bool\n\t// ClassMapRead, on a drive, is handed the routes of every class map a\n\t// review set is resolved from (the machine's models.classes over the\n\t// bundled map, never a repository's or a run's stored state), as each\n\t// run starts; the drive adds them to the routes its walled launch takes\n\t// by name (runner.Config.AddClassRoutes). nil does nothing.\n\tClassMapRead func(routes []string)\n\t// Now is the clock; nil means time.Now.\n\tNow func() time.Time\n\t// AcceptConfig is `implement step --accept-config-change` given with\n\t// --discard, --release or --restart: a changed git configuration the run\n\t// tripwire would refuse is accepted in the same write as the move it goes\n\t// with (acceptWith), so a move refused writes no acceptance either.\n\tAcceptConfig bool\n\n\t// Minter mints the run id; the zero value is production.\n\tMinter recordid.Minter\n\t// Session is the joined session of the shared run state\n\t// (~/.abcd.noindex/runs/\u003croot-sha\u003e/) a new run is started for. When set, Start\n\t// claims the intent for it there, so a build of the same intent from any\n\t// other checkout of the repository sees the run before its lane has moved\n\t// or claimed anything (iss-2609252050506863). Empty, the run holds no\n\t// claim and is invisible to another checkout until its lane shows.\n\tSession string\n\t// Pace, SubAgents and FixRounds are the --pace, --sub-agents and\n\t// --fix-rounds flags as typed; nil when the flag was not given. They set a\n\t// new run's pace over every configured layer.\n\tPace, SubAgents, FixRounds *string\n\t// Roots are where the pace's configuration layers are read; nil reads\n\t// them at layered.RootsFor(repoRoot).\n\tRoots *layered.Roots\n\t// NetworkProbe proves the network back for the shared outage probe a\n\t// step runs when it is due; nil is implement.RemoteProbe at the checkout.\n\tNetworkProbe func() (bool, string)\n\t// OutageSession is the session the shared outage is recorded and probed for\n\t// when no other is known, and it keeps probing past the schedule's give-up: a\n\t// terminal drive's under a bound, which has a bound of its own. Unlike Session\n\t// it claims nothing in the shared run.\n\tOutageSession string\n\t// RunnerFailed is told of each launch that failed, with what it showed; nil\n\t// tells no one. A terminal run reads a limit and keeps its evidence from it.\n\tRunnerFailed func(role string, fl *runner.Failure)\n\t// RunnerStarting is told of each agent about to start, by role; nil tells no\n\t// one. A terminal run says so on its screen and in its log.\n\tRunnerStarting func(role string)\n\t// Runners is the runner configuration read before a run is created\n\t// (LoadRunners). A new run's budget check (budget.go) asks each runner a\n\t// role of the run is routed to for its remaining quota; nil leaves every\n\t// role on the host, which reports none.\n\tRunners *runner.Config\n\t// Quota asks the named runner for its remaining quota, under ctx's\n\t// deadline; nil asks Runners.\n\tQuota func(ctx context.Context, name string) (runner.Quota, bool, error)\n\n\t// Tiers is the model-tier routing a step resolves the tier of each role\n\t// its rounds hand out through (escalate.go; spc-2609251028149555, AC 10):\n\t// the routing tables and the machine's connections. Nil records no route.\n\tTiers *Tiering\n\n\t// AutoPlan is `abcd build --auto-plan` (autoplan.go): a draft intent is\n\t// planned by the run, on adr-2610310235000654's substitute for the\n\t// sign-off, in place of being refused as not planned. An intent already\n\t// planned is built as it would be without it; an issue key is refused.\n\tAutoPlan bool\n\n\t// PlanGuard is the front door's rule for a step that writes the intent\n\t// and spec records in this checkout, as an auto-plan lane's plan does\n\t// (autoplan.go): it is called under the run's lock immediately before\n\t// `intent plan` runs, and an error refuses the step as it is, the lane\n\t// left at its plan and the run's state unwritten. Nil guards nothing.\n\tPlanGuard func() error\n\n\t// Profile is the profile a drive runs on, by name, which a run it starts records\n\t// (drive_profile.go); \"\" for anything but a drive.\n\tProfile string\n\n\t// Trial starts the run in the loop's trial mode (trial.go): a model-matrix\n\t// copy, which takes no reservation and no shared-run claim and lands\n\t// nothing. A trial resumes only a trial, and a build never resumes one.\n\tTrial bool\n\t// Frozen is a trial's frozen commit, the one every lane of the run is cut\n\t// from: the full id of the checkout's head, its copy's clone in the clone\n\t// store, which is the only checkout a trial runs in. Only a trial names\n\t// one.\n\tFrozen string\n\n\t// TakeOver is `abcd build --take-over`: the start's reservation moves\n\t// this person's own live reservation from another copy to this one. It\n\t// never moves another person's.\n\tTakeOver bool\n\t// contains filtered or unexported fields\n}\n```\nOptions are the seams tests set; the zero value is production.\n\n```go\ntype OutageDone struct {\n\tLanded       []string   `json:\"landed\"`\n\tPullRequests []OutagePR `json:\"pull_requests\"`\n}\n```\nOutageDone is what a run that gave up had done: the lanes landed and the pull requests it opened that have not landed.\n\n```go\ntype OutageInfo struct {\n\tSince       time.Time  `json:\"since\"`\n\tServices    []string   `json:\"services\"`\n\tDown        []string   `json:\"down\"`\n\tProbes      int        `json:\"probes\"`\n\tNextProbeAt *time.Time `json:\"next_probe_at,omitempty\"`\n\t// Retried is what the lanes were doing when they lost the connection.\n\tRetried  []string    `json:\"retried\"`\n\tGaveUpAt *time.Time  `json:\"gave_up_at,omitempty\"`\n\tDone     *OutageDone `json:\"done,omitempty\"`\n\tLeft     *OutageLeft `json:\"left,omitempty\"`\n\t// Notify is true from the give-up until a session acknowledges it.\n\tNotify bool `json:\"notify\"`\n}\n```\nOutageInfo is what an outage holds a refusal or a step to: when it began, the services down, the probes so far and the next one due; for a run that gave up, when it did, what the run had done and what is left, and whether the product thinker's notification is still pending.\n\n```go\ntype OutageLane struct {\n\tLane     string `json:\"lane\"`\n\tSpecStep int    `json:\"spec_step\"`\n\tStage    Stage  `json:\"stage\"`\n}\n```\nOutageLane is one lane left, at its stage.\n\n```go\ntype OutageLeft struct {\n\tLanes   []OutageLane  `json:\"lanes\"`\n\tPending []PendingStep `json:\"pending\"`\n}\n```\nOutageLeft is what a run that gave up has left: each lane with work and its stage, and the spec steps no lane has opened for.\n\n```go\ntype OutagePR struct {\n\tLane string `json:\"lane\"`\n\tPR   int    `json:\"pr\"`\n\t// Merge is what the landing did with it: armed, or left open.\n\tMerge string `json:\"merge,omitempty\"`\n}\n```\nOutagePR is one pull request a lane opened.\n\n```go\ntype Outcome struct {\n\tAwait *Await\n\t// HandBack stops the lane: it is handed back to the person with what the\n\t// stage found, and the loop starts nothing further for it (itd-50,\n\t// criterion 2). Set only with no Await.\n\tHandBack *HandBack\n\t// Stay records a step of a stage that takes several invocations (the\n\t// landing): the lane's changes are written and the record gets the note,\n\t// and the lane stays at the stage for the next invocation's step. Set only\n\t// with no Await and no HandBack.\n\tStay bool\n\t// Goto sends the lane back to an earlier stage (the landing's sync sends\n\t// it to a fresh round); set only with no Await, HandBack or Stay.\n\tGoto Stage\n\t// LandLeft is set by a landing body that sends the lane back: the sync,\n\t// once it has reserved an issue's whole found_at again, before it changed\n\t// anything locally (reserveOnLeavingLand), so the move does not judge\n\t// the reservation a second time; and a records round, which takes no fix\n\t// round and so needs no wider reservation. Reservation is the run record's line for\n\t// a widening it made, \"\" when the reservation already covered the found_at.\n\tLandLeft    bool\n\tReservation string\n\t// Note is the run record's line for the stage.\n\tNote string\n\t// contains filtered or unexported fields\n}\n```\nOutcome is what a stage's body returns. A body that hands its work to an agent returns Await: the lane then waits on the receipt it names and the stage completes only when Receipt verifies it.\n\n```go\ntype Pace struct {\n\tWorkMinutes  PaceValue `json:\"work_minutes\"`\n\tPauseMinutes PaceValue `json:\"pause_minutes\"`\n\tSubAgents    PaceValue `json:\"sub_agents\"`\n\tFixRounds    PaceValue `json:\"fix_rounds,omitzero\"`\n}\n```\nPace is a run's pace: the working window, the pause after it, the ceiling on this run's lanes and validators alive at once, and the fix rounds a lane may take before it is handed back. FixRounds is zero in a run a state file before version 6 holds: it started before the pace carried the cap, and FixRoundCap reads the bundled value for it.\n\n```go\nfunc (p Pace) String() string\n```\nString renders the pace and where each number came from, as the run record and the text surfaces name it.\n\n```go\ntype PaceValue struct {\n\tValue  int    `json:\"value\"`\n\tLayer  string `json:\"layer\"`\n\tOrigin string `json:\"origin\"`\n}\n```\nPaceValue is one of the pace's numbers with the layer that supplied it: \"flag\", \"repo\", \"machine\" or \"bundled\", and the origin — the flag as typed, the file, or \"bundled\".\n\n```go\ntype PassedLane struct {\n\tIssue  string `json:\"issue\"`\n\tRun    string `json:\"run\"`\n\tReason string `json:\"reason\"`\n}\n```\nPassedLane is a lane a drive passed over: its run's file states another schema version, and the judge of a whole save (mayWholeSave) refused this drive the save taking it up or taking it over needs. Reason is that judge's reason and remedy. From the pass to the drive's end, whatever the reason, the drive writes nothing for the lane: no save, claim, reservation pushed or renewed, or line in its record, and no agent runs for it.\n\n```go\ntype PendingStep struct {\n\tNumber int    `json:\"number\"`\n\tTitle  string `json:\"title\"`\n\t// Needs are the spec steps it waits for, as its `- needs:` line or the\n\t// default (every earlier step, ruling DR6b) resolved them; nil in a file\n\t// before version 9, which reads as the default.\n\tNeeds []int `json:\"needs\"`\n}\n```\nPendingStep is a spec step the run will open a lane for.\n\n```go\ntype PlanReview struct {\n\tLens    string `json:\"lens\"`\n\tRole    string `json:\"role\"`\n\tBrief   string `json:\"brief\"`\n\tReturn  string `json:\"return\"`\n\tVerdict string `json:\"verdict,omitempty\"`\n\tPass    bool   `json:\"pass\"`\n}\n```\nPlanReview is one review of the draft: the lens it judges by, the agent it is started as, its brief and return, and the verdict the loop parsed.\n\n```go\ntype PreflightRefused struct{ Reason string }\n```\nPreflightRefused is why a lane's preflight is not run.\n\n```go\nfunc (e *PreflightRefused) Error() string\n```\n\n```go\ntype RateLimit struct {\n\tLane        string       `json:\"lane\"`\n\tRole        string       `json:\"role\"`\n\tRunner      string       `json:\"runner\"`\n\tResponse    string       `json:\"response\"`\n\tCheckpoints []Checkpoint `json:\"checkpoints\"`\n\t// contains filtered or unexported fields\n}\n```\nRateLimit is a runner's rate-limit response as a step reports it: the lane and the agent it came from, the runner, the response in abcd's words, and every lane it checkpointed.\n\n```go\ntype ReceiptRecord struct {\n\tRole    string `json:\"role\"`\n\tReceipt string `json:\"receipt\"`\n\t// Model is the model the runner reported, as reported; empty when it\n\t// reported none. The binary cannot verify it.\n\tModel string `json:\"model,omitempty\"`\n\t// Route is the route that ran the agent when a runner ran it: the runner\n\t// asked for, the one that ran and the model it reported. Absent when the\n\t// host ran it, so a host-run receipt reads as it always has.\n\tRoute *runner.RouteRecord `json:\"route,omitempty\"`\n\t// Named is the model the receipt named when the landing replaced Model\n\t// with one its trailer can name (rereadModels), kept only where the\n\t// comparison can read it (keptName); empty while Model is the receipt's\n\t// own. The writers of the lane are read from it and from Model alike\n\t// (laneWriters).\n\tNamed string `json:\"named,omitempty\"`\n}\n```\nReceiptRecord is one implementer's receipt the loop verified.\n\n```go\ntype RecordComparison struct {\n\tRound int `json:\"round\"`\n\tComparison\n}\n```\nRecordComparison is how one role's reviewers compared in one round (reviewers.go).\n\n```go\ntype RecordJudge struct {\n\tRound int `json:\"round\"`\n\tRoundJudge\n}\n```\nRecordJudge is one round's judge (judge.go).\n\n```go\ntype RecordLane struct {\n\tID        string `json:\"id\"`\n\tKey       string `json:\"key\"`\n\tSpecStep  int    `json:\"spec_step\"`\n\tStepTitle string `json:\"step_title\"`\n\tStage     Stage  `json:\"stage\"`\n\tBranch    string `json:\"branch,omitempty\"`\n\tBaseSHA   string `json:\"base_sha,omitempty\"`\n\tHeadSHA   string `json:\"head_sha,omitempty\"`\n\t// Receipts are the implementers' receipts the loop verified, each with the\n\t// model its runner reported.\n\tReceipts []ReceiptRecord `json:\"receipts\"`\n\t// Verdicts are every verdict the loop recorded, round by round.\n\tVerdicts []RecordVerdict `json:\"verdicts\"`\n\t// Comparisons are how each reviewer role's reviewers compared, round by\n\t// round, where a review set asked them for classes (reviewers.go).\n\tComparisons []RecordComparison `json:\"comparisons,omitempty\"`\n\t// Judges are each round's judge, where a role's reviewers disagreed on a\n\t// run whose judge was active (judge.go): what it ruled and struck, or why\n\t// it was not launched.\n\tJudges []RecordJudge `json:\"judges,omitempty\"`\n\t// Resolves are the captures the lane fixed.\n\tResolves []string `json:\"resolves\"`\n\t// PR is the lane's pull request, and Landing what its landing did.\n\tPR       int       `json:\"pr,omitempty\"`\n\tLanding  *Landing  `json:\"landing,omitempty\"`\n\tHandBack *HandBack `json:\"hand_back,omitempty\"`\n\t// AutoPlan is the auto-plan lane's record: the draft, its digest, the\n\t// plan reviews' verdicts as the loop recorded them, and what the plan\n\t// made. Absent on every other lane.\n\tAutoPlan *AutoPlan `json:\"auto_plan,omitempty\"`\n}\n```\nRecordLane is one lane of the run record.\n\n```go\ntype RecordPick struct {\n\tLane  string `json:\"lane\"`\n\tEntry string `json:\"entry\"`\n\tintent.Pick\n\tExcluded []Excluded `json:\"excluded\"`\n\t// Falsified is true once a lane of the run was handed back as\n\t// unachievable after the run's fix rounds, and FalsifiedBy names it.\n\tFalsified   bool   `json:\"falsified\"`\n\tFalsifiedBy string `json:\"falsified_by,omitempty\"`\n}\n```\nRecordPick is a run's pick as its record reads it (itd-2609211116005482 criterion 6, spc-2609212015048113 scope 8): the candidates in the pick order with their scores, the rule, the runner-up and the falsifier, as the pick made them; the planned intents the checks excluded; and whether the lane's state has met the falsifier. The intent's grounds entry is never edited: a falsified pick is named here and in the run record's lines.\n\n```go\ntype RecordVerdict struct {\n\tRound   int    `json:\"round\"`\n\tHeadSHA string `json:\"head_sha\"`\n\tRole    string `json:\"role\"`\n\tVerdict string `json:\"verdict\"`\n\tPass    bool   `json:\"pass\"`\n\t// Return is the validator's return the verdict was parsed from.\n\tReturn string `json:\"return\"`\n\t// Route is the runner route that ran the validator; absent when the host\n\t// ran it.\n\tRoute *runner.RouteRecord `json:\"route,omitempty\"`\n\t// Reviewer, Class, Model and ModelStatus are a review set's reviewer\n\t// (reviewers.go): its index among its role's reviewers, the class it was\n\t// asked for, the model the class resolved to, and whether that model was\n\t// only asked for, its runner reported one (beside it on Route), or the\n\t// reviewer route answered, which is sent no model (unsent); absent for a\n\t// validator no review set asked for a class.\n\tReviewer    int    `json:\"reviewer,omitempty\"`\n\tClass       string `json:\"class,omitempty\"`\n\tModel       string `json:\"model,omitempty\"`\n\tEffort      string `json:\"effort,omitempty\"`\n\tModelStatus string `json:\"model_status,omitempty\"`\n\t// Located and Findings are the reviewer's located findings (findings.go):\n\t// how many its return cites, 0 included, and each with what the fix\n\t// report said of it and who else in the round cites it; absent for the\n\t// intent-auditor and for a verdict recorded before the loop read them.\n\tLocated  *int      `json:\"located,omitempty\"`\n\tFindings []Finding `json:\"findings,omitempty\"`\n\t// WriterModels, ReviewerModel and ReviewerNamed are every model that\n\t// wrote into the lane up to the round, the model the reviewer was asked\n\t// for or its runner reported, and the model its return named where that\n\t// is another (reviewers.go); absent on the intent-auditor and on a\n\t// reviewer handed out before they were recorded.\n\tWriterModels  []string `json:\"writer_models,omitempty\"`\n\tReviewerModel string   `json:\"reviewer_model,omitempty\"`\n\tReviewerNamed string   `json:\"reviewer_named,omitempty\"`\n\t// ModelsUnrecorded marks a reviewer handed out before reviewers' models\n\t// were recorded, whose record says so in words.\n\tModelsUnrecorded bool `json:\"models_unrecorded,omitempty\"`\n}\n```\nRecordVerdict is one verdict the loop recorded from a validator's return.\n\n```go\nfunc (v RecordVerdict) ModelsPhrase() string\n```\nModelsPhrase names the writers' and the reviewer's models as the text surfaces show them, each cleaned, bounded and in a code span where it is shown; for a reviewer handed out before they were recorded, that they were not; \"\" when the verdict records none.\n\n```go\nfunc (v RecordVerdict) ReviewerPhrase() string\n```\nReviewerPhrase names the verdict's reviewer as the text surfaces show it: its index and its class with the model and effort the class held; \"\" for a validator no review set asked for a class.\n\n```go\ntype Refusal struct {\n\t// Stage is where the loop refused: \"check\" before a run starts, \"state\" for\n\t// a run that cannot be read, \"pause\" for the window clock, or the lane stage\n\t// (\"worktree\", \"implement\", …) and \"receipt\" inside a run.\n\tStage string `json:\"stage\"`\n\t// Check names the pre-start check that failed, when Stage is \"check\".\n\tCheck string `json:\"check,omitempty\"`\n\t// Lane names the lane, inside a run.\n\tLane   string `json:\"lane,omitempty\"`\n\tReason string `json:\"reason\"`\n\tRemedy string `json:\"remedy\"`\n\t// Contention marks a refusal that is somebody else's hold rather than the\n\t// caller's fault — a peer holding the record, a run locked by another\n\t// invocation, a pause: back off and take other work. The CLI maps it to\n\t// exit 3, as `abcd implement` does.\n\tContention bool `json:\"contention,omitempty\"`\n\t// Wrote says what the call did before it refused, \"\" for nothing.\n\tWrote string `json:\"wrote,omitempty\"`\n\t// Checks is every pre-start check's row, when Stage is \"check\", so a caller\n\t// sees the whole picture rather than the first failure.\n\tChecks []CheckRow `json:\"checks,omitempty\"`\n\t// Excluded is every planned intent a pick excluded and the check that\n\t// excluded it, when a pick found no candidate.\n\tExcluded []Excluded `json:\"excluded,omitempty\"`\n\t// Outage is the run's lost connection a refusal is held by: the shared\n\t// probe a lane waits on, or, at the stage \"outage\", the give-up with what\n\t// the run had done and what is left (iss-2610080620372731).\n\tOutage *OutageInfo `json:\"outage,omitempty\"`\n\t// contains filtered or unexported fields\n}\n```\nRefusal is the one shape every refusal of the loop takes (criterion 13): the stage it happened at, the reason and the remedy, in text and in --json. A refusal writes nothing: the state file is as it was before the call, except for the time a landing began waiting for its full check (ruling DR6d-2), which the call that finds the wait writes once, whatever the call answers.\n\n```go\nfunc AsRefusal(err error) (*Refusal, bool)\n```\nAsRefusal returns err's Refusal, if it carries one.\n\n```go\nfunc (r *Refusal) Error() string\n```\nError renders the refusal as one line: stage, reason, remedy.\n\n```go\ntype Resolution struct {\n\tIssue   string `json:\"issue\"`\n\tCommit  string `json:\"commit\"`\n\tNote    string `json:\"note\"`\n\tImpact  string `json:\"impact\"`\n\tGrounds string `json:\"grounds\"`\n}\n```\nResolution is one capture a lane fixed: the issue, the lane's commit that fixed it, and what \\`abcd capture resolve\\` records — the note, the product impact and the grounds. The loop checks the shape and that the commit is one the receipt names; the capture store judges the rest when the landing resolves it.\n\n```go\ntype RestartAside struct {\n\tRunID string    `json:\"run_id\"`\n\tLane  string    `json:\"lane\"`\n\tAt    time.Time `json:\"at\"`\n\t// Path is the aside's directory, relative to the checkout root.\n\tPath string `json:\"path\"`\n\t// Head is the lane's last commit, the one the patch applies to and the one\n\t// the fresh agent starts from.\n\tHead string `json:\"head\"`\n\t// Files are the paths the patch changes; empty when nothing was left\n\t// uncommitted, and Patch is then empty too.\n\tFiles []string `json:\"files\"`\n\tPatch string   `json:\"patch,omitempty\"`\n\t// Why is WhyDied, or \"agent yielded: NETWORK: \u003ccmd\u003e\".\n\tWhy string `json:\"why\"`\n\t// Receipt is the partial receipt copied aside, by its name there; empty\n\t// when the gone agent wrote none.\n\tReceipt string `json:\"receipt,omitempty\"`\n}\n```\nRestartAside is what a restart saved aside, as aside.json holds it.\n\n```go\ntype RestartResult struct {\n\tStepResult\n\tAside RestartAside `json:\"aside\"`\n}\n```\nRestartResult is what restartLane returns: the lane's step result, re-telling the implementer await, and the aside.\n\n```go\nfunc RestartDrive(ctx context.Context, repoRoot, runID, laneID, yielded string, steps Stages, o Options, rs Runners) (RestartResult, error)\n```\nRestartDrive is restartLane under the run's routes (iss-2611012047534449): a re-told role routed to a runner, by the configuration or a --route, is started on its runner at once, as a held role is retried (runner\\_pause.go), rather than re-told to the host; one the runner fails to start pauses the lane. A --route for a role the restart does not re-tell is refused before anything is changed. With rs.Config nil, or in an auto-plan run, it is restartLane. The first routed role re-told is started; any other is retried by a later step.\n\n```go\ntype Retry struct {\n\tLane   string       `json:\"lane\"`\n\tRole   string       `json:\"role\"`\n\tRunner string       `json:\"runner\"`\n\tWhy    string       `json:\"why\"`\n\tPaused *RunnerPause `json:\"paused,omitempty\"`\n}\n```\nRetry is a held role a step retried on its runner: the lane, the role, the runner, why it was held, and, when the runner failed to start it again, the pause it stays in.\n\n```go\ntype ReviewClass struct {\n\tClass        string `json:\"class\"`\n\tModel        string `json:\"model\"`\n\tMapLayer     string `json:\"map_layer\"`\n\tMapOrigin    string `json:\"map_origin\"`\n\tEffort       string `json:\"effort,omitempty\"`\n\tEffortLayer  string `json:\"effort_layer,omitempty\"`\n\tEffortOrigin string `json:\"effort_origin,omitempty\"`\n}\n```\nReviewClass is one class of a review set with the model the class map resolves it to, and the map layer (\"machine\" or \"bundled\") and origin that supplied the model; and the effort the class runs at, with the layer and origin of models.effort that set it. A run started before efforts carries none of the three.\n\n```go\ntype ReviewJudge struct {\n\tClass        string `json:\"class\"`\n\tModel        string `json:\"model\"`\n\tMapLayer     string `json:\"map_layer\"`\n\tMapOrigin    string `json:\"map_origin\"`\n\tEffort       string `json:\"effort,omitempty\"`\n\tEffortLayer  string `json:\"effort_layer,omitempty\"`\n\tEffortOrigin string `json:\"effort_origin,omitempty\"`\n\tLayer        string `json:\"layer\"`\n\tOrigin       string `json:\"origin\"`\n\tStatus       string `json:\"status\"`\n}\n```\nReviewJudge is a review set's judge: its class, the model it resolves to, the layer and origin of review.judge, and its status, fixed when the run starts (itd-2611101419006280 decision 5): active once a judge agent has cleared itd-81's calibration gate, else waiting. A waiting judge is never launched, awaited or counted in an estimate, and a run never gains a judge part-way.\n\n```go\nfunc (j *ReviewJudge) Active() bool\n```\nActive reports whether the run's judge runs on a disagreement: a judge the run started with as active. nil, and a waiting judge, never run.\n\n```go\ntype ReviewRoute struct {\n\t// Name is the route as oracle.review names it; the record names it.\n\tName string\n\t// Reviewer reaches the route; nil when this machine names no server for\n\t// it, and Absent says so.\n\tReviewer Reviewer\n\tAbsent   string\n\t// AgentPrompt is a reviewer's agent definition, the head of its request.\n\tAgentPrompt func(role string) (string, error)\n}\n```\nReviewRoute is the reviewer route the configuration selected.\n\n```go\nfunc LoadReviewRoute(r layered.Roots, agentPrompt func(role string) (string, error)) (*ReviewRoute, error)\n```\nLoadReviewRoute reads the reviewer route (oracle.LoadReview) at the roots a step starts from and refuses in the loop's refusal shape on a fault, before anything moves. nil is the host's route: nothing differs from a run that configures none.\n\n```go\ntype ReviewSet struct {\n\tRoles        []RoleReviewers `json:\"roles\"`\n\tJudge        *ReviewJudge    `json:\"judge\"`\n\tMaxReviewers PaceValue       `json:\"max_reviewers\"`\n\tClasses      []ReviewClass   `json:\"classes,omitempty\"`\n\tUnlaunchable []RoleClasses   `json:\"unlaunchable,omitempty\"`\n}\n```\nReviewSet is a run's review set: each role's reviewers, the judge (nil for none) and the ceiling the lists were held to; and Classes, the whole class map the run started on, one entry per class in the order Classes gives, from which a reviewer whose class holds the writer's model takes another (reviewers.go). Classes is empty in a run started before version 27, which chooses among the classes its set recorded. Unlaunchable is, for a run a drive started, each role's classes of that map its runners could not launch when the run started, by the admission CheckReviewersLaunch asks of the listed reviewers, so a reviewer is never moved to one of them; empty when every class launches, and on every run but a drive's, whose reviewers are asked of the host.\n\n```go\nfunc ReviewSetFor(o Options, repoRoot string) (ReviewSet, error)\n```\nReviewSetFor is the review set a run started now would run on, as a drive's start names it before it asks (itd-2611101419006280 decision 8).\n\n```go\nfunc (rs ReviewSet) ClassMapPhrase() string\n```\nClassMapPhrase is the class map the run started on as the text surfaces show it, each class with its model, and what a reviewer whose class holds a writer's model does; \"\" for a run started before the map was stored.\n\n```go\nfunc (rs ReviewSet) Pair() string\n```\nPair is the set as a drive's start names it before it asks: each role's reviewers, the two roles together where they run the same classes, and the judge with its status.\n\n```go\nfunc (rs ReviewSet) Role(role string) (RoleReviewers, bool)\n```\nRole returns the reviewers of role, and false when the set names none.\n\n```go\nfunc (rs ReviewSet) String() string\n```\nString renders the set and where each value came from, as the run record and the text surfaces name it.\n\n```go\ntype Reviewer interface {\n\tReview(ctx context.Context, request string) (string, error)\n}\n```\nReviewer is the validator interface a reviewer route other than the host implements: the request the loop renders in, the reviewer's whole return out. The loop reads the verdict from the return and records it, as it does a host reviewer's. An error is a review that did not come back: one with a Reason method names the fallback's reason, and its text is the detail.\n\n```go\ntype RoleClasses struct {\n\tRole    string   `json:\"role\"`\n\tClasses []string `json:\"classes\"`\n}\n```\nRoleClasses is one review role's classes a drive's runners could not launch when the run started, in the order Classes gives.\n\n```go\ntype RoleReviewers struct {\n\tRole      string        `json:\"role\"`\n\tReviewers []ReviewClass `json:\"reviewers\"`\n\tLayer     string        `json:\"layer\"`\n\tOrigin    string        `json:\"origin\"`\n\tClamped   int           `json:\"clamped,omitempty\"`\n}\n```\nRoleReviewers is one role's reviewers, with the layer and origin of the list. Clamped is the length the list named before the machine's ceiling cut it; 0 when it was not cut.\n\n```go\ntype Round struct {\n\tRole string `json:\"role\"`\n\t// Tier is the tier the role was asked to run at, the receipt's tier asked;\n\t// \"\" when its route names no tier.\n\tTier oracle.Tier `json:\"tier,omitempty\"`\n\t// EscalatedFrom is the tier the role ran at in the round before, when the\n\t// failed round moved it up; \"\" when it did not move.\n\tEscalatedFrom oracle.Tier `json:\"escalated_from,omitempty\"`\n\t// GateOutput is the failing output of the round before this role ran, the\n\t// verdicts and findings that caused any switch, bounded; \"\" when the role\n\t// did not follow a failed round.\n\tGateOutput string `json:\"gate_output,omitempty\"`\n\t// Note says why the role did not move after a failed round: its route\n\t// names no tier, or it is at the top of the ladder.\n\tNote string `json:\"note,omitempty\"`\n}\n```\nRound is the route one role of a lane's round ran at (spc-2609251028149555, AC 10; itd-2609170822093401's Decision 1, \"a rule, not a router\"). A round whose gates failed moves the next round's tier one step up the ladder local, economy, frontier (oracle.Escalate), and the switch is recorded here as a fact: the tier the role ran at, the tier it moved from, and the failing gate output that caused it. A route that names no tier (a runner and model, a role pointed at a provider, host-decides, or a role with no routing row) does not move, and says why in Note.\n\n```go\ntype RoundJudge struct {\n\tRoles  []string `json:\"roles\"`\n\tClass  string   `json:\"class\"`\n\tModel  string   `json:\"model\"`\n\tEffort string   `json:\"effort,omitempty\"`\n\tBrief  string   `json:\"brief,omitempty\"`\n\tReturn string   `json:\"return,omitempty\"`\n\tRuled  bool     `json:\"ruled,omitempty\"`\n\tStruck int      `json:\"struck,omitempty\"`\n\t// Strikes are the locations the judge struck, each with its reason, in\n\t// the round's validator order: kept on the judge, so they outlive the\n\t// round's findings, which the state drops once the next round opens\n\t// (keepLatestFindings). A judge an abcd before state version 29 recorded\n\t// keeps none where its round's findings were already dropped, and one\n\t// whose strikes were trimmed to keep the state within its bound keeps\n\t// none either (trimOldestFindings); its count stands in both.\n\tStrikes    []JudgeStrike `json:\"strikes,omitempty\"`\n\tUnlaunched string        `json:\"unlaunched,omitempty\"`\n}\n```\nRoundJudge is a round's judge: the roles whose reviewers disagreed, in the order the round hands them out; the class, model and effort the run's judge resolved to; its brief and return; whether the loop recorded its return (Ruled), how many locations it struck and each with its reason (Strikes); or, where the run's active judge was not launched because its agent no longer cleared the gate, why (Unlaunched), with no brief or return.\n\n```go\nfunc (j RoundJudge) ClassPhrase() string\n```\nClassPhrase names the judge's class as the text surfaces show it, with the model it held and the effort it ran at.\n\n```go\ntype RouteAnswer struct {\n\tRoute  string `json:\"route\"`\n\tSHA256 string `json:\"sha256\"`\n}\n```\nRouteAnswer is the answer a reviewer route placed at an await's return path: the route, and the SHA-256 (hex) of the bytes it placed. The receipt records the review as the route's only when the return its verifier reads has that digest.\n\n```go\ntype RoutedJudgementAnswer struct {\n\tSchemaVersion int    `json:\"schema_version\"`\n\tIssue         string `json:\"issue\"`\n\tAnswer        string `json:\"answer\"`\n\tKind          string `json:\"kind,omitempty\"`\n\tReason        string `json:\"reason\"`\n}\n```\nRoutedJudgementAnswer is the routed judge's answer, read strictly: the host's shape less the digest, which abcd computes itself.\n\n```go\ntype RunPick struct {\n\t// Lane is the lane whose branch carries the pick's entry as its first\n\t// commit: the run's first lane.\n\tLane string `json:\"lane\"`\n\t// Entry is the grounds entry's text, written after the `pursued:` token.\n\tEntry string `json:\"entry\"`\n\t// Pick is the choice: the candidates in the pick order with their scores,\n\t// the rule, the runner-up.\n\tPick intent.Pick `json:\"pick\"`\n\t// Excluded are the planned intents the checks excluded.\n\tExcluded []Excluded `json:\"excluded\"`\n}\n```\nRunPick is the pick a run was started from, as the state carries it.\n\n```go\ntype RunRecord struct {\n\tRunID  string `json:\"run_id\"`\n\tKey    string `json:\"key\"`\n\tIntent string `json:\"intent\"`\n\tSpec   string `json:\"spec\"`\n\tDriver Driver `json:\"driver\"`\n\t// Profile names the profile a drive ran the run on, by name; absent for a run no\n\t// drive named one for.\n\tProfile   string    `json:\"profile,omitempty\"`\n\tComplete  bool      `json:\"complete\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\tUpdatedAt time.Time `json:\"updated_at\"`\n\t// Pace is the pace the run ran on, nil for a run started before the loop\n\t// paced a run.\n\tPace *Pace `json:\"pace\"`\n\t// Review is the review set the run ran on, nil for a run started before\n\t// review sets.\n\tReview      *ReviewSet    `json:\"review\"`\n\tLanes       []RecordLane  `json:\"lanes\"`\n\tPending     []PendingStep `json:\"pending\"`\n\tTranscripts []Transcript  `json:\"transcripts\"`\n\t// Fallbacks are the run's fallback receipts, and FallbackCounts their\n\t// count per runner asked for and per role (itd-2609201916056194\n\t// criterion 4).\n\tFallbacks      []runner.FallbackReceipt `json:\"fallbacks\"`\n\tFallbackCounts runner.Counts            `json:\"fallback_counts\"`\n\t// Outages are the lost connections the shared run's log records over the\n\t// run's lifetime, each with its minutes, its outcome and what was retried,\n\t// so a short outage nobody was told of still appears.\n\tOutages []implement.OutageSpan `json:\"outages\"`\n\t// Pick is the pick `abcd build next` started the run from, with its score\n\t// table and whether its falsifier was met; nil for a run `abcd build\n\t// \u003citd-N\u003e` started.\n\tPick   *RecordPick `json:\"pick\"`\n\tRecord []Entry     `json:\"record\"`\n}\n```\nRunRecord is a run's record as it is read at the end.\n\n```go\nfunc CaptureTranscripts(repoRoot, runID string, paths []string, capture TranscriptCapturer, o Options) (RunRecord, error)\n```\nCaptureTranscripts captures each path into the history store through capture, one capture per path, and records each in the run's state. It is refused on a run that is not complete: the record's transcripts are the run's, captured at its end. A capture that fails stops the call: the ones before it are recorded, and the refusal names the path that failed, so the call can be made again with the rest. A path captured before is captured again (the store's capture is idempotent) and recorded once. A session that is not the run's driver leaves a run whose file states another version as it stands, capturing nothing (mayWholeSave): \\`implement record\\` makes no claim.\n\n```go\nfunc ReadRecord(repoRoot, runID string) (RunRecord, error)\n```\nReadRecord reads a run's record.\n\n```go\ntype RunRenewal struct {\n\t// Root is the checkout the run lives in.\n\tRoot string\n\t// RunID and Key name the run and the record it reserves.\n\tRunID string\n\tKey   string\n\t// Renewed is true for a renewal pushed and logged as reservation_renewed;\n\t// in a run with members, only when no issue's renewal in the pass failed\n\t// (membersRenewal).\n\tRenewed bool\n\t// Note is what the run record logged: the renewal's line when Renewed,\n\t// else why it failed, or that the reservation is another person's or\n\t// copy's.\n\tNote string\n}\n```\nRunRenewal is one renewal of a run's reservation RenewRuns or RenewRunsIn made or tried.\n\n```go\nfunc RenewRuns(waiterRoot string, now time.Time) []RunRenewal\n```\nRenewRuns renews, as at now, the due reservation of each run in progress the gated waiter in waiterRoot serves: each that lives in waiterRoot, and each that lives in another worktree of the repository (git worktree list) with a lane, not yet done, whose worktree is waiterRoot, compared by real path. A run that cannot be read is named in the result and not renewed, and the others in its worktree still are; a worktree that cannot be listed, and a listing git refuses, renew nothing. It never refuses: the waiter's wait and its command go on whatever it finds.\n\n```go\nfunc RenewRunsIn(repoRoot, runID string, now time.Time) []RunRenewal\n```\nRenewRunsIn renews, as at now, the due reservation of each run in progress that lives in repoRoot, or of the one runID names (\"\" for every run): implement status's renewal of the runs it shows.\n\n```go\ntype RunStop struct {\n\tSetBy   string    `json:\"set_by\"`\n\tSetAt   time.Time `json:\"set_at\"`\n\tNotedAt time.Time `json:\"noted_at\"`\n\t// HaltedAt is when the last lane settled and the claims were let go; nil\n\t// while an agent is still in its call.\n\tHaltedAt *time.Time `json:\"halted_at,omitempty\"`\n\t// Released says what became of the run's reservation.\n\tReleased string     `json:\"released,omitempty\"`\n\tLeft     []StopLeft `json:\"left,omitempty\"`\n\t// FromFile says the stop was read from a stop file, which a lift removes; a\n\t// signal's stop has none, and stays until a take-over.\n\tFromFile bool `json:\"from_file,omitempty\"`\n\t// PageFailed says why the day's page could not be written, \"\" when it could.\n\tPageFailed string `json:\"page_failed,omitempty\"`\n}\n```\nRunStop is the stop a run took: who set it and when, what is left of the halting, and what each lane left once it settled.\n\n```go\ntype RunnerClaim struct {\n\tRunner  string    `json:\"runner\"`\n\tSession string    `json:\"session\"`\n\tUntil   time.Time `json:\"until\"`\n}\n```\nRunnerClaim is a runner a step started for an await: the runner, the session it was started under, and when the claim lapses.\n\n```go\ntype RunnerPause struct {\n\tRunner string        `json:\"runner\"`\n\tReason runner.Reason `json:\"reason\"`\n\tDetail string        `json:\"detail\"`\n\t// Stderr is the first line the runner wrote to stderr, redacted, one line\n\t// and bounded; \"\" when it wrote none.\n\tStderr string    `json:\"stderr,omitempty\"`\n\tSince  time.Time `json:\"since\"`\n\tAt     time.Time `json:\"at\"`\n\tTries  int       `json:\"tries\"`\n}\n```\nRunnerPause is why a role waits for its runner: the runner that failed to start it, the reason in abcd's words, the first line the runner wrote to stderr, when the pause began and when the latest start failed, and how many starts have failed.\n\n```go\nfunc (p RunnerPause) Why() string\n```\nWhy is the pause's reason as one clause.\n\n```go\ntype Runners struct {\n\t// Config is the runner configuration read when the call began\n\t// (runner.Load); nil drives nothing and leaves every role on the host.\n\tConfig *runner.Config\n\t// Transcripts is where each runner's transcript lands: abcd's own store\n\t// (runner.HistoryStore) in production.\n\tTranscripts runner.TranscriptStore\n\t// Timeout bounds one runner's run; the role's Config.TimeoutFor when zero.\n\tTimeout time.Duration\n}\n```\nRunners is what the process driver starts a routed role through.\n\n```go\ntype SeriesFlags struct {\n\tPace      *string `json:\"pace,omitempty\"`\n\tSubAgents *string `json:\"sub_agents,omitempty\"`\n\tFixRounds *string `json:\"fix_rounds,omitempty\"`\n}\n```\nSeriesFlags are --pace, --sub-agents and --fix-rounds as typed; absent when not given.\n\n```go\ntype SeriesPick struct {\n\tIntent   string    `json:\"intent\"`\n\tRunID    string    `json:\"run_id\"`\n\tPickedAt time.Time `json:\"picked_at\"`\n\tOutcome  string    `json:\"outcome\"`\n\t// Falsified is true once the run's state met the pick's falsifier.\n\tFalsified bool `json:\"falsified\"`\n}\n```\nSeriesPick is one pick of a series and what its run has come to.\n\n```go\ntype SeriesResult struct {\n\t// State is the series' state file, relative to the checkout root.\n\tState string `json:\"state\"`\n\t// Started is true when this call began the series.\n\tStarted bool `json:\"started\"`\n\tNextSeries\n\tComplete bool `json:\"complete\"`\n}\n```\nSeriesResult is the series as one call leaves it.\n\n```go\ntype Stage string\n```\nStage is one stage of a lane: the loop performs a lane's stages in order, and the lane as a whole lands one step of the spec (a spec's steps keep that word; BU1, iss-2609291313276243).\n\n```go\nconst (\n\tStagePlanReview Stage = \"plan-review\"\n\tStagePlan       Stage = \"plan\"\n)\n```\nThe auto-plan lane's stages.\n\n```go\nconst (\n\tStageWorktree  Stage = \"worktree\"\n\tStageBrief     Stage = \"brief\"\n\tStageImplement Stage = \"implement\"\n\tStageValidate  Stage = \"validate\"\n\tStageLand      Stage = \"land\"\n\tStageDone      Stage = \"done\"\n\t// StageHandedBack is a lane that took its run's cap of fix rounds and still\n\t// did not pass (itd-50, criterion 2): the loop starts nothing further for\n\t// it, and its intent is the person's to replan.\n\tStageHandedBack Stage = \"handed-back\"\n\t// StageHeld is a lane whose round passed after a sibling was handed back\n\t// (ruling DR6c): it holds no slot, starts nothing and is never armed until\n\t// the person releases it (`implement step --release`) or discards it.\n\tStageHeld Stage = \"held\"\n\t// StageDiscarded is a held lane the person discarded: its pull request\n\t// closed, its worktree and branch removed, its step left unlanded.\n\tStageDiscarded Stage = \"discarded\"\n)\n```\nThe lane's stages, in the order Sequence performs them. StageDone is the state of a lane with nothing left to do, and StageHandedBack of a lane stopped and handed back to the person; neither is a stage with a body.\n\n```go\ntype StageDef struct {\n\tName    Stage\n\tPiece   int\n\tRun     Handler\n\tVerify  Verifier\n\tRepeats bool\n}\n```\nStageDef is one stage of the lane sequence: its name, the spec piece that delivers its body, and the body — nil when this build does not carry it.\n\nA stage that hands the lane to several agents in turn (the validators, and the fresh implementer their findings go to) sets Repeats: a verified receipt then returns the lane to the stage's body rather than completing the stage, and the body decides, on the next step, whom it hands the lane to next or that the stage is complete.\n\n```go\ntype Stages []StageDef\n```\nStages is the lane sequence with its bodies.\n\n```go\nfunc DefaultStages() Stages\n```\nDefaultStages is the lane sequence this build carries, each stage with the spec piece that delivers its body: the worktree (lane.go), the brief (brief.go), the implement stage with its receipt's verifier (receipt.go) and the validators with theirs (validate.go), and the landing (land.go).\n\n```go\ntype StartResult struct {\n\tRunID string `json:\"run_id\"`\n\t// State is the state file, relative to the checkout root.\n\tState string `json:\"state\"`\n\t// Resumed is true when a live run for the key already existed: the call\n\t// created nothing and names that run.\n\tResumed bool          `json:\"resumed\"`\n\tLane    Lane          `json:\"lane\"`\n\tPending []PendingStep `json:\"pending\"`\n\t// Checks are the pre-start checks' rows when the call created the run; a\n\t// resumed start runs none, and carries none.\n\tChecks []CheckRow `json:\"checks\"`\n\t// Claim is the shared-run claim a new run took for Options.Session; nil when\n\t// no session was named or the start resumed a run, and then null in the\n\t// JSON, never absent, so the payload says the run holds no claim.\n\tClaim *implement.ClaimResult `json:\"claim\"`\n\t// Pace is the run's pace, each number with the layer that supplied it.\n\t// Null for a run started before the loop paced a run.\n\tPace *Pace `json:\"pace\"`\n\t// Review is the run's review set (reviewset.go), each value with the\n\t// layer that supplied it. Null for a run started before review sets.\n\tReview *ReviewSet `json:\"review\"`\n\t// Diagnostics are the review set's non-fatal reports when the call\n\t// created the run (a list clamped to the machine's ceiling, a\n\t// repository's class map skipped), one line each, for the front door to\n\t// print on stderr; never in the payload.\n\tDiagnostics []string `json:\"-\"`\n\t// HandBack is set when the run's lane stands handed back to the person.\n\tHandBack *HandBack `json:\"hand_back,omitempty\"`\n\t// Reservation is what the start did with the run's reservation on the\n\t// shared remote (reserved, renewed or took it over, until when, with what\n\t// footprint); empty when it reserved nothing (no remote named origin, or\n\t// a resumed run handed back).\n\tReservation string `json:\"reservation,omitempty\"`\n\t// ReservationWarnings is each warning the start's reservation act gave:\n\t// a footprint path naming a directory git tracks, with the tracked files\n\t// beneath it (iss-2610230016544142), reserved all the same. Every act\n\t// that names the run's footprint gives them, a reserve that renews this\n\t// copy's own tip included; it is empty when the footprint names no such\n\t// directory, when a resume renewed the reservation keeping the tip's\n\t// footprint (a renewal names none), or when nothing was reserved.\n\tReservationWarnings []string `json:\"reservation_warnings,omitempty\"`\n\t// ForkUnchecked is why the start's reservation could not ask the forge\n\t// whether origin is a fork, so it went on without the check (claim's\n\t// Result.ForkUnchecked); \"\" when it asked, or asked nothing.\n\tForkUnchecked string `json:\"fork_unchecked,omitempty\"`\n\t// ForkAllowed is the fork, as owner/name, the start's reservation was let\n\t// through on because reservation.fork_origin names it (claim's\n\t// Result.ForkAllowed); \"\" when none was.\n\tForkAllowed string `json:\"fork_allowed,omitempty\"`\n\t// Closed is each lane a resumed build closed because its pull request had\n\t// merged (closeOnResume); empty when it closed none.\n\tClosed []ClosedLane `json:\"closed,omitempty\"`\n\t// Finished is true when that closing left the run nothing to build: the\n\t// run is complete, and the invocation started nothing more.\n\tFinished bool   `json:\"finished,omitempty\"`\n\tNext     string `json:\"next\"`\n}\n```\nStartResult is what Start returns.\n\n```go\nfunc Start(repoRoot, key string, o Options) (StartResult, error)\n```\nStart resumes the live run for key, or runs the checks and, when every one passes and the budget check (budget.go) finds no runner's quota under the run's estimate, creates the run: the state file with one lane at the sequence's first stage, the spec's other unlanded steps pending, and the record's first line. A refused check writes nothing.\n\nA live run for the same key in this checkout is looked up first, under the lock, and resumed — named, not duplicated, and not re-judged. The checks judged the record when the run was created; since then the run's own lanes change the tree they read (a lane's worktree moves the intent to shipped/, a lane claims it), so judging again would refuse the run as its own peer. So starting again after a kill loses nothing and repeats nothing, and the checks run only when a run is created. Only the key's shape is checked before the lookup, so a path is never built from a key that is not an intent id.\n\nWith o.Session named, a new run also claims its intent in the shared run state for that session, with the run id as the lane and the longest lease a claim takes: the peers check then counts that session's own live claim on the intent as its own, and a build from another checkout counts it as a peer's. A session that has not joined is refused before anything is created; a claim refused under the lock (a racing holder, a second session's bound) leaves no run behind; and a run whose state cannot be written releases the claim it took.\n\n```go\ntype State struct {\n\tSchemaVersion int `json:\"schema_version\"`\n\t// RunID names the run and its directory.\n\tRunID string `json:\"run_id\"`\n\t// Key is the record the run was started for: an intent id, or an issue id\n\t// (decision 10), for which Intent and Spec are empty.\n\tKey string `json:\"key\"`\n\t// Intent and Spec are the intent the run delivers and the open spec it\n\t// builds against, as the readiness gate judged them.\n\tIntent string `json:\"intent\"`\n\tSpec   string `json:\"spec\"`\n\t// Driver is what drives the loop (DriverHost unless configured).\n\tDriver Driver `json:\"driver\"`\n\t// Profile names the profile a drive runs this run on (drive_profile.go), \"\" for\n\t// a run no drive has driven.\n\tProfile   string    `json:\"profile,omitempty\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\tUpdatedAt time.Time `json:\"updated_at\"`\n\t// WindowStartedAt and NextEligibleAt are the window clock the pacing intent\n\t// (itd-2609201925079472) writes and reads. The loop honours NextEligibleAt:\n\t// before it, a stage is refused as a pause and nothing moves (decision 2).\n\tWindowStartedAt *time.Time `json:\"window_started_at,omitempty\"`\n\tNextEligibleAt  *time.Time `json:\"next_eligible_at,omitempty\"`\n\t// Pace is the pace the run started on, each number with the layer that\n\t// supplied it (itd-2609201925079472). Nil in a run a version-1 state file\n\t// holds: it started before the loop paced a run, and runs unpaced.\n\tPace *Pace `json:\"pace,omitempty\"`\n\t// Review is the review set the run started on (reviewset.go), each value\n\t// with the layer that supplied it. Nil in a run a state file before\n\t// version 15 holds: it started before review sets.\n\tReview *ReviewSet `json:\"review,omitempty\"`\n\t// Pick is the pick `abcd build next` made to start the run: the\n\t// candidates, their scores and the grounds entry its first lane commits.\n\t// Nil for a run `abcd build \u003citd-N\u003e` started.\n\tPick *RunPick `json:\"pick,omitempty\"`\n\t// Admitted is the rule the run's lanes were admitted under\n\t// (itd-2610301850454860): the drain's rule record, with its path, for a lane\n\t// the drain opened, else the spec the run builds against or the issue it\n\t// fixes. Written at the start; every records commit carries it as its\n\t// `Admitted-by:` trailer, and a records step over a state without it is\n\t// refused. Nil in a run a state file before version 26 holds, and in the\n\t// two runs that land nothing: an auto-plan run, which plans a draft, and a\n\t// trial run.\n\tAdmitted *Admitted `json:\"admitted,omitempty\"`\n\t// Lanes are the lanes opened so far, in the order they opened; several may\n\t// be open at once, up to the ceiling (ruling DR6). A lane lands one step of\n\t// the spec's `## Steps` (the whole spec when it lists none).\n\tLanes []Lane `json:\"lanes\"`\n\t// Waiting is the work the ceiling holds back: each item's lane, role and\n\t// the time the ceiling first held it. An item leaves it when it takes a\n\t// slot, with a record entry naming the minutes it waited.\n\tWaiting []Waiting `json:\"waiting,omitempty\"`\n\t// Pending are the spec's unlanded steps no lane has been opened for yet.\n\tPending []PendingStep `json:\"pending\"`\n\t// Record is the run record, accumulated as stages complete.\n\tRecord []Entry `json:\"record\"`\n\t// Transcripts are the transcripts the run's record captured into the\n\t// history store once the run was complete, one capture per path (piece 10).\n\tTranscripts []Transcript `json:\"transcripts,omitempty\"`\n\t// Fallbacks are the run's fallback receipts, one per role a runner it was\n\t// routed to did not run (itd-2609201916056194 criterion 3): the role, the\n\t// runner asked for, the reason and the route that ran instead. The run's\n\t// summary counts them per runner and per role (runner.Tally).\n\tFallbacks []runner.FallbackReceipt `json:\"fallbacks,omitempty\"`\n\t// ReservedAt is when the run reserved its key on the shared remote\n\t// (itd-2609091034175565): the reservation `implement step` renews, fences\n\t// and tombstones. Nil for a run that holds none.\n\tReservedAt *time.Time `json:\"reserved_at,omitempty\"`\n\t// Bundle is the member issues an issue run carries beside its lead, the\n\t// run's Key (itd-2611201450052326): one lane, one branch and one pull\n\t// request for them all, each member keeping its own reservation. Empty for\n\t// a run with no members, which writes no `bundle` key.\n\tBundle []Member `json:\"bundle,omitempty\"`\n\t// LeadHandBack is the lead's own hand-back in a run with members, set when\n\t// the lead alone is handed back while its members go on: the lead is then\n\t// no issue of the run's (Issues). Nil on every other run.\n\tLeadHandBack *HandBack `json:\"lead_hand_back,omitempty\"`\n\t// Trial is set on a run started in the loop's trial mode (trial.go): a\n\t// model-matrix copy, which holds no reservation and lands nothing.\n\tTrial bool `json:\"trial,omitempty\"`\n\t// Frozen is a trial's frozen commit (Options.Frozen), which its lanes are\n\t// cut from; \"\" on every other run.\n\tFrozen string `json:\"frozen,omitempty\"`\n\t// contains filtered or unexported fields\n}\n```\nState is one run: everything the loop needs between two invocations.\n\n```go\nfunc ReadState(repoRoot, runID string) (State, error)\n```\nReadState is the state file's one reader. It refuses a run id of the wrong shape before building a path from it, reads through the checkout's os.Root (so a symlinked component cannot walk the read out of the checkout), decodes strictly — an unknown field is a file some other writer produced — and holds the file to the version and the id it is stored under.\n\n```go\nfunc Runs(repoRoot string) ([]State, error)\n```\nRuns lists this checkout's runs, oldest first. An absent tier or run directory holds none. A state file that cannot be read fails the listing, naming it: a run the loop cannot read is not one it may skip past.\n\n```go\nfunc (s State) Ceiling() int\n```\nCeiling is the most agents the run may have out at once.\n\n```go\nfunc (s State) Complete() bool\n```\nComplete reports whether the run has nothing left: every lane is done (or, in an issue run, discarded) and no spec step is waiting for one.\n\n```go\nfunc (s State) FixRoundCap() int\n```\nFixRoundCap is the fix rounds a lane of the run may take before it is handed back: the run's own, or the bundled value for a run that started before the pace carried one (an unpaced run, or a state file before version 6).\n\n```go\nfunc (s State) Issue() string\n```\nIssue is the issue an issue-keyed run fixes (decision 10), or \"\" for a run that builds an intent.\n\n```go\nfunc (s State) Issues() []string\n```\nIssues is every issue of the run, in order: the lead, then each member, leaving out each handed back alone, the lead included. A run with no members is its key alone, which every reservation act iterates as it reads the one key today.\n\n```go\nfunc (s State) SlotsInUse() int\n```\nSlotsInUse is the agents the run has out: its outstanding awaits.\n\n```go\ntype StepResult struct {\n\tRunID string `json:\"run_id\"`\n\tLane  string `json:\"lane,omitempty\"`\n\t// PerformedStage is the stage this call completed; empty when it completed none\n\t// (the lane awaits a receipt, or the run is complete).\n\tPerformedStage Stage `json:\"performed_stage,omitempty\"`\n\t// Stage is the lane's next stage after the call.\n\tStage Stage `json:\"stage,omitempty\"`\n\t// Awaiting is what the lane waits on, when it waits on an agent.\n\tAwaiting *Await `json:\"awaiting,omitempty\"`\n\t// Tier is the model tier the round asks the awaited agent to run at\n\t// (escalate.go), one step up after a round that did not pass; omitted\n\t// when its route names no tier.\n\tTier     oracle.Tier `json:\"tier,omitempty\"`\n\tComplete bool        `json:\"complete\"`\n\t// NextEligibleAt is set when this call closed the run's window: nothing\n\t// was performed, and no stage is taken before this time.\n\tNextEligibleAt *time.Time `json:\"next_eligible_at,omitempty\"`\n\t// HandBack is set when the lane was handed back to the person: this call\n\t// stopped it, or it stood stopped when the run was started again.\n\tHandBack *HandBack `json:\"hand_back,omitempty\"`\n\t// Slots is the agents the run has out after the call, and Ceiling the most\n\t// it may have (the run's pace.sub_agents); CeilingReached is set when this\n\t// call found every slot taken and handed nothing out.\n\tSlots          int  `json:\"slots\"`\n\tCeiling        int  `json:\"ceiling\"`\n\tCeilingReached bool `json:\"ceiling_reached,omitempty\"`\n\t// Alive is every lane of the run with anything left, with its stage and\n\t// each agent it awaits, the held lanes included.\n\tAlive []AliveLane `json:\"alive,omitempty\"`\n\t// Blocked are the landings that waited on the forge's merge this call\n\t// while another lane moved: each holds only its own lane. Any other refused\n\t// stage is the call's answer, and no lane moves.\n\tBlocked []Refusal `json:\"blocked,omitempty\"`\n\t// Route is the route that ran the agent when the process driver started\n\t// it through a runner (Drive); absent when the host is to run it.\n\tRoute *runner.RouteRecord `json:\"route,omitempty\"`\n\t// Fallback is the fallback receipt this call recorded when the reviewer\n\t// route did not return a review and the host is handed it.\n\tFallback *runner.FallbackReceipt `json:\"fallback,omitempty\"`\n\t// Paused is the lane's role its runner failed to start, with why\n\t// (Await.Paused): it waits for the runner, and no agent is to be started\n\t// for it (runner_pause.go). Awaiting is then empty.\n\tPaused *Await `json:\"paused,omitempty\"`\n\t// Retried is the held role this call retried on its runner, with why it\n\t// was held and, when the runner did not start it again, its pause.\n\tRetried *Retry `json:\"retried,omitempty\"`\n\t// Outage is the run's lost connection while one is open: the lanes that\n\t// reach the network or an agent wait on its shared probe (Blocked names\n\t// them) while the others move.\n\tOutage *OutageInfo `json:\"outage,omitempty\"`\n\t// RateLimit is the runner's rate-limit response that ended the run's\n\t// window early in this call, with the lanes it checkpointed\n\t// (ratelimit.go); NextEligibleAt is then the pause's end.\n\tRateLimit *RateLimit `json:\"rate_limit,omitempty\"`\n\t// AcceptedConfigChange names each changed git setting or file the call\n\t// accepted (`implement step --accept-config-change`) before its step:\n\t// names alone, a URL subsection hidden, never a value (configwatch.go).\n\tAcceptedConfigChange []string `json:\"accepted_config_change,omitempty\"`\n\t// Bundle is where a discard saved the lane's commits not on origin's\n\t// default branch before it removed the lane's branch, relative to the\n\t// checkout root; \"\" when the branch held none of its own.\n\tBundle string `json:\"bundle,omitempty\"`\n\t// Released is what became of the run's reservation once a discard left no\n\t// lane of the run at work or held; \"\" when it held none to release.\n\tReleased string `json:\"released,omitempty\"`\n\n\t// RouteUnused is each `implement step --route` the step did not use: a\n\t// landing ahead of its role moved first (route_use.go). Every other\n\t// --route the step would not use is refused before anything is written.\n\tRouteUnused []string `json:\"route_unused,omitempty\"`\n\tNext        string   `json:\"next\"`\n\t// contains filtered or unexported fields\n}\n```\nStepResult is what advance and Receipt return.\n\n```go\nfunc Discard(repoRoot, runID, laneID string, o Options) (StepResult, error)\n```\nDiscard does not land a held lane, on the person's word (\\`implement step --discard \\\u003clane\u003e\\`): its worktree is removed from the machine store and its branch deleted, then its pull request is closed if it opened one, and its stage is \\`discarded\\`; its step stays unlanded in the spec, so a replanned remainder carries it. The local removals come first, so a refused one leaves the pull request open and the lane held, and a retry finds nothing half done: a worktree or branch already gone is passed over. It changes nothing when the lane is not held or any lane is still at work.\n\nIt also ends a lane at work whose run nothing drives, and a lane handed back for any reason (discard\\_unheld.go): refused while the run is live or the lane's pull request is open or merged, its worktree and branch are removed as a held lane's are, and a pull request the forge reports closed is not closed again. Every discard first saves the lane's commits not on the default branch to a bundle in the run's directory (saveLaneBundle), and one that leaves no lane of the run at work or held releases the run's reservation (releaseOnDiscard). With o.AcceptConfig, a changed git configuration is accepted in the discard's own write (acceptWith).\n\nWhile the network is down a lane with a pull request to close waits on the shared probe, changing nothing, and a close the network refuses is recorded as the run's outage (outage.go).\n\n```go\nfunc Drive(ctx context.Context, repoRoot, runID string, steps Stages, o Options, rs Runners) (StepResult, error)\n```\nDrive performs the next stage as advance does and, when the stage hands the lane to an agent whose role is routed to a runner, starts that agent through the runner and hands its receipt back through Receipt. A role on the host returns the await for the host to act on, as advance returns it; a runner that did not start its role pauses the lane, and the result names the role as paused (runner\\_pause.go). A step that hands no agent out retries one held role once on its runner, and a --route for a held role retries it at once.\n\n```go\nfunc DriveReview(ctx context.Context, repoRoot, runID string, res StepResult, steps Stages, o Options, rr *ReviewRoute) (StepResult, error)\n```\nDriveReview sends the review this call handed to the host to rr instead: a ruthless or security reviewer res hands out, which no runner ran or fell back from. The route's return is written to the review's return path and handed back through the receipt, which verifies it and records its verdict with the route that ran it. Anything else, and a nil rr, is res unchanged.\n\nA review the route does not return falls back (scope 3): no server on this machine, a refused connection, a bound run out, the server's error, an answer that is not the protocol's, or a return with no verdict the loop can record. The host's own agent is handed the same brief and return path, as res already names them, and one fallback receipt (the role, the route asked for, the reason and abcd's detail, the host as the route that runs it) is written to the run's state and record, which the summary counts per route and per role. No return is written for it, so nothing stands where the host's agent writes. A step interrupted while the route works (the person, or a host's command timeout) falls back too, as interrupted, so every review the route was asked for and did not return has its receipt.\n\n```go\nfunc Receipt(repoRoot, runID, receiptPath string, steps Stages, o Options) (StepResult, error)\n```\nReceipt hands back the receipt an agent stage waited on. The path is looked up among every outstanding await of the run, not only one lane's, and the lane that await belongs to is advanced (ruling DR6): a verified receipt frees its slot, which the next \\`implement step\\` fills. It is refused when no await names the path, when this build carries no verifier for the stage, and when the verifier refuses it; in every refusal the run stays where it was and the agent's slot stays taken. A path a step already collected is the one exception to the first (answerCollected).\n\n```go\nfunc Release(repoRoot, runID, laneID string, o Options) (StepResult, error)\n```\nRelease lands a held lane as it is, on the person's word (\\`implement step --release \\\u003clane\u003e\\`): its stage returns to \\`land\\` and its landing resumes at the step it stopped before, synced first when a sibling landed since its base. It changes nothing when the lane is not held or any lane is still at work.\n\n```go\ntype StopLeft struct {\n\tLane  string `json:\"lane\"`\n\tStage Stage  `json:\"stage\"`\n\t// Settled is false while the lane's agent is still in its call.\n\tSettled bool `json:\"settled\"`\n\t// Aside is where its uncommitted work was saved, and Files how many files\n\t// that holds.\n\tAside string `json:\"aside,omitempty\"`\n\tFiles int    `json:\"files,omitempty\"`\n\t// Note says anything else: a receipt collected, an agent lost, work that\n\t// could not be saved.\n\tNote string `json:\"note,omitempty\"`\n\t// ArmedPR is the pull request armed before the stop, which the forge can still merge\n\t// under it, 0 when there is none.\n\tArmedPR int `json:\"armed_pr,omitempty\"`\n}\n```\nStopLeft is what the stop left in one lane.\n\n```go\ntype Sync struct {\n\tAt         time.Time `json:\"at\"`\n\tSiblings   []string  `json:\"siblings\"`\n\tMerged     string    `json:\"merged\"`\n\tConflicted bool      `json:\"conflicted\"`\n\tPaths      []string  `json:\"paths,omitempty\"`\n\tBrief      string    `json:\"brief,omitempty\"`\n\tReceipt    string    `json:\"receipt,omitempty\"`\n\t// Head is the head the sync produced: the merge commit, or the verified\n\t// head of the implementer who resolved the conflict; empty until then.\n\tHead string `json:\"head,omitempty\"`\n\t// Round is the fresh round that judges Head, once it has opened.\n\tRound int `json:\"round,omitempty\"`\n}\n```\nSync is one merge of the default branch into a lane after a sibling lane of the run landed (spc-2609202134341288, \"Two lanes that touch the same files\"): the siblings whose landing caused it, the default branch's sha merged in, whether it conflicted, and the head it produced. A conflicting sync goes to a fresh implementer with the brief and receipt named here.\n\n```go\ntype TakeResult struct {\n\tRunID string `json:\"run_id\"`\n\t// Profile names the profile a drive ran the run on, \"\" for none.\n\tProfile string `json:\"profile,omitempty\"`\n\t// Collected are the receipts it handed back, by lane.\n\tCollected map[string]string `json:\"collected,omitempty\"`\n\t// Saved are the lanes with no agent whose uncommitted work it saved aside.\n\tSaved []RestartAside `json:\"saved,omitempty\"`\n\t// Restarted are the lanes whose lost agents it re-told, with the aside each\n\t// saved; each await named there wants a fresh agent.\n\tRestarted []RestartResult `json:\"restarted,omitempty\"`\n\t// Left says what it could not do, and why.\n\tLeft []string `json:\"left,omitempty\"`\n\t// Reservation is what became of a reservation a stop released.\n\tReservation string `json:\"reservation,omitempty\"`\n\t// Run is the run as it now stands.\n\tRun  *ListedRun `json:\"run,omitempty\"`\n\tNext string     `json:\"next\"`\n}\n```\nTakeResult is what a take-over did.\n\n```go\nfunc TakeRun(repoRoot, runID string, o Options) (TakeResult, error)\n```\nTakeRun takes a run over. It is refused, changing nothing, while a stop holds and while another driver's process is alive; and, having collected what had already arrived and changing nothing else, when a reservation a stop released cannot be taken again.\n\n```go\ntype TerminalOptions struct {\n\t// Options are the loop's seams and configuration, Runners among them.\n\tOptions Options\n\t// Drain are the drain's own flags; Context is set to the run's.\n\tDrain DrainOptions\n\t// Runners starts each role.\n\tRunners Runners\n\t// Stages are the lane's stages; DefaultStages when nil.\n\tStages Stages\n\t// Review is the reviewer route, as `implement step` hands it.\n\tReview *ReviewRoute\n\t// Preflight runs the repository's preflight behind the load gate in\n\t// checkout, the drive's own checkout of a lane's head, whose full commit\n\t// id is head (preflightcheckout.go), never the lane's worktree.\n\tPreflight func(ctx context.Context, checkout, head string) error\n\t// PreflightAllowed says whether a lane's preflight may run, given its\n\t// worktree, base and head: the head its landing lands, the judged head or\n\t// the landing's records commit on it, never what the worktree has checked\n\t// out. A *PreflightRefused hands the lane back. Nil allows all.\n\tPreflightAllowed func(worktree, base, head string) error\n\t// Stop is closed when a stop is asked for. The context stays live, so a\n\t// call in flight finishes.\n\tStop \u003c-chan struct{}\n\t// BeforeStage is called before each move and each step, so before any\n\t// stage starts; an error ends the run, TerminalWall. Nil checks nothing.\n\tBeforeStage func() error\n\t// Resumed says this process goes on with a drive another began, so what that one\n\t// held back is this one's to report at its end.\n\tResumed bool\n\t// BoundaryCeiling is the longest AtBoundary waits for what the run has in hand; past it\n\t// the call runs regardless. Zero sets none.\n\tBoundaryCeiling time.Duration\n\t// Moved is called after each move the drain makes, before anything else the run\n\t// does with it. Nil does nothing.\n\tMoved func()\n\t// AtBoundary is called once a move has been made and before the next, between stages\n\t// and with the checks above just passed: a lane has ended, or a wait has ended before\n\t// the next opens. A refused step comes back to the run with its lane still in progress\n\t// and reserved, and a judgement holds its issue, so the call stays due until the next\n\t// move has settled each, for BoundaryCeiling at most; past that it runs beside them,\n\t// and what the run holds is renewed while it does. It always waits for the next move to\n\t// take a skip the run gave. It is never called during a stage. It reports whether it\n\t// took time, so that the run goes round the stop, the bound and the checks again before\n\t// anything starts. Nil does nothing.\n\tAtBoundary func(ctx context.Context) bool\n\t// Say prints one line, already plain; nil says nothing.\n\tSay func(string)\n\t// Sleep waits; nil sleeps until the time passes or the stop or the\n\t// context ends it.\n\tSleep func(ctx context.Context, d time.Duration)\n\t// Until is the bound the person set (--until): the run ends at this time,\n\t// and no wait ends it before then. Zero keeps the eight-hour limit on each\n\t// wait (adr-2610222222326104's amendment of 2026-11-05).\n\tUntil time.Time\n\t// Probe asks whether a limit that named no reset has lifted, for role, with\n\t// the cheapest launch that can tell. It reports true when it has; otherwise\n\t// the failure says what came back. Nil leaves the lane's next launch to find\n\t// out.\n\tProbe func(ctx context.Context, role, model string) (bool, *runner.Failure)\n}\n```\nTerminalOptions are one terminal run's inputs.\n\n```go\ntype TerminalResult struct {\n\t// Ended is why: the drain's Stopped, TerminalStopped or TerminalOutage.\n\tEnded string `json:\"ended\"`\n\t// Run, Issue and Lane name the lane left on its branch, when one is.\n\tRun   string `json:\"run,omitempty\"`\n\tIssue string `json:\"issue,omitempty\"`\n\tLane  string `json:\"lane,omitempty\"`\n\t// Resume is the command that takes the lane up, when one is left.\n\tResume string `json:\"resume,omitempty\"`\n\t// Lapses is when the lane's reservation lapses, when a kill left it held.\n\tLapses *time.Time `json:\"lapses,omitempty\"`\n\t// Last is the last move's result.\n\tLast DrainResult `json:\"last\"`\n\t// HeldBack names each issue the run held back.\n\tHeldBack []string `json:\"held_back,omitempty\"`\n\t// PassedOver names each issue the run did not open, with why.\n\tPassedOver []Excluded `json:\"passed_over,omitempty\"`\n\t// PassedLanes names each lane the run passed over, with why.\n\tPassedLanes []PassedLane `json:\"passed_lanes,omitempty\"`\n\t// Why is what stopped the run when a check did.\n\tWhy string `json:\"why,omitempty\"`\n\t// Swept is the line of the sweep the drive ran on its own at its end\n\t// (autosweep.go), \"\" when it ran none or it said nothing.\n\tSwept string `json:\"swept,omitempty\"`\n}\n```\nTerminalResult is how one terminal run ended.\n\n```go\nfunc RunTerminal(ctx context.Context, repoRoot string, o TerminalOptions) (TerminalResult, error)\n```\nRunTerminal drives the drain from here until its cap, an empty ledger, the outage limit or a stop. An error is a refusal the run cannot go past.\n\n```go\ntype Tiering struct {\n\tTable *oracle.Layered\n\tConns oracle.Connections\n\t// Reviewer is the reviewer route oracle.review selects (ReviewRoute.Name),\n\t// which takes the ruthless and the security review the stage hands to the\n\t// host; \"\" when it selects none.\n\tReviewer string\n}\n```\nTiering is the model-tier routing a step resolves each role's tier through: the routing tables (oracle.Load) and the machine's provider connections (oracle.APIConfig.Connections). A step with none records no route.\n\n```go\nfunc LoadTiering(r layered.Roots, rr *ReviewRoute) (*Tiering, []string, error)\n```\nLoadTiering reads the model-tier routing a step resolves each role's tier through, at the roots a step starts from: the routing tables (oracle.Load) and the machine's provider connections (oracle.LoadAPI), with reviewer the reviewer route the step sends its reviews to (nil for none). A fault is refused in the loop's refusal shape before anything moves, as a delegating verb refuses it: the table decides which tier a round asks for, so it is never guessed past. The provider configuration's diagnostics and the tables' (an orphan row) are the caller's to print, as a delegating verb prints them.\n\n```go\ntype Transcript struct {\n\tAt time.Time `json:\"at\"`\n\t// Path is the transcript as it was handed to the capture, home-redacted.\n\tPath string `json:\"path\"`\n\t// Session is the session the history store recorded it under, and Stored\n\t// where it lives there, home-redacted.\n\tSession string `json:\"session\"`\n\tStored  string `json:\"stored\"`\n\t// Wrote is false when the store already held it (an idempotent capture).\n\tWrote bool `json:\"wrote\"`\n\t// ScanGap is the capture's scan gap, home-redacted: the repository armed a\n\t// scanner augmenter (gitleaks) that did not run, so the transcript was\n\t// stored masked by the native scanner alone. Empty when there is none.\n\tScanGap string `json:\"scan_gap,omitempty\"`\n}\n```\nTranscript is one transcript the run record captured into the history store.\n\n```go\ntype TranscriptCapturer func(path string) (Transcript, error)\n```\nTranscriptCapturer captures one transcript by path into the history store, as \\`abcd history capture \\\u003cpath\u003e\\` does, and reports what it stored.\n\n```go\ntype Unattended struct {\n\t// Kind is UnattendedBuild or UnattendedDrain.\n\tKind string\n\t// RunID and Key name a build's run and the record it builds; both are\n\t// empty for a drain. Key is empty too when the state names no record id\n\t// (an itd- or an iss- id): it is read from a local-tier file and quoted\n\t// to the agent, so nothing else is passed on.\n\tRunID string\n\tKey   string\n}\n```\nUnattended is the build or drain a session's checkout is running.\n\n```go\nfunc RunningUnattended(sessionRoot string, now time.Time) (Unattended, bool, error)\n```\nRunningUnattended reports the build or drain running for the session whose checkout is sessionRoot, as of now. A build counts while its run is not complete and its state was written within lease.Default of now; a drain while it has not stopped and its state was written within the same window. The window is the reservation lease's: a run idle past it is the run the reservation system already treats as abandoned, so a checkout holding old unfinished runs (the main checkout keeps many from 2026-10-12) does not count as running one. A state dated more than lease.Skew ahead of now is not counted either, so a planted far-future date cannot hold it on. Nor is a run waiting on the person (waitsOnPerson): the person is at the terminal by then, taking the work over, and their own prompts must show.\n\nThe session also counts when sessionRoot is the worktree of a lane of a counting build in any other worktree of the same repository: a lane's checkout lives in the machine's worktree store, while its run's state lives in the checkout that started it.\n\nA run or drain state that cannot be read does not count and is passed over. The error is returned only when nothing could be read: the checkout cannot be opened, or every state it holds failed and no lane matched. The caller reads an error as no answer, never as a run.\n\n```go\ntype ValidationRound struct {\n\tRound int `json:\"round\"`\n\t// ResolvesShown is each issue the round's brief named as declared fixed, as\n\t// the lane's receipts stood when it opened: what a records commit may move.\n\tResolvesShown []string `json:\"resolves_shown,omitempty\"`\n\t// HeadSHA is the lane's head the round's validators judge.\n\tHeadSHA    string         `json:\"head_sha\"`\n\tValidators []ValidatorRun `json:\"validators\"`\n\t// Fix is the verified receipt of the fresh implementer the round's\n\t// findings were handed to; once set, the next step opens the next round.\n\tFix string `json:\"fix,omitempty\"`\n\t// Routes is the tier each agent the round handed out ran at, one record\n\t// per role, in the order the round handed them out (spc-2609251028149555,\n\t// AC 10): the validators, and the fresh implementer the round's findings\n\t// went to. Empty for a round handed out with no routing read.\n\tRoutes []Round `json:\"routes,omitempty\"`\n\t// Comparisons is how each reviewer role's reviewers compared, one per\n\t// role, written as the last of the role's returns is recorded; empty for\n\t// a round opened with no review set (reviewers.go).\n\tComparisons []Comparison `json:\"comparisons,omitempty\"`\n\t// Judge is the round's judge (judge.go): set once the round, its every\n\t// validator returned, finds a reviewer role disagreeing on a run whose\n\t// judge is active; nil on every other round.\n\tJudge *RoundJudge `json:\"judge,omitempty\"`\n}\n```\nValidationRound is one round of the validate stage: the validators it hands the lane's head to, one at a time, and the fresh implementer it hands their findings to when one of them did not pass.\n\n```go\ntype ValidatorRun struct {\n\tRole   string `json:\"role\"`\n\tBrief  string `json:\"brief\"`\n\tReturn string `json:\"return\"`\n\t// Verdict is the verdict the loop parsed from the return; empty until the\n\t// return is handed back. Pass is whether it lets the lane advance.\n\tVerdict string `json:\"verdict,omitempty\"`\n\tPass    bool   `json:\"pass\"`\n\t// Audit is the fidelity audit's request and reading, on the\n\t// intent-auditor's run.\n\tAudit *AuditRun `json:\"audit,omitempty\"`\n\t// Route is the route that ran the validator when a runner ran it; absent\n\t// when the host ran it. It is the one field a runner-run review's record\n\t// differs in from a host-run one's (itd-2609201916056194 criterion 7).\n\tRoute *runner.RouteRecord `json:\"route,omitempty\"`\n\t// Reviewer is the validator's index among its role's reviewers in the\n\t// round, from 0 (reviewers.go): absent reads as 0, the role's first or\n\t// only reviewer, which is how a round written before version 20 reads.\n\tReviewer int `json:\"reviewer,omitempty\"`\n\t// Class is the model class the run's review set asked the reviewer for,\n\t// and Model the \u003cprovider\u003e/\u003cmodel\u003e route the class map resolved it to;\n\t// both empty for a round opened with no review set and for the\n\t// intent-auditor, which keeps its single run.\n\tClass string `json:\"class,omitempty\"`\n\tModel string `json:\"model,omitempty\"`\n\t// Effort is the class's effort the reviewer was asked to run at\n\t// (itd-2611101419006280): handed to a runner that can pass it, asked of\n\t// the host, and never confirmed. Empty wherever Class is, and for a run\n\t// started before efforts.\n\tEffort string `json:\"effort,omitempty\"`\n\t// ModelStatus says how far Model is known to be the model that ran, once\n\t// the verdict is recorded: ModelReported when the runner that ran the\n\t// reviewer reported a model (Route.Model, beside it), ModelAsked when\n\t// only the asking is known, as for every host-run reviewer, whose model\n\t// is asked for and never confirmed, and ModelUnsent when the reviewer\n\t// route answered (Route.Ran is oracle.ReviewRP): that route is sent no\n\t// model, so Model was never asked of what ran. Empty while the reviewer\n\t// is out and wherever Model is.\n\tModelStatus string `json:\"model_status,omitempty\"`\n\t// Located is how many located findings (findings.go) the loop read from a\n\t// reviewer's return when it recorded the verdict, 0 included, and\n\t// Findings the first maxLocatedFindings of them, kept on the lane's\n\t// latest round only and dropped from it too when the state would outgrow\n\t// its read (stateData); both absent on the intent-auditor, while the\n\t// reviewer is out, and on a verdict recorded before version 24.\n\tLocated  *int      `json:\"located,omitempty\"`\n\tFindings []Finding `json:\"findings,omitempty\"`\n\t// WriterModels are every model that wrote into the lane up to the round\n\t// the reviewer judges, in the order they wrote (laneWriters): for each\n\t// implementer's receipt, the model its runner reported and the one the\n\t// receipt named, where each is known. ReviewerModel is the model the\n\t// reviewer was asked for, its class's or the class the loop took instead\n\t// when that class held a writer's model (reviewers.go), and once it\n\t// returned the model its runner reported, where one did; for a reviewer no\n\t// class was asked of, the model its runner reported, else the one its\n\t// return named. ReviewerNamed is the model its return named, kept only\n\t// where that is not the same model as ReviewerModel. All three are written\n\t// on the code-review roles alone. ModelsUnrecorded marks a reviewer an\n\t// earlier version had handed out before any of them were recorded: it is\n\t// set only as such a file is read, and keeps none of them.\n\tWriterModels     []string `json:\"writer_models,omitempty\"`\n\tReviewerModel    string   `json:\"reviewer_model,omitempty\"`\n\tReviewerNamed    string   `json:\"reviewer_named,omitempty\"`\n\tModelsUnrecorded bool     `json:\"models_unrecorded,omitempty\"`\n\t// ReturnSHA256 is the SHA-256 of the return, in hex, as the loop read it\n\t// when it recorded the verdict: every later read of the return the\n\t// landing makes is held to it (recordedReturn). Absent while the\n\t// validator is out, and on a verdict recorded before version 31.\n\tReturnSHA256 string `json:\"return_sha256,omitempty\"`\n}\n```\nValidatorRun is one validator of a round: the fresh agent handed the lane, its brief, the return it writes, and the verdict the loop parsed from that return.\n\n```go\ntype Verifier func(c Context, lane *Lane, receipt string) error\n```\nVerifier checks the receipt an agent stage waited on. An error refuses the receipt and the lane stays where it was.\n\n```go\ntype Waiting struct {\n\tLane  string    `json:\"lane\"`\n\tRole  string    `json:\"role\"`\n\tSince time.Time `json:\"since\"`\n}\n```\nWaiting is one piece of work the ceiling held back.\n\n```go\ntype WallEnded struct{ Ended string }\n```\nWallEnded is a BeforeStage's error when a wait inside the check ended the run for a reason of its own, which the run ends on: a stop, a kill, or a limit it could not outwait.\n\n```go\nfunc (e *WallEnded) Error() string\n```\n\n```go\ntype WidenResult struct {\n\tRunID     string   `json:\"run_id\"`\n\tLane      string   `json:\"lane\"`\n\tRecord    string   `json:\"record\"`\n\tAdded     []string `json:\"added\"`\n\tFootprint []string `json:\"footprint\"`\n\tNote      string   `json:\"note\"`\n}\n```\nWidenResult is a widening's outcome: the run and lane, the paths newly held (none when the reservation already covered every one), the footprint the reservation holds after, and the run record's line.\n\n```go\nfunc Widen(repoRoot, runID, laneID string, paths []string, o Options) (WidenResult, error)\n```\nWiden widens the reservation of run runID, for its current lane laneID, to cover paths before the lane's implementer edits them: a host session's step, since the loop widens the hold to what the lane's branch changes itself once the receipt is handed back (widenLaneChanges). A path the reservation already covers adds nothing, and when it covers every one nothing is pushed. A run that holds no reservation (no origin) has nothing to widen and says so. Refused for a person (exit 2): a lane that is not the run's current one or not at an editing stage; a path no reservation may carry; a reservation the view does not show this copy holding. Contention (exit 3): another copy's live hold on one of the paths, with nothing pushed and a run record line saying the widening backed off; or a locked run state. A lane's own abcd may run it, so the save is the reservation's alone (mutateReservation, iss-2611020719494343).\n\n","path":"github.com/intentdriven/abcd/internal/core/implement/loop","name":"loop","synopsis":"Package loop is the implement loop's engine (itd-2609201916151817, spc-2609202134338445): the state file a run lives in, the checks that decide whether a run may start, and the step interface a driving host calls.","isRedistributable":true}
