Skip to main content
Everything a consumer — a person, a script, or a hosted product — may depend on is listed on this page; anything not listed here is private implementation and may change without notice. The Constitution holds the architectural invariants. This page holds the interface specifications: the public inventory and the exact formats of the status observation and the progress summary. It is the single public inventory entry point.

The contract principle

  • A consumer may rely only on an interface that is officially documented here. Private implementation is not a contract.
  • Changing a documented contract requires a documentation update and a release note entry in the same PR; a silent change is a defect even when all tests pass.
  • The inventory is interface specification, not architectural invariant. Adding, editing or removing a row is ordinary interface evolution: it updates this page and the release notes, and it is not a constitutional amendment.
  • A change that alters an architectural invariant still follows Article 7 of the Constitution, exactly as any other article does.

The public interface inventory

Anything not in this table is internal and may change without notice.

Label definitions

The engine’s platform label names are configuration data, not code (Issue #2347). One file — src/orbi/labels.toml, shipped with the engine package — is the single source:
  • every platform label is one [[label]] entry with four keys: role (the key the engine asks for), name, color and description;
  • the [reserved] table carries the names the engine reserves but does not own (bug): the engine reads them, orbi setup never creates or updates those labels;
  • the role vocabulary is queue, in_progress, pr_opened, fix_needed, merged, blocked, awaiting_merge, priority, epic, release, content_only, ops_only, human_review and needs_detail.
Two invariants hold, and a file that breaks either one fails the start with the problem named (a missing file, malformed TOML, an unknown role, a duplicated role, a missing queue role, an invalid color or an empty description):
  1. Every platform role appears exactly once, and exactly one role is queue. No role is implied by a default in code.
  2. The queue role is the only overridable one. Per repository the precedence is the repository’s .github/orbi.toml dispatch_label > the queue entry in labels.toml; the host orbi.toml does not read dispatch_label. Every other role is engine data and changes only with an engine release.
The engine reads the file at start and answers every label question (the queue label for this repository, is this ticket queued, put it in or take it out of the queue, and the same for the other roles) from that one table; orbi setup creates and updates the labels from the same file. A release that renames a label in labels.toml changes the engine’s behavior with no code change.

Status observation contract

This section specifies the observation behavior of orbi status and orbi status --follow. It replaces mtime guessing with attributed, complete records.

Scope and selection

A status run prints a snapshot of every configured source repository. --follow changes how long it observes, not the scope. --repo OWNER/REPO selects one configured repository and --issue N selects an Issue in it. Issue-only selection is valid when exactly one source repository is configured; with several configured repositories it requires --repo. Invalid selectors are rejected before any read happens. The view keeps capacity, slots, queue and recent results, and shows every concurrent active delivery when several run at once.

Attribution and membership

The observation key is the configured repository plus the Issue number. A repository is never reverse-mapped from a global slug, and the Issue number is matched exactly: Issue 42 must not match Issue 420. Candidate worktrees are enumerated only when the directory name matches that repository’s existing full naming convention, .worktrees/orbi-<owner>-<repo>-issue-<N>-<run_id>. The worktree name attributes the run; a complete JSONL session record attributes the session; a complete event timestamp attributes the activity time. Directory or file mtime, filename order and a random run id prove nothing about current execution. Example: for the configured repository acme/shop, Issue 42 matches the prefix .worktrees/orbi-acme-shop-issue-42-; the legal eight-hex suffix of .worktrees/orbi-acme-shop-issue-42-86b57234 gives run 86b57234. A complete JSONL header {"type":"session","id":"sess-1","timestamp":"2026-10-15T06:20:00Z"} gives session sess-1; the activity time comes from the corresponding complete activity record. Activity-row membership comes from the last complete successful GitHub scope read, under the existing Orbi state rules. Local worktrees only attach observations to those Issues: file discovery cannot add an old Issue back to the active set, and before the first successful scope read no activity members are guessed. When an Issue leaves that set, it is read directly and its confirmed exit result is shown through the next successful GitHub refresh; its activity row is then removed. If delivery A completes while delivery B continues, A’s retained directory cannot make A active again. Explicit --issue follow retains that Issue until Ctrl-C and may show attributed, timed historical observations without claiming that execution is ongoing. A snapshot reads the last complete attributed observation from each candidate session. Follow keeps per-file offsets in process memory, reuses the complete JSONL parsing, and discovers new worktrees and sessions in the same scope. Incomplete or unattributable records mean “no readable activity”, never “idle”. If several retained records cannot prove which run is alive, the attributed observations and times are shown with explicit uncertainty; one is never silently chosen. No raw messages are displayed. Labels, PR and check results, and confirmed completion remain authoritative. A Runner stage may be shown only when a matching existing journal record explicitly associates the same run and the same Issue; otherwise the stage is unknown (null). Stages are never inferred from tool names, and the last line of one instance log file is never assumed to be globally newest. The writer takes its stage from its already bound Runner context.

Read cycles

Local discovery and incremental reads run on a 0.5-second cycle, with the design target of showing a complete local event in about one second under healthy local conditions. The initial scan establishes the latest observation; later cycles read only new complete records. This is record-level observation, not token streaming and not an end-to-end guarantee. GitHub state has a separate cycle: it starts immediately and waits 15 seconds after each completed read. Single-Issue scope reads that Issue; repository and all-repository scope paginate open Issues completely through the existing read command and page parser, then apply the existing Orbi state semantics — there is no arbitrary 1/50/200 total limit. A new GitHub task is discovered on this cycle, not necessarily within 0.5 seconds. A previously active task that disappears from the set receives a direct state read before its confirmed result, manual wait or removal is shown. Issue follow keeps its Issue until Ctrl-C. GitHub reads never block local event presentation: one bounded background read inside the foreground command is enough. State-read cycles never overlap. The last successful view is preserved; after the existing bounded read retries fail, the affected repository and Issue are named and the command exits nonzero. Ctrl-C ends cleanly without an orphan read task. There is no daemon, no persistent cursor or history, and no refresh setting. The Linux and macOS journal entry points and JSONL sources are the existing ones (systemd_deploy.py:328-349, launchd_deploy.py:80-86,253-274, scheduler.py:175-185, pi_activity.py:58-90,284-325, pi_process.py:1103-1124,1245-1285 at the reviewed baseline). macOS logs have no global ordering guarantee.

Path policy

A read or edit activity target must normalize to a repository-relative path inside the worktree: an absolute path inside the worktree is published as that relative path, so nothing absolute ever reaches either representation, while an escaping, outside or unattributable target becomes null. The RUNNER_RUNTIME_EXCLUDES paths (defined once in pi_activity.py, imported by pi_session.py for the worktree exclude pinning and the dirty-worktree gate) are excluded — .orbi/, .worktrees/, .pi-session/, .pi/, and the root plan.md, test.log and verify.md — together with .git metadata. A target carrying an HTML comment character (< or >) becomes null as well: the hidden block escapes those characters as it serializes, the readable prose publishes the same value verbatim, and a value that could open or terminate a comment is dropped in both representations before either is rendered. The credential and provider files the existing configuration resolves (<deploy_home>/.orbi/env and the host-only pi_providers file) are outside the task worktree, so that same containment rule rejects them; there is no extra setting and no heuristic filename dictionary. Prose and the hidden block share this check. It publishes paths inside the known boundary; it does not publish file contents and does not promise to detect arbitrary secrets in unknown files.

Progress summary contract

The progress block

Each run keeps its one existing progress comment. Its formal start is the existing run marker followed immediately by the orbi:progress:v1 block, including at finish:
The version belongs only to the marker. The payload requires step, reported_at and activity.
  • step is a documented stage or null. Only Runner-confirmed actions set starting, implement, review, checks, merge and release; review includes the reviewer’s fixes. checks appears in two places: from the moment the PR opens until the review session starts, and at the merge gate’s check. It does not mean the review has passed and does not mean a process is still running. An unmapped task type uses null.
  • reported_at is the report generation time as a UTC ISO-8601 string and cannot be null. A heartbeat may advance reported_at without advancing activity.at.
  • activity is null when no known activity kind can be published.

Activity shape

When activity is not null, all three keys at, kind and target are required and are never omitted: at is the activity’s UTC timestamp or null when unknown, kind is one of read, edit, command or analysis, and target is a safe repository-relative path or null.
command and analysis keep their kind and activity time with target: null; they never expose arguments or text. An unsafe read or edit target also becomes null while the known kind and time are kept. No known activity is "activity": null, never an empty object.

Report selection

From the complete pagination, first identify the most recently updated formal run record under the existing trusted-publisher and run-scoped comment rules. That candidate does not need a progress block; a quoted or fenced marker is not a formal record. Then select the most recently updated progress comment belonging to that same run and classify its summary as missing, unsupported, invalid or available. A started or milestone record does not discard a progress comment already present for the same run. If that run has no progress comment or no readable summary, another run’s summary is not used as its current report. Older content may appear only as explicitly labelled history with its own run and times. The selection chooses the most recently reported run attribution, not the latest start and not a live process. Terminal and manual GitHub facts retain precedence.

Content and safety rules

One safe value is generated from the structured events, and both the prose and the block are rendered from it. A read or edit target is validated as a repository-relative path; absolute or outside paths, credential locations, internal runtime directories and HTML comment characters are rejected, so no target can terminate the hidden block or forge a comment in the readable prose. Serialization is escaped as well, so the block cannot be terminated even by a value that carries the characters. A previously assembled command string is never re-sanitized. Prompts, analysis text, source, outputs and secrets are never published in either representation, including at finish; recovery and failure records keep their own existing contract.

Reader and publication boundary

Readers validate the trusted publisher under the existing author rules, the exact unquoted formal prefix, a supported version and complete pagination. Candidate and run selection, including records with no block, follows Report selection above. PR, check and terminal facts are not duplicated into the payload. There is no current-run pointer, no new run ordering, no second comment stream and no recovery store. Publication remains best effort: its failure cannot relabel, block, skip or fail delivery, review or merge. This is a display contract, not task state.

Protocol examples

These comment bodies are the protocol fixtures a reader integrates against: run attribution and the timestamps come from the records themselves, and the writer never publishes the forged or corrupt forms. A consumer proves its own selection and view against them; this page documents the shapes only.
A terminal or manual GitHub fact — the Issue closed or merged, or a confirmed manual wait — wins over any published or local summary, and a quoted, fenced or unknown-version marker is never selected as the current run of the report.

Comment kinds and machine metadata

Every run-scoped comment starts with the hidden run marker <!-- orbi:run=<run_id> -->. The marker carries the run identity; it does not authenticate an author, so a consumer keeps its own trusted-author rules. Five kinds are official, written on the line right after the run marker:
  • started: the Orbi started Pi: comment.
  • failure: the COMPLETE diagnostic/action failure comment (the orbi:failure:v1 record with its reader-facing Action and Reason). It is not the live progress echo and not a short milestone notification.
  • review-round: a COMPLETED review report; its orbi:scene:v1 block supplies the round counter and the PR URL.
  • merged: the merge receipt.
  • requeued: the one automatic re-queue of a transient GitHub failure before any PR exists (see Workflow). Its presence in a runner-written comment IS the whole counter: the same failure after it is terminal (ai-blocked with a failure comment), so a re-queue never loops. The comment carries no orbi:failure:v1 block — nothing blocked happened.
Official metadata occupies the contiguous prefix that begins with the run marker. On the five kinded comments the kind follows the run marker; progress comments keep their existing run-marker-then-progress-block prefix and carry no kind; the existing scene and failure blocks follow as applicable. A marker-shaped string quoted in the human body, a raw log or a code fence is not official metadata: a comment is identified by this prefix and never by its translated heading, and an unsupported or malformed kind is not reinterpreted through the prose next to it. A present but invalid structured block is never silently replaced by the prose beside it. Progress comments written before the progress block existed, and historical English comments without a kind marker, keep the existing English-heading fallback. Only a review-round comment with a valid scene is a new round record; a review failure that reuses the previous scene is a failure and consumes no round. A comment kind adds no task state and no recovery record: GitHub Issues and labels remain the only state store.

The merged receipt

The merged receipt is one comment whose unique details element carries the complete fixed machine rows merge_commit, review_rounds, commits, external_commits, run_id and pr_url, each exactly once. pr_url is the unambiguous PR URL, so no consumer extracts a PR from the summary label, which is display text and may be translated. Missing, duplicate or conflicting rows or blocks are rejected, rows quoted elsewhere do not identify a receipt, and the URL must belong to the expected repository.

Failure diagnostics

The complete failure comment and its short notifications are the existing public surface: the hidden <!-- orbi:failure:v1 {json} --> block (its version, enum and meaning unchanged), the <!-- orbi:fail=<fingerprint>[:count] --> dedup marker, and the reader-facing Action, Reason and Diagnosis details. The failure record’s definition is in Workflow. A resumable Pi/model failure’s recovery comment carries the same orbi:fail marker without a failure record; the same fingerprint on 3 consecutive rounds ends the run with a blocker comment placed beside that folded recovery record (Issue #2292). Three terminal reasons name a stop that used to read as unclassified (Issue #2222): release_failed (a release task failed; the visible reason names the release step that failed), no_commit_delivered (the agent session ended without a commit on the task branch) and no_file_change (the delivered commits change no file). All three are blocked, retry_safe: false, action fix_ticket. The model-provider balance stop carries its own provider_balance record with action top_up_balance and retry_safe: false (Issue #2283): the provider account has no balance (HTTP 402 insufficient_balance_error), so it is a different stop from credential_missing / check_credentials, and a consumer that renders by reason_code shows the top-up repair instead of a credential re-check. A base_ci_red failure comment carries one more hidden block beside that record — <!-- orbi:base-ci-red:v1 {json} --> with schema, state, base_branch, base_sha, pr and failing_checks. It is the record the automatic recovery edits in place (waiting -> resuming/stale -> merged); the same stability rules apply: one block per comment, a present but invalid block is never read as “no block”, and the prose beside it is display only.

The stop question

A stop that needs a decision — a review deadlock, or an external PR that passed review — carries ONE hidden question beside the unchanged orbi:failure:v1 record:
The shape is a superset of the drafting question in The draft command contract, so every question orbi draft returns today is valid here unchanged:
  • id — unique per Issue (a later stop never reuses an earlier one).
  • kind — choice (2 to 4 options), confirm (yes/no: the question carries the action “yes” performs and, for amend_requeue, the criterion appended on “yes”; “no” is a decline) or text (free text, appended to the Issue body as an assumption). An absent kind reads as choice when options is present and text otherwise — exactly how a drafting question reads today.
  • summary — one plain sentence with the real cause; the visible Reason line of the stop comment is the same text.
  • details — optional: the evidence behind the decision (SHAs, commands, exit codes, file paths, run ids). The stop comment renders it inside one collapsed <details> block, so the sentences the person reads carry none of it, and a --> or a </details> written inside the evidence never closes the comment or the block early.
  • option — label, description, consequence, action, and on at most one option "recommended": true with a one-line reason. For amend_requeue the description is the exact acceptance criterion appended to the Issue body, written as one verifiable sentence. The optional consequence is the one or two plain sentences the person reads instead of it: what picking the option authorizes, who acts next (Orbi, the person, a reviewer) and what happens to the ticket afterwards — for example “Orbi re-runs the checks on the current branch and restarts delivery; nothing is waiting on you.” When an option carries one, the visible option line shows that consequence and the same option’s description moves into the collapsed block, so the criterion is never printed twice; without one, the option line shows the description as before. It applies only to questions with options: a confirm or text question carries none. A drafting option whose label ends with (Recommended) reads as recommended: true.
Both fields are optional and additive: a question without them stays valid and renders exactly as before, and both are omitted from the block when absent. summary, question and every consequence carry no SHAs, commands, exit codes or internal step names — that is what details is for. The action set is closed: decision_class says who may answer: pick_best (one option is better on the evidence), missing_info (only the person knows a fact) or authority — ONLY for accepting code from outside contributors, anything about money, prices or plans, and overriding a decision the maintainer wrote explicitly in the ticket body or the repository AGENTS.md. Existing tests, gates and checks are NOT recorded maintainer decisions. A review deadlock whose class is not authority and whose question carries a recommended amend_requeue option is answered by the engine ONCE, at the moment it writes the stop report (see Workflow): it appends that criterion to the Issue body, re-queues the delivery and posts one requeued comment carrying the same question block plus an answer record
instead of ai-blocked, with “Not right? Reply with another option.” The record is one shape shared with the ticket that reads a person’s answer and with the hosted caller: action is accept, decline or cancel; value is the chosen option’s label, free text, or a boolean (a confirm answer); by names who answered, and reason is the one optional field. A record carrying cancel, a boolean value or a reason parses. Every other stop stays ai-blocked with the question attached. An external PR that passed review always asks the same authority question with three fixed options (link to the PR, close the external PR, drop the work) and no recommendation, whatever the reviewer wrote. The block is one line and every > inside its JSON strings is written as \u003e, so no option text can close the HTML comment before the marker’s own -->. A separate marker is used because the strict orbi:failure:v1 parser rejects unknown fields. Technical stops (github_transient, credential_missing, …) carry no question: their next step follows from reason_code alone.

Reading an answer

An answer is read by the stage the ticket carries when the engine looks: the stopped-ticket scan reads ai-blocked, ai-pr-opened and ai-fix-needed once per tick, the steering poll reads ai-in-progress, and the merge gate reads the ticket again immediately before it merges. Five rules decide what is carried out:
  • only an answer NEWER than the ticket’s newest stop question counts — an answer to a question the ticket has replaced is stale;
  • of the answers that count, the newest one is carried out — the last word wins: answering the same question again supersedes the earlier answer, so the stopped-ticket scan, the steering poll and the merge gate all act on that one answer, and an answer a later one replaced is carried out by none of them;
  • one answer is carried out once: its receipt (below) is the counter the next read finds;
  • the engine’s own record ("by": "orbi", the automatic answer above) is never carried out, and neither is an answer whose author is not a repository writer or this runner’s own account;
  • the record is read from its own block, never from the prose beside it, and engine output is skipped by its run marker — not by the <!-- orbi marker an answer comment itself carries; so is the engine’s own command receipt (below), read from its trailing marker, because it quotes the answer it answers.
A changed answer replaces the answer it supersedes in the body too, not just in the decision (Issue #2241): every criterion an answer appends carries the hidden attribution <!-- orbi:criterion:v1 <question id> --> on its own line, so answering the SAME question again replaces that line instead of adding a contradictory one, while a criterion another question asked for stays. The ticket’s own text is never touched — only the line of the engine’s amendment section is rewritten, and the section itself is still the one <!-- orbi:acceptance:v1 --> block. A criterion the criteria proposal path appends carries no attribution: it answers no question, and its append stays idempotent rather than replacing.
Outside ai-blocked an answer changes the Issue body and nothing else: between rounds the next review session reads the amended ticket, and while a session runs the steering poll restarts it once with the amended ticket. A closing action (cancel included) is carried out only at ai-blocked; anywhere else the answer is not carried out. Every answer leaves exactly ONE receipt comment — what was carried out, or why nothing was. A cancel is a strict, replayable cleanup (Issue #2337): the delivery pull request is closed, the Orbi delivery branch is CONFIRMED gone — a refused delete is the answer’s failed step and the Issue stays ai-blocked — and the success receipt is posted by the Issue close’s own write, so an interrupted cancel is finished by the next scan with that same one receipt and a closed Issue never leaves its branch behind. A clean-reviewed pull request whose merge waits for CI is not merged while a trusted answer the engine has not carried out yet exists: the delivery goes back to ai-fix-needed and the next review reads the amended ticket.

The clarification proposal and command receipts

Two machine surfaces of a ticket comment are public: the proposal the clarification stop comment may carry, and the receipt an in-ticket command leaves behind. Both are read from fixed markers, never from the translated prose beside them.

The clarification proposal section

When Orbi’s clarification gate — the claim-time check for an observable result, an acceptance condition and a single outcome — stops a ticket whose text already states enough to propose the fix, the stop comment carries that proposal between two fixed markers. A kind=split proposal the gate can apply itself never reaches a stop comment: the claim creates the children instead (Issue #2207, see Turning a proposal into child tickets), and the section appears in a stop comment only when that apply failed and fell back to the stop. The section is rendered in exactly two cases:
  • single_outcome failing, whether or not another piece is also missing (most often acceptance_condition): kind=split, one numbered item per new ticket, each with its own acceptance line and optionally depending on an earlier item — the split answers both failures, because every item carries its own acceptance;
  • acceptance_condition missing alone: kind=criteria, one line per acceptance condition.
Every other stop comment — another missing piece, a ticket that lacks a fact a proposal needs, or one whose fix needs a decision only a person can make — stays unchanged and carries no section.
A rendered section is followed by one display sentence — English Editing this comment changes the proposal., zh 编辑这条评论即可修改这份提案。 — carrying no meaning beyond that. Each kind adds a second display sentence naming the command that acts on it: a kind=split section English Reply /orbi split to create these tickets., zh 回复 /orbi split 即可创建这些工单。; a kind=criteria section English Reply /orbi amend to add these and start., zh 回复 /orbi amend 即可把这些加入工单并 开始交付。 The item number, the (after N) phrase (zh (等第 N 条)) and the Acceptance: prefix (zh 验收:) come from the message catalog, so a Chinese ticket renders the Chinese line grammar and the parser accepts every catalog language.

Line grammar and parsing

Between the markers every line is one of:
  • the start marker <!-- orbi:suggestion:v1 kind=split --> or <!-- orbi:suggestion:v1 kind=criteria -->;
  • for kind=split: <n>. <result>, immediately followed by the acceptance line Acceptance: <text>, the result optionally ending with (after <n>);
  • for kind=criteria: - <condition>;
  • the end marker <!-- /orbi/suggestion -->.
Blank lines inside the section are ignored. Item numbers must be unique, and (after N) must name an item written EARLIER in the section: a person can remove, rename and reorder lines and only has to keep that rule. One parser reads a whole comment body and returns either the items or the 1-based number of the FIRST invalid line, counting every line of the body from 1, markers and prose included:
  • no start marker: no proposal, which is not an error (the same answer as a stop comment from before this contract);
  • an unknown kind or a missing end marker: the start marker’s line;
  • a second start marker before the end marker: that line;
  • an empty section: the end marker’s line;
  • a line that is none of the shapes above, a duplicate item number, an item whose next line is not its acceptance line (the item’s own line), an (after N) naming the item itself, a later item or no item: that line.

The authoritative stop comment

The authoritative stop is the newest comment on the Issue that carries the formal stop prefix — the optional @author mention line, the run marker and the hidden <!-- orbi:clarify-stop:<digest> --> marker — and that this runner authored (the same trust rule the stop marker itself uses). Selection is comment creation order, never edit time, so editing a stop keeps its position. The newest trusted stop is authoritative even when it carries no proposal: a proposal from an older stop is never reused, and a newer stop written by somebody else is not selected at all.

A criteria proposal the claim applies itself

When the claim-time judgment fails ONLY on the acceptance condition and its answer carries a usable kind=criteria proposal, the gate applies that proposal itself instead of stopping (Issue #2206): it appends the same section /orbi amend writes — the acceptance heading of the message language, the conditions and the hidden <!-- orbi:acceptance:v1 --> marker — and posts ONE comment listing what was added and saying that editing the ticket changes them. No ai-needs-detail is added and the same claim continues into delivery. A body that already carries the marker is never amended twice (that ticket takes the stop), and a failed write falls back to the stop, so /orbi amend finishes the append. Every other failing verdict stops with the comment and ai-needs-detail as before.

Turning a proposal into child tickets

The children of a kind=split proposal are created by two callers and one implementation (Issue #2207):
  • by the clarification gate itself, in the claim that judged the ticket, when the failing verdict carries that usable proposal: no stop is posted, the ticket becomes ai-epic instead of being delivered, and the ONE success comment lists the children (it carries the run marker and the visible run_id= field, and no command receipt marker — there was no command);
  • by /orbi split (issue comment or orbi split --repo <owner/name> --issue <N>), which reads the newest trusted stop comment of the ticket it runs on, parses the section exactly as this page describes, and creates one child Issue per kind=split item — as the comment reads at that moment, so editing it first changes what is created. Only a kind=split section is valid input: a kind=criteria proposal, a missing section or an invalid line is rejected with a receipt naming the reason (and, for an invalid line, its number).
Both ride the same steps over GitHub’s own state, so they adopt each other’s children: the gate’s apply is finished by /orbi split when a GitHub write failed halfway (the stop comment then still carries the proposal and the ticket carries ai-needs-detail), and an interrupted apply is finished by the next claim of the ticket. Each child is a normal Issue whose body is a public contract too:
The hidden marker names the parent and the item, so a re-run can find the children it already created — every item marker of this parent, including one that a later edit removed from the proposal. It counts only when THIS runner authored the Issue — GitHub reports that account on an Issue as app/<name> and in a comment as <name>, so the check compares accounts, never payload shapes — and the title, the acceptance lines and the native dependencies still match the item and the proposal as it reads now: a copied or forged marker, an edited item, a child whose item the proposal no longer has, a native blockedBy edge the proposal does not ask for, or two matching markers stop the command with a receipt that lists what exists and names the conflicting child and dependency — nothing is adopted blindly, and the command never closes, deletes, relabels or cancels an existing child. Two matching markers are never resolved by guessing: the receipt names the intended child to keep and asks for that marker to be removed from the extra Issue’s body — closing it alone is not enough, the lookup reads closed Issues too — then for the reply again. The child is attached as a native sub-issue of the parent, its (after N) becomes a native blockedBy edge, it inherits only the parent’s p0 label (when present), bug (when present) and Milestone, and it receives the dispatch label. The parent then carries ai-epic instead of the dispatch label, and ai-needs-detail is removed last, after the one receipt listing the children — so an interrupted run is picked up again by the next tick.

Adding the proposed acceptance criteria

/orbi amend — an issue comment, or on the host orbi amend --repo <owner/name> --issue <N> — reads the newest trusted stop comment of the ticket it runs on, parses the section exactly as this page describes, and appends every kind=criteria condition — as the comment reads at that moment — to the ticket body under an acceptance heading followed by the hidden <!-- orbi:acceptance:v1 --> marker. The heading follows the repository’s message_language (Issue #1971): ## Acceptance in English, ## 验收 in Chinese.
With message_language = "zh" the same section uses the Chinese heading ## 验收; the marker below it is identical in every language, and it is what makes the append idempotent: a re-run after a failed step finds it and appends nothing, so the body gains the section exactly once. Only a kind=criteria section is valid input: a kind=split proposal, a missing section or an invalid line is rejected with a receipt naming the reason (and, for an invalid line, its number) and nothing is written. The ticket then carries the dispatch label and one receipt listing the conditions, and ai-needs-detail is removed last.

Command receipts

An in-ticket command (/orbi milestone <version>, /orbi fix-base, /orbi split, /orbi amend) answers with one receipt comment per outcome. The receipt’s hidden marker identifies the command and its outcome, and its comment= key identifies the command comment it answers:
  • <!-- orbi-<name>-command comment=<key> -->: the command ran;
  • <!-- orbi-<name>-command-rejected comment=<key> -->: it was not applied (permission, argument shape, the command’s own rule, or context only the command’s own flow can supply);
  • <!-- orbi-<name>-command-failed step=<step> comment=<key> -->: it reached its handler and failed at that step.
<name> is the command’s stable machine id (fix_base, milestone, split, amend), never a translated display word, so a consumer matches a receipt on the marker alone — even where the /orbi spelling differs from the id (fix_base for /orbi fix-base). <key> is the answered comment’s GitHub id, then its URL, then <login>@<createdAt> when neither is readable — the key the /orbi fix-base success receipt already uses. The prose around the marker is display text in the ticket language, so a consumer classifies the outcome from the marker prefix and the step field, and finds the command comment through comment=, never by parsing a translated sentence.

Worked examples

Concurrent Issues

Two configured deliveries run at once. Each Issue shows its own attributed observations, because the observation key includes the repository and the Issue number; the local cycle keeps every concurrent active delivery instead of one current run.

Retained session

Delivery A finished and its Issue left the last successful GitHub scope read, but its worktree and JSONL are still on disk. A is removed from the activity rows: the retained session is history, not current execution. If A’s actual GitHub state changes again and a new scope read includes it, it can appear again.

New run without a summary

A fresh run record exists — a run marker with no progress block. Its summary is classified missing: the run is shown with its own fields, and no other run’s summary is used as its report.

Unsupported or corrupt report

The progress block carries an unknown version or malformed JSON. The summary is classified unsupported or invalid; the rest of the view is still shown, and the command does not crash.

Terminal or manual state wins

The Issue is closed or merged, or it is waiting on a confirmed manual action. That GitHub fact is displayed over the local observation, and the local records are never used to claim the delivery is still running.

What this page does not promise

  • Not a second state store: GitHub Issues and labels remain the only state.
  • Not an end-to-end latency guarantee: record-level observation is not token streaming.
  • Not a secret scanner: the path policy filters the known boundary, not arbitrary files.

The draft command contract

orbi draft turns one request into deliverable Issues. It runs in one of three modes:
  • interactive (default): orbi draft --repo OWNER/REPO "<request>" asks its questions, shows the draft, takes a typed edit and creates the Issues only on confirmation. Nothing is left behind.
  • one drafting round: --session-dir <dir> reads one document from stdin and writes one to stdout (below). Reusing the same <dir> across rounds resumes the same session, and the conversation and the current draft are replayed in every round, so a lost session still works.
  • creation: --create reads the confirmed draft and prints the created numbers.
Round input and output:
questions carries at most three questions, in one round. A question is {"question", "header"?, "options"?}: question is required (one sentence in the person’s language), header is optional (one to three words naming the decision) and options is optional — when present, 2 to 4 choices, each a label and a one-sentence description of what it means or its trade-off. A bare string is a question with no header and no options, and a question with no options is a valid question. When one option is the reasonable default its label ends with (Recommended) — or the option carries "recommended": true, the same field a stop option carries — and the engine takes that option itself instead of returning the question: it does not check where that option sits, the same round keeps drafting with the option’s words replayed into the session (so the Issue records it under Assumptions), and reply names every option taken. Only a question with no recommended option is returned to the person: the request is empty, contradicts itself, names no change at all, or refers to an attached image in a way that matches more than one set of elements on that image. A request that names no change at all (21, hello, test), or that hands the choice to Orbi (take a look and tell me what else to improve, not sure what to change, you pick, 帮我看看这个项目还能改点啥), is answered with exactly one question, asked after the repository is read, whose 2 to 4 options are tasks that repository needs — the label is the task in a few words and the description one sentence naming what changes — and no option is marked (Recommended) or "recommended": true, so the question comes back to the person and the engine never picks a task itself. In a repository with no code yet, the options are tasks that build a first version, taken from the README when it describes what to build. A reply that carries no question for such a request is never the round’s final answer: the drafting session is asked once more for the one question, and a second prose reply fails the round with invalid_draft at the read the draft step. There is no Other option: the person’s own answer is always allowed. A question is always returned in the shape it was accepted in, so a bare string comes back as {"question": "..."}. When the person attached an image and refers to things on it by the words shown on screen or by the kind of control (“the two 写需求 controls, one a button, one a link”), the drafting session reads those referents from the image first, by the visible text and the kind of control; source code, comments and design files never override what the image shows, and which existing element on the image the person means is never a decision taken by default. When exactly one set of elements on the image matches the reference, the session drafts as usual. When more than one set of elements on the image matches the same reference, it asks exactly one question with 2 to 4 options, each option naming one candidate set by its visible text, and never marks one as the recommended default, so the question comes back to the person. An image the session’s model cannot view keeps the attachment instruction: ask the person to describe it. after is the 1-based number of an EARLIER Issue in the same draft that this one waits for, or is absent. labels is the match the drafting session made from the request, and it is a closed set: bug when the request describes behaviour that is supposed to work today and does not, p0 only when the request says the problem is urgent or blocking (an outage, data loss, every delivery stopped). A plain new feature carries neither, the field is absent when nothing matched, and an urgency the request does not state is never p0. The claim order reads p0 before bug before plain, so the match decides the pickup order. Any other name is refused — the answer is invalid_draft with the engine’s own reason, which the draft tools hand back to the session, so the model corrects it there and no answer file is written (Issue #2445). issues is empty when the round only asks questions; a draft round carries at least one Issue. A request that explicitly asks for no code change (“just review it and tell me”, “don’t touch the code”) ends with issues and questions both empty and the answer in reply: that reply-only round runs neither the fidelity pass nor the pre-work check, so it carries no check and no warning. check is present on a draft round only: passed, or the comma-separated identifiers of the pre-work checks (observable_result, acceptance_condition, single_outcome) the draft still failed after its one rewrite. warning is present only when the fidelity pass could not run or returned nothing: the draft is still returned. Creation input, and the created numbers on stdout:
A new Issue’s labels ride in the SAME create that opens it (gh issue create --label ..., one flag per name), and the dispatch label is added afterwards as before; the fidelity pass and the one rewrite of a body the pre-work check bounced keep the drafter’s match. issue is absent for new Issues, and set to add detail to an existing Issue: with one drafted Issue its body is appended once and ai-needs-detail becomes the dispatch label; with several, that Issue becomes the parent of the drafted Issues (native sub-issues, blockedBy for after, dispatch label last, ai-epic on the parent). Running --create again with the same input creates nothing new: each created Issue carries the marker below, and only an Issue this runner authored is adopted.

Attachments

Both documents carry the draft’s files in one list, attachments: [{name, src}]: src is a local path or an http(s) address, and the type follows from the extension. orbi draft --attach <path> (repeatable) adds one file to either mode, after the document’s own list; the interactive mode hands the same list to every round and to its creation. Allowed are images (png, jpg, jpeg, gif, webp), HTML (html, htm) and plain text (txt, md, csv, tsv, json, log): at most 10 files, 10 MB each, and all HTML and text of one draft at most 50,000 characters together. Anything else — an 11th file, a larger file, any other extension, a longer text — fails invalid_input at the read the attachments step, with the reason as the detail. Every file is copied or downloaded into <session-dir>/.pi-session/attachments/<n>.<ext>, never under its own name, so a name carrying ../ cannot leave that directory, and the context names all of them in one line (The person attached: 1.png = screen.png, 2.html = spec.html) with the directory. An image reaches the model as a Pi @<path> argument in front of the context file only when the run’s model declares "input": ["text", "image"] in its catalog entry (orbi.model_catalog; the shipped DeepSeek template does); otherwise it is named as not viewable. The drafting session reads HTML and text with read, and the tool-less fidelity pass receives them as @<path> arguments too. Each Issue of the draft output carries attachments: the 1-based numbers of the draft’s files that Issue uses; the field is absent when the Issue uses all of them, and an empty list means none. The creation document carries the same per-Issue numbers and the whole list, so a split into several new Issues writes only what each Issue uses. When the draft is shown during local drafting, each Issue lists the files it uses as <n>.<ext> <name> <src> — the number a created Issue references, the person’s own name and where the file sits (1.png checkout-error.png ./screens/checkout-error.png). A --create that makes NEW Issues writes one ## Attachments section AFTER the draft marker, in the same create: an image with a local src is uploaded by gh issue create --attach and referenced as ![name](./<n>.<ext>), an image with an http(s) src is written as ![name](src), and each HTML or text file is a collapsed block (<details><summary>name</summary> with a fenced block tagged with the language from the extension: html, csv, json, …). An amend to an existing Issue carries no attachment; a /orbi split of an existing Issue copies the links of the attachments each child uses from the original body into the child instead of uploading a file again. A gh that refuses an upload still creates the Issue and exits non-zero: the creation counts as created, and the command prints the images that did not upload with the repair (paste them into the Issue, or run gh auth login as yourself). Every model session that reads an Issue — the thin-ticket clarification gate, the ticket-only content agent, the implementer, a steering restart and the reviewer (review re-reads every round) — receives the SAME Issue material from ONE shared function (orbi.issue_material.material): the title, the body (HTML and text attachments are already inline blocks in it), the trusted comments under ONE trust rule and ONE count limit, and the Issue’s images — the Attachments section plus any native GitHub image of the body or a trusted comment (github.com/user-attachments/assets/..., read through GitHub’s Markdown rendering and downloaded with no token) — when the session’s model declares image input, with the same naming line. The reviewer adds the current PR’s feedback on top of that material. So no session judges or delivers an Issue from its text alone: the gate sees a screenshot that states the result and the acceptance just as the delivery session does. orbi suggest renders each open Issue with the same text renderer, without comments or images (it reads up to 200 open Issues). Attachments have ONE reader (orbi.attachments.copied) and ONE downloader (orbi.attachments.download), shared by orbi draft and delivery: the request names the orbi User-Agent orbi.build requires, and a file declared as an image whose bytes are not one is refused. Unreadable means stop: a drafting round that cannot read an attachment fails and names the file, and an Issue session does not start — the stop goes through the failure-stop path with the reason code attachment_unavailable (its record is defined in Workflow), so the Issue ends ai-blocked with ONE comment naming the image and the repair (upload it again, or remove it from the Issue, then remove ai-blocked and add ai-ready, or ai-fix-needed when a PR is open) and no tick re-runs it. Nothing is skipped silently, and the journal line issue_images_unreadable records the reason without the signed address. Failure output is one JSON object on stderr and exit code 1:
code is invalid_input, invalid_draft, no_answer, session_failed, timeout, create_failed, too_many_rounds, no_request, provider_insufficient_balance or draft_failed. A round that times out AFTER the model wrote its draft returns that draft instead of failing. The draft tools validate an answer with the engine’s OWN parser before recording it, so a draft rule the tool schema cannot express (an after naming no earlier Issue, a question carrying two recommended options) comes back to the model as a tool error it corrects in the same session; a session that ends without an answer after such a rejection fails invalid_draft with that last reason as its detail, never a bare timeout. A session the model provider stopped because its account has no balance is provider_insufficient_balance with the plain sentence (what to repair, and the HTTP 402) as its detail — never the provider’s raw payload. The session directory layout: <session-dir>/.pi-session/ holds the drafting session’s Pi JSONL plus the rendered prompt and context files, and <session-dir>/.fidelity/.pi-session/ holds the independent fidelity pass — a caller accounts usage and shows progress from those files. Interactive mode uses a temporary directory of the same shape and removes it. The repository a draft reads is origin/<base_branch> fetched when the round starts, never the deployment checkout’s working tree: deliveries always build their worktrees from the remote, so the checkout itself can predate the base by weeks, and a draft that reads it reports existing files as missing and cites names the base branch already renamed. The round materializes a detached worktree of the fetched commit under the checkout’s .orbi/ run dir, hands its path to the drafting session, and removes it when the round ends; the checkout and every delivery worktree stay exactly where they were. A fetch that fails fails the round — {"code": "draft_failed", "step": "read the repository at origin/<base_branch>", ...} — with no fallback to the stale checkout. The Issue marker: every Issue orbi draft creates carries <!-- orbi:draft:v1:<key>:<position>:<sha256> --> — the caller’s key, the Issue’s 1-based position in that draft, and the sha256 of the drafted text BEFORE the marker line (the Attachments section a creation writes after the marker, and the asset addresses a gh upload rewrites inside it, are outside the fingerprint). The pre-work check reads it at claim time (clarify.enforce): an Issue this runner authored whose body still hashes to the marker’s fingerprint is not judged again, because the same check judged it when it was drafted. An edited body, or a marker on an Issue another account authored, is judged exactly as before.