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.

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. Four 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.
Official metadata occupies the contiguous prefix that begins with the run marker. On the four 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 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 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. It 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.

Turning a proposal into child tickets

/orbi split (issue comment or orbi split --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 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). 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:
after is the 1-based number of an EARLIER Issue in the same draft that this one waits for, or is absent. issues is empty when the round only asks questions; a draft round carries at least one Issue. 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:
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. 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 or draft_failed. A round that times out AFTER the model wrote its draft returns that draft instead of failing. 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 Issue marker: every Issue orbi draft creates ends with <!-- orbi:draft:v1:<key>:<position>:<sha256> --> — the caller’s key, the Issue’s 1-based position in that draft, and the sha256 of the body as created (the marker line excluded). 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.