Local work environment
statecraft-cli
Register projects, inspect configuration and drive governed local work.
Observed 2026-11-07 · Producer spec-spine 0.32.0
f133913a98ceaa58ff47de1e628989022aff28ab ↗73 specifications. Verification and deployment qualification are unknown in this export.
Bootstrap spec system
Foundational contract for this repository: authored truth lives only in markdown (+ YAML frontmatter); machine-consumable truth is compiler-emitted JSON only; every artifact is a deterministic function of (config, file contents); a typed authority graph governs who-owns-what. This repository was born governed: the corpus existed before the first line of product code, and no spec here may claim code that does not exist.
The product boundary, the component owners, and the separation of authority
What this product is, what it is not, and who owns each capability it depends on. Fixes the claim vocabulary (specified / implemented / tested / released), the two interaction modes and which one is built first, the rule that separates an authority change from an implementation change, and the reuse disposition for every shared component this repository would otherwise reimplement. Owns the product half of the constitution and the two founding records under docs/. It owns no code.
Project registration and the Statecraft-managed environment: one global home, one project area, one initialization flow, and where authority comes from
Defines repository registration, initialization, the global and per-project environment, ownership classes, manifests, configuration provenance, upgrade, removal, transfer, and setup-profile rendering. Harness delivery, governance-producer adoption, and managed-session evidence are separated into specs 008, 009, and 015.
Work selection, workspace preparation, the run record, and recovery after interruption
The core loop's semantics. How a unit of work is identified by reading spec-spine's structured report rather than re-deriving it; how an isolated workspace is prepared so the operator's checkout is never edited; the append-only hash-linked run record with intent written before an effect and outcome after it; the closed outcome set (completed, failed, refused, interrupted, cancelled) and the rule that a retry appends an attempt rather than replacing history; supervisor-owned refusal accounting a supervised process cannot erase; and reconciliation of an ambiguous effect before any retry, with no exactly-once promise.
The execution adapter boundary and the first provider: one protocol, declared capabilities, a qualification suite, a constructed child environment, and what a real stream can witness
The single seam through which this product runs an agent, and the first provider behind it. Fixes the three-part protocol (a request the supervisor writes, an event stream it reads, a result it records), the closed capability vocabulary with required tokens refusing before any process starts and preferred tokens degrading visibly, the negative suite that qualifies an adapter binary version, and the constructed rather than filtered child environment whose property is a complete record and explicitly not containment of hostile code. Sections 3.9 to 3.16 name Claude Code as the first provider and fix what its stream can and cannot witness: which capability tokens the manifest may declare, each against a measurement rather than a reading of the flags; the finding that a mid-stream denial notification accompanies the terminal refusal record and that a denied session still classifies itself as a success; which of two denial mechanisms the adapter must use, because they have opposite evidence properties; and what a qualification record binds to.
Independent acceptance, the receipt, the separately reported evidence dimensions, and the envelope two products exchange
How a claim of completion becomes, or fails to become, an acceptance. Fixes the identification of candidate bytes and the trusted base, the authority-set rule that stops a candidate from being judged by rules it wrote, the receipt that binds repository, base, candidate, suite, exit codes and policy digest, the four evidence dimensions reported separately from admission with closed value sets, independently supplied trust roots, the preservation of original bytes and named hash constructions, and the three names for absence, none of which reads as success. It also owns the envelope crate the statecraft platform wrote against these serializations and transferred here, which makes one owner for the reference, the dimensions, admission and the absence words rather than two implementations of one wire format.
The command surface: one binary, every verb the other specs name, and what an exit code means
The binary, and every verb reachable through it. Specs 002 to 005 each describe operator verbs and then own only a library crate, so nothing they specify is runnable. This spec owns crates/statecraft-cli/ and binds those verbs to a process: the command tree, the rule that a command is a thin binding and never a second implementation, the closed exit-code vocabulary that distinguishes a refusal from a failure from a finding, human and --json output as two renderings of one value, and the binary's name being a recorded decision rather than a Cargo default. It also carries the work, run and accept bindings that were specified separately as 009: discovery as a join of two spec-spine reports because one of them does not carry status, inspection as a read-only fold of the run record and nothing else, and the rule that a binding needing a library entry point gets it from the crate that owns the behavior. Section 3.11.1 adds the five verbs 002 sections 3.25 to 3.29 need: inspecting and explicitly upgrading the required harness identity, obtaining the managed-session payload, and recording startup evidence beside submitting qualification evidence for admission.
The family envelope: every --json answer in the exit and JSON contract spec-spine speaks
Amends 006 sections 3.3 and 3.4. Every --json answer this product writes becomes the envelope spec-spine has written since 0.26.0 (its spec 132 section 3.4): schemaVersion, tool, verb, outcome, exitCode, summary, then report for exit 0 or 1 and error for 2, 3 or 4, where error.kind is one of the family's ten tokens. No exit number moves. A usage error under --json is an envelope on stdout. The replacement of 002 section 3.23's check translation, which #118 proposed for the same change, is left to the spec-spine 0.28.0 adoption, which changes the producer answer it would read. Replaces the historical proposal from #118 with the amendment that the current model requires (001 section 5).
Harness delivery, hooks, and skills
Carries the environment adapter, delivered harness, consented settings, required identity, and startup-delivery requirements relocated from spec 002. It keeps repository initialization separate from the harness that a registered adapter delivers.
Governance producer adoption
Carries the governance producer boundary relocated from spec 002: exact released identity, supported APIs, and the rule that Statecraft consumes spec-spine without becoming a second compiler.
Setup profile revision 9: a project decides whether governance refuses an unresolved claim
Amends 002's setup profile. github-actions-rust revision 9 adds one boolean parameter, governance.fail_on_unresolved, default true. True renders what revision 8 renders: gate.sh governance runs index check with --fail-on-unresolved. False omits only that flag: index check still runs, names each unresolved claim and fails a stale or invalid index, and every other governance step is unchanged. It exists for a corpus that approves a spec before building it, where an approved spec's unbuilt claim is unresolved by design. Owner decision of 2026-09-25 ("statecraft-cli switch"), requested by the travel-memory program for Rahi.
Initialization never scaffolds a second 000 spec and never writes an approved one
Amends 002 section 3.15's reconciliation of the contract path <specs_dir>/000-bootstrap/spec.md. When the corpus already has another spec holding the ordinal 000, init does not scaffold the bootstrap spec and drops a stale managed record of one that is not on disk. When init does write the bootstrap spec, it writes it with status draft, because ratification is the owner's act and never a tool's. An existing 000-bootstrap spec is adopted and never rewritten, as before. A defect found by the travel-memory program in hiqlite #47 and rahi #90.
A setup profile declares remote desired state and doctor compares it without writing
Amends 002's setup-profile and remote-doctor contract. A profile renders a versioned desired remote-state document covering required checks, extra jobs, code-owner review, merge queue, the review-exception environment and its reviewers, workflow-token defaults, secret names, repository custom properties, and profile identity. doctor --remote compares every field independently and never writes remote state or reads a secret value.
Supervised adoption of one wire-witness sidecar per attempt
Amends 003 and 004 so Statecraft may adopt wire-witness as an exact linked producer, bracket one sidecar as its own durable effect, supply one per-attempt loopback proxy endpoint to the child, and report confinement and witness posture without treating testimony as authority or creating a general sidecar host.
Admission of wire-exchange evidence
Amends the run record, evidence envelope, and command projection so an exact statecraft/wire-exchange/v1 artifact can be bound to one run attempt and sidecar effect, judged deterministically under explicit policy, and shown without retaining secret values or confusing producer testimony with independent acceptance.
Managed-session evidence and admission
Carries the live-observation, control, startup-record, launch-state, managed-trial, trailer, and confinement requirements relocated from spec 002. It separates runtime evidence from installation and harness delivery.
Active specifications stay bounded and historical journals stay outside the corpus
Amends spec 001's authoring model so an active spec carries current requirements and concise resolved rationale, never an append-only work log. A mechanical gate bounds active files and moves historical journals and handoffs to a nonnormative archive outside the compiler input.
Setup profile revision 10: AI review defaults to a 3000-line diff cap
Amends spec 002's setup profile. github-actions-rust revision 10 raises the inherited AI review diff cap from 2000 to 3000 changed lines so ordinary substantial pull requests remain reviewable. Explicit operator selections remain authoritative and are preserved on upgrade.
Governed inputs for a complete first bootstrap
Amends 002's initialization contract and 009's producer call so a fresh repository can supply setup-profile parameters through one explicit, plan-bound input document, receives the exact governance-producer pin from the producer itself, and remains honestly partial when project-owned prerequisites are absent.
Immutable context-packet consumption across repository snapshots
Amends Statecraft's run, adapter, acceptance, command, and governance-producer contracts so one task may bind immutable spec-spine context packets from several independently identified repository snapshots, record intended and provider-visible delivery separately, and judge packet integrity, closure, freshness, citations, and evidence without reimplementing producer-owned selectors, closures, or digests.
Documentation task and structured result contracts
Amends Statecraft's run, adapter, acceptance, and command contracts with an immutable documentation-task document and a provider-neutral structured documentation result. It separates task authority from provider output, binds every claim to an explicit lifecycle grade and supporting references, preserves omissions and contradictions, and keeps provider completion apart from independent acceptance and publication.
Independent documentation acceptance and review
Amends Statecraft's run, acceptance, and command contracts with an independent documentation-acceptance record. It keeps intended delivery, observed transport, schema validation, citation resolution, semantic review, and acceptance as separate facts; requires claim-grade support, preserved unknowns and contradictions, valid artifacts, and a fresh context manifest; and grants no application or publication authority.
Fixed-export documentation workflow
Amends Statecraft's run, adapter, acceptance, and command contracts with a bounded offline documentation workflow over revision-pinned context exports. It preserves immutable task, delivery, raw result, validation, review, correction, and acceptance records as separate facts; proves the workflow with a deterministic fake adapter; and grants no live provider, repository application, remote export, or publication authority.
Setup profile revision 11: the commit walk runs a contained spec-spine
Amends spec 002's setup profile. github-actions-rust revision 11 copies the spec-spine binary into each temporary commit worktree as a regular file instead of linking it from outside, so spec-spine's containment rule can read every commit's tree. The walk's verdicts are otherwise unchanged.
Setup profile revision 12: a token-budgeted AI review and ratification as a merge condition
Amends spec 002's setup profile and spec 017's review cap. github-actions-rust revision 12 leaves a managed file out of the AI review only when its bytes match the digest its policy records, sends deletions as a list under their own cap, measures the reviewable change in estimated tokens, and reviews a change larger than one call in file groups whose verdicts are merged. It also refuses a merge that changes a path a draft spec owns, unless that pull request ratifies the spec with the owner's exception. An unreadable base now refuses instead of letting the candidate's policy and scripts judge it.
Prompt-injection qualification: untrusted content never expands authority
Amends the adapter negative suite and the documentation lane with a versioned hostile-content corpus and a deterministic product-invariance suite. Every surface that carries repository, packet, citation, provider, wire or tool-facing text is exercised with hostile payloads, and the suite proves by construction that Statecraft's decisions are unchanged: no authority expands, no credential is disclosed, no forbidden capability is invoked, no review or acceptance is bypassed. Provider susceptibility is a separate, later measurement that is recorded as testimony and is never the boundary. Delimiters and detectors are not security controls.
doctor reports a path whose recorded ownership disagrees with the transfer journal or the current rendering
Amends spec 002 section 3.5 with one additive, read-only doctor finding, ownership-disagreement. For each path, doctor compares three facts: the manifest entry's class, the latest transfer-journal record for the path, and the class the current selection's rendering would give it. Each incompatible ownership state defined below is reported with both sources named. doctor repairs nothing, transfers nothing and never treats a rendering it could not compute as agreement. Backlog SC-006.
Observation and proposals: noticing that a repository's governed truth changed, and proposing typed work without acting on it
Adds the transition this product lacks between "spec-spine says the repository means X" and "the operator is offered the work that follows". One observation reads exactly one commit through spec-spine's existing structured reports, reduces the answers to three closed projections, and compares them with the last observation recorded for that repository. Each semantic transition a built-in subscription names becomes a proposal with a deterministic identity, recorded in an append-only chain in the product home. A proposal is never executed by this spec: the operator admits it, admission re-derives its preconditions against the current commit, and an admitted proposal enters spec 003's existing run path with its cause recorded in the attempt's intent. No watcher, no loop, no automatic admission, and no change to spec-spine.
Agent attribution and agent commit identities are refused
Amends spec 001's authored-content rules so agent attribution is suppressed at the project boundary and refused in every text the governance gate reads. The same gate refuses commits whose author or committer uses a known agent address. Display names do not decide identity, and external contributors remain allowed.
One resolved judge: every spec-spine call this product makes runs the executable one resolution selected
Every spec-spine invocation this product makes, in every verb and in every hook it delivers, runs the executable that one resolution selected for that operation, and records which one. No call site names a bare `spec-spine` and lets PATH decide. The resolution's sources are, in order, the supervisor's path in a managed session, an operator override, the project's declared engine as spec-spine's own launcher resolves it when that launcher is present, the repository-local install named by the active setup profile, the repository's own build and then PATH; every candidate except the supervisor's already-resolved path is put to the pin, and each passed over is named. `doctor` reports the resolved executable, never a separate PATH probe. Where the resolved engine carries `check --json`, the check is read from its envelope instead of from its wording. Amends spec 008 section 3.23 contracts 2, 4 and 5.
A governed project needs no provider-specific directory, and this product writes none
Makes the absence of provider-specific project directories (`.claude/`, `.codex/`, `.agents/`, `.agent/` and their equivalents) a supported and tested operating condition. No adapter declares a managed or adopted path inside one. The Claude Code adapter's owned instructions file moves out of `.claude/statecraft/` into content this product already manages, and its pointer, where one is still needed, imports `.statecraft/AGENTS.md` directly. A project that already holds the old file converges through the ordinary upgrade and removal rules. A qualification case starts with every provider directory absent and proves initialization, the governed verbs and context delivery work and recreate none of them. Brings the adapter into line with spec 002 section 3.12 and spec 008 section 3.14, and amends the adapter declaration of spec 004.
Setup profile revision 13: the repository-local engine lives in .bin/
The owner decided that neither spec-spine nor Statecraft uses `.tooling/bin` and that the repository-local spec-spine is `.bin/spec-spine`. Profile github-actions-rust revision 13 installs the pinned engine there, its gate, commit walk, CI cache and policy commands read it there, and its ignore fragment ignores `.bin/`. The resolver's repository-local candidate, the delivered hooks and this repository's own `Makefile` follow. A revision-12 project converges through the ordinary managed upgrade.
Required project-owned code checks under managed governance
Profile revision 14 keeps Rust as its default and admits an explicitly selected external code surface. A contained executable local script and a tracked reusable workflow remain required. Rust prerequisites apply only to the Rust selection. Governance, coupling, AI review, protected owner exceptions and the single required aggregate retain their existing rules.
A reviewed initialization plan may explicitly move the adopted spec-spine pin
Adds an explicit exact --spine request to init plan and init apply. The source and destination pins, producer identity, original configuration digest and minimal authored edit are part of the consented plan identity. Apply changes only the existing required_version value in spec-spine.toml after revalidating the plan, then uses the ordinary managed upgrade rules. No implicit pin move, dependency rewrite, ratification or branch protection change is authorized by initialization.
Protected boundary acceptance preserves read-only checkout access
Corrects the self-test and hostile-fixture acceptance of spec 004 section 3.18 to preserve rule 2: the operator checkout and other attempt workspaces remain readable, and mutations are refused. Product home and launch records remain inaccessible except for the existing explicit exceptions.
Offline issuer authorization: three fixed domains, detached owner signatures and the pinned RootSetV2
Amends 005 for the shared half of the offline issuer enrollment contract the owner approved on 2026-10-03 (docs/proposals/007-offline-enrolment-contract.md). Adds three closed signing domains (trust.issuer-enrolment, trust.issuer-rotation, trust.issuer-revocation) under the unchanged family preimage, strict key, signature and payload decoding, the detached signature and owner public records, the RootSetV2 reader with its digest and complete history verification, issuer eligibility at an explicit time and scope, and the operator version and digest pin that refuses rollback. The envelope crate stays pure: no file, clock, entropy or network. Custody and the offline verbs are 036's; adoption in a cell is the platform's.
The offline issuer verbs: trust root-generate, trust issuer-sign and trust issuer-verify
Amends 006 for the command half of the offline issuer enrollment contract the owner approved on 2026-10-03 (docs/proposals/007-offline-enrolment-contract.md). Adds three verbs to the existing binary: root-generate writes a new offline owner seed only to an explicit path, with owner-only permissions and an explicit confirmation option; issuer-sign signs one enrollment, rotation or revocation only after strict decoding, history checks and a confirmation naming the exact payload digest; issuer-verify checks a detached authorization against an independently pinned owner key and, with the full option group, issuer eligibility under the operator's exact pin. Formats and verification are 035's; no verb reads the product home, contacts a network, opens a cell or store, or signs an arbitrary domain.
Envelope admission evaluates through action-gate's closed mode, with identical decisions and bytes
Amends 005 for how the envelope's admission::evaluate combines its requirements. It builds one closed action-gate gate per evaluation (action-gate-core 0.3.0, action-gate spec 004), with one required check per requirement registered in today's reason order, and maps every deny back to its RefusalCode. Decisions, refusal codes, their order, the serialized Admission and the policy-eval claim are unchanged, which a differential test against the frozen pre-change evaluator proves. The envelope stays pure and Apache-2.0; the policy digest stays the policy's identity.
The hosted client: device-grant login, submit and decision against one Statecraft cell
Amends 006 with the CLI's half of the hosted thin path that the Statecraft platform's spec 005 section 3.2 names and its 004 B-3 leaves open. The operator logs in with the OAuth device authorization grant (RFC 8628) against the cell's own issuer, as the public native client that the cell's manifest declares. `hosted submit` registers the revision this product accepted locally and submits its receipt and artifact bytes idempotently. `hosted decision` retrieves the revision's decision bundle and verifies it offline against a root set the operator pinned independently, never against the bundle's own. Tokens never reach a log, a receipt, a repository or a JSON answer. Nothing here dispatches work, records a reviewer's decision, or acts on an approval.
Reopen F-04 for a local same-origin cockpit over the existing operations
Amends 001's interface exclusion and reopens founding deferral F-04 only for Statecraft Dev: a one-repository loopback browser cockpit, calling the same typed local operations under 002 section 3.20. This is an authority decision, separate from the application extraction, server, distribution and command implementations. Ratification grants no production signing, release, hosted panel, daemon or detached execution authority.
Callable application operations with unchanged envelopes and chain effects
Extract run, shared attempt launch, acceptance, override recovery, run reconciliation and startup trial orchestration from the binary into the existing CLI library. Typed operations own admission and effects and return render::Answer. Verb adapters parse and render. Four independently green delivery slices preserve envelope bytes, record ordering and execution ownership, providing the shared boundary a later local cockpit calls.
Base-commit governance context for managed AI review
Supply the managed reviewer with bounded governance documents selected from the base commit, record their provenance, and account for their bytes in every call. Candidate assertions remain review data. Missing context does not prove a contradiction, and review never grants owner ratification or an exception. Deliver the profile change separately from its self-adoption.
Per-run provider configuration and a measured Mach-service allowlist close spec 004's two open items against IX
Amends 004 section 3.18 to close the two items its rule 12 names as open against constitution IX. A confined provider process gets its own configuration directory inside the attempt, discarded after it, and is authenticated by a provider token the operator provisions once, so the child no longer writes any file that an unconfined process later loads. On macOS every Mach service is refused except an allowlist measured against a confined provider session. Both rest on live measurements this spec names, and the first confined provider session is the activation rule 12 defers.
The witness sidecar's ready deadline starts when its process starts
Amends 013 so the supervisor's ready deadline measures the producer's own startup, not the operating system's assessment of a newly placed executable. A bounded start deadline covers the time from spawn until the producer's code is observed running; the existing ready deadline runs from that observation. Closes the residual 013 records for a ready-timeout under syspolicyd load, and measures the same route on Linux.
Setup profile revision 18: supply-chain, policy-isolation, workflow-lint, structural-scan and secret-scan jobs
Amends spec 002's setup profile. github-actions-rust revision 18 adds five required checks to every target: a supply-chain job (cargo-deny, cargo-audit, cargo-vet with exact tool versions), a guard that refuses a pull request mixing dependency or policy files with anything else, a workflow lint (zizmor and an offline refusal of any action not pinned by commit digest), an ast-grep scan where the project declares rules, and a digest-verified gitleaks scan. Each is wired into ci-gate. A target needs a committed deny.toml to upgrade to it.
statecraft-home reads YAML through the adopted producer's one reader
Amends specs 002, 012 and 032 so every YAML document statecraft-home parses (a project's reusable code workflow, and the default branch's CI workflow the remote-state comparison reads) is read by spec-spine's one YAML reader, which this product already links, and removes the direct serde_yaml dependency. The workspace then carries no unsafe-libyaml, and RUSTSEC-2024-0449 no longer applies here.
One secret type: redacted when shown, cleared when dropped, exposed only by name
Adds a small crate owning one secret-string type whose Debug and Display never show its value, whose bytes are zeroed when dropped, and whose value is read only through an explicit expose call. The provider token (statecraft-home) and the hosted credential (statecraft-hosted) migrate to it. Four structural rules adapted from preloop-ci are specified here and delivered in a later change that depends on spec 044's sg-scan.
Admission and qualification read what an adapter declares it can do, never which adapter it is
Amends spec 004's seam with a per-adapter capability declaration beside the closed six-token vocabulary: the facts admission, qualification and the witness path currently learn by naming the one adapter (a stream it can witness, hooks it honours in print mode, a wire sidecar it can route through, a per-run configuration directory). Every branch reads the declaration. A test adapter with a different declaration proves the seam. No second provider is added.
Typed run operations under one controller lease, recorded in the run record
Gives a run three typed operations, attempt.retry, attempt.continue and attempt.abort, submitted by one controller holding a lease. Each carries an idempotency key and the run version it was decided against; each request and its outcome append to spec 003's hash-linked run record, durable and uncapped, so replaying the record reproduces the run's state. A reconnecting controller reads events from a cursor over the record. The one live slot of spec 003 section 3.7 is held or released explicitly by each operation.
An admission dry-run evaluates a policy through the closed evaluator and writes nothing
Adds a verb that evaluates a revision's recorded verdicts and decisions against an admission policy through spec 037's closed evaluator and answers what admission would decide, with the same refusal codes in the same order, without writing an attestation, a record or any state. Beside the decision it reports every check's own result, so an operator previewing a policy change sees which requirements allowed and were overruled by a deny. The policy-eval/v1 claim is unchanged; whether that trace should ever enter the claim is an owner question.
A local halt record that run consults before launch, and denies when it cannot read
Adds an operator-written halt record in the product home, per registered repository, with three independently halted scopes: run admission, tool effects and dispatch. run reads it before launch and refuses a halted scope with a closed reason; a halt record it cannot read or verify denies with its own reason rather than admitting. Halting with a live attempt records stop requested; stop confirmed is recorded only when that attempt's cancelled outcome is durable. The hosted tenant halt fact is not defined here; it is consumed once its own spec merges.
The supervisor holds the provider token behind a loopback gateway; the child holds only a per-attempt token
Replaces spec 042's delivery of the operator's provider token in the child's environment with a loopback authentication gateway the supervisor owns. The child receives the gateway's address and a short-lived token minted for its attempt, through a 0600 file in the per-run configuration directory; the gateway checks that token and forwards with the real one, and revokes it when the attempt ends. The provider token never appears in the child's environment or files. Claude Code's honouring of a base-URL override with an OAuth token in print mode is measured, unconfined; the confined measurement is part of acceptance.
Version-pinned provider captures, a quarantine and a divergence ledger gate a new provider version
Turns the Claude Code adapter's recorded streams into a governed corpus of golden captures, each pinned to a provider version and a named scenario, with a quarantine list for captures that are wrong recordings and a divergence ledger for differences a reviewer has accepted. A new provider version is compared against the goldens offline; an unreviewed divergence refuses that version's qualification. Capturing costs provider usage, so it is owner-triggered; comparison runs in CI with no provider and no network.
Operator input to a live attempt is recorded before delivery, expires, and is evidence on the attempt
Lets an operator steer a live attempt with a note, read by the agent at its next governed tool call, or a command, which starts a new turn as a spec 048 continue. Each input is written to the run record before it is delivered, carries its author, reason and expiry, and moves through pending, delivered, then acknowledged or expired. The cockpit is view-only by default and grants control for a bounded time. Localhost only; no hosted transport and no unsigned session-authorized command. An abort command ends the attempt as spec 003's cancelled.
An AI pre-screen is an advisory attestation shown beside approvals and never counted as one
Records the managed AI review's verdict on a revision as an advisory attestation naming the model, the prompt's digest, the guidelines' digest and the structured verdict. It is shown beside statecraft/approval/v1 and is never counted as an approval. It may order a review queue. A policy may let a deny refuse admission only on a fail-closed path, where a missing or unreadable pre-screen refuses too. An AI deciding, confidence-gated auto-approval, approval on error, substring parsing of a verdict and a prompt the gated agent can influence are forbidden.
A Codex adapter, built on the capability seam and admitted only by its own pass of spec 004's suite
Proposes statecraft-adapter-codex, the second provider adapter under the conditional F-07 lift of 2026-10-20. It mirrors the Claude Code adapter's shape: codex exec's JSONL stream mapped to spec 003's closed outcomes, a constructed environment, a per-run CODEX_HOME in the spirit of spec 042, and harness delivery under spec 008 without touching the user's own Codex configuration. It declares its capabilities through the seam proposed as spec 047 and is built only after that seam merges. It is qualified only by its own pass of spec 004's negative suite on fixtures recorded from a named Codex version. An appendix records preloop's facts on other harnesses as reference for later adapters; no code.
Setup profile: a managed review guide and a repository's own REVIEW.md in the AI review's governance context
Amends spec 002's setup profile and spec 041's default governance context. The next github-actions-rust revision delivers a managed review guide at .statecraft/REVIEW.md, the reviewer's contract written once for every target, and adds it and a repository-authored REVIEW.md to the documents the AI review reads from the base commit. An absent REVIEW.md is recorded as absent, as any default document is. This repository's own REVIEW.md is an adaptation of preloop-ci's guide to Statecraft's conventions.
Releasing this repository's binaries is repository delivery: cargo-dist archives, installers, SBOM and build provenance
Specifies how this repository delivers its own binaries, under the F-02 narrowing of 2026-10-20: a tag the owner pushes builds macOS and Linux archives for aarch64 and x86_64 with cargo-dist at an exact version, a shell installer and a Homebrew formula, a CycloneDX SBOM per archive that refuses to ship empty, and a keyless build-provenance attestation per archive. It adds no verb, and no verb in this corpus publishes. The binary's name, the Homebrew tap and the version scheme are the owner's decisions.
Setup profile revision 18: superseded pull-request runs are cancelled, a preflight orders the expensive jobs, and the cargo cache is saved from the default branch only
Amends spec 002's setup profile. github-actions-rust revision 18 changes when work runs, never what judges it: a newer push to a pull request cancels that pull request's older run; a preflight job (the base, the committed artifacts' freshness, formatting) runs before code and every declared extra job, so a stacked pull request skips them unless it asks for them by label; and the code job restores the cargo cache on every event but saves it only from the default branch. Every check keeps running where it ran; ci-gate's rules are unchanged except that preflight is required.
Setup profile revision 18 cancels superseded work job by job, so a run waiting on the owner exception never blocks a newer one
Amends spec 058. Revision 18's single workflow-level concurrency group let a run waiting on the owner-exception Environment hold the group: GitHub does not cancel such a run, so every newer push to the same pull request stayed pending behind it. Every job except review-exception and ci-gate now has a concurrency group of its pull request and job instead, and the workflow has none. Revision 18 keeps its number: no project had adopted the first form.
Setup profile revision 19: a blocked ci-gate names each failed job with its first error lines, and the code job's cache leaves out workspace artifacts
Amends spec 002's setup profile. github-actions-rust revision 19 changes what a failure tells its reader and what the cache holds, never what judges: when ci-gate blocks, it lists every failed job of its run with the failed step and at most five error lines from that job's log, in the step summary and as annotations, on a best-effort read that never changes the verdict or the exit code. Before the code job saves the cargo cache it drops the workspace's own artifacts, which Cargo rebuilds after any checkout. Spec 044 moves from revision 19 to revision 20.
Setup profile revision 20: a stalled AI review call is detected, retried once, and otherwise skipped as transient
Amends spec 002's setup profile and spec 024's review. github-actions-rust revision 20 watches each reviewer call: the call streams its events, and a call that emits none for 180 seconds is stopped and retried once with the same input. A second stall ends the review as a visible `skipped:transient`, naming the stall, instead of running into the job's limit. The review job's limit becomes 20 minutes so that one retry fits. What the review reads, the findings it reports and how they judge are unchanged. Spec 044 moves from revision 20 to revision 21.
Setup profile revision 21 publishes the AI review's verdict as a check run, and review status reads it
Amends spec 002's setup profile, spec 024's review and spec 006's command surface. github-actions-rust revision 21 publishes every review result (findings, no-findings, skipped:<class>) as a check run on the reviewed head, named `statecraft-ai-review`, whose output carries the evidence record byte for byte. A new read-only verb, `statecraft-cli review status <pr> [--head <sha>] [--repo <owner/name>] [--json]`, reads it under one rule for which review counts, the rule ci-gate already uses in the merge queue, and answers with a closed outcome and spec 006's exit codes. The `## AI review` comment is unchanged. Arming, retrying and waiting are out of scope. Spec 044 moves from revision 21 to revision 22.
The land verbs wait for, arm, push and restack a pull request, and land status orders what is left
Amends spec 006's command surface; its four write verbs act under the F-02 narrowing of 2026-10-27 and never inside a run attempt (D-5). Six verbs act on a pull request's way to the default branch through the operator's gh: `land wait` blocks until a named event, `land arm` enables auto-merge only for a head the AI review passed on a pull request based on the default branch, `land push` pushes a signed head with a lease after disarming, `land restack` moves a stacked pull request onto its new base and regenerates only declared generated paths, and `land status` orders the open pull requests by their next action, and `land cancel-superseded` cancels runs no open pull request needs. The adopter's values (default branch, stack caps, generated paths and their regenerators, pre-push checks) come from a `landing` block in the project declaration; a value no layer supplies is refused, never defaulted. Only `land arm` arms, and nothing here approves, merges or re-runs.
The protected set is the product home's entries, not the operator's worktrees
Amends spec 004 section 3.18 rule 2. The protected roots a confinement takes from the product home are the home's top-level entries, every one except a closed operator list (worktrees and Finder's .DS_Store), rather than the home as one root. An unknown or later entry is still protected. The self-test's sentinel and socket directory live in one fixed protected entry. A multiply linked file in a protected entry still refuses.
A fail-closed screen's refusal of hostile content is declared, not a breach of spec 025's invariant
Amends spec 025. Invariant I-1 says no byte of untrusted content changes a Statecraft decision, evidence admission included; spec 014's secret screen refuses evidence whose content looks like a credential. A corpus case may therefore declare one refusal from a closed list, naming the decisions it is carried into and the recordings it leaves empty; those may differ from the twin's only as that refusal, and every other difference still fails. A refusal only withholds; nothing here lets content expand authority.
The boundary self-test's probe socket lives under a short fixed directory, so a long home path cannot refuse a launch
Amends spec 064 section 3.3. The self-test's listening Unix socket moves from a directory under the product home's boundary entry to a private directory under /tmp, so its path no longer grows with the home's path and stays within the platform's socket path limit (104 bytes on macOS, 108 on Linux). The sentinel stays in boundary/, the protected roots and the confinement record are unchanged, and rule 6 of spec 004 section 3.18 still decides whether the probe's connect is refused.
Setup profile revision 24: where the merge queue is required, a push to the default branch runs only the cache saves and ci-gate
Amends specs 002, 032, 044 and 058. Where the policy records a required merge queue, the queue has already judged the exact commit a push to the default branch carries. github-actions-rust revision 24 skips every job that judges on that push, keeps the cache steps, and has ci-gate admit the skips by an explicit post-merge rule only when the pushed commit passed ci-gate in its merge-queue run. Repo-owned called workflows receive a boolean post_merge input. Without a required queue nothing changes.
AI review findings carry a severity, and an answered low finding passes ci-gate without the owner exception
Amends spec 024's review and the ci-gate rule of spec 062. Each AI review finding carries a severity (`low`, `medium`, `high`) and a category. A head whose findings are all `low`, each answered by a `Review note (<sha8>):` line in the pull request's body, passes ci-gate without the owner's review exception; a finding of any other severity, and any change that touches correctness, security, authority or ratification, still needs it. Known false positives are handled through review.context_paths.
Setup profile revision 25: the managed code job can free runner disk before it builds
Amends spec 002's setup profile and spec 058's code job. A new boolean parameter, ci.code.free_disk, off by default, renders one step in the managed code job before the build: it removes the runner's unused preinstalled toolchains and reports the free space before and after. Off, the rendered workflow is revision 24's. An external code selection refuses the parameter, because its job is the project's own.
A read-only root refuses only a link the child could write
Amends spec 004 section 3.18 rule 2's alias scan. An inaccessible root still refuses any multiply linked file. A read-only root (the target's working tree, its Git directory, another attempt's workspace) refuses a multiply linked file only when another of its names lies where the child may write. Cargo's build output in a checkout and Git objects shared with a local clone no longer refuse every launch.
Setup profile revision 27: the policy-isolation guard ignores a workspace version bump
Amends spec 044 section 3.3 and spec 002's setup profile. The policy-isolation guard classes any Cargo.toml or Cargo.lock as policy, so a release bump, which moves the workspace version in both beside its changelog and re-blessed fixtures, always reads as mixed and has needed an admin merge. Revision 27 adds a fourth class, version-only: a Cargo file present at both revisions that is unchanged once every workspace package's version is masked. Like generated paths it is ignored. A dependency, source, lockfile-format or new-file change keeps the file policy.
Setup profile revision 28: the policy-isolation guard ignores a self-pin and the owning spec
Amends spec 044 section 3.3, spec 071 and spec 002's setup profile. A repository that pins spec-spine to its own version, as spec-spine does, moves spec-spine.toml with every release, so its release bump stays mixed under revision 27; and a policy file that a spec claims needs that spec's spec.md beside it under the coupling gate, which the guard calls other. Revision 28 treats a self-pin move as version-only and a spec.md whose front matter names a changed policy path as an ignored owning spec. It also drops "branches up to date" from the remote obligations and the gate's comments that assumed merge commits.