132-one-exit-contract-for-the-family
One exit contract for the family
spec-spine and the Statecraft CLI answered in two exit vocabularies. spec-spine spent 2 on staleness and 3 on everything that went wrong, from a malformed `spec-spine.toml` to a failed read to a refused write, so a consumer could not tell "you asked for something this tool will not do" from "the disk failed", and a containment refusal was reported as I/O. This spec adopts the family contract the two tools share: 0 ok, 1 finding (validation, drift, stale, unresolved, not found, authored content that does not parse), 2 refused (an invalid configuration, a version pin not met, a containment refusal: nothing done), 3 usage, 4 failed (I/O, internal, a tool-produced artifact that fails its schema). `Error` gains `Refused`, `Usage` and `Internal`, and every call site is classified. The `--json` envelope becomes the family envelope, version 1.0.0: `schemaVersion`, `tool`, `verb`, `outcome`, `exitCode`, `summary`, then `report` or `error`, with `ok` removed and `error.kind` a closed set of ten tokens. It is a deliberate breaking change, accepted by the owner, taken once so the consumer migrates once.
Read the full pinned specification ↗Relationships
depends on
depended on by
amends
- 034-machine-readable-verdicts
- 055-a-version-pin-the-cli-can-check
- 061-shipped-is-not-the-same-as-working
- 062-one-name-one-freshness-verb
- 067-a-short-id-names-the-same-spec-at-every-verb
- 068-a-verifier-checks-the-bytes-it-was-given
- 069-the-committed-index-is-compared-not-trusted
- 070-an-authority-snapshot-says-what-it-read
- 079-a-blocking-claim-is-not-a-stale-shard
- 080-an-unresolved-claim-is-not-stale
- 093-the-harness-this-repository-runs
- 103-a-verifier-fixture-is-a-published-artifact
- 126-a-derived-file-stays-in-its-directory
- 127-a-derived-file-is-where-its-path-says
- 128-a-derived-tree-stays-in-its-repository
- 129-a-json-config-obeys-the-loaders-rules
Claimed units
- establishes
{ "kind": "file", "path": "crates/spec-spine-cli/tests/exit_contract.rs" } - extends
{ "nature": "corrective", "spec": "000-spec-spine-bootstrap", "unit": { "kind": "file", "path": "crates/spec-spine-types/src/error.rs" } } - extends
{ "nature": "additive", "spec": "000-spec-spine-bootstrap", "unit": { "kind": "file", "path": "crates/spec-spine-types/src/lib.rs" } } - extends
{ "nature": "corrective", "spec": "000-spec-spine-bootstrap", "unit": { "kind": "file", "path": "crates/spec-spine-types/src/config.rs" } } - extends
{ "nature": "corrective", "spec": "034-machine-readable-verdicts", "unit": { "kind": "file", "path": "crates/spec-spine-types/src/verdict.rs" } } - extends
{ "nature": "corrective", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-types/src/version.rs" } } - extends
{ "nature": "corrective", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/main.rs" } } - extends
{ "nature": "corrective", "spec": "062-one-name-one-freshness-verb", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_check.rs" } } - extends
{ "nature": "corrective", "spec": "004-codebase-index", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_index.rs" } } - extends
{ "nature": "corrective", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_compile.rs" } } - extends
{ "nature": "corrective", "spec": "005-coupling-gate", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_couple.rs" } } - extends
{ "nature": "corrective", "spec": "021-ledger-seal", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_attest.rs" } } - extends
{ "nature": "corrective", "spec": "021-ledger-seal", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/verify_attestation.rs" } } - extends
{ "nature": "corrective", "spec": "021-ledger-seal", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/seal.rs" } } - extends
{ "nature": "corrective", "spec": "096-compaction-is-a-verb-not-a-session", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_compact.rs" } } - extends
{ "nature": "corrective", "spec": "002-registry-query", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_registry.rs" } } - extends
{ "nature": "corrective", "spec": "108-a-work-scope-is-declared", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_scope.rs" } } - extends
{ "nature": "corrective", "spec": "110-an-interface-reference-is-digest-pinned", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_interface.rs" } } - extends
{ "nature": "corrective", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/lib.rs" } } - extends
{ "nature": "corrective", "spec": "022-index-sharding", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/shard.rs" } } - extends
{ "nature": "corrective", "spec": "004-codebase-index", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/index.rs" } } - extends
{ "nature": "corrective", "spec": "002-registry-query", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/query.rs" } } - extends
{ "nature": "corrective", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/compile.rs" } } - extends
{ "nature": "corrective", "spec": "021-ledger-seal", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/attest.rs" } } - extends
{ "nature": "corrective", "spec": "107-a-context-closure-is-declared", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/closure.rs" } } - extends
{ "nature": "corrective", "spec": "108-a-work-scope-is-declared", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/scope.rs" } } - extends
{ "nature": "corrective", "spec": "109-impact-and-conflict-are-declared", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/impact.rs" } } - extends
{ "nature": "corrective", "spec": "071-a-change-is-classified-under-the-bases-rules", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/delta.rs" } } - extends
{ "nature": "corrective", "spec": "110-an-interface-reference-is-digest-pinned", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/interface.rs" } } - extends
{ "nature": "corrective", "spec": "113-a-waiver-has-a-declared-lifecycle", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/waiver.rs" } } - extends
{ "nature": "corrective", "spec": "071-a-change-is-classified-under-the-bases-rules", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_delta.rs" } } - extends
{ "nature": "corrective", "spec": "003-conformance-lint", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_lint.rs" } } - extends
{ "nature": "corrective", "spec": "043-verify-declared-acceptance", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_verify.rs" } } - extends
{ "nature": "corrective", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/canonical_json.rs" } } - extends
{ "nature": "corrective", "spec": "005-coupling-gate", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/couple.rs" } } - extends
{ "nature": "corrective", "spec": "029-ownership-coverage", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/coverage.rs" } } - extends
{ "nature": "corrective", "spec": "044-index-diagnostics-reach-a-gate", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/diagnostics.rs" } } - extends
{ "nature": "corrective", "spec": "074-a-governed-read-names-its-version", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/read.rs" } } - extends
{ "nature": "corrective", "spec": "067-a-short-id-names-the-same-spec-at-every-verb", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/spec_id.rs" } } - extends
{ "nature": "additive", "spec": "034-machine-readable-verdicts", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/cli.rs" } } - extends
{ "nature": "additive", "spec": "107-a-context-closure-is-declared", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/closure.rs" } } - extends
{ "nature": "additive", "spec": "107-a-context-closure-is-declared", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/closure_composed.rs" } } - extends
{ "nature": "additive", "spec": "047-effective-config-is-a-governed-read", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/config.rs" } } - extends
{ "nature": "additive", "spec": "005-coupling-gate", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/couple.rs" } } - extends
{ "nature": "additive", "spec": "128-a-derived-tree-stays-in-its-repository", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/derived_dir_contained.rs" } } - extends
{ "nature": "additive", "spec": "126-a-derived-file-stays-in-its-directory", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/derived_paths.rs" } } - extends
{ "nature": "additive", "spec": "127-a-derived-file-is-where-its-path-says", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/derived_symlinks.rs" } } - extends
{ "nature": "additive", "spec": "110-an-interface-reference-is-digest-pinned", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/interface.rs" } } - extends
{ "nature": "additive", "spec": "110-an-interface-reference-is-digest-pinned", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/interface_composed.rs" } } - extends
{ "nature": "additive", "spec": "108-a-work-scope-is-declared", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/scope.rs" } } - extends
{ "nature": "additive", "spec": "067-a-short-id-names-the-same-spec-at-every-verb", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/spec_id.rs" } } - extends
{ "nature": "additive", "spec": "103-a-verifier-fixture-is-a-published-artifact", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/verifier_fixtures.rs" } } - extends
{ "nature": "additive", "spec": "068-a-verifier-checks-the-bytes-it-was-given", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/verify_attestation_bytes.rs" } } - extends
{ "nature": "additive", "spec": "090-the-verdict-is-the-only-thing-on-stdout", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/verify_streams.rs" } } - extends
{ "nature": "additive", "spec": "113-a-waiver-has-a-declared-lifecycle", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/waiver.rs" } } - extends
{ "nature": "additive", "spec": "021-ledger-seal", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/attest.rs" } } - extends
{ "nature": "additive", "spec": "107-a-context-closure-is-declared", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/closure.rs" } } - extends
{ "nature": "additive", "spec": "096-compaction-is-a-verb-not-a-session", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/compact.rs" } } - extends
{ "nature": "additive", "spec": "071-a-change-is-classified-under-the-bases-rules", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/delta.rs" } } - extends
{ "nature": "additive", "spec": "093-the-harness-this-repository-runs", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/harness_hooks.rs" } } - extends
{ "nature": "additive", "spec": "110-an-interface-reference-is-digest-pinned", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/interface.rs" } } - extends
{ "nature": "additive", "spec": "002-registry-query", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/query.rs" } } - extends
{ "nature": "additive", "spec": "097-a-path-leaves-the-corpus-the-way-a-spec-does", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/retire.rs" } } - extends
{ "nature": "additive", "spec": "108-a-work-scope-is-declared", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/scope.rs" } } - extends
{ "nature": "additive", "spec": "113-a-waiver-has-a-declared-lifecycle", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/waiver.rs" } } - extends
{ "nature": "additive", "spec": "055-a-version-pin-the-cli-can-check", "unit": { "kind": "file", "path": "crates/spec-spine-types/tests/config.rs" } } - extends
{ "nature": "additive", "spec": "034-machine-readable-verdicts", "unit": { "kind": "file", "path": "crates/spec-spine-types/tests/dtos.rs" } } - extends
{ "nature": "additive", "spec": "012-declared-extra-frontmatter-passthrough", "unit": { "kind": "file", "path": "crates/spec-spine-types/tests/frontmatter.rs" } } - extends
{ "nature": "additive", "spec": "057-the-docs-name-what-adopters-derived", "unit": { "kind": "file", "path": "docs/adoption-guide.md" } } - extends
{ "nature": "additive", "spec": "100-a-deleted-path-is-judged-where-it-lived", "unit": { "kind": "file", "path": "docs/api.md" } } - extends
{ "nature": "additive", "spec": "115-bindings-are-designed-not-shipped", "unit": { "kind": "file", "path": "docs/bindings-plan.md" } } - extends
{ "nature": "additive", "spec": "055-a-version-pin-the-cli-can-check", "unit": { "kind": "file", "path": "docs/schema-versioning.md" } } - extends
{ "nature": "corrective", "spec": "103-a-verifier-fixture-is-a-published-artifact", "unit": { "kind": "file", "path": "crates/spec-spine-core/fixtures/verifier/" } } - extends
{ "nature": "corrective", "spec": "093-the-harness-this-repository-runs", "unit": { "kind": "file", "path": ".claude/settings.json" } } - extends
{ "nature": "corrective", "spec": "093-the-harness-this-repository-runs", "unit": { "kind": "file", "path": "AGENTS.md" } } - extends
{ "nature": "corrective", "spec": "093-the-harness-this-repository-runs", "unit": { "kind": "file", "path": ".claude/skills/code-review/SKILL.md" } } - extends
{ "nature": "corrective", "spec": "093-the-harness-this-repository-runs", "unit": { "kind": "file", "path": ".claude/skills/ship/SKILL.md" } } - extends
{ "nature": "corrective", "spec": "094-one-gate-and-the-boundaries-it-holds", "unit": { "kind": "file", "path": ".githooks/pre-commit" } } - extends
{ "nature": "corrective", "spec": "099-a-merged-acceptance-is-asked-again", "unit": { "kind": "file", "path": "scripts/acceptance-scope.sh" } } - extends
{ "nature": "corrective", "spec": "105-governed-scope-is-enabled-here", "unit": { "kind": "file", "path": "CLAUDE.md" } }
Source headings
- 132: One exit contract for the family
- 1. Purpose
- 1.1 Two vocabularies
- 1.2 Measured before the change
- 2. Territory
- 3. Behavior
- 3.1 The contract
- 3.2 Where each case lands
- 3.3 `check` folds by the higher code (amends 062 §3.3)
- 3.4 The family envelope (amends 034 §3.1, §3.3, §3.6)
- 3.5 Verbs whose code changed
- 3.6 The verifier fixture set moves to 1.0.0 (amends 103 §3.5)
- 3.7 The harness reads the five codes (amends 093 §3.8 to §3.10)
- 3.8 The acceptance this contract changes is carried here
- 4. Out of scope
- 5. Resolved decisions
- Verification
Frozen anchors
No frozen anchors declared.