Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

specodelic

specodelic (spk) is a specification format and toolchain for AI agents: specs are plain markdown with YAML frontmatter (the Intent layer) and three fixed tables — Constraints, Model, Properties — under a closed schema. The linter never reads prose, so prose is free; everything the toolchain reasons about lives in the structured rows.

The repo dogfoods itself: every corpus file in openspec/specs/ is a spec written in the format it describes.

Hit jargon? The glossary defines every term a cold read needs, from EARS to the guarantee ladder.

Is this for you? The format presumes a spec-first workflow — the spec is the design artifact and the implementation is agent-authored, regenerable, machine-checked code. If humans hand-maintain the code and nothing consumes the structured rows, the layers are pure tax, not leverage. The full when-not-to-use statement (assumption, honest one-line test, and the cases where an ordinary design doc wins) is in USAGE.md.

New to the format? Read the worked example — one reservation/order spec built layer by layer, with every lint finding and counterexample the author hit on the way.

Before trusting a green checkmark, read verification boundaries — the guarantee ladder from lint-clean to matches-oracle, and what each rung does not assure.

Thinking about a design rather than code? Specs as the design substrate is the canvas for that — and which command when? routes any task to the right verb. Questions a cold read asks are answered in the FAQ.

The four layers

LayerCarriesChecked by
Intentid, kind, statement (one EARS sentence)linter.frontmatter
Constraintsinvariants and effects, [[wiki-linked]] traceslinter.schema_shape, graph
Modelstates + guarded transitions (a state machine)linter.model_shape
Propertiesderiving properties with generator + predicatelinter.coverage

The pipeline

spk walks a spec file through stages, each with its own command:

  1. spk lint — the gate: every rule, every file.
  2. spk compile — Constraints → TOML, Properties → proptest scaffolding, Model → TLA+ module (all three artifacts, byte-stable).
  3. spk model-check — the compiled model interpreted as a pc-automaton by the embedded stateright backend.
  4. spk verify — executes the emitted proptest scaffolding.

Plus tooling around the corpus: spk graph (reference graph with fan-in/out and dangling detection), spk rename / spk merge / spk refactor / spk orchestrate, spk doctor (workspace diagnosis), spk explain (the embedded format guide for agents), spk new (scaffold), spk init and spk feedback.

Domain packs extend the format without a format revision: a kind: profile manifest declares typed sections, fiber kinds, and reference fields for a domain (no config file — lint discovers packs by corpus scan). Seven packs ship in-repo — the six standard packs (data.lineage, numeric.predicates, empirical.registry, quant.finance, svc.contracts — still draft, and kernel.pack — the kernel namespace’s kernel.binding claim carrier) plus the bioimage D6 pilot (bioimage.data, the first cross-pack ## Requires); see the packs spec and the using packs guide.

For agents

No repo access needed: spk explain serves the distilled format guide from inside the binary — thirteen topics (format, ears, kinds, references, lifecycle, lint-rules, dual-format, packs, graph-views, conform, oracle-records, verdict-taxonomy, claim-executable), and every lint finding carries its own rule_id and one-line semantics. See llms.txt at the site root for a machine summary.

Ecosystem

specodelic is part of the charly-vibes tool ecosystem — the ecosystem map shows how spk relates to the sibling tools (wai, beads, openspec, genesis-vibes, and the checkers). For the two relationships that touch this repo daily — the OpenSpec dual-format protocol and the ah/espectacular correspondence companion — see tool relationships.

Install

cargo install specodelic

Then spk --version --json (reports the embedded format_revision), spk new my.first_spec, and spk lint my.first_spec.md.

Documentation provenance

Rendered docs are generated artifacts; the repository sources are authoritative — edit the repo sources, not the rendered output.

Release Status

Generated artifact (from Cargo.toml + git ref). Do not hand-edit — the repo source files remain authoritative.

  • Version: v0.15.0
  • Built from: main @ 9a8eb20

Status

experimental — early-stage; surface may be renamed or sunset. Version 0.15.0.

Implemented

CommandStatusNotes
spk (specodelic)betalints, compiles, verifies, refactors markdown specs (alias spk)
spec formatbetafrontmatter, Constraints, state Model, Properties tables
verification claimsbetaevery opted-in invariant claim (Rust, kernel, citation) must verify before a file verifies; prose-only invariants stay unchecked; claim reports are versioned and scope-bound — JSON, human, and persisted views name the same blockers; every verdict carries a trust base naming what was not checked, reported as information about the corpus that never blocks or grants verified

In progress

  • Self-hosting round — the openspec/specs/ corpus is specodelic’s own specification, written in the format it defines, so the tool lints and verifies its own documentation the way it would a user’s spec (the self-hosting-compiler analogy). The round keeps that corpus lint-clean as the format grows, making the tool’s own spec the first consumer of every new rule.
  • Docs conformance round — the project’s documentation is held to a conformance standard like the specs’ own: the mdBook site now builds from a single root book.toml, so one build renders the whole book — including the generated spec and openspec pages — and drift between the prose and the corpus it mirrors surfaces as a build or gate failure instead of rotting silently.

Mapped to specs

  • The format itself: every corpus file in openspec/specs/ is a spec in the format; openspec proposals for changes.

Verification is not application testing — the canonical statement of what specodelic’s verification does and does not assure lives in the repo README (not linked — the book’s deployed copy has no README page); this page keeps the capability table only and does not restate the assurance semantics.

Dogfooding

  • espectacular installs specodelic from git in its CI (unpinned — to reconcile in DDL-1a0)
  • specodelic’s own CI runs just ci and validates its specs

Installation & Quick Start

Install

# macOS (Homebrew)
brew tap charly-vibes/charly
brew install specodelic

# Linux / macOS (binary download — all five release targets, see checksums.txt)
# Grab the archive matching your platform from:
# https://github.com/charly-vibes/specodelic/releases/latest
#   specodelic_{VERSION}_linux_{amd64|arm64}.tar.gz · specodelic_{VERSION}_darwin_{amd64|arm64}.tar.gz
tar xz specodelic_*_linux_amd64.tar.gz && sudo mv specodelic spk /usr/local/bin/

# Windows (Scoop)
scoop bucket add charly https://github.com/charly-vibes/scoop-charly.git
scoop install specodelic

# Any platform (Cargo)
cargo install specodelic

(Rust stable toolchain; published on crates.io.) Installs two binaries: specodelic and its alias spk.

Quick start

All output below was captured verbatim from specodelic 0.15.0. On a TTY the tool prints human-readable text (shown here); when stdout is piped it emits a JSON envelope instead.

# Scaffold a spec — the template teaches its own tables
spk new order.cancel --file order.cancel.md
created order.cancel.md
→ Run: specodelic lint order.cancel.md

(--file picks the target path; without it the scaffold lands in the openspec tree at openspec/specs/<cap>/spec.md, which must already exist.)

# Lint it — findings carry their own rule id + semantics
spk lint order.cancel.md
lint: 1 file(s) linted, 0 finding(s), 4 advisory warning(s)
  advisory order.cancel.md [linter.scenario_binding_table_absent] file declares no `Scenario bindings` table (h3 under `## Requirements` or a trailing h2 — Revision 24 accepts both) — its scenarios are unbound prose; declare the table and bind each `#### Scenario:` heading to the model rows it exercises (advisory rollout hint — the scenario coverage gate, ticket specodelic-pxjn)
  advisory order.cancel.md [linter.placeholder_content] intent statement is a whole-cell placeholder: THE system SHALL …
  advisory order.cancel.md [linter.placeholder_content] constraint `c1` expr is a whole-cell placeholder: TODO — what must always hold
  advisory order.cancel.md [linter.placeholder_content] property `p1` predicate is a whole-cell placeholder: TODO — the property holds
→ Run: specodelic graph

What a finding looks like. A typical first edit — replacing the file-qualified wiki-link in the traces_to column with bare text — is a real mistake, and lint reports it:

spk lint order.cancel.md
lint: 1 file(s) linted, 1 finding(s), 4 advisory warning(s)
  order.cancel [linter.single_root_reachable] 4 row(s) unreachable from any intent row — an orphaned island (traces_to/derives_from/guard/from-to/emits): order.cancel.c1, order.cancel.initial, order.cancel.p1, order.cancel.t1
  advisory order.cancel.md [linter.scenario_binding_table_absent] file declares no `Scenario bindings` table (h3 under `## Requirements` or a trailing h2 — Revision 24 accepts both) — its scenarios are unbound prose; declare the table and bind each `#### Scenario:` heading to the model rows it exercises (advisory rollout hint — the scenario coverage gate, ticket specodelic-pxjn)
  advisory order.cancel.md [linter.placeholder_content] intent statement is a whole-cell placeholder: THE system SHALL …
  advisory order.cancel.md [linter.placeholder_content] constraint `c1` expr is a whole-cell placeholder: TODO — what must always hold
  advisory order.cancel.md [linter.placeholder_content] property `p1` predicate is a whole-cell placeholder: TODO — the property holds
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

That is linter.single_root_reachable hard-failing: every row must reach its file’s own intent row through own-file typed links, and bare text is not a wiki-link — so c1 loses its reachability path and drags the state, transition, and property hanging off it down as one orphaned island.

# Derive the reference graph (fan-in/out, dangling links)
spk graph order.cancel.md
graph: 1 file(s), 5 node(s), 5 edge(s), 0 dangling, 0 typing violation(s), 0 supersedes cycle(s), 0 external boundary(ies)
→ Run: specodelic lint
# Compile to artifacts: TOML + proptest scaffolding + TLA+ module
spk compile order.cancel.md --out-dir specodelic/
compile: 1 compiled, 0 failed
  order.cancel.md [order.cancel] → specodelic/order.cancel.toml, specodelic/order.cancel_props.rs, specodelic/order.cancel.tla
→ Run: specodelic verify (consumes the *_props.rs artifacts)
# Model-check the compiled module (embedded stateright backend)
spk model-check order.cancel.md
model-check: 1 checked, 0 failed
  order.cancel.md [order.cancel]: exploration_only (1 states explored) → specodelic/order.cancel.check.json
    claims: 0 evaluated, 1 unchecked, 0 blocking
      unchecked: c1
    trust base: 1 unverified claim(s), 1 assumed — prose_only_invariant: 1, prose_only_guard: 1
      prose_only_invariant: c1 (order.cancel)
      prose_only_guard: t1 (order.cancel)
→ Run: specodelic verify (consumes the *.check.json reports)

In an existing workspace

spk doctor        # diagnose the workspace (self-hosting vs consumer mode)
spk init          # write the SPECODELIC managed block into AGENTS.md
spk explain       # the embedded format guide — thirteen topics
                  # (format, ears, kinds, references, lifecycle, lint-rules,
                  # dual-format, packs, graph-views, conform, oracle-records,
                  # verdict-taxonomy, claim-executable), no repo access needed
spk feedback      # send feedback about the tool

Self-hosting

This repo’s own corpus (openspec/specs/ — the single tree, specodelic-jf1) is linted by the tool itself:

just lint-specs   # spk lint openspec/specs
just ci           # fmt-check + clippy + tests + release build + openspec gates

Command Reference

Exit codes (uniform across verbs): 0 = a clean run; 1 = the stage produced findings or a tool-level failure; 2 = invocation error — nothing was processed (path not found, no spec files matched, unreadable input). clap argument-parse failures also exit 2. The JSON envelope’s envelope_kind is "error" and ok is false whenever the run is not a clean run — findings and failures never ride a success-shaped envelope (openspec/specs/errors/spec.md envelope_error_kind + exit_code_mapping).

101 is a Rust panic — an internal invariant violation, not a corpus verdict: it prints a panic message to stderr and no envelope at all. Treat it as a bug in the tool and report it; the envelope contract above does not cover it. Corpus shapes that reach a panic are fixed as bugs, so a 101 from a released binary is always worth an issue.

All commands emit through the genesis envelope: JSON for pipes, human-readable for TTYs (--human / --format json to override). Failures carry a remediation hint. Hit jargon? The glossary defines every term a cold read needs.

spk lint <files|dirs>

Use when: you want the gate — before committing, in CI, or wired as the pre-commit hook (spk hooks install). It is the first stage every other verb assumes (spk explain lifecycle).

The gate. Runs every rule in the catalog over spec files (recursively; files without frontmatter are skipped with a warning). Each finding carries rule_id (linter.<name>) and rule_semantics.

Resolution scope. Reference resolution is corpus-wide (Revision 18), so when the files you name live inside a specs tree, lint resolves their references against that whole tree while reporting findings only for the files you named (specodelic-f4sx: spk lint openspec/specs/<cap>/spec.md is clean when the corpus resolves it, which is what per-capability gates such as ah sync need). files_linted still counts the request, and a warning names the resolution corpus. Outside a specs tree the linted set IS the resolution corpus — a cross-file reference then dangles, and the hint tells you to lint the containing tree.

When nothing was found and the repo carries an openspec/ tree (consumer repos keep their corpus under openspec/changes/*/specs/), the failure hint names it — spk lint openspec (gh#2.2).

Ingestion is hostile-input hardened (specodelic-suz): only regular files under a 2 MiB cap are ever read — a FIFO, device file, or oversized file named *.md is labeled, named, and skipped (never blocking or unbounded-memory); when nothing else was linted, the labeled notes ride the failure envelope. A parse error (malformed frontmatter) fails the stage (exit 1) even when the rest of the batch linted clean — a corrupted spec is never a silent pass (specodelic-in9: the pre-commit gate must not let it commit); the error names the offending file and the file was NOT linted.

Domain packs

A workspace extends the format with domain packs: kind: profile spec files whose six manifest tables (Sections, Kinds, References, Checkers, Floors, Requires) declare typed sections, fiber kinds, reference fields, checkers, and floors. Lint discovers packs by corpus scan (no config file), activates them when a file’s vocabulary matches, and reports:

  • linter.pack_shape findings — a malformed pack manifest is a labeled failure
  • pack-activation notes (warnings channel, exit 0) and orphan_vocabulary labeled failures — pack vocabulary used with no pack discovered or declared is never silent: a uses edge naming an absent pack, or a pack-qualified token in a kind/field position whose namespace has no discovered pack, names the candidate pack and both remediations
  • lifecycle/revision-skew advisories (draft packs activate advisory-first; a pack pinned to an older base format_revision is named)

The six in-repo standard packs live in packs/ (data.lineage, numeric.predicates, empirical.registry, quant.finance, svc.contracts — the last still draft, and kernel.pack — the kernel namespace’s kernel.binding claim carrier); a consuming file opts in by using the pack’s vocabulary, or explicitly via a uses reference to the pack’s frontmatter id.

A *.checklist.md file in the linted tree declares an external checklist (openspec/specs/linter-external_completeness/spec.md — mp1 row 10’s manifest format): a flat ## Items list plus a ## Mapping table (item/status/mapped_ids/rationale). The five linter.external_completeness rules then check every item is explicitly covered (mapped ids resolve to real constraint/property rows) or waived (with a stated rationale). This pass is optional and never gates a lifecycle stage — no checklist declared, nothing checked; spk compile’s precondition gate deliberately does not run it.

spk graph <files|dirs>

Use when: you need to see who references what — dangling references, fan-in/fan-out, typing violations, supersedes cycles — before making rename, merge, or refactor decisions (the advisors build on it).

Derives the reference graph from every typed reference field: nodes, edges (including a Transition’s from/to state edges), fan-in/fan-out per row, dangling references, typing violations (the Reference Typing table — forbidden edges are reported, never recorded), and supersedes cycles. The rename/merge/refactor advisors build on it.

Text projections (--format edges|dot|mermaid) — note this --format is the projection selector, not the global output-format flag: JSON output is the global --json (spk graph --format json is an invocation error, exit 2): edges writes the raw six-column TSV edge list (source_id, source_kind, field, target_id, target_kind, annotation — every recorded edge one row, every typing violation one annotation row); dot and mermaid write byte-stable Graphviz/Mermaid text projections (visual grammar: solid = state machine, dashed = guards, bold = emits, dotted = traceability, red dashed = dangling/violations). Rendering stays external — pipe into dot -Tsvg or paste into a mermaid renderer; there is no --render. The projections are the one documented exception to the envelope: raw text straight to stdout, so awk/jq pipelines consume it without an envelope parser. --view wiring (requires --format, composes with all three) selects the wiring view: constraints.satisfies edges project to file level (consumer file → the producer’s published contract), self-loops are dropped, and the remaining cross-file instances aggregate per distinct pair; a corpus with no remaining edges emits a labeled no_wiring element, never a silently clean diagram. Derived diagrams of this repo’s own corpus (wiring, states, trace, schema) live in graph views; spk explain graph-views carries the same taxonomy and one-pipe recipes for your own corpora. The DOT projection renders externally — including through gently, the family’s native Graph::Easy port (spk graph <corpus> --format dot | gently --as ascii); rendering stays a pipe, never a built-in flag.

Same discovery hint as lint: with an openspec/ tree present, the zero-files failure suggests spk graph openspec.

Exit codes (both modes): 0 clean, 1 findings (typing violations — the annotation rows still ride along in projections), 2 invocation error (no spec files on an existing path is clean-empty, but a nonexistent or unreadable path is an error — a typo’d path is not a clean empty corpus).

spk new <id>

Use when: you are starting a fresh spec and want the four-layer skeleton plus the per-layer guidance comments instead of a blank file.

Scaffolds a spec file from the template — per-layer HTML-comment guidance (valid kinds, what a guard may cite, law-case requirements), rendered from the same constants the linter enforces.

spk migrate <file> [--dry-run]

Use when: you have an existing openspec delta to wrap (plain form) or — with --rekey — a 0.6.0-era dual-format file still carrying id: spec that must be re-keyed to its real parent-dir-derived id for the 0.6.0 → 0.7.0 corpus migration (spk lint <tree> finds them).

Wraps an existing openspec delta file in place into the Revision 19 pair: the plain delta stays byte-untouched and the generated sibling layer.md sidecar carries the specodelic layer — frontmatter (the parent-directory-derived id with a .layer suffix plus an EARS scaffold statement) and wired scaffold layers (scaffold_* placeholder rows — constraint, one-state model, deriving property). Existing sidecar pieces pass through verbatim; only missing pieces are inserted. A file that already carries frontmatter is refused, never rewritten — re-running is safe. The scaffold lints clean as written; keep it green while you replace the placeholders. Files not named spec.md get a naming-law warning (openspec requires the delta filename spec.md). --dry-run prints the resulting content without writing. --rekey instead rewrites an id: spec dual-format file (0.6.0-era) to its Revision 18 real id — derived from the parent directory — re-keying every [[spec.*]] ref; a file already carrying its real id is an idempotent no-op, and a plain delta or undeducible id is refused without rewriting. This is the sanctioned 0.6.0 → 0.7.0 corpus migration path: spk lint <tree> finds the files, spk migrate <file> --rekey per file.

spk compile <files> --out-dir <dir>

Use when: a spec is lint-clean and you want its executable artifacts — the Constraints TOML, proptest scaffolding, and TLA+ module that model-check and verify consume.

Compiles a lint-clean spec into three artifacts: <stem>.toml (Constraints), <stem>_props.rs (proptest scaffolding), <stem>.tla (TLA+ module). Total or labeled failure — never a silent partial result.

Property and invariant fragments opt in per cell with a **lang:** marker whose tag is drawn from the closed set {rust, py, ts}; a tag outside the set (e.g. **go:**) is a labeled extraction failure naming the tag and the closed set, never silence. **rust:** is the only executable tag — a **py:** or **ts:** fragment gates compile with a labeled failure naming its emitter follow-up (add-py-fragment-emission / add-ts-fragment-emission), never a silent fall-through to Rust emission.

The tag shape is lowercase-initial ([a-z][a-z0-9_-]* before :**): ordinary bold prose (**Note:**) stays prose, but a lowercase bold label in fragment position (**note:**) is tag-shaped and therefore a labeled extraction failure naming the tag and the closed set — keep prose labels capitalized, or move them out of fragment position.

Two binding layers, never cross-wired:

  1. Artifact scaffolds (specodelic). compile emits the fragment verbatim into the artifact and records it in metadata comments and the .check.json/manifest staleness keys. Those comments are staleness records, not contracts (CORR-001’s correction).
  2. Contract bindings (espectacular). ah binds existing tests to deployed scenarios via contract-TOML entries ([[tests.cargo]], [[tests.pytest]], [[tests.shell]] flags). Binding is not compilation — the layers have different wall-clock, caching, and toolchain stories (design D3 of the language-neutral binding change).

The claim path between them is kernel.binding: an invariant-kind Constraint may carry a kernel.binding column, and compile extracts the cell as an opaque string into the Constraints TOML artifact — verbatim, never parsed, validated, or interpreted (design D4 of add-min-expr-kernel: no registry; the name is namespaced against pack binding columns). An external checker claims a constraint through contract-TOML flags — binding its own tests to the deployed scenarios — while specodelic never learns the checker’s language: the bridge carries the claim, it never absorbs the checker.

The boundary between the tools is tracing vs semantics: espectacular’s property-untraced finding is bookkeeping and may grow similar tracing findings, but ah must never grow semantic findings — a hypothetical property-uncompiled would enforce compile.md’s semantics from ah, crossing the sibling-tool boundary (read-only over openspec/, never enforcing against the specs/ corpus).

spk model-check <files>

Use when: you want bounded evidence that the compiled model’s required claims hold (spk explain lifecycle: model_check requires a complete Model section). Read the outcome honestly — claim_aggregate_governs (openspec/specs/model_check/spec.md) fixes the priority:

  • no_counterexample — clean: a nonempty required set all verified over a completed bounded exploration (the native backend earns it when the corpus carries executable claims; it is not TLC-only).
  • counterexample_found — a required claim was refuted; exit 1, the finding names the claim id.
  • timed_out — the depth/state/time bound expired before the exploration completed; exit 0, but not clean.
  • exploration_only — the exploration completed but required claims were unknown, unsupported, or missing — including a prose-only corpus whose required set is empty; exit 0, but not clean.

Only no_counterexample satisfies spk verify’s model gate.

Runs the compiled model through a model-check backend within a stated bound (--max-depth, --max-states, --timeout-secs). Two backends:

  • stateright (default) — embedded BFS exploration over the compiled model, executing the claims opted into evaluation: **rust:** predicate fragments compiled into the module run inside the exploration, and **kernel:** claims evaluate over the kernel grammar. Prose guards are never interpreted.
  • tlc (opt-in, --backend tlc --tlc-jar <tla2tools.jar>) — the TLA+ TLC reference engine as a JVM subprocess over the compiled module, -depth as the stated bound (--max-states has no TLC equivalent and is a labeled error). The JVM binary comes from PATH or SPK_TLC_JAVA; a missing binary or jar is a missing_checker error, never a verdict.

Claim gates (model_check.md’s required_claims_classified + claim_aggregate_governs): a run partitions each parsed file’s invariant-kind Constraints into a required set — those opted into evaluation (**rust:** fragment, **kernel:**, or citation) — and an explicitly unchecked set of prose-only invariants: prose wording, a constraint’s name, or a deriving Property never implies evaluation, and advisory/effect/extension-point rows are never required. The outcome is governed by the required claims’ statuses with fixed priority: any refuted required claim is counterexample_found naming it; absent refutation, an exhausted time/state/depth budget is timed_out; otherwise any unknown, unsupported, or missing required claim is exploration_only with reasons — and so is an empty required set (a prose-only corpus has nothing required, so a completed run stays exploration_only). Only a nonempty required set all verified over a completed bounded exploration reports no_counterexample — the native backend earns it when the corpus carries executable claims; it is not TLC-only. A refuted kernel claim (counterexample_found — CHANGELOG #116’s failing aggregate outcome) is findings: exit 1 with an error-kind envelope (ok:false), the payload intact.

Evidence: the run report persists as <stem>.check.json (claim_schema_version 1) with the consumed module’s SHA-256, the backend engine + version, canonical claim records (id, evaluator kind, status, reason where not verified), expected_claim_ids / unchecked_claim_ids, and a scope_sha256 digest of the parsed structured content and the consumed compiled artifacts. The digest binds structured content, not filesystem paths: reordering CLI inputs or editing prose alone preserves it, while two inputs differing in invariant content never share one. Verify (and orchestrate’s verify stage) recompute the digest and the required claim set from the current inputs and reject stale, foreign, or malformed reports with a rerun hint naming the model-check command — a stored report is never rewritten to manufacture evidence. A command’s parsed inputs must claim unique intent ids: two files with the same id fail duplicate_corpus_identity with a rename hint before compilation, evaluation, or report writes (Revision 18: dual-format files carry real ids and compose like any corpus — the former id: spec isolated-scope rule retired with id: spec itself). A **kernel:** constraint cell that breaks the closed grammar is a labeled kernel_grammar failure before any run — the same validation compile applies — so a stale compile can never silently demote a malformed kernel claim to unchecked and report clean. The honest non-failure outcomes keep exit 0 — timed_out (the bound expired) and exploration_only (a completed exploration over a corpus with no executable claims) are real terminal outcomes, not failures (model_check.md); spk verify’s model gate is what rejects them as not-clean.

spk verify <files>

Use when: you want the conjunction — executed proptest properties and a current clean model verdict (no_counterexample). Choose verify over re-running model-check when a current .check.json exists and you want the full gate without re-exploring the model — verify never re-compiles and never re-runs the model checker; choose model-check when you need fresh bounded exploration evidence itself. Neither is a substitute for the application’s own test suite (spk explain lifecycle).

Executes the emitted proptest scaffolding and rejects stale clean results via the .check.json hash.

Both gates must hold — verified is the conjunction, never a single green stage:

  • Properties gate — the *_props.rs artifact is staleness-checked against the current spec by block-metadata fingerprint (ids, cases, generators, predicates — hand-translated predicate bodies keep the fingerprint, spec edits change it), then really executed: the artifact is staged into a scratch cargo crate and run via cargo test, so an un-translated todo_predicate! fails honestly (properties_failed), never skipped. Failing blocks report proptest’s shrunk minimal input.
  • Model gate — the <stem>.check.json run report must be current (its artifact_sha256 matches the on-disk <stem>.tla; a missing module fails closed as stale), its scope_sha256 digest and required claim set must match the current inputs (verify recomputes them — stale, foreign, or malformed reports fail with a rerun hint, never rewritten), and its outcome must be no_counterexample — earned only when every required claim verified over a completed bounded exploration (exploration_only and timed_out are explicitly not clean).

--timeout-secs <N> (default 600; 0 = unbounded) bounds the whole cargo run on a wall-clock clock: a hanging (likely pathological) predicate is killed and reported as a labeled properties_timed_out block — never a silent hang, and never indistinguishable from a test failure (no block verdicts exist after a kill, so the bound is raised and the run repeated, not misread as a failing property).

.data.status is verified exactly under the conjunction, else the first blocking stage (missing_properties_artifact, stale_properties_artifact, properties_failed, properties_timed_out, properties_uncompilable, runner_unavailable, missing_model_run, stale_model_run, model_not_clean). Verify never re-compiles and never re-runs the model checker. A blocked verify is findings, never a success-shaped envelope: exit 1 with ok:false / envelope_kind:"error", the payload (and .data.status) intact.

Scope note: verify’s stored scope digest binds the run’s structured inputs (contributing files, claim records, artifact SHA-256), not result statuses — a hand-forged check.json with invented verified statuses does not yield a clean model gate: verify recomputes the scope and the required claim set from the current inputs, and any digest, record-shape, or artifact mismatch is rejected with a rerun hint (openspec/specs/verify/spec.md evidence_scope_bound; the persisted report is never rewritten).

The properties gate’s scratch crate lives under the system temp dir (specodelic-verify/), with a shared target/ dir so proptest compiles once per machine. A retention policy keeps it bounded: orphaned per-invocation crate dirs (from killed runs) are pruned after 24 hours, and if the shared target/ dir exceeds 4 GiB it is dropped whole — the next verify pays one cold proptest rebuild. Set SPECODELIC_VERIFY_SCRATCH to relocate the scratch base (e.g. off a size-capped tmpfs).

spk conform <file> --oracle scenarios.jsonl [--closed-world]

Use when: you have evidence from outside the spec — traces recorded from a legacy system, a curated case set, or a reference implementation — and you want each trace classified against what the spec declares and can actually execute. Every other verb evaluates the spec’s own claims; conform is the one verb that checks the spec against reality. It is strictly read-only (help text states it): it never advances the lifecycle, is never an orchestrate stage, and writes nothing.

Each JSONL trace record (one per line, carrying id, an optional setup state, and a trace of actions with observations) receives exactly one verdict from a closed set — never collapsed to pass/fail:

  • permitted — a declared, executable claim covers the trace and it agrees
  • forbidden — the trace violates a declared executable claim (in any invocation mode), or — only under --closed-world — nothing declared covers it
  • underspecified — no declared Model element or claim covers the trace (open-world default: a spec gap, never a prohibition)
  • unknown — a covering claim exists but is prose-only (prose is never silently checked)
  • unsupported — the covering claim’s evaluator kind is not executable in this run

The run report carries a conform-local report_schema_version, per-trace records sorted by scenario id (no timestamps — reruns over identical inputs are byte-identical), a scope_sha256 binding the parsed spec and the consumed corpus bytes, and a fixed evidence_scope field in both the JSON envelope and the --human view — “agreement on the supplied corpus; not a proof of behavioral equality”. That scope is data, not a disclaimer: a finite trace corpus agreeing with the spec never proves the spec describes the system.

Exit codes: 0 = no forbidden/unsupported verdict; 1 = any such verdict; 2 = invocation error or gate refusal (stale artifacts, lint-dirty file, malformed corpus) with zero verdict records emitted. unknown and underspecified surface as counts but never fail the run — they are spec-gap findings, not refutations.

spk check <file> [--oracle scenarios.jsonl] [--before report.json]

Use when: you want one verdict over the evidence the spec actually has, instead of reading verify, conform, and audit separately. check is the single judge verb: one invocation runs conform’s artifact gate, verify’s both-gates evaluation (the compiled proptest blocks through verify’s bounded runner, the model gate from the current <stem>.check.json), conform’s trace walk when --oracle is supplied, and audit’s classification, prior diff and ladder rung.

It compiles nothing, writes no artifact, and executes nothing but the spec’s own compiled properties — no contract suite, adapter registry, sidecar binding, or corpus demotion is involved. The only bound is the runner’s: --timeout-secs (default 600, 0 unbounded); a run killed at the bound is a labeled termination, never a verdict.

One vocabulary, no fourth entrant: every record carries a conform verdict (permitted, forbidden, underspecified, unknown, unsupported, agree) and an audit class (current, stale, unchecked, contradicted, binds_nothing, new). Verify-stage rows are keyed verify:prop:<block-id> and verify:model[:<claim-id>]:

  • a passed property block ⇒ permitted / current
  • a failed property block ⇒ forbidden / contradicted, reason carrying the runner’s shrunk input
  • a clean model run with every required claim verified ⇒ permitted / current
  • counterexample_found or a refuted required claim ⇒ forbidden / contradicted
  • an unknown claim, exploration_only, or model timed_out ⇒ unknown / unchecked (knowledge absence — countable, never a pass)
  • stale/missing/uncompilable properties artifacts, a missing or scope-mismatched model report, a killed runner, a corpus or digest refusal, or zero rows ⇒ no row at all (a refusal, never a verdict)

Exit codes:

CodeMeaning
0a judgement was emitted and no contradicted row exists (and no stale row under a declared expectation) — including all-unchecked/binds_nothing runs
1a judgement was emitted and a contradicted row exists, or a declared-expectation stale row does — the contradicted set is classified before the --before overlay, so a sustained contradiction still fails
2no judgement was emitted — gate refusal, unavailable/terminated evidence, digest/schema refusal, zero rows, invocation error; never a pass, never a contradiction

The report is an audit report — same schema version, row layer and scope_sha256 — so spk audit --before <check-report> and spk check --before <audit-report> both work. check writes nothing: redirect the JSON envelope to record a baseline. A fully green run reports ladder_rung: 4 (matches-oracle), the rung audit cannot reach without persisted verify evidence. Without --oracle the evidence-scope field states that only the spec’s own compiled evidence was consumed.

spk parse <file>

Use when: a downstream tool or script needs one file’s structured IR as JSON — syntax-only, it succeeds even where lint would fail (chain spk lint yourself).

Emits the parsed Spec IR for one file as a JSON envelope (specodelic-9rv): data carries the full structured layer — intent, constraints rows, states, transitions, properties rows (cells as keyed maps, not generated text), and structured links. Parse is syntax-only: it succeeds on files that fail spk lint and embeds no lint status — chain spk lint yourself (the envelope’s hint names it). Exactly one file per invocation (no globbing — consumers loop); unparseable or missing input is a labeled error envelope with a remediation hint and a non-zero exit.

spk doctor

Use when: onboarding a repo or after a format-revision bump — it classifies the workspace and warns (never fails) on corpus revision lag.

Classifies the workspace (self_hosting vs consumer), checks the local corpus’s Revision N against the binary’s embedded format_revision — warns, never fails, on lag. A corpus discovery check names where the specs live (specs/, an openspec/ tree with a file count, or the discovery rule).

spk explain [topic]

Use when: you are offline or want the canonical wording — the embedded format guide, no repository access required. Nine topics: format, ears, kinds, references, lifecycle, lint-rules, dual-format, packs, graph-views.

spk init, spk feedback

Use when: provisioning an agent-facing repo (init writes the SPECODELIC managed block) or filing an upstream issue (feedback).

spk init writes/refreshes the SPECODELIC managed block in the repo’s AGENTS.md (rule catalog + format revision). spk feedback opens a prefilled feedback channel for the tool.

spk hooks install, spk hooks uninstall

Use when: you want the dual-format lint gate (spk lint openspec) to run on every commit — marker-guarded and additive in the lefthook chain, never a commit trap.

spk hooks install wires the dual-format gate (spk lint openspec) into the repo’s pre-commit chain as a marker-guarded managed block in lefthook.yml — purely additive (beads’ core.hooksPath → lefthook chain keeps flowing), idempotent, indentation inferred from the stage’s own children. Install runs the gate once and reports the outcome (data.outcome, data.gate_dry_run); a failing gate is a warning with the failure summary and an escape hint (spk hooks uninstall), never a commit trap. Requires a lefthook config (never created from scratch) and an openspec/ tree; husky and prek repos get a labeled refusal with a manual-wiring hint. spk hooks uninstall strips only the managed block.

spk archive-companion <CHANGE_ID>

Use when: archiving an openspec change whose deltas carry the dual-format layer in sibling layer.md sidecars — the stock openspec archive regenerates deployed specs and strips the layer (spk explain dual-format has the wrap recipe).

spk archive-companion archives an openspec change while preserving its dual-format layer (specodelic-fzo, GH#7; reworked for Revision 19, add-delta-layer-sidecar): the companion invokes openspec archive with default spec application — plain deltas are openspec’s native merge — then re-attaches the layer to each regenerated deployed spec from the change’s archived layer.md sidecar. Fail-closed: a delta without a restorable sidecar is refused BEFORE the destructive archive, with the spk migrate wrap path as the hint, and the assembled deployed spec is shape-asserted (no delta headers, frontmatter + the three tables) before anything lands — the tool never deploys a stripped spec. Re-running on an already-archived change skips the openspec invocation and re-attaches to identical deployed bytes; a change with no spec deltas succeeds with an empty restored list; --dry-run resolves the plan without invoking openspec or writing anything. just archive-change delegates to this command.

spk rename <old_id> <new_id> [files|dirs]

Use when: an id changes and every referencing [[link]] (plus checklist mapped_ids and the filename itself) must follow — computed and verified in memory before any byte is written, so a failed rename leaves the repo byte-identical.

The atomic rename (openspec/specs/rename/spec.md): updates the defining row (an Intent frontmatter id or a table row’s qualified id) and every referencing [[link]] — including child refs like [[old_id.child]] — as one transaction. Declared checklists reach into the same law: every *.checklist.md’s mapped_ids cells are rewritten too (bare and [[…]] spellings alike), and the verify gate re-runs the external-completeness resolution over the post-rename corpus, so a missed cell is a labeled rejection, not a silent dangle. A file whose Intent id is renamed also gets its filename renamed per the - ⇔ . naming law. Everything is computed and verified in memory (re-parse + zero dangling) before any byte is written, so a failed rename leaves the repo byte-identical: collisions, unknown ids, and verify-gate rejections are labeled failures with remediation hints.

Merge check

Use when: two branch tips both touched spec ids and you want what a textually clean merge cannot see — id collisions, dangling renames, intersecting blast radii — checked before joining the trees.

spk merge --branch <incoming-tree> [--base <ancestor-tree>] [current-tree] checks what a textually clean 3-way merge cannot see (merge), over the two branch tips’ spec trees:

  • id collisions — an id minted on both branches (absent from the ancestor, or divergently edited on both) is flagged as a collision.
  • dangling renames — a rename on one branch plus a fresh reference to the old name on the other is flagged for replay (spk rename does the rewriting after the trees are joined).
  • blast radii — each branch’s touched ids get a fan-in/fan-out closure computed from that branch’s own graph artifact; intersecting radii require human review (needs_review) even when the file diffs don’t overlap.
  • relint gate — the union tree must re-lint clean with zero dangling references before the merge reports merged.

Exit 0 = merged, 1 = findings (verdict needs_review or failed), 2 = invalid invocation (missing --branch, empty incoming tree).

spk orchestrate <files|dirs> [--out-dir <dir>] [--backend tlc --tlc-jar <jar>]

Use when: you want the whole pipeline — parse → lint → compile → model_check → verify — in the fixed stage order with each gate enforced, halting at the first failing stage, in one invocation.

Drives the full pipeline — parse → lint → compile → model_check → verify — in the order orchestrate fixes, gating each stage transition exactly as specodelic specifies and halting at the first stage that fails:

  • Lint stage — the six Checker Ownership checkers run in dependency order: frontmatter first, then referential_integrity → graph_shape → model_shape (branch A), ears_syntax (branch B), schema_shape (branch C). A failed checker’s dependents are skipped (never invoked, never reported as failed) while independent branches still run and report. linter.external_completeness runs when a checklist is declared and never gates.
  • Compile stage — advances past the coverage checker’s verdict only (compile_gate_matches_coverage), never a looser or stricter check.
  • Model_check stage — passes only when every file’s outcome is no_counterexample; exploration_only and timed_out are honestly not clean, so a corpus whose required claims never all verify halts here — a prose-only corpus (empty required set) always reports exploration_only, while corpora with executable claims can pass on the native backend (use --backend tlc --tlc-jar for the TLC reference engine over TLA+ modules).
  • Verify stage — the conjunction of both gates (see spk verify).

.data.stages lists every stage with a status (passed / failed / skipped) and the failed stage’s exact findings; every skip carries its reason. Rename is never part of a run. Re-running against an unchanged repo is byte-identical.

Refactor advisor

Use when: you are planning a tidy-first split — advisory findings (high unrelated fan-in, changeset subset ownership) that never gate a run.

spk refactor [paths] [--high-fan-in N] [--changeset id1,id2] is the tidy-first split advisor (refactor): it flags nodes whose incoming cross-file dependents share no namespace segment below the root (nearest common ancestor = root — decision of record 2026-09-30), and — with --changeset — nodes whose owned rows the changeset touches only as a strict subset without depending on the rest. Every count comes from spk graph’s derived edges, never an independent markdown walk. The high-fan-in threshold is per-invocation configuration (threshold_is_per_repo_setting; default 3). Findings are advisory: exit 0 whether or not anything is flagged.

Which command when? — routing a task to the pipeline

The full reference is commands.md; this page answers the earlier question — I have X, what do I run? — including which verbs gate on which, and which findings are advisory.

The spine first

The pipeline verbs form a gated chain — each stage refuses to run on a file the earlier stages have not blessed:

parse → lint → compile → model-check → verify
              (gates on lint)  (consumes      (gates on
                               artifacts)     model-check)

spk compile only runs on a file that passed lint and coverage (openspec/specs/compile/spec.md, precondition_satisfied); spk verify never re-compiles — it consumes the artifacts a prior compile wrote to the same out-dir, so a stale compile is a rerun, never an acceptance; spk orchestrate applies the same stage discipline across a whole corpus run. spk conform stands outside this chain: it consumes and classifies, but never gates a lifecycle transition.

Routing table

What you have / wantRunNotes
A new specspk new <id>, then spk lintThe scaffold teaches its own tables — quick start
A design question, not codethe design canvas, running the loop in itSpecs first; implementation is a rendering
“Is this file format-valid?”spk lintThe gate; findings self-describe — spk explain lint-rules
The machine to challenge the designspk compile, then spk model-checkBounded exploration; a counterexample is often the design lesson
Executable checks / generated test casesspk compile, then spk verifyOnly opted-in invariant claims are checked; prose never is
Traces from an existing system, oracle, or curated casesspk conform <file> --oracle scenarios.jsonlOpen-world default; --closed-world makes an uncovered trace forbidden — conform
Diagrams of the corpusspk graphProjections and derived views — graph views
An id changedspk rename <old_id> <new_id>In-memory verified, atomic; rewrites links, filenames, checklists
Two branches both touched specsspk merge --branch <incoming>Collisions, dangling renames, blast radii — before joining trees
A file got too big / high fan-inspk refactorAdvisory only — it flags split candidates, never edits
The whole pipeline over many filesspk orchestrateOptional --backend tlc --tlc-jar — note TLC cannot execute Rust fragments
The workspace feels wrongspk doctorWorkspace diagnosis with remediation hints
An OpenSpec delta to bring into dual formatspk migrate <file> [--dry-run]Wraps the delta into the dual-format skeleton
The dual-format lint gate in pre-commitspk hooks installMarker-guarded managed block; never claims core.hooksPath
An OpenSpec change to archive, preserving the layerspk archive-companion <CHANGE_ID> [--dry-run]Fails closed on a delta lacking the dual-format layer
The format explained to an agent, no repo accessspk explain [topic], spk parse <file>, llms.txtNine explain topics — For agents

Two honest maturity notes

  • spk model-check is bounded, and honest about it: exhaustive runs report exploration_only, never a fabricated clean; a backend that cannot execute Rust fragments reports exploration_only, never a fabricated pass (model_check).
  • spk refactor advises — it never edits. Its findings are exit-0 regardless (refactor).

More boundaries: verification boundaries — what a green check actually buys you.

Glossary

The jargon this book (and the openspec/specs/ corpus) uses, defined for a cold read. Definitions are one to three sentences; where a deeper explanation exists, the entry links to it instead of restating.

The format and its files

  • spec / specodelic file — one markdown file: YAML frontmatter plus fixed tables under a closed schema. Every corpus file in openspec/specs/ is a spec written in the format it describes — see the core format.
  • frontmatter — the YAML block at the top of a spec file carrying the file-level identity: id, kind, and statement. Checked shape-first by linter.frontmatter.
  • Intent — the file-level layer: a real id, a kind, and one EARS statement saying what the spec promises.
  • four layers — the fixed structure of every spec: frontmatter (Intent), Constraints, Model, Properties. The linter never reads prose — everything the toolchain reasons about lives in these structured rows. See architecture.
  • EARS — Easy Approach to Requirements Syntax: five fixed sentence patterns (Ubiquitous, Event-Driven, State-Driven, Unwanted-Behavior, Optional-Feature) with an imperative SHALL. A spec’s statement must match exactly one pattern; conformance is shape-only grammar checking. spk explain ears has the pattern table.
  • kind — the type tag on a spec file (kind: intent, kind: profile) or a table row (invariant, effect, advisory, extension_point, deriving, …), drawn from closed sets: a value outside the set is a labeled finding, never silently accepted. See kinds.
  • Constraints — the table of the spec’s claims (invariants, effects, advisories, extension points), with [[wiki-linked]] traces. Compiles to TOML.
  • Model — the behavior table: states plus guarded transitions — a state machine. Compiles to a TLA+ module and is explored by spk model-check.
  • Properties — the table of deriving properties, each with a generator + predicate. Compiles to proptest scaffolding and is executed by spk verify.
  • corpus — the set of spec files a command operates on, usually a whole tree (openspec/specs/ here; consumer repos pass any dir). Lint discovers packs by scanning it; spk graph derives edges over it.
  • lifecycle — the ordered stage gates a spec moves through — parse → lint → compile → model_check → verify — each stage gated on the previous one’s clean run. spk explain lifecycle states the gates; spk orchestrate drives the whole run.
  • dogfooding — the repo eating its own dog food: every file in specs/ is a spec in the format specodelic defines, so the tool validates itself with every lint run (see self-hosting round, below).
  • naming law — a spec file’s frontmatter id equals its filename stem with - ⇔ .: linter-graph_shape.md ⇔ id: linter.graph_shape.
  • format_revision / Revision N — the format’s version stamp. Each corpus file states the current Revision N in its revision history, and the binary embeds format_revision (reported by spk --version --json); spk doctor warns when a corpus lags the binary, never fails.
  • wiki-linked reference — a [[id]] link in a table cell pointing at another row or file. Typed reference fields are checked by spk graph and linter.referential_integrity.
  • link kinds — the typed reference fields that connect rows: traces_to/derives_from trace provenance (derives_from is the coverage edge — a Property derives from its Constraint), emits/ observes are a typed effect protocol between files (an observation is not a dependency), satisfies consumes a published extension_point contract, supersedes replaces an older row. The authority is specodelic.md’s Reference Typing table.
  • pack (domain pack) — a kind: profile spec file whose manifest tables declare typed sections, fiber kinds, and reference fields for a domain. Discovered by corpus scan (no config file); a consuming file opts in explicitly via a uses reference to the pack’s id. See packs.
  • fiber kind — a kind declared by a pack. While the pack is active, the base closed kind set widens to base ∪ active-pack-fiber; the same token without an active pack fires a labeled finding.
  • external checklist — a *.checklist.md file declaring items that must each be explicitly covered (mapped to real constraint/property rows) or waived with a rationale; checked by linter.external_completeness, which never gates a lifecycle stage.
  • dual-format — one markdown file that parses as both a specodelic spec and an OpenSpec delta: the specodelic half (frontmatter + Constraints/Model/Properties) plus the openspec half (## ADDED Requirements mirrored verbatim in ## Requirements). One file, two parsers, requirement text authored once. spk explain dual-format carries the protocol and the migration recipe.

The toolchain and its output

  • spk — the CLI binary; the crate is named specodelic.
  • finding — one labeled rule violation a checker reports, carrying a rule_id (linter.<name>) and one-line semantics. Findings fail a stage (exit 1) and never ride a success-shaped envelope.
  • envelope — the output wrapper every command emits through: JSON (ok, envelope_kind, data) for pipes, human-readable for TTYs. Failures carry a remediation hint. See errors.
  • artifact — a compiled output on disk: <stem>.toml (Constraints), <stem>_props.rs (proptest scaffolding), <stem>.tla (TLA+ module), and <stem>.check.json (the model-check run report).
  • scaffold — placeholder rows or sections that a template or spk migrate inserts so a file lints clean immediately, to be replaced with real content while staying green.
  • staleness — compiled artifacts carry digests or fingerprints of the spec they were compiled from. spk verify recomputes them and rejects stale, foreign, or malformed reports with a rerun hint — a stored report is never rewritten to manufacture evidence.
  • scope_sha256 — the digest in the <stem>.check.json run report binding the run’s structured content and consumed compiled artifacts. Prose edits and input reordering preserve it; any invariant-content change breaks it — so a report can never be reused as evidence for different inputs. See model_check.

Verification and checking

  • lint-clean — the file passes the join of the gating linter checkers (exit 0 from spk lint). Rung 1 of the ladder; format-valid, not verified.
  • guarantee ladder — the five rungs of what a green checkmark actually assures, from lint-clean to matches-oracle (and the better-design rung a counterexample puts you on). A file’s honest status is the highest rung it has evidence for. See verification boundaries.
  • graded evidence — evidence the toolchain touches but never re-validates: recorded example corpora, pack-checker results, fragment/claim bindings, prior audit reports. spk audit computes the grading uniformly — see graded evidence.
  • audit classes — the closed evidence-lifecycle vocabulary spk audit assigns every evidence row: current, stale, unchecked, contradicted, binds_nothing, new. A record carries both the audit class and the underlying conform verdict — audit layers the class on top, never re-deriving the verdict.
  • binds_nothing — the audit class for a fragment or claim that cites no declared model element: green yet vacuous. A warnings-channel advisory — countable, never a pass, never exit-nonzero — and a legitimately sparse model with declared elements is never flagged.
  • evidence_scope — the fixed statement every conform and audit report carries in both output views: agreement on the supplied corpus; not a proof of behavioral equality. It is report data, so no reformatting can strip it.
  • coverage — every Constraint row must have at least one Property deriving from it (p.derives_from == c), checked by linter.coverage. Uncovered constraints are invisible to the rest of the pipeline.
  • proptest — Rust’s property-based-testing library: a generator produces many random inputs and a predicate asserts a property over each. The Properties table compiles to proptest scaffolding; spk verify executes it and reports the shrunk minimal failing input.
  • TLA+ — a formal specification language for concurrent and stateful systems. The Model table compiles to a TLA+ module (.tla).
  • stateright — the embedded Rust model-checking backend (the default): breadth-first exhaustive exploration of the compiled model within stated bounds (--max-depth, --max-states, --timeout-secs).
  • TLC — the TLA+ reference model checker, opt-in as a JVM subprocess (--backend tlc --tlc-jar <tla2tools.jar>); a missing binary or jar is a missing_checker error, never a verdict.
  • pc-automaton — how the compiled Model is interpreted for checking: a program-counter automaton whose state is an index into the Model’s states and whose actions are the transitions, explored by stateright with exactly the semantics the committed .tla emission commits to.
  • kernel — the opt-in **kernel:** marker placing an expression cell in a closed atomic grammar (equality, comparisons, bounded ∀/∃, reference atomics like resolves/unique/acyclic) that evaluates three-valued (verified / counterexample / unknown) during model checks. A cell outside the grammar is a labeled failure, never prose silently ignored. See compile.
  • kernel.binding — an opaque string (test node id, filter, or shell payload) on an invariant row, surfaced verbatim in compiled artifacts so external checkers (like ah) can bind their tests to spec claims; the toolchain never parses or interprets it.
  • claim partition — the split a model-check run makes of each file’s invariant-kind Constraints into a required set (those opted into evaluation: a Rust fragment, a kernel claim, or a citation) and an explicitly unchecked set (prose-only). The run’s outcome is governed by the required set only — prose wording never implies evaluation. See model_check.
  • model-check outcomes — the four terminal states of spk model-check: no_counterexample (every required claim verified over a completed bounded exploration), counterexample_found (a required claim was refuted), timed_out (the bound expired), and exploration_only (completed exploration over a corpus with no executable claims). The last two are honest non-failures — spk verify’s model gate is what rejects them as not clean.
  • counterexample — a concrete input sequence a model checker found that violates a claim. The ladder’s better-design rung treats it as the design lesson, not a tool failure; the worked example shows the precedent.
  • oracle — the executable ground truth a spec’s claims are measured against. Here that is the compiled property blocks and required invariant claims that spk verify executes; rung 4 of the ladder, matches-oracle, means exactly that they ran and passed. (The oracle corpus of conform/audit is a different sense: a JSONL file of recorded examples from an external system, classified against the spec — see conform.)
  • SUT — System Under Test: in classic property-based testing, the implementation the properties run against. In specodelic the checked “system” is the spec’s own compiled model and claims, so a verified verdict attests about the specification, never about a deployed implementation — see verification boundaries.
  • advisory — a Constraint kind that records intent without enforcing: advisory rows can never gate a transition (by typing, not convention) and are never required in a model-check run — but their findings are still labeled, never silent.
  • fan-in / fan-out — per-row counts of incoming and outgoing references in the derived graph. High fan-in flags a row too many others depend on — a spk refactor candidate.
  • dangling reference — a [[id]] link pointing at nothing that exists. Detected by spk graph and linter.referential_integrity; a post-merge corpus with zero dangling references is the relint gate.

Ecosystem and workflow

  • self-hosting round — the specs/ corpus is specodelic’s own specification, written in the format it defines, so the tool lints and verifies its own documentation the way it would a user’s spec. The round keeps that corpus lint-clean as the format grows, making the tool’s own spec the first consumer of every new rule. See status.
  • ah / espectacular — the companion CLI enforcing spec↔test correspondence via scenario-contract TOMLs; read-only over openspec/ — it never enforces against the specs/ corpus.

FAQ — the questions a cold read asks

These are the questions three independent cold reads of this project (two external AI models in 2026-10, plus a third whose export is still pending) actually asked while onboarding. Every answer either states an editorial judgment or links to the authoritative page — answers never restate machine-generated truth (spk explain topics, lint-rule semantics, corpus-derived views), because a hand-copied restatement becomes an unconsulted claim the first time the format revises.

For the design-oriented questions (“why do the layers impose these constraints at all?”), see specs as the design substrate. For “which command when?”, see the decision guide.

Basics

What is specodelic in one sentence?

A specification format and CLI toolchain for AI agents: specs are plain markdown with a closed four-layer schema — Intent, Constraints, Model, Properties — checked by a linter that never reads your prose. The introduction and the glossary expand every term in that sentence.

Is this a documentation format or a testing tool?

Neither, exactly — it is a format with a checking pipeline. The structured tables are linted, compiled, model-checked, and verified; the prose stays free for humans. What a green check attests — and what it does not — is the subject of verification boundaries.

Should I use this for my hand-maintained codebase?

Probably not. The format presumes spec-first, agent-authored, regenerable code — its value comes from something mechanical consuming the structured rows (compiled properties, the TLA+ model, the contract gate). Under hand-maintained code the coverage/anchoring discipline is pure tax: every third-party evaluation of the format reached this verdict independently. The positioning section of USAGE.md states the assumption, the honest one-line test (“will anything mechanical consume the structured rows?”), and the cases where an ordinary design doc wins.

Why can’t I write prose and have the linter check it?

Deliberately not. The linter never parses prose, so prose is free to argue, motivate, and explain. Anything the toolchain reasons about must live in a structured row — a prose-only invariant stays explicitly unchecked and is never counted as verified (verification boundaries, rung 4), and spk conform reports prose-covered traces as unknown rather than silently passing them (conform).

Why is the schema closed? Why can’t I add a fifth table?

A closed schema is what makes every other guarantee stateable: row kinds are closed sets, every [[wiki-link]] is typed, and format evolution is additive-only through numbered revisions — the theory behind this is in theory.md, the mechanism in specodelic.md. Domain-specific structure goes through domain packs, which extend the format without a format revision.

Checks and guarantees

What does a green check actually mean?

It depends on which rung of the guarantee ladder you are standing on: lint-clean, well-modeled, checked-within-bounds, matches-oracle, better-design. Each rung presupposes the ones below it, and each is honest about what it does not assure.

Is my spec “done”?

A file’s honest status is the highest rung it has evidence for, never a single undifferentiated PASS. Lint-clean means format-valid; verified means the compiled property blocks executed and every opted-in invariant claim checked — and still not application correctness. Walk the ladder in verification boundaries.

model-check returned a counterexample — is the tool broken?

Usually the opposite: a refuted claim names the violated invariant, and the counterexample is often the design lesson rather than a tool failure. The worked example records the precedent — the checker found a two-step trace to a state the author swore was unreachable, and the over-claiming row turned out to be the bug.

What can the checkers NOT find?

Known limitations are stated up front, each backed by a runnable command — for example, coverage cannot detect a missing constraint. See verification boundaries — known limitations.

Workflows

Which command should I run when?

The decision guide routes “what do I have, what do I want” to the right verb — including the honest maturity notes on advisory verbs like spk refactor.

I have an existing system or oracle but no specodelic implementation — how do I check specs against it?

spk conform is the one verb that brings evidence from outside the spec: it classifies traces recorded from a legacy system, a curated case set, or a reference implementation against what the spec declares. The verdict taxonomy (permitted / forbidden / underspecified / unknown / unsupported) and the open- vs closed-world choice are in conform.

How do I get large numbers of scenarios out of a spec?

Two complementary verbs: spk model-check explores the compiled model’s reachable state space within a bound (model_check), and spk verify executes the compiled property blocks whose generators produce concrete cases (verify). For scenarios coming from outside the spec, use conform instead.

Can one spec be implemented in different languages or paradigms?

The layers are implementation-neutral by construction — the pattern of “several interchangeable implementations of one contract” is documented in USAGE.md §2.3. One honesty note: **rust:** predicate fragments are compiled and executed natively by model-check/verify; **py:** and **ts:** fragments are illustrative and are not executable (known limitations).

Format mechanics

A lint finding says linter.<something> — what does it mean?

Every finding carries its own rule id and one-line semantics string. spk explain lint-rules prints the catalog from the same table the linter emits from, and each rule has a page under Lint Rules in this book — start at the linter overview.

How do I safely rename an id, or merge two diverged branches?

spk rename rewrites the defining row, every referencing [[link]], and checklist mapped_ids as one in-memory-verified transaction (rename); spk merge --branch checks id collisions, dangling renames, and intersecting blast radii before you join the trees (merge).

Where are the docs agents read without repo access?

spk explain serves the distilled format guide from inside the binary — thirteen topics (format, ears, kinds, references, lifecycle, lint-rules, dual-format, packs, graph-views, conform, oracle-records, verdict-taxonomy, claim-executable) — and llms.txt at the site root is the machine summary (For agents).

Ecosystem

How does specodelic relate to OpenSpec?

OpenSpec changes are the engineering-truth workflow; specodelic specs share the same grammar via the dual-format protocol, and ah/ espectacular enforces spec↔test correspondence read-only. The full division of ownership is in tool relationships.

Can I extend the format for my domain?

Through a domain pack: a kind: profile manifest declaring typed sections, fiber kinds, and reference fields — discovered by corpus scan, no config file. The using packs guide walks the whole loop. Seven packs ship in-repo — six standard packs (data.lineage, numeric.predicates, empirical.registry, quant.finance, svc.contracts — the last still draft, and kernel.pack — the kernel namespace’s kernel.binding claim carrier) plus the first cross-pack ## Requires pilot (bioimage.data).

Specs as the design substrate — a canvas for thinking about the system

The four layers are not documentation sections that later get implemented. They are the place where the system is designed: the contract you reason over while inventing, refining, and validating a design. An implementation — in Rust, Python, whatever paradigm — is a later, optional rendering of a model that already lives in the spec, and it is the rendering that must keep proving itself, never the other way around.

Provenance. This page is distilled from three independent cold-reads of the project by external AI models (2026-10, against v0.7.0); the questions their humans asked seeded the FAQ, and the answers were re-grounded against the current corpus before being written down here. Where this page and the format disagree, the format wins — spk explain format is the machine truth these paragraphs compress, and architecture holds for the lint pipeline’s pass structure.

The shift: the spec is the artifact

Most design docs describe a system that lives somewhere else — in a codebase, in someone’s head, in a slide deck. A specodelic corpus makes the design itself the load-bearing artifact:

  • It is lintable — the closed schema means every design decision is in a place the toolchain can see.
  • It is connected — the [[wiki-link]]s are typed foreign keys, so claims trace upward to the promise they serve and downward to the behavior that verifies them (architecture).
  • It is checkable — the pipeline can challenge the design, not just its spelling (the design loop).

Each layer is a question you must answer

The format’s constraints are not arbitrary gatekeeping — each layer forces one design question to have an explicit, wired answer. If you skip the question, lint tells you where.

Intent — what do we promise? One EARS-patterned sentence in the frontmatter. If a feature cannot be stated in one sentence, the feature is not understood yet; the EARS patterns (kinds and statement, EARS) force the promise to be about a system response with defined conditions, not a vague ambition.

Constraints — what must always hold, and what may be observed? Invariants and effects, each a table row tracing to the Intent it serves. This is where you discover whether your invariants are actually invariant, and which observable outcomes are contractual rather than incidental (specodelic.md).

Model — what can happen? A state machine: states, guarded transitions. The guards must cite the Constraints — the checker demands the wiring — so “the model says so” always decomposes into “these named claims say so”. Writing the Model is where you find out that your constraints were silent about the failure paths (linter.model_shape).

Properties — what would convince us? Every constraint needs a deriving property with a generator and a predicate (coverage, linter.coverage). A claim with no way to challenge it is a wish, not a design decision.

The design loop

spk new → spk lint → spk compile → spk model-check → spk verify is usually presented as a CI pipeline. It works equally well as a thinking loop, run while designing:

  1. Draft the layers — the scaffold from spk new teaches its own tables (quick start).
  2. Lint early and often; every finding is self-describing, so each failed pass is one concrete design question (“this transition has no guard — what claim says when it may fire?”).
  3. Compile and model-check to let the machine explore what you wrote; a counterexample_found verdict is the highest-value design moment, not a failure — see the better-design rung and the worked example, where the checker caught the author over-claiming a rejection state.
  4. Verify what can execute; record what cannot, honestly (verification boundaries).

The loop converges on a corpus where every claim is wired, guarded, and either checked or explicitly unchecked — a design that can be handed to an implementer, human or agent, with an honest account of what has and has not been challenged.

Where the canvas ends

The format can force accountable design, not good design. A wrong but internally coherent model lints clean (that is rung 2 of the guarantee ladder, not a defect); the checkers can only challenge what you wrote, and a missing constraint is the blind spot they cannot see past (known limitations). The honest status of any corpus is the highest rung it has evidence for — this page is the canvas, the ladder is the audit.

Design conversations — the specodelic-design skill

The one-line summary: run design conversations that end in a lint-clean Specodelic spec (a four-layer markdown format — Intent, Constraints, Model, Properties).

The specodelic-design skill is a guided conversation procedure — Listen → Intent → Constraints → Model → Properties → Assemble — that ends in a spec the toolchain accepts. It ships inside the spk binary as a managed skill pack: the protocol prose, a format reference rendered from the same tables spk explain serves, and the book’s worked example embedded verbatim.

The procedure’s single authoring surface is the tracked source skill-packs/specodelic-design/SKILL.md (a repo path — outside the deployed book, so it is not a link here) — this page deliberately does not duplicate it. The worked example is reservation-order, the same file the binary embeds, so the skill and the book can never disagree.

Install it into your agent’s skill directory:

$ spk skill install            # default: ~/.claude/skills
$ spk skill install --dir ~/.config/agents/skills   # any target

Every installed file carries a managed marker; spk doctor reports a stale install (older binary) with the regenerate command, and a missing one only as an optional hint.

For the thinking behind the four layers the conversation builds, see the design canvas; for the questions a cold read asks, see the FAQ.

specodelic — the core format


id: specodelic kind: intent statement: “THE specodelic SHALL represent a feature’s intent, constraints, state model, and properties as one parseable markdown file conforming to a fixed schema.”

Specodelic

A feature’s specification is a markdown file with YAML frontmatter, a fixed set of tables, and wiki-link references between them. This file describes that format’s own constraints, lifecycle, and properties — it is a spec written in the format, about the tool that checks it (see USAGE.md §0 for the project/format/tool/subject terminology).

Purpose

A feature’s specification is a markdown file with YAML frontmatter, a fixed set of tables, and wiki-link references between them. This file describes that format’s own constraints, lifecycle, and properties — it is a spec written in the format, about the tool that checks it (see USAGE.md §0 for the project/format/tool/subject terminology).

Constraints

idkindexprtraces_to
frontmatter_validinvariantfrontmatter has id, kind, statement; kind ∈ {intent, profile} — profile marks a domain pack (see [[packs]], Revision 14)[[specodelic]]
unique_idinvariant∀ row ∈ file: unique(row.id)[[specodelic]]
total_refsinvariant**kernel:** resolves(traces_to) ∧ resolves(derives_from) ∧ resolves(guard) ∧ resolves(supersedes) ∧ resolves(emits) ∧ resolves(satisfies) ∧ resolves(observes) ∧ resolves(uses) ∧ resolves(from) ∧ resolves(to) — no dangling [[...]][[specodelic]]
acyclic_tracesinvariantthe traces_to/derives_from graph is a DAG[[specodelic]]
guard_requiredinvariant∀ transition: guard != null[[specodelic]]
ears_statementinvariantintent.statement matches one of the 5 EARS patterns[[specodelic]]
one_capability_per_rowinvariantno row.id joins two intents via "and"/"or"[[specodelic]]
coverageinvariant**kernel:** ∀ c ∈ Constraint: ∃ p ∈ Property: p.derives_from == c[[specodelic]]
law_requires_casesinvariant∀ property where kind == "law": the property's predicate enumerates its required cases in machine-findable **name:** case-label form, and the label set includes identity and associativity — a floor, not a ceiling: a given law may require further named cases (e.g. unit, counit, naturality, triangle identity) in addition, as extra case labels in the same form; a prose mention of a case name is not an enumeration; Revision 21 adds the per-case body form beside the labels — a case may carry its own executable body under its case key (**name::**) followed by the fragment marker in fragment position, and the labels stay the enumeration of record: a body never adds a case, never renames one, and never replaces the label (specodelic.md Revision 21)[[specodelic]]
no_boolean_columnsinvariantschema defines no bool column type; states are named variants only[[specodelic]]
append_only_variantsinvariant∀ id-set S governed by 𝒦 — a variant-table's ids (chiefly States), a Constraint/Property row's own kind value-set, or the Reference Typing table's field set — across revisions r < r': S(r) ⊆ S(r'), grown only under a new Revision heading, never silently; an existing member's typing may narrow only in the same Revision that introduces the kind-split it depends on, and only if the narrowing invalidates nothing valid at r[[specodelic]]
prose_untouchedinvariantparser never inspects rationale/description content[[specodelic]]
model_presentinvariant[[model.state]] and [[model.transition]] sections both exist[[specodelic]]
no_counterexampleinvariantthe selected model-check backend (see [[model_check]]) finds no violated invariant[[specodelic]]
properties_passinvariantall compiled proptest! blocks pass[[specodelic]]
id_matches_fileinvariantfrontmatter.id == expected_id_from_path(path) — a file named spec.md derives its id from its PARENT DIRECTORY name; a file named layer.md derives the parent-directory id plus a .layer suffix (Revision 19); any other file from its own stem; - maps only to the namespace dot, _ is preserved literally within a segment; a bare spec.md with no parent directory falls back to the stem. E.g. linter-graph_shape.md declares id: linter.graph_shape; openspec/specs/ge-cli/spec.md declares id: ge.cli (Revision 18); openspec/changes/<id>/specs/cap-a/layer.md declares id: cap.a.layer (Revision 19)[[specodelic]]
ref_kind_compatibleinvariant∀ ref: target.kind ∈ allowed_targets(field) — see Reference Typing below[[specodelic]]
single_root_reachableinvariant∀ constraint/property/state/transition row in file: the row reaches the file's own intent row through own-file primary linkage (traces_to/derives_from chains resolved within the file) — cross-file typed edges (guard citations of foreign constraints, satisfies, observes) are outbound leaves, never reachability paths[[specodelic]]
every_state_usedinvariant∀ state: state appears as from or to in ≥ 1 transition[[specodelic]]
every_transition_validinvariant**kernel:** ∀ t ∈ Transition: ¬(t.from == ⊥) ∧ ¬(t.to == ⊥)[[specodelic]]
constraint_kind_closedinvariant∀ Constraint row: row.kind ∈ {invariant, advisory, effect, extension_point} — see [[kinds.constraint_row_shape]][[specodelic]]
property_kind_closedinvariant∀ Property row: row.kind ∈ {unit, law} — see [[kinds.property_row_shape]][[specodelic]]
supersedes_acyclicinvariant**kernel:** acyclic(supersedes) — the supersedes graph alone (Constraint→Constraint, Property→Property) contains no cycle[[specodelic]]

The four rows carrying the **kernel:** marker are this file’s executable slice — the min-expr kernel’s closed atomic grammar (add-min-expr-kernel), each backed by its own coverage property row. The remaining data-dependent cells stay informal by recorded decision, not by omission, and no new advisory class was invented to force them in: unique_id (an id is not a schema morphism — uniqueness has no acset-backed atomic), guard_required (¬(t.guard == ⊥) would conflate prose-guard presence with absence), every_state_used (needs ∨, outside the closed grammar), acyclic_traces (the union-graph DAG is not expressible in the closed grammar — per-morphism acyclicity is a strict weakening), and the kind-set/typing cells (outside the closed grammar). A cell migrates only when a Revision widens the closed grammar to carry it — a migration that would need a new advisory class is a migration bug, not a corpus fact.

Reference Typing

Which kind a reference field may point at — every reference field here is a typed foreign key. ref_kind_compatible is this table read as a constraint.

FieldAppears onMust resolve to
traces_toConstraintIntent
derives_fromPropertyConstraint, or the same Property when the deriving row is itself a law — a law derives from the top-level constraint or law it restates (e.g. the checker-file *_naturality laws deriving from specodelic.rename_naturality); the graph acyclicity invariant (acyclic_traces, which already includes derives_from) is what keeps this same-kind self-reference edge well-formed
guardTransitionan invariant Constraint — or a State, the “has reached state X” pattern (Revision 12) — an advisory Constraint can never gate a transition, by typing, not by convention. A guard may be prose; when its gating condition corresponds to a declared constraint, the guard must cite it — a prose-only guard is machine-uninterpreted (the model-check backend reports invariants_checked: [] — exploration-only, honestly, never counted as verified); when the guard’s cited invariant Constraint carries a **rust:** fragment (Revision 15 — the marker lives on the Constraint’s expr cell, never on the guard itself, which fragment_guard_rejected refuses), model_check’s executable backend runs it natively and no_counterexample can be honestly earned
from / toTransitionState
supersedesConstraint, Propertysame kind as the row it appears on (Constraint→Constraint, Property→Property)
emitsStateConstraint, kind == effect only — a state’s declared Moore-machine output; optional and absent on a state with no output of its own
satisfiesConstraint, any fileConstraint, kind == extension_point only — one-directional, outbound from a consumer’s file to a contract published elsewhere, possibly in a file the consumer’s author never edits or fully reads. The row carrying satisfies still has its own ordinary traces_to pointing at its own file’s Intent, so single_root_reachable needs no carve-out: satisfies is an extra outbound pointer, exactly like guard or emits, not a second reachability edge
observesConstraint, any fileConstraint, kind == effect only — a declared observable: an outbound pointer from the row that consumes/monitors the output to the effect row that publishes it, possibly cross-file. The row carrying observes still has its own ordinary traces_to pointing at its own file’s Intent, so single_root_reachable needs no carve-out: observes is an extra outbound pointer, exactly like guard, emits, or satisfies — not a second reachability edge, and it joins no acyclic edge set (an observation claim is not a dependency; mutual cross-file observation is well-formed). Checking “every effect is observed” is linter-observability.md’s contract — advisory, never gating in this Revision
usesConstraint, any fileIntent of a kind: profile file (the pack’s frontmatter id) — set-valued (multiple [[...]] targets in one cell, like traces_to); declares a file’s explicit pack enablement, upgradeable from vocabulary-triggered activation ([[packs]]). An outbound leaf joining no reachability path and no acyclic edge set — nothing targets it, single_root_reachable needs no carve-out, and mutual pack use (two files each uses-ing the other’s pack) is well-formed (Revision 14)
givenscenario_bindingState — the state the scenario starts from (“in state X”); optional, absent when the scenario has no declared start state (Revision 23)
onscenario_bindingTransition — the transition(s) the scenario exercises; optional and set-valued (multiple [[...]] targets in one cell) (Revision 23)
assertsscenario_bindingState — the resulting state(s) the scenario claims; optional (Revision 23)
verifiesscenario_bindingConstraint — the constraint(s) the scenario claims to check; optional and set-valued (Revision 23)

Outbound-leaf carve-out (Revision 22). A typed reference whose target resolves to another file is an outbound leaf: it is never an own-file reachability path. single_root_reachable builds a file’s primary linkage from its own traces_to/derives_from chains plus the file’s own from/to/guard/emits links; a cross-file target is dropped from that graph (Revision 23 adds the scenario bindings’ four own-file typing columns to the same treatment). The fields this applies to are cross-file guard citations and the leaf fields satisfies, observes, uses, and pack reference fields that resolve to a declared row of the declaring file (opaque carriers such as kernel.binding are not references). The acyclic edge set is separate: constraint traces_to ∪ property derives_from ∪ guard-as-edge; a guard edge stays in that set even when its target is another file, while satisfies, observes, uses, and pack reference fields never join it. total_refs still requires every target to resolve; a dangling outbound leaf is a labeled finding. The Revision 23 binding fields (given, on, asserts, verifies) are the strictest leaves of all: they are scoped to the binding row’s OWN file (a foreign frame has no lifeline — scenario_binding_refs_own_file fires on a cross-file target), join no reachability path and no acyclic edge set, and the binding row itself is a claim ABOUT the file’s machine, not a node of it — single_root_reachable’s scope stays the four classic row kinds. This paragraph is the single normative statement of the rule: other spec files point here instead of restating it.

Model

States

  • draft
  • parsed
  • linted
  • compiled
  • model_checked
  • verified

Transitions

idfromtoguard
parsedraftparsed[[specodelic.frontmatter_valid]] ∧ [[specodelic.id_matches_file]]
lintparsedlinted∀ checker ∈ checker_ownership: checker.state == passed — see Checker Ownership below
compilelintedcompiled[[specodelic.coverage]] ∧ [[specodelic.law_requires_cases]]
model_checkcompiledmodel_checked[[specodelic.model_present]]
verifymodel_checkedverified[[specodelic.no_counterexample]] ∧ [[specodelic.properties_pass]]

Checker Ownership

linted is not one flat conjunction — it is the join point of nine independently-specified checker files (Revision 23 added linter-scenario_bindings.md), each its own instance of this same format (a spec-of-a-linter-check, verifying a spec). This table replaces the constraint-by-constraint guard with a reference to where each constraint is actually enforced, and the partial order those checkers run in.

Checker fileOwns constraintsDepends on
linter-frontmatter.mdfrontmatter_valid, id_matches_file— (first gate)
linter-referential_integrity.mdunique_id, total_refs, ref_kind_compatiblelinter-frontmatter.md
linter-graph_shape.mdacyclic_traces, single_root_reachable, supersedes_acycliclinter-referential_integrity.md
linter-model_shape.mdguard_required, model_present, every_state_used, every_transition_valid, no_boolean_columnslinter-graph_shape.md
linter-failure_shape.mdterminal_states_emit, error_labels_unique, guard_negation_totallinter-model_shape.md (the failure-shape walk reads the Model’s states, transitions and emits edges — the model must be proven well-formed first)
linter-ears_syntax.mdears_statement, one_capability_per_rowlinter-frontmatter.md (parallel to the above branch)
linter-schema_shape.mdappend_only_variants, prose_untouched, constraint_kind_closed, property_kind_closed, kinds.constraint_row_shape, kinds.state_row_shape, kinds.transition_row_shape, kinds.property_row_shapelinter-frontmatter.md (parallel to the referential/graph/model branch)
linter-coverage.mdcoverage, law_requires_caseslinter-graph_shape.md, linter-model_shape.md
linter-scenario_bindings.mdscenario_binding_targets_declared_scenario, scenario_binding_refs_own_file, scenario_binding_status_closed, kinds.scenario_binding_row_shapelinter-frontmatter.md, linter-referential_integrity.md (resolution composition — engine-side the rules ride the referential stage)

Three further checker files exist but sit outside this table on purpose (they are instances of the same format, just never gating): linter-observability.md — advisory findings on the warnings channel, exit 0 by its own advisory_severity invariant — linter-content_advisories.md — whole-cell placeholder and tautology warnings, exit 0 by the same advisory contract — and linter-external_completeness.md — runs only when a repo declares an external checklist, and its outcome never gates per orchestrate.md’s external_completeness_never_gating. Their absence from the table is a membership statement: linted is the join over the nine rows above only.

linted is an all-must-pass dependency gate over this diagram: lint fires only when every terminal node reports passed, not when constraints are checked in some fixed sequence; the two branches after linter-frontmatter.md (referential→graph→model, and ears-syntax / schema-shape) run independently of each other.

Properties

idkindderives_fromgeneratorpredicate
referential_integrityunit[[specodelic.total_refs]]specodelic_spec_file()**rust:** { let base = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let broken_text = specodelic::fixtures::specs::materialize("spec_file_with_dangling_reference").expect("the dangling fixture materializes"); let broken = specodelic::spec::parse_str(&broken_text).expect("the dangling fixture parses"); !specodelic::fixtures::specs::rule_fired(&base, "linter.total_refs") && specodelic::fixtures::specs::rule_fired(&broken, "linter.total_refs") } — ∀ ref ∈ file: lookup(ref) ≠ None
acyclicityunit[[specodelic.acyclic_traces]]specodelic_spec_repo()**rust:** { let repo = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let cyclic_text = specodelic::fixtures::specs::materialize("spec_repo_with_traces_cycle").expect("the cycle fixture materializes"); let cyclic = specodelic::spec::parse_str(&cyclic_text).expect("the cycle fixture parses"); !specodelic::fixtures::specs::rule_fired(&repo, "linter.acyclic") && specodelic::fixtures::specs::rule_fired(&cyclic, "linter.acyclic") } — is_dag(traces_to_graph(repo))
rename_naturalitylaw[[specodelic.unique_id]]specodelic_spec_repo(), specodelic_rename_id()identity: rename(I, a, a) == I associativity: rename(rename(I,a,b), b,c) == rename(I,a,c) naturality: compile(rename(I)) == rename(compile(I)) identity:: **rust:** { let files = vec![(std::path::PathBuf::from("fx.md"), v0.as_str().to_string())]; let outcome = specodelic::rename::run(&files, &v1, &v1).expect("the identity rename succeeds"); outcome.writes.is_empty() } associativity:: **rust:** { let files = vec![(std::path::PathBuf::from("fx.md"), v0.as_str().to_string())]; let first = specodelic::rename::run(&files, &v1, "fx.p_mid").expect("the first rename succeeds"); let mid_files = vec![(std::path::PathBuf::from("fx.md"), first.writes[0].1.clone())]; let second = specodelic::rename::run(&mid_files, "fx.p_mid", "fx.p_final").expect("the second rename succeeds"); let direct = specodelic::rename::run(&files, &v1, "fx.p_final").expect("the direct rename succeeds"); second.writes[0].1 == direct.writes[0].1 } naturality:: **rust:** { let files = vec![(std::path::PathBuf::from("fx.md"), v0.as_str().to_string())]; let original = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let renamed = specodelic::rename::run(&files, &v1, "fx.p_renamed").expect("the rename succeeds"); let renamed_spec = specodelic::spec::parse_str(&renamed.writes[0].1).expect("the renamed fixture parses"); let before = specodelic::compile::compile_spec(&original).expect("the original compiles"); let after = specodelic::compile::compile_spec(&renamed_spec).expect("the renamed spec compiles"); after.toml == before.toml.replace("p_rename_me", "p_renamed") && after.props == before.props.replace("p_rename_me", "p_renamed") && after.tla == before.tla.replace("p_rename_me", "p_renamed") }
filename_conventionunit[[specodelic.id_matches_file]](id, mismatched_filename) pairs**rust:** { let text = specodelic::fixtures::specs::materialize("specodelic_spec_file").expect("the fixture materializes"); let mut spec = specodelic::spec::parse_str(&text).expect("the fixture parses"); spec.path = Some(std::path::PathBuf::from("other-name.md")); specodelic::fixtures::specs::rule_fired(&spec, "linter.id_matches_file") } — check(id, filename) == failed
typing_enforcedunit[[specodelic.ref_kind_compatible]]specodelic_property_row_guard()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.ref_kind_compatible") } — check(file) == failed
own_intent_reachableunit[[specodelic.single_root_reachable]]spec_repo_with_disconnected_constraint_cluster()**rust:** { let clean = specodelic::spec::parse_str(&specodelic::fixtures::specs::materialize("specodelic_spec_repo").expect("the fixture materializes")).expect("the fixture parses"); let repo = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); !specodelic::fixtures::specs::rule_fired(&clean, "linter.single_root_reachable") && specodelic::fixtures::specs::rule_fired(&repo, "linter.single_root_reachable") } — check(repo) == failed
model_well_formedunit[[specodelic.every_transition_valid]]spec_file_with_transition_target_not_in_states()**rust:** { let clean = specodelic::spec::parse_str(&specodelic::fixtures::specs::materialize("specodelic_spec_file").expect("the fixture materializes")).expect("the fixture parses"); let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); !specodelic::fixtures::specs::rule_fired(&clean, "linter.every_transition_valid") && specodelic::fixtures::specs::rule_fired(&spec, "linter.every_transition_valid") } — check(file) == failed
advisory_cannot_gateunit[[specodelic.ref_kind_compatible]]guard_field_pointing_at_an_advisory_constraint()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.ref_kind_compatible") } — check(file) == failed
state_guard_citation_acceptedunit[[specodelic.ref_kind_compatible]]transition_guard_citing_a_declared_state()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::lint_clean(&spec) } — check(file) == passed — the “has reached state X” guard pattern (Revision 12); a State target gates nothing, it records progress — but it is a legal typed citation
supersedes_cross_kind_rejectedunit[[specodelic.ref_kind_compatible]]constraint_row_with_supersedes_property_row()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.ref_kind_compatible") } — check(file) == failed
constraint_derives_from_rejectedunit[[specodelic.ref_kind_compatible]]constraint_row_with_derives_from_column()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.ref_kind_compatible") } — check(file) == failed — the Appears-on column is normative, not descriptive: derives_from appears on Property rows only (decided of record 2026-10-01, specodelic-huf; a constraint is derived FROM by properties, it does not derive), and ref_kind_compatible reads the column source-side the same way it already reads supersedes’ same-kind rule
supersedes_cycle_rejectedunit[[specodelic.supersedes_acyclic]]spec_repo_with_supersedes_cycle()**rust:** { let repo = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let instance = specodelic::acset::instance::Instance::from_specs(std::slice::from_ref(&repo)); let cyclic = specodelic::acset::query::cyclic_nodes(&instance, &["supersedes"]).expect("the supersedes query runs"); !cyclic.is_empty() } — check(repo) == failed
no_stored_superseded_flagunit[[specodelic.no_boolean_columns]]schema_with_is_superseded_column()`rust: { let schema = specodelic::acset::schema::canonical(); let stored = schema.morphisms.iter().any(
emits_cannot_target_non_effectunit[[specodelic.ref_kind_compatible]]emits_field_pointing_at_an_invariant_constraint()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.ref_kind_compatible") } — check(file) == failed — same shape as advisory_cannot_gate, mirrored onto the other direction of the kind-split
satisfies_wrong_kind_rejectedunit[[specodelic.ref_kind_compatible]]satisfies_field_pointing_at_an_invariant_constraint()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.ref_kind_compatible") } — check(file) == failed — same shape as advisory_cannot_gate and emits_cannot_target_non_effect, mirrored onto the third kind-typed reference field
extension_point_needs_no_reachability_carveoutunit[[specodelic.single_root_reachable]]constraint_row_satisfying_a_foreign_extension_point()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let host_text = specodelic::fixtures::specs::materialize("foreign_file_declaring_an_extension_point").expect("the fixture materializes"); let host = specodelic::spec::parse_str(&host_text).expect("the fixture parses"); let corpus = vec![spec, host]; !specodelic::fixtures::specs::rule_fired_in(&corpus, "linter.single_root_reachable") } — check(row) == passed — satisfies adds no reachability obligation; the row is reachable the ordinary way, through its own traces_to
frontmatter_missing_field_rejectedunit[[specodelic.frontmatter_valid]]frontmatter_missing_statement()**rust:** { let mut missing = false; if let Err(err) = specodelic::spec::parse_str(&v0) { missing = format!("{err:?}").contains("statement"); } missing } — check(file) == failed
guardless_transition_rejectedunit[[specodelic.guard_required]]transition_row_with_empty_guard()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.guard_required") } — check(file) == failed
non_ears_statement_rejectedunit[[specodelic.ears_statement]]statement_outside_the_five_ears_patterns()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.ears_syntax") } — check(file) == failed
multi_intent_join_rejectedunit[[specodelic.one_capability_per_row]]row_id_joined_to_two_intents_via_and()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.no_conjoined_id") } — check(file) == failed
coverage_gap_flaggedunit[[specodelic.coverage]]spec_file_with_coverage_gap()**rust:** { let clean = specodelic::spec::parse_str(&specodelic::fixtures::specs::materialize("specodelic_spec_file").expect("the fixture materializes")).expect("the fixture parses"); let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); !specodelic::fixtures::specs::rule_fired(&clean, "linter.coverage") && specodelic::fixtures::specs::rule_fired(&spec, "linter.coverage") } — lint(file) reports rule == failed
law_missing_case_rejectedunit[[specodelic.law_requires_cases]]law_property_missing_associativity()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.law_cases") } — check(file) == failed
orphan_state_rejectedunit[[specodelic.every_state_used]]state_appearing_in_no_transition()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.every_state_used") } — check(file) == failed
missing_model_section_rejectedunit[[specodelic.model_present]]spec_file_without_states_or_transitions()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.model_present") } — check(file) == failed
invariant_violation_blocks_verifyunit[[specodelic.no_counterexample]]model_with_a_violated_invariant()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let ir = specodelic::compile::extract_model_ir(&spec); let tla = specodelic::compile::model_to_tla(&spec); let bound = specodelic::model_check::Bound { max_depth: 10, max_states: Some(100), timeout_secs: Some(120) }; let report = specodelic::model_check::run_executable(&ir, tla.as_bytes(), &bound).expect("the executable-invariant run reports"); report.outcome == specodelic::model_check::Outcome::CounterexampleFound && report.violated_invariant_id.as_deref() == Some("c1") } — check(model_check) == failed
failing_proptest_blocks_verifyunit[[specodelic.properties_pass]]compiled_proptest_block_that_fails()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let cell = spec.properties.first().expect("the fixture carries a Property row").cells.get("predicate").cloned().unwrap_or_default(); let fragment = specodelic::compile::fragment_of_strict(&cell).expect("the predicate parses").expect("the predicate carries a fragment"); let verdict = specodelic::fixtures::specs::failing_properties_verdict().expect("the properties gate runs over the fixture"); verdict.0 == "properties_failed" && verdict.1 && fragment.text.contains("false") } — check(verify) == failed
prose_does_not_affect_lintunit[[specodelic.prose_untouched]]two_specs_identical_except_rationale_prose()**rust:** { let with = v0.as_str(); let without = specodelic::fixtures::specs::strip_rationale(with); let a = specodelic::spec::parse_str(with).expect("the rationale fixture parses"); let b = specodelic::spec::parse_str(&without).expect("the stripped fixture parses"); specodelic::fixtures::specs::lint_issues(&a) == specodelic::fixtures::specs::lint_issues(&b) } — lint(a) == lint(b) — differing prose never changes a lint result
silently_shrunk_id_set_rejectedunit[[specodelic.append_only_variants]](r, r') where a 𝒦-governed id-set member was removed with no Revision heading`rust: { let before = specodelic::fixtures::specs::materialize(“revision_before_governed_id_set_change”).expect(“the prior revision materializes”); let after = specodelic::fixtures::specs::materialize(“revision_after_id_set_member_removed”).expect(“the current revision materializes”); let findings = specodelic::lint::revision::check_pair(&before, &after).expect(“the revision pair parses”); findings.iter().any(
constraint_kind_out_of_set_rejectedunit[[specodelic.constraint_kind_closed]]constraint_row_with_kind_made_up()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.constraint_kind_closed") } — check(file) == failed
property_kind_out_of_set_rejectedunit[[specodelic.property_kind_closed]]property_row_with_kind_audit()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.property_kind_closed") } — check(file) == failed

Notes

This file is itself a document instance of its own schema (Intent, Constraint, State, Transition, Property). Running this file through its own lint transition should produce zero findings — if it doesn’t, the format and its own description of itself disagree, the same way a self-hosting compiler that fails to compile its own source has a bootstrapping bug rather than an ordinary bug.

One thing the format cannot check about itself: whether no_boolean_columns is itself satisfiable without a boolean-shaped escape hatch somewhere in the tooling (e.g. a linter’s own pass/fail result). That’s outside 𝒦 — a property of the compiler, not of any instance it compiles — flagged as Needs Human Review rather than silently assumed.

Revision 2

Decomposing the linter into linter-frontmatter.md, linter-referential_integrity.md, linter-graph_shape.md, and linter-model_shape.md surfaced four gaps in Revision 1’s constraint list, now resolved and folded in above:

  • id_matches_file — resolved as a structural rule, not left open: a file’s declared id must equal its filename with hyphens read as namespace dots (linter-frontmatter.md ⇒ linter.frontmatter). Applies uniformly to every spec file, since every file’s frontmatter kind is intent regardless of whether it sits at the top of the feature tree or describes one narrow checker.
  • ref_kind_compatible — resolved by writing out 𝒦’s morphism typing explicitly (see Reference Typing table) instead of leaving it as an unstated assumption a checker would have had to invent.
  • single_root_reachable — resolved as reachability from the file’s own declared intent specifically, not any intent in the repo, since the looser version would silently accept a cross-feature reference filed under the wrong id.
  • every_state_used / every_transition_valid — folded in as prerequisites for model_present to mean anything downstream, since a dangling to field would otherwise reach the TLA+ generator undetected.

The lint transition’s guard was also restructured: the flat seven-clause conjunction from Revision 1 was itself an instance of the God-transition pathology modularity-diagnostician flags in code, just written in a guard field instead of a function body. It’s replaced with a reference to the Checker Ownership table, so linted is now legible as a limit over an explicit dependency diagram rather than an opaque AND of everything at once — the fix is the same move as extracting a God Object into cohesive collaborators, applied to a guard expression instead of a class.

Since this revision, linter-ears_syntax.md, linter-schema_shape.md, and linter-coverage.md were all written; none surfaced further gaps in the constraint list above (see each file’s own Notes section).

Revision 3

A Rule-of-5 review (rule-of-5-universal) of the full corpus found one CRITICAL correctness bug in Revision 2’s id_matches_file constraint, plus documentation drift left over from before the last three checker files existed. Both fixed here:

  • id_matches_file was not invertible. The original rule (“hyphens read as namespace dots”) assumed a filename’s hyphens could be unambiguously mapped back to dots, but hyphens were also standing in for underscores within a segment (linter-graph-shape.md for id linter.graph_shape). dots_to_dashes⁻¹ doesn’t exist as a function when the forward map isn’t injective. Fixed by reserving - exclusively for the namespace dot and preserving _ literally in filenames; five files were renamed to match: linter-referential_integrity.md, linter-graph_shape.md, linter-model_shape.md, linter-ears_syntax.md, linter-schema_shape.md. Without this fix, the linter as specified would have rejected five of its own seven checker files — a bootstrapping failure the format’s own Notes explicitly claims should never happen.

Revision 4

Writing kinds.md — the standalone definition of 𝒦’s five objects, STATUS.md §4’s P0 item — surfaced one gap: nothing in Revision 3’s list required a Constraint row’s or Property row’s own kind column to come from a closed set. frontmatter_valid only ever checked the file-level kind == "intent"; a Property row with kind: "made_up" had no constraint anywhere rejecting it. Added constraint_kind_closed (kind ∈ {invariant}) and property_kind_closed (kind ∈ {unit, law}), each tracing to the corresponding row-shape constraint now specified in kinds.md. Enforcement landed the same session: linter-schema_shape.md now owns both (see its updated Checker Ownership row above).

  • Stale “not yet written” notes removed from the Checker Ownership table and this section, left over from before linter-schema_shape.md and linter-coverage.md existed.

Revision 5

Checking this format against ten features a real polyglot tool ecosystem needed (non-gating quality signals, confidence-scored checks, scenario supersession, cross-language adapter contracts, self-reported-vs-verified claims, versioned shared dependencies, an ad hoc “needs human review” escape hatch, feedback/regression loops, priority-ordered fallback installs, and multi-target compilation) found that seven of the ten were already representable with the mechanisms above and needed no schema change — writing them down for the record, so the next reviewer doesn’t re-open them:

  • Non-gating quality signals and “needs human review” as structure, not prose turned out to be the same gap, and it closes by finally exercising kind_field_extensible on Constraint.kind the way it was already exercised on Property.kind: adding advisory above. An advisory Constraint carries no obligation on any transition, for free, once guard’s Reference Typing row is narrowed to kind == invariant (see below) — non-gating by typing, not by the checker remembering to ignore it.
  • Confidence-scored / statistical properties need no new mechanism: a Property’s predicate is already an unparsed boolean-valued expression (prose_untouched only forbids the parser reading rationale prose, not expr/predicate fields). A threshold like precision(check(corpus)) ≥ 0.95 is an ordinary unit Property with a fixed-corpus generator; the scoring algorithm behind the threshold is the feature’s own concern, not the format’s.
  • Feedback/regression loops and priority-ordered fallback steps need no new mechanism either: States/Transitions is an open table, not a closed enum, so revise: verified → draft or a guard expressing “try A, else B, else C” via mutually-exclusive guard clauses both fit the existing Model section without touching 𝒦.
  • Cross-language adapter/plugin contracts don’t need a sixth object in 𝒦 — they need their own file, the same way compile.md, model_check.md, and verify.md already got their own files instead of growing specodelic.md’s Model section.
  • Self-reported-vs-verified claims and versioned shared dependencies both turned out to be downstream of the one real structural gap below, once supersession makes a row’s provenance and lineage traceable instead of overwritten.

One gap needed an actual addition, generalized rather than special-cased:

  • supersedes. append_only_variants already guarantees a superseded row is never deleted — but nothing let a newer row declare what it replaces, so retirement had to be said in prose or not at all. Rather than add a bespoke “supersession” concept, supersedes is specified as one more row in the Reference Typing table — structurally identical to traces_to/derives_from, just self-typed (Constraint→ Constraint, Property→Property). Its cycle-freedom is checked as its own supersedes_acyclic invariant rather than folded into acyclic_traces, for the same reason Revision 2 broke the lint guard into independent checkers instead of one larger conjunction: lineage and intent-tracing are different graphs answering different questions, and merging them would recreate the God-invariant shape Revision 2 removed. Whether a row is “current” is never stored — it’s computed (superseded(x) ⟺ ∃ y. y.supersedes ∋ x) — so no boolean column is needed and no_boolean_columns covers it with no changes of its own.
  • reference_field_extensible. Adding supersedes exposed that the Reference Typing table itself had no stated growth path, unlike the kind columns (kind_field_extensible, in kinds.md). The same append-only-by-Revision discipline now applies to the table as a whole, not just to the value sets inside it — the general rule this codifies is that a Revision’s job is to widen 𝒦’s typing, in either dimension, never to leave a second unwritten one beside the first.

Enforcement cost was uneven, and it’s worth recording why: linter- referential_integrity.md’s ref_kind_compatible needed zero code changes for either supersedes or the narrowed guard row, because it was already written to read allowed_targets(field) from this table rather than hardcoding it per field — the Reference Typing table is its only input. linter-schema_shape.md and linter-graph_shape.md were not so lucky: reference_field_extensible and supersedes_acyclic needed genuinely new local checks (an append-only-table diff, and a second small DAG check kept independent of acyclic rather than unioned into it — see each file’s own Notes), which are now implemented in both files rather than left pending.

Self-correction: reference_field_extensible’s first draft in this Revision forbade retyping an existing reference field at all — which its own paragraph above immediately violates, by narrowing guard from any Constraint to kind == invariant only. The rule above is the corrected version: a narrowing is permitted in the same Revision that introduces the kind-split it depends on, and only when it invalidates nothing that was previously valid (true here, since no advisory Constraint — and therefore no guard pointing at one — could have existed before this Revision introduced the kind itself).

Revision 6

Checked this format against a second, unrelated domain — a pure-Python, lazy, pipe-composed data library whose operations are grounded in category theory (an adjoint triple, a closed expression grammar, Moore-machine reducers). Unlike Revision 5, most of what looked missing here turned out to already be one Revision-5 pattern applied a second time, or an existing mechanism nobody had pointed at yet. Following this file’s and AGENTS.md’s own instruction to fold gaps back the same session rather than let them accumulate, both are done here, and the general workflow is now written up on its own in USAGE.md — read that file before writing a domain spec (one describing a piece of software, not this repo’s own linter), since everything below assumes its vocabulary (sealed enumeration, staged lifecycle, conformance-by-limit).

Simplified, not extended — three rules become one. kind_field_extensible (kinds.md), reference_field_extensible (Revision 5, above), and the old narrow wording of append_only_variants were the same rule discovered three times: an id-set governed by 𝒦 only grows, and only under a new Revision heading. append_only_variants above now states that once, for all three cases (variant-table ids, a kind column’s value-set, and the Reference Typing table’s field set); reference_field_extensible is retired as a separate row, and kinds.md’s kind_field_extensible is reworded to cite this constraint rather than restate its logic (see that file’s own Revision). This is the same move Revision 2 made collapsing a flat lint guard into the Checker Ownership table: one stated rule with several instances, not several hand-maintained copies that can drift out of sync with each other — which they had (Revision 5’s version of this rule already didn’t match kind_field_extensible’s wording word-for-word, despite saying the same thing).

One real addition: emits, giving State an output. A Moore machine is states, transitions, and an output function of state — the third part had nowhere to live, since kinds.md’s state_row_shape fixed State to exactly {id}. Rather than add a sixth 𝒦 object, this reuses exactly the move Revision 5 validated on guard: kind-split Constraint again ({invariant, advisory, effect} — one more kind_field_extensible-governed widening, now expressed via append_only_variants), then add one row to Reference Typing: emits | State | Constraint, kind == effect only. The new kind lives on Constraint, not on State or Transition, because a State’s output is a claim about a value, the same shape every other Constraint already makes — it needs no new row shape, only a new place a State may point at one. emits is optional: a state with no declared output is an ordinary automaton state, not a Moore state, and both are valid. linter-referential_integrity.md’s ref_kind_compatible needed zero code changes for this either, for the same reason Revision 5 noted for supersedes — except its wording needed a fix genuinely found this session: it named traces_to/derives_from/guard explicitly, which was already stale (it didn’t mention supersedes, added last Revision) and would have gone stale again with emits. Reworded there to read the Reference Typing table generically, matching what the check already does in practice.

Confirmed representable with no schema change, written up in USAGE.md as patterns rather than repeated here: a spec author’s own closed, exhaustively-matched enumeration (a “sealed AST”) is a Constraints-table id-set under the same generalized append_only_variants rule — it belongs there, not in Model/States, because it’s a closed value shape, not a lifecycle; a build-then-execute staging (laziness) is two ordinary guarded states, the same shape compile.md’s extracting → emitting already uses; conformance across multiple interchangeable implementations is the Checker Ownership pattern read backwards — N files each owning a slice of one shared Intent, joined as a limit — already fully built and running on this repo, just not yet named as a reusable pattern anywhere; and law_requires_cases’s two required cases were already a stated floor, now said explicitly in its own row above, so an adjunction or functor law needing unit/counit/naturality/triangle-identity cases adds them to its own property rather than waiting on a schema change.

Deliberately left alone: expr/generator/predicate remain unparsed strings. Revision 5 already noted this in passing for confidence thresholds; it’s restated here as a considered boundary, not an oversight — turning categorical laws into something a checker executes rather than a human reads is a different tool (a theorem prover), not a wider lint schema, and is out of scope for the same reason no_prose_field_parsed’s audit-vs-generator mismatch is flagged Needs Human Review rather than forced into a shape it doesn’t fit.

Revision 7

Checked this format against a third kind of gap: Julia-style multiple dispatch and, more sharply, Clojure-style protocols/multimethods, where a consumer extends a generic function or interface for their own type from a file the original author never edits and may never read — the expression-problem pattern, and the concrete mechanism behind the Open/ Closed Principle (closed for modification, open for extension). Every existing pattern in USAGE.md §2 assumes one file eventually enumerates its whole id-set (append_only_variants grows a set inside the file that owns it); an open-world conformer breaks that assumption structurally, not by omission — the same honest boundedness model_check.md already admits for unbounded recursive structures, here across files instead of depth.

Scope deliberately narrowed before specifying anything: an earlier draft of this Revision added a two-way implements edge and a single_root_reachable carve-out so the origin file could enumerate its own conformers. Discarded — verifying unknown, not-yet-written code was never a goal this format’s own boundedness rules could honestly support, and every previous Revision that tried to overreach past what’s checkable (no_prose_field_parsed’s parser-audit case, the categorical-law theorem-proving boundary) ended up walked back to a narrower, honest claim. The kept scope: this format publishes a contract an extension must satisfy, typed and lint-checkable as a well-formed statement; it never claims to verify who or what actually implements it. That’s a communication artifact, not an enforcement one — the same distinction no_boolean_columns’s Notes already draws between what 𝒦 can check about itself and what it can’t.

One new Constraint kind, one new one-directional reference field, both minimal:

  • extension_point — constraint_kind_closed widens from {invariant, advisory, effect} to {invariant, advisory, effect, extension_point}, one more kind_field_extensible-governed widening (kinds.md gets the matching Revision). An extension_point row’s expr states the method signature(s) and behavioral expectation a conformer must provide — e.g. ∀ T conforming: symmetry(T)::SymmetryTag, canonical_order(T)::Vector{Int} — the same field every other Constraint kind already has, just aimed outward at code the origin file’s author doesn’t write.
  • satisfies — one new row in the Reference Typing table: a Constraint on any file may point satisfies at an extension_point Constraint on any other file, declaring “this row is my conformance to that published contract.” Structurally identical to traces_to (a typed, outbound, one-directional pointer), deliberately not bidirectional like supersedes — the origin file gets no inbound edge and no obligation to know its conformers exist, by construction rather than by convention.

Two things this addition needs nothing new for, checked explicitly so the next reviewer doesn’t re-open them (AGENTS.md #3a):

  • guard already excludes extension_point from gating. guard’s Reference Typing row already reads Constraint, kind == invariant only — advisory, effect, and now extension_point are all excluded by the same existing typing fact, not by a new “cannot gate” invariant. Exactly the advisory_cannot_gate precedent AGENTS.md #3a calls out: check the type system before adding a restatement.
  • single_root_reachable needs no carve-out. A Constraint row carrying satisfies is still an ordinary row of its own file’s Constraints table, with its own ordinary traces_to pointing at that file’s own Intent — satisfies is an extra outbound pointer sitting beside traces_to on the same row, exactly the way guard and emits already coexist with it without affecting reachability. No forest, no second root, no change to the existing invariant at all — this is the concrete payoff of narrowing scope before specifying: the two-way implements draft would have needed a carve-out; the one-way satisfies doesn’t.
  • linter-referential_integrity.md needs zero code changes, the same claim Revision 5 made for supersedes and Revision 6 made for emits, for the same reason: ref_kind_compatible already reads allowed_targets(field) generically from the Reference Typing table rather than naming fields by hand (Revision 6 fixed the one place its wording still hadn’t caught up to that). A fourth typed field is not a fourth special case there.

What this deliberately still doesn’t do: there is no way to ask “do all current and future conformers satisfy this contract” as a single checkable fact, and there won’t be one — that question is unbounded across files and time the same way an arbitrarily-nested expression tree is unbounded across depth (USAGE.md §4), and forcing a false sense of completeness onto it would be a worse outcome than leaving it explicitly unclaimed. What is checkable, per conformer, is entirely ordinary: ref_kind_compatible confirms a consumer’s satisfies row resolves to a real extension_point row of the right kind; whether that consumer’s own expr is actually faithful to the contract it names is the same kind of human/test-suite judgment call every other invariant row already relies on — satisfies adds traceability of intent to conform, not proof of conformance.

Note on an existing, narrower use of “Open/Closed” in this repo: STATUS.md §2 already lists “Switch/case rigidity (OCP violation)” as solved by append-only variant tables — that’s OCP within one file’s own governed id-set (a new case is an insert, not an edit to an existing match). This Revision’s extension_point/satisfies is OCP in the other, harder sense — extension by a party who never touches the origin file at all. Both are real and both now have a home; they shouldn’t be read as the same mechanism solving the same problem twice, which is exactly the kind of same-token-different-guarantee confusion AGENTS.md #6 already tracks (CLAR-001 through CLAR-003) — flagged here rather than silently left for a future reviewer to notice on their own.

Revision 8

The model-checking story became backend-pluggable, and Alloy left the corpus language. no_counterexample’s expr named “TLC/Alloy” — a tool coupling that model_check.md had already outgrown: its contract (bounded exploration, minimal counterexample, invariant named by id) is engine-neutral, so naming engines in the core invariant list pinned an implementation detail into the format itself.

  • no_counterexample now says “the selected model-check backend”, and model_check.md’s Notes specify the backends: stateright (default, an embedded Rust model-checking crate — BFS exploration gives counterexample_is_minimal by construction; target_max_depth/timeout give the stated bound and timed_out) and TLC (opt-in, JVM subprocess, the reference engine for the .tla module).
  • Alloy was dropped everywhere (compile.md, STATUS.md, USAGE.md, linter-model_shape.md): with a native default and a reference TLA+ engine it had no remaining role, and a SAT-based engine returns an instance, not a minimal trace — which would fight counterexample_is_minimal rather than satisfy it.
  • model_check.backend_identified is new: a run report names the engine and version that produced it, so reports from different backends are attributable and comparable.

No variant table changed — this Revision rewords one constraint’s expr and adds one constraint to a non-core file, so append_only_variants is satisfied trivially. The .tla module remains an unconditional compile artifact regardless of backend (see compile.md’s Notes).

Revision 9

Declared outputs became observable claims. Revision 7 added extension_point/satisfies (a published contract and its outbound consumers) and Revision 6 added emits (a state’s Moore-machine output) — but nothing distinguished an effect that something must observe from one nobody watches: a spec could declare outputs that nothing observes and lint clean.

  • The Reference Typing table gains observes: Constraint, any file → Constraint, kind == effect only — mirroring the satisfies precedent end to end (one optional column, one typed row, ref_kind_compatible needs zero special cases). A row carrying observes keeps its own ordinary traces_to, so single_root_reachable needs no carve-out.
  • observes joins no acyclic edge set: linter-graph_shape.md’s acyclic union is closed and unchanged — an observation claim is not a dependency, so mutual cross-file observation is well-formed.
  • Checking “every effect is observed” is linter-observability.md’s contract: advisory severity (warnings channel, exit 0), never gating a lifecycle transition in this Revision; gating is decided after dogfooding produces real friction evidence.
  • kinds.md Revision 5 states the general rule this row relies on: optional typed reference columns may appear beside traces_to (satisfies, observes), superseding the “exactly four fields” reading of constraint_row_shape (HITL ticket specodelic-mp1 row 9, resolved by that Revision).

No variant table changed — one new Reference Typing row, grown under this heading per append_only_variants.

Revision 10

Two long-standing “Needs Human Review” questions were decided of record (HITL ticket specodelic-mp1 rows 7 and 8, user-approved 2026-09-30, advised by typed Jev evaluations, jev-1.13.0):

  • Guard typing — hybrid (row 7). A transition guard may be prose, but when its gating condition corresponds to a declared constraint, the guard must cite it. The Reference Typing table’s guard row carries the rule; the target typing is unchanged (Constraint, kind == invariant only). This is the only policy consistent with both halves of the format’s own philosophy: guard is a typed foreign key (machine-readable edges exist where constraints exist), yet prose_untouched and the model-check reality (prose guards are uninterpreted — invariants_checked: []) mean banning prose outright buys nothing. The bridge pattern is precedented in the corpus: the hooks capability spec’s guards were bridged by appending typed citations to their prose. Banning prose would churn ~48 corpus rows into invented one-off constraint rows; leaving prose uncited strands half the corpus outside the typed graph.
  • Reachability — tiered own-file intent (row 8). single_root_reachable is reworded: a row reaches the file’s OWN intent through own-file primary linkage (traces_to/derives_from chains resolved within the file); cross-file typed edges (guard citations of foreign constraints, satisfies, observes) are outbound leaves, never reachability paths — exactly the wording the table already gives satisfies/observes (“not a second reachability edge”). Enforcement is tiered: rows whose only connection is cross-file are advisory-flagged first; hard enforcement flips after corpus reconciliation (specodelic-cxq) anchors them. The strict own-file reading the old expr implied would fail ~150 of 375 corpus rows, much of it legitimate cross-file structure; the looser some-intent reading the shipped checker implemented silently accepts a cross-feature reference filed under the wrong id. Tiering keeps the wrong-file catch without a churn cliff.

No variant table changed — two existing rows reworded under this heading per append_only_variants; the guard field’s target set is narrowed not at all and the kind sets are untouched.

Revision 11

derives_from gains the same-kind law edge (Reference Typing row reworded; specodelic-cxq corpus reconciliation, 2026-09-30). A Property row whose own kind is law may point derives_from at a Constraint or at the same-kind Property — the top-level law it restates — because the checker files’ *_naturality laws instantiate exactly this file’s rename_naturality law, and banning that edge forced the corpus into either illegal targets or prose-only linkage. Well-formedness of the same-kind edge is not a new invariant: acyclic_traces already includes derives_from in its edge set, so a derivational cycle among laws is a lint finding, and coverage’s no_orphan_property still requires every derives_from target to resolve. A unit Property deriving from a Property remains a violation.

No variant table changed — one existing Reference Typing row reworded under this heading per append_only_variants; the target set WIDENS only for law sources, so nothing valid at Revision 10 is invalidated.

Revision 12

guard’s target set widens to admit a State (Reference Typing row reworded; specodelic-tik reconciliation of the shipped checker, 2026-09-30). Revision 10’s prose said “the target typing is unchanged (Constraint, kind == invariant only)”, but the reconciliation commit that shipped the hybrid guard policy (specodelic-cxq) also encoded the “has reached state X” pattern in graph.rs’s typing_violation and in the independent reference oracle: a transition guard may cite a State — the pattern graph.md’s own extract transition ([[specodelic.parsed]]), refactor.md’s analyze, and orchestrate.md’s start_lint all use. The table text never followed the checker; this Revision makes the table the authority again. A State citation records progress, it gates nothing — but it is a legal typed citation, and advisory Constraints still can never gate a transition, by typing, not by convention. The stale side-effects are reconciled in the same stroke: graph.md’s wrongly_typed_edge_rejected fixture/note (which contradicted graph.md’s own Model extract), USAGE.md’s §2.6 typing remark, and the embedded guide’s REFERENCE_TYPING row.

One existing Reference Typing row reworded and one deriving Property added under this heading per append_only_variants; the target set WIDENS only, so nothing valid at Revision 11 is invalidated — a unit Property (state_guard_citation_accepted) now pins the acceptance beside the existing rejection rows.

Revision 13

Law-row named cases become machine-checkable (specodelic-9qw, 2026-10-01). The law_requires_cases row is reworded: the cases a law requires are enumerated as **name:** case labels in the property’s own predicate — the form compile’s required_law_cases has parsed since the compile functor shipped — instead of free prose whose mention of a case name the linter could not tell apart from a declaration. The identity and associativity floor stands, unchanged, as a minimum; extra named cases (commutativity, idempotence, naturality, unit/counit, triangle identity, …) remain first-class — each becomes its own checkable declaration and its own proptest block. The floor is now lint-enforced (linter.law_cases, executing linter-coverage.md‘s every_law_has_cases) ahead of compile’s precondition gate, so required_law_cases’ unlabeled fallback survives only as defense-in-depth for input that skipped the gate.

One Constraint row reworded under this heading per append_only_variants; the case set WIDENS only (labels beyond the floor stay legal), so nothing valid at Revision 12 is invalidated — a law predicate whose cases lived only in prose now fails lint instead of silently passing.

Revision 14

The extension mechanism becomes first-class: domain packs (specodelic-dcx, add-domain-pack-mechanism, 2026-10-02). Independent vendors converged on the same extension moves — optional sections, per-kind case-label floors, new outbound reference fields — but nothing in the format named an extension, so pack vocabulary collided in the global closed kind sets. A pack is now a declared, discoverable, versioned artifact in the corpus itself; its full contract is [[packs]].

  • frontmatter_valid reworded — the frontmatter-kind closed set grows once, narrowly: kind ∈ {intent, profile}. profile marks a pack file; every other rule for profile files is pack-fiber-relative (pack-shape checking, not base-set growth). Nothing valid at Revision 13 is invalidated — a pure widening.
  • Reference Typing grows by uses — Constraint, any file → Intent of a kind: profile file, set-valued, outbound leaf. This is the one new generating morphism the mechanism requires; satisfies is NOT overloaded (conforming to a published extension_point contract and enabling a vocabulary fiber are different relations).
  • Base closed sets freeze by policy — constraint_kind_closed, property_kind_closed, and the Reference Typing field set stop growing except by true format Revisions like this one; pack vocabulary is per-pack (namespaced, fiber-relative — the Grothendieck construction one level up), never global.
  • Checker Ownership stays closed: the pack manifest’s structural rule (pack_shape, owned by [[packs]]) sits outside the eight-row gating table on the linter-observability precedent — it is conditional on pack discovery and advisory-first by its own contract, and a workspace with no kind: profile files lints byte-identically to Revision 13.

One Constraint row reworded and one Reference Typing row added under this heading per append_only_variants; every widening, no narrowing — the profile kind is opt-in per file and uses is optional per row.

Revision 15

Executable predicate fragments (specodelic-rjb, 2026-10-03 — the specodelic-mp1 row 7 option-C decision of record). The verified gate was unreachable by construction: every compiled predicate was a todo_predicate! placeholder that panics at execution, and the native model-check backend executed zero invariant predicates, so verify could never honestly report verified for any file. The way out is opt-in verbatim Rust:

  • **The **rust:** marker.** A Property's predicatecell or an invariant-kind Constraint'sexprcell may carry exactly one**rust:marker; the cell text after it is the fragment — a Rust boolean expression emitted verbatim (compile.md'spredicate_fragment_opt_in, invariant_fragment_opt_in). Property fragments bind the block's generated values v0…(one per named generator, each aString`); invariant fragments bind the current state’s id. A cell without the marker compiles and checks exactly as before — pure widening.
  • Verbatim, not interpreted. The fragment is user Rust, compiled by the Rust compiler, never re-parsed into a mini-language. Property fragments land in the proptest! artifact (verify’s existing scratch crate executes them); invariant fragments execute through a dependency-free scratch-crate BFS run whose engine attribution is native-bfs (model_check.md’s executable_invariants_execute) — exploration_only remains the honest outcome wherever no fragment is executable, and TLC, which cannot execute Rust, never claims clean.
  • Rejections are labeled, never silent. A fragment on a law-kind Property (each case needs its own body), a non-invariant Constraint, or a Transition guard (the program-counter model has no data binding a guard could constrain — deferred of record) fails extraction with a label naming the rule (compile.md’s fragment_law_rejected, fragment_guard_rejected).
  • Hygiene is defense-in-depth, not a sandbox (compile.md’s fragment_hygiene): fragments run on the invoking user’s machine with the invoking user’s privileges, exactly like every other compiled artifact; the banned-token list (unsafe, extern, include!, std::fs, std::process, std::net, std::env, asm!, Command) rejects the escape hatches a table cell should never legitimately need. A panicking fragment is a violation, never a pass (model_check.md’s invariant_totality).

No row of this file’s own tables changes in this Revision — the growth lives entirely in compile.md, model_check.md, and verify.md (fragments_reach_verified pins the now-reachable verdict). The only reworded rows sit in those files; nothing valid at Revision 14 is invalidated, and the proptest scaffolding’s element type simplifies from the GenVal wrapper to plain String in the same stroke.

Revision 16 — 2026-10-04

Closed language-tag fragments (specodelic-lf3, 2026-10-04 — design of record in openspec/changes/add-language-neutral-property-binding). Revision 15’s opt-in made predicate cells executable but Rust-bound: the **rust:** marker names the one supported language, and a cell wanting executable Python or TypeScript fragments has no honest form. This Revision widens the marker to a closed tag set — the format grammar grows once, per-language emission machinery stays out (it lives with espectacular’s contract binding and per-language emitters, none built here):

  • The tag set is closed — {rust, py, ts}, the same closed-set discipline as property_kind_closed (the grammar owns the enumeration, a cell cannot carry a tag it doesn’t declare). The fragment-position rule and the non-empty-fragment requirement carry over verbatim per tag (compile.md’s fragment_language_closed, widening predicate_fragment_opt_in/invariant_fragment_opt_in’s grammar); **rust:** remains the fully specified case, byte-identical semantics.
  • Unknown tags fail labeled, never silent — **go:** in fragment position is a labeled extraction failure naming the unknown tag and the closed set (sd1’s discipline: no silently ignored markers anywhere in the grammar; compile.md’s unknown_tag_rejected).
  • Rust widening is pure — every cell that extracted under Revision 15’s grammar extracts byte-identical after it (compile.md’s rust_back_compat); a cell without any marker compiles exactly as before. Nothing valid at Revision 15 is invalidated.
  • No emitter, no artifact — a **py:** or **ts:** fragment fails compile labeled, with a remediation hint naming the per-language emitter follow-up (compile.md’s no_emitter_labeled_failure). Executable emission for those languages is deferred of record to the per-language follow-ups (add-py-fragment-emission, add-ts-fragment-emission) — an accepted-tag-without-emitter would silently fall through to Rust, which is the vacuous outcome this Revision exists to prevent.
  • Mention is not extraction — a **rust:**/**py:**/**ts:** occurrence anywhere other than fragment position (mid-span, in the defining rows of compile.md’s own table, or in prose between spans) is a mention of the mechanism and never extracts (compile.md’s mention_not_extraction, carrying sd1’s rule into the widened grammar).

No row of this file’s own tables changes in this Revision — the growth lives entirely in compile.md, mirroring Revision 15’s shape. Nothing valid at Revision 15 is invalidated, and the proptest/verify machinery is untouched.

Revision 17 — 2026-10-08

The min-expr kernel (add-min-expr-kernel, 2026-10-08). The data-dependent cells — the equational and bounded-quantified ones — had no defined semantics: the linter and model-check verify structure, but “resolves is unique” or “every reachable row satisfies a bound” was prose only. This Revision defines a decidable bounded fragment of the internal language of Set^𝒦 — the kernel — and makes it first-class format vocabulary:

  • One opt-in marker, closed grammar. An expr cell opts in per cell with the kernel: marker in fragment position, under the same fragment-position rule as the executable-fragment markers; the expression is parsed against the closed atomic set — equality, comparisons, bounded ∀/∃ over the finite instances I(k), ∧/¬, and the reference-typed atomics resolves/unique/acyclic/reachable — and a non-member atomic fails labeled naming the atomic and the closed set (compile.md’s kernel_expr_opt_in). A cell without the marker compiles exactly as before — pure widening, nothing valid at Revision 16 is invalidated.
  • Three-valued, never coerced. Evaluation over the finite instances reports exactly one of verified, counterexample, unknown; unknown is honest (the claim could not be discharged), propagates under Kleene rules, and never coerces to pass or to counterexample.
  • Semantics never outrun proven machinery. Each v0 atomic names its grounding — acyclic/reachable on graph traversal, unique/resolves on acset traversal, equality, comparisons, and bounded quantifiers on model_check bounded evaluation — and an atomic without a grounding entry cannot ship. The widening law: a new atomic (pack predicates included) registers only if it is decidable over finite instances; a predicate failing the gate stays pack-side, checked by contract-TOML runners rather than by the kernel.
  • Guard citations evaluate. A guard citation ([[a]] ∧ [[b]], ¬) is upgraded from inert annotation to a kernel-evaluated claim with the same three-valued honesty — an undischargable citation reports unknown, never pass. Executable guard fragments remain rejected of record: fragment_guard_rejected’s deferral condition (a data-carrying state space) is not met, and this Revision does not claim it.
  • kernel.binding, the opaque bridge. An invariant-kind Constraint may carry a kernel.binding cell, extracted and surfaced verbatim and never interpreted by the toolchain; external checkers claim constraints through contract-TOML flags binding, and no registry is built (compile.md’s kernel_binding_opaque).

The grammar growth lives in compile.md (kernel_expr_opt_in, kernel_binding_opaque), mirroring Revision 16’s shape. This file’s own Constraints table carries the migrated kernel rows — total_refs, coverage, every_transition_valid, and supersedes_acyclic opt in with the kernel: marker; their per-file migration (USAGE.md examples, then this file’s invariants) was gated lint-clean and command-verified before this Revision’s heading, and this Revision declares the grammar those cells use. Nothing valid at Revision 16 is invalidated.

Revision 18 — 2026-10-08

Single-tree spec authoring: the id law derives spec.md from its parent directory (update-id-derivation-spec-md, specodelic-mcy, 2026-10-08). The old law — frontmatter.id == replace(stem(path), "-", ".") — forced every file named spec.md (the openspec-mandated filename, delta or deployed capability spec) to declare id: spec, and id: spec files resolved as self-contained (refs within the file only, total_refs/total_refs’s scoped index, and the command scope law’s isolated_scope_required arm). That structurally locked a two-tree architecture: a real-id corpus for the typed graph plus a deployed dual-format tree produced by per-repo hand-rolled deploy transforms. This Revision retires the distinction with one rule:

  • The id law — expected_id_from_path(path): a file named spec.md derives its expected id from its PARENT DIRECTORY name (openspec/specs/ge-cli/spec.md → id: ge.cli); any other file derives from its own stem; - maps to the namespace dot, _ is literal; a bare spec.md with no parent directory falls back to the stem. A real-id corpus file dropped as openspec/specs/<cap>/spec.md yields exactly one finding — a mismatched id_matches_file.
  • id: spec retires. dual_format_valid no longer polices the id (the naming law is the only id gate a dual-format file answers to), total_refs resolves every file corpus-wide (the self-containment scoping and its bare-local arm are gone — real-id files are distinguished by their own ids, so the false-resolution CORR-001 guarded against needed the id: spec collision to exist), and the command scope law reduces to duplicate_corpus_identity (model_check.md’s isolated-scope rule retired with its subject). Real-id dual-format files compose like any corpus; a same-id pair (transitionally: an active change’s delta and its deployed spec) is refused by the identity law on command paths.
  • Scaffolds teach the single tree. spk new targets openspec/specs/<id>/spec.md by default; spk migrate generates the real derived id in the frontmatter it scaffolds. New users cannot produce the two-tree distinction.

Pure widening plus one narrowing of dead machinery: nothing valid at Revision 17 is invalidated — a file that satisfied the old law still satisfies the new one (stem files were already stem-derived; spec.md files under capability directories now satisfy the law with their real ids, which the old law rejected — but no corpus content at Revision 17 depended on that rejection being the only legal reading). The rename tool’s filename law (rename.md’s new_id_matches_filename) inherits expected_id_from_path verbatim.

Revision 19 — 2026-10-24

Change deltas go plain; the layer rides beside (add-delta-layer-sidecar, specodelic-s8fg Stage 2). Stage 1 (2026-10-19) made deployed capability specs 1.x-strict-valid by stripping delta sections at deploy; the remaining 1.x rejections were the dual-format change deltas themselves — the byte-identical ## Requirements mirror and the layer tables in the same file. This Revision retires the dual-format delta class with one rule:

  • Plain deltas + sidecar. A change delta under openspec/changes/<id>/specs/<cap>/ is a plain openspec file — ## ADDED/MODIFIED/REMOVED Requirements (plus ## Purpose), no frontmatter, no layer tables, no mirror; openspec validate is its gate. The specodelic layer (frontmatter + Constraints/Model/Properties) is carried by a sibling layer.md sidecar — a real, corpus-linted specodelic file whose traces_to citations resolve corpus-wide.
  • The id law gains the sidecar arm. expected_id_from_path: a file named layer.md derives its expected id from its PARENT DIRECTORY name plus a .layer suffix (specs/cap-a/layer.md → id: cap.a.layer) — the sibling of the spec.md rule, keeping sidecars per-capability unique and co-archived with their delta. id: spec’s retirement logic (Revision 18) is untouched.
  • The mirror retires by construction. requirement_drift and dual_format_valid’s delta-pairing arm police the pairing of a delta section with a same-file ## Requirements mirror — a shape plain deltas can no longer produce without failing openspec validation. Both retire; the dual-format capability spec class (deployed openspec/specs/<cap>/spec.md) keeps every other rule unchanged. migrate’s mirror generation retires with it — the wrap path now scaffolds the sidecar.

The retirement narrows exactly the shape the corpus already stopped authoring: spec-integration’s intent of record (Revision 18 era) already declared “change deltas stay plain openspec files”, and no deployed capability spec is invalidated — the capability-spec class keeps every rule it had. archive-companion’s deploy re-assembly (openspec applies, the companion re-attaches the layer from the archived sidecar) is tool semantics, recorded in archive-companion.md — not a format law.

Revision 20 — 2026-11-12

Guard row names the executable regime (specodelic-814). The Reference Typing guard cell stated only the prose-only regime — “a prose-only guard is machine-uninterpreted (the model-check backend reports invariants_checked: [])” — with no mention of the **rust:** escape hatch; that was never wrong for prose guards but went incomplete when Revision 15 landed the executable-fragment mechanism. The cell now states both regimes: prose-only stays exploration-only, honestly uncounted; a cited invariant Constraint carrying a **rust:** fragment executes natively (model_check.md’s executable_invariants_execute), where no_counterexample can be honestly earned. No typing rule, closed set, or table shape changes — wording sync only.

Revision 21 — 2026-11-13

Law-kind rows carry one executable body per named case (specodelic-1nhe). A law Property row named its cases as **name:** labels (Revision 13) but could not say what each case means: the compiler emitted one todo_predicate! placeholder block per case, and a fragment on a law row was rejected outright — one fragment cannot honestly serve several named cases. The law was therefore executable only case by case, never at all.

  • The labels stay the enumeration of record. **name:** remains the only thing that declares a case; the identity/associativity floor is unchanged, and a body never adds, renames or replaces a case. A **rust:** occurrence is a fragment marker, never a case label (the shared parser in law.rs is what makes the linter’s law_cases rule and the compiler’s block expansion agree on that).
  • The per-case body. A case carries its own executable body under a case key — **name::** — followed by the fragment marker in fragment position: **identity::** `**rust:** v0.len() >= 1` . The body is emitted verbatim as that case’s block body; a case with no body keeps the honest todo_predicate! placeholder. The closed tag set, the fragment-position rule, the hygiene list and the mention-vs-extraction rule are unchanged — a body is a fragment like any other.
  • The labeled failures. A fragment no case key introduces, a second body for one case, a body naming a case the row does not enumerate, an empty body, a case key that introduces no body, and a case key on a non-law row are each a labeled extraction failure naming the rule and the offending case — never a silently ignored marker.

One Constraint row reworded under this heading per append_only_variants (law_requires_cases); the row’s case set is unchanged — the labels still enumerate, and the body form only ADDS an executable arm beside them, so nothing valid at Revision 20 is invalidated. The compile.md rows that stated the law-row rejection and the one-marker-per-cell rule are reworded to the same effect (compile.md’s fragment_law_rejected, fragment_language_closed, predicate_fragment_opt_in, properties_to_proptest).

Revision 22 — 2026-11-14

The outbound-leaf carve-out has one normative home (specodelic-mlc). The rule that cross-file typed edges (guard citations of foreign constraints, satisfies, observes, uses, and every pack-added reference field) are outbound leaves — never reachability paths, never acyclic-edge-set members — was restated in prose across the pack, observability, and graph-shape specs. It now lives once under Reference Typing; every other file carries at most one pointer naming that section. Prose-only consolidation: no id-set, typing, or checker semantics change. FORMAT_REVISION moves 21 → 22 so a consumer can detect the corpus wording change.

Revision 23

Scenario bindings — the scenario→model binding as data (add-scenario-bindings, ticket specodelic-lksd). 687 scenarios are EARS-shaped prose; the Model and Constraints are structured; nothing linked them. Revision 23 adds the missing table, not a new vocabulary:

  • New row kind scenario_binding — the closed object set grows five → six under this heading (append_only_variants). A binding row lives in an optional per-file ### Scenario bindings table (placed at the end of ## Requirements, one table per file — the checklist-manifest precedent: one manifest keyed by item id, the binding layer visually separate from prose). Its base field is exactly {id}, where the id cell IS the scenario slug; the remaining fields are the four typed reference columns given / on / asserts / verifies (see Reference Typing above), each optional and bindable in any subset.
  • The slug canonicalization is pinned in ONE place, here: lowercase every alphanumeric character; map every run of non-alphanumeric characters to a single -; trim leading and trailing hyphens. This is the algorithm espectacular’s slugify applies to #### Scenario: headings — #### Scenario: headings are structural (headings, never prose), and the slug is the stable join key between spec bindings and espectacular contract names. The checker side is linter-scenario_bindings.md (scenario_binding_targets_declared_scenario: a binding id must slugify-match exactly one own-file heading).
  • Own-file v1 restriction. All four binding cells cite own-file rows only (scenario_binding_refs_own_file). The scenario view projects one file’s machine; a foreign frame has no lifeline. Cross-file bindings stay a named future.
  • Lazy adoption. The whole table is optional per file; a file without it parses zero binding rows and reports zero binding findings — adoption is per file, and Revision 23 lands with zero binding tables in the corpus (the 687 scenarios gain bindings one file at a time, draft status first — the adoption engine is wlkt.1/wlkt.2’s beat, not this revision’s).
  • Leaves, not nodes. The binding fields join no reachability path and no acyclic edge set (see the outbound-leaf carve-out above, which this revision extends). A binding row is a claim ABOUT the file’s machine; single_root_reachable’s scope stays the four classic row kinds, and no binding row needs a traces_to of its own.
  • Deliberately out (named, not specced here): file-scope coverage and the unbound-scenario hint (specodelic-pxjn); the scenario card view (specodelic-a950); SCXML/Turtle projections (specodelic-3x5l); an event/trigger column (multiple transitions sharing one trigger is a semantics change nothing in v1 needs); model-checker trace comparison (a binding is nearly a trace oracle — future).

Revision 24

Bindings provenance + placement (add-binding-status-and-h2, tickets specodelic-ebdg + specodelic-kbrg). Two amendments to the Revision 23 scenario layer, both driven by its first rollout (specodelic-wlkt.1/.2):

  • The status cell. A binding row gains one optional base field, status, recording the binding’s confirmation provenance in the closed vocabulary {draft, confirmed} — the absent cell is draft, and an empty cell is the absent cell. The column order is pinned: id, status, then the four typed reference columns. Status cites no target, so the Reference Typing table is unchanged. The scenario card’s confidence tiers (add-scenario-card) already consume the cell — confirmed lifts a row above unconfirmed, and conform evidence lifts confirmed to attested — so a typo’d value would silently downgrade a claim: the checker side pins scenario_binding_status_closed (an Issue, like the other closed vocabularies) in linter-scenario_bindings.md.
  • The h2 placement. The bindings table may sit as ### Scenario bindings at the end of ## Requirements (Revision 23’s spelling) OR as a trailing ## Scenario bindings h2 — the openspec-parseable placement (an h3 under ## Requirements parses as a requirement with no scenarios), which is the spelling the corpus adopted first (graph-views, wlkt.1). The parser has recognized the table by its own heading since the wlkt.2 accommodation; this revision pins the acceptance in the format, not just the code.

FORMAT_REVISION moves 23 → 24 so a consumer can detect the row-shape and placement change.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: referential_integrity

  • WHEN specodelic_spec_file()
  • THEN ∀ ref ∈ file: lookup(ref) ≠ None
  • VERIFIES [[specodelic.referential_integrity]]

Scenario: acyclicity

  • WHEN specodelic_spec_repo()
  • THEN is_dag(traces_to_graph(repo))
  • VERIFIES [[specodelic.acyclicity]]

Scenario: rename_naturality

  • WHEN specodelic_spec_repo(), specodelic_rename_id()
  • THEN identity: rename(I, a, a) == I associativity: rename(rename(I,a,b), b,c) == rename(I,a,c) naturality: compile(rename(I)) == rename(compile(I))
  • VERIFIES [[specodelic.rename_naturality]]

Scenario: filename_convention

  • WHEN (id, mismatched_filename) pairs
  • THEN check(id, filename) == failed
  • VERIFIES [[specodelic.filename_convention]]

Scenario: typing_enforced

  • WHEN specodelic_property_row_guard()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.typing_enforced]]

Scenario: own_intent_reachable

  • WHEN spec_repo_with_disconnected_constraint_cluster()
  • THEN check(repo) == failed
  • VERIFIES [[specodelic.own_intent_reachable]]

Scenario: model_well_formed

  • WHEN spec_file_with_transition_target_not_in_states()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.model_well_formed]]

Scenario: advisory_cannot_gate

  • WHEN guard_field_pointing_at_an_advisory_constraint()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.advisory_cannot_gate]]

Scenario: state_guard_citation_accepted

  • WHEN transition_guard_citing_a_declared_state()
  • THEN check(file) == passed — the “has reached state X” guard pattern (Revision 12); a State target gates nothing, it records progress — but it is a legal typed citation
  • VERIFIES [[specodelic.state_guard_citation_accepted]]

Scenario: supersedes_cross_kind_rejected

  • WHEN constraint_row_with_supersedes_property_row()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.supersedes_cross_kind_rejected]]

Scenario: constraint_derives_from_rejected

  • WHEN constraint_row_with_derives_from_column()
  • THEN check(file) == failed — the Appears-on column is normative, not descriptive: derives_from appears on Property rows only (decided of record 2026-10-01, specodelic-huf; a constraint is derived FROM by properties, it does not derive), and ref_kind_compatible reads the column source-side the same way it already reads supersedes’ same-kind rule
  • VERIFIES [[specodelic.constraint_derives_from_rejected]]

Scenario: supersedes_cycle_rejected

  • WHEN spec_repo_with_supersedes_cycle()
  • THEN check(repo) == failed
  • VERIFIES [[specodelic.supersedes_cycle_rejected]]

Scenario: no_stored_superseded_flag

  • WHEN schema_with_is_superseded_column()
  • THEN check(schema) == rejected — supersession status is derived (superseded(x) ⟺ ∃ y. y.supersedes ∋ x), never stored
  • VERIFIES [[specodelic.no_stored_superseded_flag]]

Scenario: emits_cannot_target_non_effect

  • WHEN emits_field_pointing_at_an_invariant_constraint()
  • THEN check(file) == failed — same shape as advisory_cannot_gate, mirrored onto the other direction of the kind-split
  • VERIFIES [[specodelic.emits_cannot_target_non_effect]]

Scenario: satisfies_wrong_kind_rejected

  • WHEN satisfies_field_pointing_at_an_invariant_constraint()
  • THEN check(file) == failed — same shape as advisory_cannot_gate and emits_cannot_target_non_effect, mirrored onto the third kind-typed reference field
  • VERIFIES [[specodelic.satisfies_wrong_kind_rejected]]

Scenario: extension_point_needs_no_reachability_carveout

  • WHEN constraint_row_satisfying_a_foreign_extension_point()
  • THEN check(row) == passed — satisfies adds no reachability obligation; the row is reachable the ordinary way, through its own traces_to
  • VERIFIES [[specodelic.extension_point_needs_no_reachability_carveout]]

Scenario: frontmatter_missing_field_rejected

  • WHEN frontmatter_missing_statement()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.frontmatter_missing_field_rejected]]

Scenario: guardless_transition_rejected

  • WHEN transition_row_with_empty_guard()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.guardless_transition_rejected]]

Scenario: non_ears_statement_rejected

  • WHEN statement_outside_the_five_ears_patterns()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.non_ears_statement_rejected]]

Scenario: multi_intent_join_rejected

  • WHEN row_id_joined_to_two_intents_via_and()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.multi_intent_join_rejected]]

Scenario: coverage_gap_flagged

  • WHEN spec_file_with_coverage_gap()
  • THEN lint(file) reports rule == failed
  • VERIFIES [[specodelic.coverage_gap_flagged]]

Scenario: law_missing_case_rejected

  • WHEN law_property_missing_associativity()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.law_missing_case_rejected]]

Scenario: orphan_state_rejected

  • WHEN state_appearing_in_no_transition()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.orphan_state_rejected]]

Scenario: missing_model_section_rejected

  • WHEN spec_file_without_states_or_transitions()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.missing_model_section_rejected]]

Scenario: invariant_violation_blocks_verify

  • WHEN model_with_a_violated_invariant()
  • THEN check(model_check) == failed
  • VERIFIES [[specodelic.invariant_violation_blocks_verify]]

Scenario: failing_proptest_blocks_verify

  • WHEN compiled_proptest_block_that_fails()
  • THEN check(verify) == failed
  • VERIFIES [[specodelic.failing_proptest_blocks_verify]]

Scenario: prose_does_not_affect_lint

  • WHEN two_specs_identical_except_rationale_prose()
  • THEN lint(a) == lint(b) — differing prose never changes a lint result
  • VERIFIES [[specodelic.prose_does_not_affect_lint]]

Scenario: silently_shrunk_id_set_rejected

  • WHEN (r, r') where a 𝒦-governed id-set member was removed with no Revision heading
  • THEN check(revisions) == failed
  • VERIFIES [[specodelic.silently_shrunk_id_set_rejected]]

Scenario: constraint_kind_out_of_set_rejected

  • WHEN constraint_row_with_kind_made_up()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.constraint_kind_out_of_set_rejected]]

Scenario: property_kind_out_of_set_rejected

  • WHEN property_row_with_kind_audit()
  • THEN check(file) == failed
  • VERIFIES [[specodelic.property_kind_out_of_set_rejected]]

kinds — closed kind value sets


id: kinds kind: intent statement: “THE kinds spec SHALL define the field set, sub-kind values, and shape-validity rule for each of the six schema objects (Intent, Constraint, State, Transition, Property, scenario_binding) that every specodelic file instantiates.”

Kinds

The five objects of 𝒦 — Intent, Constraint, State, Transition, Property — are referenced constantly throughout this repo but have never been specified as subjects in their own right (STATUS.md §4, P0). This file is that specification: for each kind, its exact field set and which values its own internal kind column (where it has one) may take. Every later checker — linter.frontmatter through linter.coverage — assumes a row has already been correctly bucketed into one of these five before it runs its own check; this file is what makes that bucketing itself a checkable fact instead of an unstated assumption.

Purpose

The five objects of 𝒦 — Intent, Constraint, State, Transition, Property — are referenced constantly throughout this repo but have never been specified as subjects in their own right (STATUS.md §4, P0). This file is that specification: for each kind, its exact field set and which values its own internal kind column (where it has one) may take. Every later checker — linter.frontmatter through linter.coverage — assumes a row has already been correctly bucketed into one of these five before it runs its own check; this file is what makes that bucketing itself a checkable fact instead of an unstated assumption.

Constraints

| id | kind | expr | traces_to | satisfies | |————————|———–|——————————————————————————————————————————————————|–––––––––––| | kind_enum_closed | invariant | the five kinds are exactly {Intent, Constraint, State, Transition, Property}, one per top-level section of a spec file (frontmatter, Constraints table, Model/States, Model/Transitions, Properties table) | [[kinds]] | | | intent_row_shape | invariant | an Intent row is the file's frontmatter block; its fields are exactly {id, kind, statement}, with kind == "intent", plus optionally-declared frontmatter keys (currently checked_against_core, per AGENTS.md's convention — see Revision 7) | [[kinds]] | | | constraint_row_shape | invariant | a Constraint row is one row of the Constraints table; its base fields are exactly {id, kind, expr, traces_to}, optionally followed by typed reference columns — each such column must be declared in specodelic.md's Reference Typing table (currently satisfies, observes) and carries no meaning beyond that typing; kind ∈ {invariant, advisory, effect, extension_point}, extended per-file by the active packs' declared kinds (openspec/specs/packs/spec.md fiber kinds — never narrower, see linter-schema_shape Notes) | [[kinds]] | | | state_row_shape | invariant | a State row is one bullet under Model/States; its fields are exactly {id, emits?} and it has no kind column of its own — states are named variants, never a typed column; emitsis optional and, when present, must resolve to a Constraint with kind == "effect" (seespecodelic.md's Reference Typing table) — a state with no emits is a bare automaton state, not a Moore state, and both are well-formed | [[kinds]] | | | transition_row_shape | invariant | a Transition row is one row of the Model/Transitions table; its fields are exactly {id, from, to, guard}, with no kind column of its own | [[kinds]] | | | property_row_shape | invariant | a Property row is one row of the Properties table; its fields are exactly {id, kind, derives_from, generator, predicate}, with kind ∈ {unit, law}, extended per-file by the active packs' declared kinds (openspec/specs/packs/spec.md fiber kinds — never narrower, see linter-schema_shape Notes) | [[kinds]] | | | scenario_binding_row_shape | invariant | a scenario_binding row is one row of the file's Scenario bindingstable —### Scenario bindingsat the end of## Requirements(Revision 23) or a trailing## Scenario bindingsh2 (Revision 24, the openspec-parseable placement the corpus uses); its base fields are exactly {id, status}, where the id cell IS the scenario slug — the slug of exactly one#### Scenario: heading of the same file under the one pinned canonicalization (specodelic.md Revision 23) — and the optional status cell records the binding's confirmation provenance in the closed vocabulary {draft, confirmed}, absent ≡ draft (Revision 24); the four typed reference columns the Reference Typing table declares (given, on, asserts, verifies) follow, each citing own-file rows only; a binding row carries no kind column of its own | [[kinds]] | | | kind_field_extensible | invariant | a Constraint or Property row's own kind value-set is one instance of [[specodelic.append_only_variants]] — it grows only under a new Revision heading in this file, never silently | [[kinds]] | | | kind_assignment_failure | effect | kinds.kind_assignment_failure(detail) | [[kinds]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | shape_check_failure | effect | kinds.shape_check_failure(detail) | [[kinds]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • unclassified
  • kind_assigned
  • shape_checked
  • passed
  • kind_failed (emits: [[kinds.kind_assignment_failure]])
  • shape_failed (emits: [[kinds.shape_check_failure]])

Transitions

idfromtoguard
beginunclassifiedkind_assignedrow belongs to exactly one of the five sections (frontmatter / Constraints table / Model States / Model Transitions / Properties table)
assign_okkind_assignedshape_checked[[kinds.kind_enum_closed]]
assign_failkind_assignedkind_failed¬([[kinds.kind_enum_closed]])
acceptshape_checkedpassed(row.kind==Intent ∧ [[kinds.intent_row_shape]]) ∨ (row.kind==Constraint ∧ [[kinds.constraint_row_shape]]) ∨ (row.kind==State ∧ [[kinds.state_row_shape]]) ∨ (row.kind==Transition ∧ [[kinds.transition_row_shape]]) ∨ (row.kind==Property ∧ [[kinds.property_row_shape]]) ∨ (row.is_scenario_binding ∧ [[kinds.scenario_binding_row_shape]])
rejectshape_checkedshape_failed¬((row.kind==Intent ∧ [[kinds.intent_row_shape]]) ∨ (row.kind==Constraint ∧ [[kinds.constraint_row_shape]]) ∨ (row.kind==State ∧ [[kinds.state_row_shape]]) ∨ (row.kind==Transition ∧ [[kinds.transition_row_shape]]) ∨ (row.kind==Property ∧ [[kinds.property_row_shape]]) ∨ (row.is_scenario_binding ∧ [[kinds.scenario_binding_row_shape]]))

Properties

idkindderives_fromgeneratorpredicate
unknown_kind_rejectedunit[[kinds.kind_enum_closed]]row_belonging_to_a_sixth_section()**rust:** { let text = v0.as_str(); let schema = specodelic::acset::schema::canonical(); let mut widened = schema.clone(); widened.objects.insert(specodelic::acset::schema::ObjectId::new("Actions")); let rejected = specodelic::acset::schema::check(&widened).is_err(); let closed = specodelic::acset::schema::check(&schema).is_ok(); rejected && closed && text.contains("## Actions") } — check(row) == failed
intent_missing_statement_rejectedunit[[kinds.intent_row_shape]]intent_row_without_statement()**rust:** { let mut missing = false; if let Err(err) = specodelic::spec::parse_str(&v0) { missing = format!("{err:?}").contains("statement"); } missing } — check(row) == failed
constraint_row_extra_field_rejectedunit[[kinds.constraint_row_shape]]constraint_row_with_extra_field(extra_field: "guard")**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.row_shape_closed") } — check(row) == failed
state_row_with_extra_field_rejectedunit[[kinds.state_row_shape]]state_row_with_extra_field(extra_field: "kind")**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.row_shape_closed") } — check(row) == failed
transition_missing_guard_rejectedunit[[kinds.transition_row_shape]]transition_row_without_guard()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.guard_required") } — check(row) == failed
property_row_bad_subkind_rejectedunit[[kinds.property_row_shape]]property_row_with_kind_audit()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.property_kind_closed") } — check(row) == failed
subkind_addition_without_revision_rejectedunit[[kinds.kind_field_extensible]]diff_adding_subkind_value_with_no_new_Revision_heading()`rust: { let before = specodelic::fixtures::specs::materialize(“revision_before_governed_id_set_change”).expect(“the prior revision materializes”); let after = v0.as_str(); let findings = specodelic::lint::revision::check_pair(&before, after).expect(“the revision pair parses”); findings.iter().any(
constraint_row_advisory_acceptedunit[[kinds.constraint_row_shape]]constraint_row_with_kind_advisory()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::lint_clean(&spec) } — check(row) == passed
constraint_row_effect_acceptedunit[[kinds.constraint_row_shape]]constraint_row_with_kind_effect()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::lint_clean(&spec) } — check(row) == passed
state_row_emits_acceptedunit[[kinds.state_row_shape]]state_row_with_effect_emits()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::lint_clean(&spec) } — check(row) == passed
state_row_without_emits_still_passesunit[[kinds.state_row_shape]]state_row_without_emits()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::lint_clean(&spec) } — check(row) == passed — emits is optional, not a second required field
state_row_emits_wrong_kind_rejectedunit[[kinds.state_row_shape]]state_row_with_invariant_emits()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.ref_kind_compatible") } — check(row) == failed
constraint_row_extension_point_acceptedunit[[kinds.constraint_row_shape]]constraint_row_with_kind_extension_point()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::lint_clean(&spec) } — check(row) == passed
scenario_binding_extra_field_rejectedunit[[kinds.scenario_binding_row_shape]]scenario_binding_row_with_extra_field(extra_field: "kind")**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::rule_fired(&spec, "linter.row_shape_closed") } — check(row) == failed
scenario_binding_typed_cells_acceptedunit[[kinds.scenario_binding_row_shape]]scenario_binding_row_with_given_and_verifies()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::lint_clean(&spec) } — check(row) == passed — the four reference cells are optional in any subset
well_formed_row_passesunit[[kinds.kind_enum_closed]]arbitrary_well_formed_row_of_one_kind()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); specodelic::fixtures::specs::lint_clean(&spec) } — check(row) == passed
kind_shape_naturalitylaw[[kinds.kind_enum_closed]]arbitrary_row_of_one_kind(), kinds_rename_id()identity: assigned_kind(rename(row,a,a)) == assigned_kind(row) associativity: assigned_kind(rename(rename(row,a,b),b,c)) == assigned_kind(rename(row,a,c)) — renaming a row’s id never changes which of the five kinds it belongs to identity:: **rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let files = vec![(std::path::PathBuf::from("fx.md"), v0.as_str().to_string())]; let outcome = specodelic::rename::run(&files, &v1, &v1).expect("the identity rename succeeds"); let kind = spec.properties.first().expect("the fixture carries a Property row").kind.clone().unwrap_or_default(); outcome.writes.is_empty() && kind == "unit" } associativity:: `rust: { let files = vec![(std::path::PathBuf::from(“fx.md”), v0.as_str().to_string())]; let first = specodelic::rename::run(&files, &v1, “fx.p_mid”).expect(“the first rename succeeds”); let mid_files = vec![(std::path::PathBuf::from(“fx.md”), first.writes[0].1.clone())]; let second = specodelic::rename::run(&mid_files, “fx.p_mid”, “fx.p_final”).expect(“the second rename succeeds”); let chained = specodelic::spec::parse_str(&second.writes[0].1).expect(“the renamed fixture parses”); let direct = specodelic::rename::run(&files, &v1, “fx.p_final”).expect(“the direct rename succeeds”); let direct_spec = specodelic::spec::parse_str(&direct.writes[0].1).expect(“the renamed fixture parses”); let kind_of =
kind_assignment_failure_label_assertedunit[[kinds.kind_assignment_failure]]kind_assignment_failure_raised()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let fired = specodelic::fixtures::specs::rule_fired(&spec, "linter.property_kind_closed"); let sites = specodelic::fixtures::specs::label_sites("kinds", "kinds.kind_assignment_failure").expect("the corpus text is readable"); fired && sites.constraint_row && sites.property_row && sites.note } — error_label == "kinds.kind_assignment_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
shape_check_failure_label_assertedunit[[kinds.shape_check_failure]]shape_check_failure_raised()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let fired = specodelic::fixtures::specs::rule_fired(&spec, "linter.every_transition_valid"); let sites = specodelic::fixtures::specs::label_sites("kinds", "kinds.shape_check_failure").expect("the corpus text is readable"); fired && sites.constraint_row && sites.property_row && sites.note } — error_label == "kinds.shape_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

Fiber-kind extension of the base subkind sets (2026-10-03, beads specodelic-ung): a domain pack’s ## Kinds rows declare pack-qualified fiber kinds (e.g. empirical.statistic), and a base Constraint/Property row’s kind column accepts them when the pack is active for the file — the closed-set walkers’ effective set is base ∪ active-pack-fiber, never narrower (the base sets above do not grow; kind_field_extensible‘s append-only discipline is untouched — the extension is per-fiber, governed by openspec/specs/packs/spec.md, and dissolves when the pack is not active, firing the labeled finding instead of passing silently). The empirical-registry pack is the first consumer: its kind targets the base Properties table’s kind column directly (the sibling packs’ kinds live in pack-added sections, which is why they never needed this).

Two different things are called “kind” in this repo, and they must not be conflated. 𝒦’s five objects (Intent, Constraint, State, Transition, Property) are what this file calls kinds — which section of a spec file a row lives in. Separately, two of those kinds carry their own kind column as one of their fields: a Constraint row’s kind (currently only invariant) and a Property row’s kind (unit or law). These are sub-classifications within an already-assigned 𝒦-kind, not alternate values of it — a Property row with kind: "law" is still a Property in 𝒦’s sense, never a sixth object. Flagging this as CLAR-002 (same shape as STATUS.md’s open CLAR-001, the coverage/linter.coverage collision): worth an explicit rename in a future revision (e.g. subkind for the column, reserving kind for the 𝒦-level classification alone) rather than leaving two meanings on one word. Not resolved here, since renaming a live column is exactly the kind of change that should go through rename_naturality, not be done by hand.

property_row_shape’s kind ∈ {unit, law} is the authoritative home for the enum linter-schema_shape.md’s EXCL-001 wants a third member added to (kind = "audit", for claims like no_prose_field_parsed that are about the parser’s implementation rather than about spec-file content). When EXCL-001 is actioned, this file’s property_row_shape constraint is what gets a new Revision, and property_row_bad_subkind_rejected’s generator would need to change from a rejection case to an acceptance case for kind: "audit" specifically.

A gap surfaced writing this file, folded into specodelic.md as Revision 4 (same session, per AGENTS.md): nothing before this file required a Constraint row’s kind or a Property row’s kind to come from a closed set at all — frontmatter_valid only ever checked the file-level kind == "intent". A Property row with kind: "made_up" had no constraint anywhere rejecting it. constraint_row_shape and property_row_shape above close that, and specodelic.md now carries matching top-level invariants (constraint_kind_closed, property_kind_closed) tracing back to this file. Follow-up closed the same session: linter-schema_shape.md now owns and enforces both — see its kind_ok transition and the two ..._kind_invalid_rejected properties.

The four *_row_shape constraints above are now decided, not just stated (2026-11-13, ticket specodelic-3632): they were constraints without an enforcing checker — a Constraint row carrying an extra column (guard) or a State bullet carrying an extra field (kind) parsed without a finding, so the corpus could not decide the rows that claim those shapes are rejected. linter.row_shape_closed (family linter-schema_shape) now decides them: a row’s field set must be exactly its kind’s base fields plus the typed reference columns the Reference Typing table declares — an undeclared column is a finding. The reference-column half is read live from the Schema-as-data (never a hardcoded list that could drift); the base-field half mirrors the four constraints above. Checked against specodelic.md’s constraint list first (AGENTS.md check #3): the claim was already stated here, so no new corpus constraint was invented — the rule enforces the existing rows, it does not add a claim of its own.

Revision 2

constraint_row_shape’s kind set widens from {invariant} to {invariant, advisory} — kind_field_extensible exercised exactly as it was designed to be, one Revision heading per widening, nothing silent. An advisory Constraint is still fully a row of the Constraints table (same four fields, same table); the only place its meaning differs is outside this file entirely, in specodelic.md’s Reference Typing table, which now types guard’s target as Constraint, kind == invariant — this file owns row shape, not what other rows may reference a row, so that cross-row rule correctly lives there and not here. property_kind_closed is untouched: EXCL-001’s pending audit value is a separate, still-open question and this Revision takes no position on it.

Revision 3

Two changes, both from specodelic.md Revision 6, folded in here the same session per AGENTS.md:

  • constraint_row_shape’s kind set widens again, from {invariant, advisory} to {invariant, advisory, effect}. Same pattern as Revision 2 — one more kind_field_extensible-governed widening, row shape itself untouched (still {id, kind, expr, traces_to}). What an effect-kind Constraint means to other rows is again a cross-row fact that lives in specodelic.md’s Reference Typing table, not here: only emits may target one, the same way only guard may target an invariant one.

  • state_row_shape gains an optional field, emits. This is a row-shape change, unlike the two kind widenings above — State’s field set moves from {id} to {id, emits?}, which is why it’s stated as its own bullet rather than folded into the kind_field_extensible framing. emits gives a State the output half of a Moore machine (states, transitions, and a function from state to output — only the first two had anywhere to live before this). Making it optional rather than required means a plain automaton state and a Moore state are both well-formed State rows; nothing about existing specs (none of which use emits) becomes invalid by this widening, so variant_set_grows_only- style backward compatibility holds automatically. See USAGE.md for the worked pattern (a reducer’s three phases, each with its own emits).

  • kind_field_extensible’s wording was also corrected, independent of either change above: it used to restate, in its own words, the same “grows only via Revision” rule specodelic.md’s append_only_variants already stated for variant tables — the two had drifted slightly out of sync (compare Revision 5’s wording of append_only_variants against this file’s kind_field_extensible at the time). specodelic.md Revision 6 generalized append_only_variants to cover kind value-sets and the Reference Typing table too; this file’s row now just cites that one rule instead of keeping a second copy of the logic.

Revision 4

constraint_row_shape’s kind set widens a third time, from {invariant, advisory, effect} to {invariant, advisory, effect, extension_point}, folded in from specodelic.md Revision 7 the same session per AGENTS.md. Same pattern as Revisions 2 and 3 — row shape itself is untouched (still exactly {id, kind, expr, traces_to}); only the closed value-set kind_field_extensible governs grows by one member. An extension_point row states a contract a consumer’s code must satisfy (a method signature, a behavioral expectation) rather than an invariant this file’s own author enforces — what makes a Constraint reference that row meaningful lives, as with effect/emits, entirely outside this file, in specodelic.md’s Reference Typing table, which now types a new field, satisfies, at Constraint, kind == extension_point only. constraint_row_extension_point_accepted above is the matching acceptance case, added the same way constraint_row_advisory_accepted and constraint_row_effect_accepted were.

Revision 5

constraint_row_shape stated its fields as exactly {id, kind, expr, traces_to} — but the format already carries optional typed reference columns beside traces_to: Revision 7 of specodelic.md added satisfies (USAGE §2.6’s five-column example), and Revision 9 adds observes. The “exactly four fields” reading and the Reference Typing table contradicted each other — HITL ticket specodelic-mp1 row 9 asked which governs; this Revision answers: the table governs.

  • constraint_row_shape now states the general rule: base fields are exactly {id, kind, expr, traces_to}, plus optional typed reference columns — each such column must be declared in specodelic.md’s Reference Typing table, and carries no meaning beyond that typing (the table row is the whole contract). No observes special case — the next field costs one typing row, zero shape edits.
  • No existing file changes meaning: every optional column in use (satisfies) was already valid under the table-driven reading; the narrowing “exactly four” was the only reading it violated, and no checker enforced it.

Row shape is otherwise untouched — the same general-rule-instead-of-special-case move as kind_field_extensible.

Revision 6

EXCL-001 is resolved by dissolution — property_row_shape’s kind set stays {unit, law} and no audit member is added (HITL ticket specodelic-mp1 row 5, user-approved 2026-09-30, advised by a typed Jev evaluation, jev-1.13.0, confidence 1.00).

The only instance that ever motivated an audit kind was linter-schema_shape.md’s no_prose_field_parsed — a claim about the parser’s implementation, framed as “verified by code audit, not by a runnable PBT case”. That framing was wrong: the claim is mechanically testable by a planted-prose differential parse (generate a spec with prose in rationale/description, parse, assert no parsed row contains it). An enum member whose definition is “not machine-verified” would crack the format’s promise that Properties are runnable, and kind_field_extensible should be spent when the shape genuinely needs it — not on a singleton. The rewrite of that property to a runnable unit row lands with the corpus-reconciliation work (specodelic-cxq); a genuinely unrunnable implementation claim remains a possible future widening, on demand and under a Revision heading, as always.

Revision 7

Two spec-text fixes from the Rule-of-5 corpus review (2026-10-01, specodelic-x4w, CORR-002 + CORR-003, both MEDIUM) — rewordings that narrow nothing, folded under one Revision heading:

  • reject’s guard was a tautology. It read ¬(intent_row_shape ∧ constraint_row_shape ∧ state_row_shape ∧ transition_row_shape ∧ property_row_shape) — but no single row can satisfy all five mutually-exclusive shape conditions (a frontmatter block is never also a table row), so the conjunction is always false and reject fired unconditionally from shape_checked: well-formed rows had both accept and reject enabled — a non-deterministic model. Fixed to negate the applicable disjunct: ¬((row.kind==Intent ∧ intent_row_shape) ∨ (row.kind==Constraint ∧ constraint_row_shape) ∨ …) — exactly one disjunct applies per row, and its negation is the rejection condition. Contrast (kept as-is): linter-graph_shape.md’s same-shaped reject is correct — its four conjuncts co-apply to one artifact (the whole graph), not to five alternative shapes of one row.
  • intent_row_shape acknowledges optionally-declared frontmatter keys. It read “fields are exactly {id, kind, statement}”, but ten corpus files carry a fourth key, checked_against_core (the AGENTS.md convention recording a core-check pass) — documented in openspec/specs/AGENTS.md, undeclared in the format. constraint_row_shape received the optional-declared-columns carve-out in specodelic.md Revision 9’s move (this file’s Revision 5); the Intent layer never did. Now: base fields stay exactly {id, kind, statement}, plus optionally-declared frontmatter keys (currently checked_against_core, per AGENTS.md’s convention). No linter change accompanies this — frontmatter_valid is a subset check (it never rejects unknown keys) and stays one; the spec text is the only guard, and the pinning fixture (extra_frontmatter_key_lints_clean, tests/cli.rs) asserts the tool-level reading: a spec carrying the key lints clean, and the parser captures it as an extra field rather than dropping it.

Revision 8

The sixth object: scenario_binding (add-scenario-bindings, ticket specodelic-lksd, specodelic.md Revision 23). The statement’s object set grows five → six (Intent, Constraint, State, Transition, Property, scenario_binding — the append-only growth append_only_variants governs). New in this revision:

  • scenario_binding_row_shape — base field exactly {id} (the id cell IS the scenario slug, pinned to the one slugify algorithm in specodelic.md Revision 23), plus the four Reference Typing columns given/on/asserts/verifies (own-file, State/Transition/State/ Constraint). No kind column of its own — like State and Transition, the row is a structural fact, not a classified claim.
  • The shape guards grow a disjunct (accept/reject): a binding row is shape-checked by its own constraint, exactly like the other five — one disjunct applies per row, keeping the model deterministic (Revision 7’s tautology lesson).
  • Deriving properties — scenario_binding_extra_field_rejected (the undeclared-column case row_shape_closed fires on) and scenario_binding_typed_cells_accepted (the reference cells are optional in any subset). The prose of kind_shape_naturality still says “five kinds” — its identity/associativity claims are unchanged by a sixth member, and renaming discipline treats a binding id like any other id.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: unknown_kind_rejected

  • WHEN row_belonging_to_a_sixth_section()
  • THEN check(row) == failed
  • VERIFIES [[kinds.unknown_kind_rejected]]

Scenario: intent_missing_statement_rejected

  • WHEN intent_row_without_statement()
  • THEN check(row) == failed
  • VERIFIES [[kinds.intent_missing_statement_rejected]]

Scenario: constraint_row_extra_field_rejected

  • WHEN constraint_row_with_extra_field(extra_field: "guard")
  • THEN check(row) == failed
  • VERIFIES [[kinds.constraint_row_extra_field_rejected]]

Scenario: state_row_with_extra_field_rejected

  • WHEN state_row_with_extra_field(extra_field: "kind")
  • THEN check(row) == failed
  • VERIFIES [[kinds.state_row_with_extra_field_rejected]]

Scenario: transition_missing_guard_rejected

  • WHEN transition_row_without_guard()
  • THEN check(row) == failed
  • VERIFIES [[kinds.transition_missing_guard_rejected]]

Scenario: property_row_bad_subkind_rejected

  • WHEN property_row_with_kind_audit()
  • THEN check(row) == failed
  • VERIFIES [[kinds.property_row_bad_subkind_rejected]]

Scenario: subkind_addition_without_revision_rejected

  • WHEN diff_adding_subkind_value_with_no_new_Revision_heading()
  • THEN check(diff) == failed
  • VERIFIES [[kinds.subkind_addition_without_revision_rejected]]

Scenario: constraint_row_advisory_accepted

  • WHEN constraint_row_with_kind_advisory()
  • THEN check(row) == passed
  • VERIFIES [[kinds.constraint_row_advisory_accepted]]

Scenario: constraint_row_effect_accepted

  • WHEN constraint_row_with_kind_effect()
  • THEN check(row) == passed
  • VERIFIES [[kinds.constraint_row_effect_accepted]]

Scenario: state_row_emits_accepted

  • WHEN state_row_with_effect_emits()
  • THEN check(row) == passed
  • VERIFIES [[kinds.state_row_emits_accepted]]

Scenario: state_row_without_emits_still_passes

  • WHEN state_row_without_emits() — no emits
  • THEN check(row) == passed — emits is optional, not a second required field
  • VERIFIES [[kinds.state_row_without_emits_still_passes]]

Scenario: state_row_emits_wrong_kind_rejected

  • WHEN state_row_with_invariant_emits()
  • THEN check(row) == failed
  • VERIFIES [[kinds.state_row_emits_wrong_kind_rejected]]

Scenario: constraint_row_extension_point_accepted

  • WHEN constraint_row_with_kind_extension_point()
  • THEN check(row) == passed
  • VERIFIES [[kinds.constraint_row_extension_point_accepted]]

Scenario: well_formed_row_passes

  • WHEN arbitrary_well_formed_row_of_one_kind()
  • THEN check(row) == passed
  • VERIFIES [[kinds.well_formed_row_passes]]

Scenario: kind_shape_naturality

  • WHEN arbitrary_row_of_one_kind(), kinds_rename_id()
  • THEN identity: assigned_kind(rename(row,a,a)) == assigned_kind(row) associativity: assigned_kind(rename(rename(row,a,b),b,c)) == assigned_kind(rename(row,a,c)) — renaming a row’s id never changes which of the five kinds it belongs to
  • VERIFIES [[kinds.kind_shape_naturality]]

Scenario: kind_assignment_failure_label_asserted

  • WHEN kind_assignment_failure_raised()
  • THEN error_label == "kinds.kind_assignment_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[kinds.kind_assignment_failure_label_asserted]]

Scenario: shape_check_failure_label_asserted

  • WHEN shape_check_failure_raised()
  • THEN error_label == "kinds.shape_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[kinds.shape_check_failure_label_asserted]]

packs — domain-pack mechanism


id: packs kind: intent checked_against_core: clear statement: “WHEN a workspace enables a domain pack, THE format SHALL make the extension mechanism first-class — a kind: profile spec file whose six per-facet manifest tables declare exactly the sections, namespaced kinds, reference fields, checkers, floors, and requirements the pack introduces — and SHALL activate pack checking advisory-first by vocabulary use or a declared uses edge, never by config files, never by narrowing any base closed set, and never by changing how files without packs lint.”

Packs

Make specodelic’s extension mechanism first-class: a domain pack is a declared, discoverable, versioned artifact in the corpus itself — not a convention followed by hand. Base closed sets stop growing; vocabulary is pack-fiber-relative (the Grothendieck construction one level up, per [[theory]] precedent); independent packs coexist namespaced instead of colliding in the global kind sets.

Purpose

Make specodelic’s extension mechanism first-class: a domain pack is a declared, discoverable, versioned artifact in the corpus itself — not a convention followed by hand. Base closed sets stop growing; vocabulary is pack-fiber-relative (the Grothendieck construction one level up, per [[theory]] precedent); independent packs coexist namespaced instead of colliding in the global kind sets.

Constraints

idkindexprtraces_to
pack_is_profile_fileinvarianta pack is a four-layer spec file with kind: profile in frontmatter — no separate artifact format, no external manifest, self-hosting preserved[[packs]]
manifest_six_tablesinvarianta pack manifest is exactly six per-facet closed tables — ## Sections, ## Kinds, ## References, ## Checkers, ## Floors, ## Requires — each with a fixed row shape checked by the pack_shape lint rule[[packs]]
discovery_corpus_scaninvariantevery kind: profile file in the workspace is a candidate pack, found by corpus scan alone anchored at the git repository toplevel (the lint target directory when no git root exists) — no config file, no registry outside the corpus, and a subdirectory lint discovers packs living anywhere in the workspace[[packs]]
namespaced_vocabularyinvariantpack-declared kinds, sections, reference fields, and predicate names are pack-qualified in fiber scope; two packs claiming the same mechanism is legitimate, collision exists only at vocabulary level and resolves by pack-qualified naming[[packs]]
base_closed_sets_frozeninvariantbase closed sets (constraint kinds, property kinds, intent kinds, reference typing) stop growing except by true format Revision; a pack can never narrow or retype an existing set entry[[packs]]
advisory_first_opt_ininvariantpack checking activates advisory-first when a file uses the pack's declared vocabulary, upgradeable to a declared uses edge; activation is per-pack — identical vocabulary declared by two discovered packs activates both with findings attributed per pack — and vocabulary matching is longest-prefix; files without packs lint byte-identically to pre-mechanism behavior[[packs]]
orphan_vocabulary_labeledinvariantdeclared vocabulary used with no pack discovered or declared produces a labeled failure finding (non-zero exit) naming the candidate pack — prefix-derived when only the namespace is known — and both remediations; never a generic dangling message, never silent[[packs]]
uses_is_outbound_leafinvariantthe uses reference field appears as a set-valued column on any Constraint row and resolves to the intent of a kind: profile file (the pack's frontmatter id); it is an outbound leaf per specodelic.md's Reference Typing carve-out — nothing targets it, single_root_reachable needs no carve-out, mutual pack use is well-formed[[packs]]
pack_self_exemptinvarianta pack file is never a consumer of declared vocabulary — its own manifest rows never trigger its or any pack's checkers and never produce orphan findings[[packs]]
lifecycle_labeledinvariantpack states are draft, published, deprecated; pack_shape must pass at parse in every state and draft packs' checkers activate advisory-first naming the draft status; the pack-authored ## Requires table pins the base format_revision and pack deps; deprecated packs stay advisory with deprecation named in findings[[packs]]
skew_advisoryinvariantrevision skew between a pack's Requires base pin and the workspace corpus revision is a labeled advisory on the warnings channel — never silent, never failing[[packs]]
honest_emptyinvarianta pack checker with no workspace fixtures, data, or vocabulary instances reports an empty checked-set honestly — no fabricated discoveries[[packs]]
append_only_packsinvariantappend_only_variants applies to packs themselves — a pack release may only add vocabulary, never remove or narrow previously declared entries[[packs]]

Model

States

  • draft
  • published
  • deprecated

Transitions

idfromtoguard
publishdraftpublished[[packs.pack_is_profile_file]] ∧ [[packs.manifest_six_tables]] — pack_shape reports zero findings over the pack's own declared vocabulary
deprecatepublisheddeprecated[[packs.lifecycle_labeled]] — maintainer marks the pack deprecated; findings name the deprecation, vocabulary still checks

Properties

idkindderives_fromgeneratorpredicate
manifest_round_tripsunit[[packs.manifest_six_tables]]pack_file_parsed_then_manifest_read()**rust:** { let corpus = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", v0.as_str())]); let spec = corpus.specs().first().expect("the corpus carries the pack file"); let m = specodelic::packs::parse_manifest(spec); m.id == "data.pack" && m.lifecycle == "published" && m.sections == vec!["Data".to_string()] && m.kinds == vec!["data.pack.tolerance".to_string()] && m.references == vec!["measures".to_string()] && m.checkers == vec!["data.pack.bound_present".to_string()] && m.floors == vec!["data.pack.tolerance".to_string()] && m.requires.len() == 1 && m.requires[0].0 == "base" && m.requires[0].1.contains("Revision 20") } — declared entries equal parsed manifest rows — no drift, no prose leakage
discovery_finds_all_packsunit[[packs.discovery_corpus_scan]]corpus_with_n_profile_files()**rust:** { let beta = specodelic::fixtures::packs::pack_file("beta.pack", 20); let gamma = specodelic::fixtures::packs::pack_file("gamma.pack", 20); let corpus = specodelic::fixtures::packs::Corpus::new(&[("alpha.pack.md", v0.as_str()), ("beta.pack.md", beta.as_str()), ("gamma.pack.md", gamma.as_str())]); let mut ids: Vec<String> = vec![]; for p in corpus.discovered() { ids.push(p.id.clone()); } let mut reversed = corpus.specs().to_vec(); reversed.reverse(); let mut reversed_ids: Vec<String> = vec![]; for p in specodelic::packs::discover(&reversed) { reversed_ids.push(p.id.clone()); } ids == vec!["alpha.pack".to_string(), "beta.pack".to_string(), "gamma.pack".to_string()] && reversed_ids == ids } — scan reports exactly n packs, order-independent
subdir_lint_discovers_workspace_packsunit[[packs.discovery_corpus_scan]]lint_subdirectory_with_pack_at_workspace_root()**rust:** { let consumer = specodelic::fixtures::packs::consumer_spec("consumer", "", "data.pack.tolerance applies here"); let corpus = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", v0.as_str()), ("work/consumer.md", consumer.as_str())]); let packs = corpus.discovered(); let warnings = corpus.warning_messages(); let issues = corpus.issue_messages(); let mut activated = false; for w in &warnings { if w.contains("activated") && w.contains("data.pack.tolerance") { activated = true; } } let mut orphan = false; for i in &issues { if i.contains("orphan_vocabulary") { orphan = true; } } packs.len() == 1 && packs[0].id == "data.pack" && activated && !orphan } — pack discovered, its vocabulary checks run, zero orphan findings
no_pack_no_changeunit[[packs.advisory_first_opt_in]]corpus_linted_before_and_after_mechanism()**rust:** { let unrelated = specodelic::fixtures::packs::pack_file("other.pack", 20); let before = specodelic::fixtures::packs::Corpus::new(&[("consumer.md", v0.as_str())]); let after = specodelic::fixtures::packs::Corpus::new(&[("consumer.md", v0.as_str()), ("other.pack.md", unrelated.as_str())]); let mut before_issues: Vec<String> = Vec::new(); let mut before_warnings: Vec<String> = Vec::new(); let rb = before.lint(); for w in &rb.issues { before_issues.push(w.message.clone()); } for w in &rb.warnings { if specodelic::lint::is_scenario_coverage_hint(&w.rule_id) { continue; } before_warnings.push(w.message.clone()); } let mut after_issues: Vec<String> = Vec::new(); let mut after_warnings: Vec<String> = Vec::new(); let ra = after.lint(); for w in &ra.issues { after_issues.push(w.message.clone()); } for w in &ra.warnings { if specodelic::lint::is_scenario_coverage_hint(&w.rule_id) { continue; } after_warnings.push(w.message.clone()); } before_issues == after_issues && before_warnings == after_warnings && before_issues.is_empty() && before_warnings.is_empty() } — pack-machinery findings byte-identical and empty for a corpus using no pack vocabulary; the scenario-bindings rollout-meter hints (tickets pxjn/wlkt) are exempt by rule id
overlapping_vocabulary_activates_bothunit[[packs.advisory_first_opt_in]]two_packs_declare_identical_vocabulary_and_a_file_uses_it()**rust:** { let beta = specodelic::fixtures::packs::pack_file_with_kinds("beta", 20, &["shared.tolerance"]); let consumer = specodelic::fixtures::packs::consumer_spec("consumer", "", "shared.tolerance applies here"); let corpus = specodelic::fixtures::packs::Corpus::new(&[("alpha.md", v0.as_str()), ("beta.md", beta.as_str()), ("consumer.md", consumer.as_str())]); let warnings = corpus.warning_messages(); let issues = corpus.issue_messages(); let mut alpha_on = false; let mut beta_on = false; for w in &warnings { if w.contains("activated") && w.contains("shared.tolerance") { if w.contains("alpha") { alpha_on = true; } if w.contains("beta") { beta_on = true; } } } let mut orphan = false; for i in &issues { if i.contains("orphan_vocabulary") { orphan = true; } } alpha_on && beta_on && !orphan } — both packs' checkers run; findings attributed per pack
orphan_finding_names_packunit[[packs.orphan_vocabulary_labeled]]corpus_using_vocabulary_without_pack()**rust:** { let corpus = specodelic::fixtures::packs::Corpus::new(&[("consumer.md", v0.as_str())]); let report = corpus.lint(); let issues = corpus.issue_messages(); let mut orphan = String::new(); for i in &issues { if i.contains("orphan_vocabulary") { orphan = i.clone(); } } report.failures() > 0 && !orphan.is_empty() && orphan.contains("ghost.pack") && orphan.contains("kind: profile") && orphan.contains("add/enable") && orphan.contains("fix the vocabulary") } — failure finding names the candidate pack and both remediations, exit non-zero
uses_edge_typingunit[[packs.uses_is_outbound_leaf]]file_with_uses_edge_to_profile_id()**rust:** { let schema = specodelic::acset::schema::canonical(); let mut uses_profile = false; for m in &schema.morphisms { if m.column == "uses" { for r in &m.refinements { if r.kind == "profile" { uses_profile = true; } } } } let pack = specodelic::fixtures::packs::pack_file("data.pack", 20); let consumer = specodelic::fixtures::packs::consumer_spec("consumer", &specodelic::fixtures::packs::uses_link("data.pack"), "plain prose only"); let wrong = specodelic::fixtures::packs::consumer_spec("wrong", &specodelic::fixtures::packs::uses_link("consumer"), "plain prose only"); let corpus = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", pack.as_str()), ("consumer.md", consumer.as_str()), ("wrong.md", wrong.as_str())]); let report = corpus.lint(); let issues = corpus.issue_messages(); let mut pack_kind = String::new(); for s in corpus.specs() { if s.intent.id == "data.pack" { pack_kind = s.intent.kind.clone(); } } let mut violation = String::new(); for i in &issues { if i.contains("ref_kind_compatible") { violation = i.clone(); } } uses_profile && pack_kind == "profile" && !violation.is_empty() && violation.contains("uses") && violation.contains("profile") && violation.contains("consumer") && !violation.contains("data.pack") } — graph edge typed uses resolves to the profile id; wrong-kind targets violate typing
pack_self_activation_absentunit[[packs.pack_self_exempt]]pack_file_linted_alone()**rust:** { let corpus = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", v0.as_str())]); let report = corpus.lint(); let mut self_activated = false; let mut non_hint_warnings = 0; for w in &report.warnings { if w.message.contains("activated") { self_activated = true; } if !specodelic::lint::is_scenario_coverage_hint(&w.rule_id) { non_hint_warnings += 1; } } report.issues.is_empty() && non_hint_warnings == 0 && report.packs.len() == 1 && report.packs[0].id == "data.pack" && !self_activated } — its checkers report an empty checked-set; no pack-machinery findings from the pack's own manifest rows; the scenario-bindings rollout-meter hints are exempt by rule id
skew_is_warning_not_failureunit[[packs.skew_advisory]]pack_pinned_to_older_revision()**rust:** { let consumer = specodelic::fixtures::packs::consumer_spec("consumer", &specodelic::fixtures::packs::uses_link("data.pack"), "plain prose only"); let corpus = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", v0.as_str()), ("consumer.md", consumer.as_str())]); let report = corpus.lint(); let corpus_rev = specodelic::guide::revision_number(specodelic::guide::FORMAT_REVISION).expect("the embedded format revision parses"); let mut skew = String::new(); for w in &report.warnings { if w.rule_id == "linter.skew_advisory" { skew = w.message.clone(); } } report.issues.is_empty() && report.failures() == 0 && !skew.is_empty() && skew.contains("Revision 10") && skew.contains(&format!("Revision {corpus_rev}")) } — exit 0 with warning-channel advisory naming the pack's base pin and the corpus revision
empty_vocabulary_honestunit[[packs.honest_empty]]pack_enabled_without_instances()**rust:** { let consumer = specodelic::fixtures::packs::consumer_spec("consumer", "", "data.pack.tolerance applies here"); let corpus = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", v0.as_str()), ("consumer.md", consumer.as_str())]); let report = corpus.lint(); let mut activated = String::new(); for w in &report.warnings { if w.message.contains("activated") { activated = w.message.clone(); } } report.issues.is_empty() && report.failures() == 0 && activated.contains("empty checked-set") && activated.contains("data.pack.tolerance") } — checker reports empty checked-set; no fabricated findings
narrowing_rejectedunit[[packs.append_only_packs]]pack_removing_previously_declared_kind()**rust:** { let corpus = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", v0.as_str())]); let report = corpus.lint(); let mut shape = String::new(); for i in &report.issues { if i.rule_id == "linter.pack_shape" && i.message.contains("narrowing rejected") { shape = i.message.clone(); } } report.failures() > 0 && shape.contains("invariant") && shape.contains("append_only_packs") } — pack_shape fails naming the removed entry and the append-only law
profile_file_is_four_layerunit[[packs.pack_is_profile_file]]pack_parsed_as_standard_spec()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the pack file parses"); spec.intent.kind == "profile" && !spec.intent.id.is_empty() && !spec.intent.statement.is_empty() && !spec.constraints.is_empty() && !spec.states.is_empty() && !spec.transitions.is_empty() && !spec.properties.is_empty() } — all four layers parse from the pack file alone — no sidecar artifact needed
pack_vocabulary_qualifiedunit[[packs.namespaced_vocabulary]]two_packs_claim_same_mechanism()**rust:** { let beta = specodelic::fixtures::packs::pack_file_with_kinds("beta", 20, &["shared.tolerance"]); let consumer = specodelic::fixtures::packs::consumer_spec("consumer", "", "shared.tolerance applies here"); let corpus = specodelic::fixtures::packs::Corpus::new(&[("alpha.md", v0.as_str()), ("beta.md", beta.as_str()), ("consumer.md", consumer.as_str())]); let report = corpus.lint(); let packs = corpus.discovered(); let mut alpha_vocab = false; let mut beta_vocab = false; let mut alpha_id = String::new(); let mut beta_id = String::new(); for p in &packs { if p.id == "alpha" { alpha_id = p.id.clone(); for v in &p.vocabulary { if v == "shared.tolerance" { alpha_vocab = true; } } } if p.id == "beta" { beta_id = p.id.clone(); for v in &p.vocabulary { if v == "shared.tolerance" { beta_vocab = true; } } } } alpha_vocab && beta_vocab && alpha_id != beta_id && report.issues.is_empty() } — both packs' declared vocabulary resolves without cross-pack collision
base_sets_unchanged_by_packsunit[[packs.base_closed_sets_frozen]]guide_sets_compared_across_pack_enable()**rust:** { let consumer = specodelic::fixtures::packs::consumer_spec("consumer", "", "data.pack.tolerance applies here"); let corpus = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", v0.as_str()), ("consumer.md", consumer.as_str())]); let report = corpus.lint(); let base_consumer = specodelic::fixtures::packs::consumer_spec("base_consumer", "", "a base vocabulary claim"); let base_corpus = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", v0.as_str()), ("base_consumer.md", base_consumer.as_str())]); let base_report = base_corpus.lint(); let mut pack_kind_in_base = false; for k in specodelic::guide::INTENT_KINDS { if *k == "data.pack.tolerance" { pack_kind_in_base = true; } } let mut uses_resolves_to = String::new(); for r in specodelic::guide::REFERENCE_TYPING { if r.field == "uses" { uses_resolves_to = r.resolves_to.to_string(); } } report.issues.is_empty() && base_report.issues.is_empty() && !pack_kind_in_base && uses_resolves_to.contains("profile") } — INTENT_KINDS and Reference Typing sets identical with and without packs discovered
lifecycle_states_parsedunit[[packs.lifecycle_labeled]]pack_model_section_parsed()**rust:** { let draft_pack = specodelic::fixtures::packs::pack_file_in_state("draft.pack", 20, "draft"); let old_pack = specodelic::fixtures::packs::pack_file_in_state("old.pack", 20, "deprecated"); let published_consumer = specodelic::fixtures::packs::consumer_spec("consumer", "", "data.pack.tolerance applies here"); let draft_consumer = specodelic::fixtures::packs::consumer_spec("consumer", "", "draft.pack.tolerance applies here"); let old_consumer = specodelic::fixtures::packs::consumer_spec("consumer", "", "old.pack.tolerance applies here"); let published = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", v0.as_str()), ("consumer.md", published_consumer.as_str())]); let draft = specodelic::fixtures::packs::Corpus::new(&[("draft.pack.md", draft_pack.as_str()), ("consumer.md", draft_consumer.as_str())]); let old = specodelic::fixtures::packs::Corpus::new(&[("old.pack.md", old_pack.as_str()), ("consumer.md", old_consumer.as_str())]); let published_report = published.lint(); let draft_report = draft.lint(); let old_report = old.lint(); let mut draft_named = false; for w in &draft_report.warnings { if w.message.contains("draft status") { draft_named = true; } } let mut old_named = false; for w in &old_report.warnings { if w.message.contains("deprecated") { old_named = true; } } let mut published_clean = true; for w in &published_report.warnings { if w.message.contains("draft status") { published_clean = false; } if w.message.contains("deprecated") { published_clean = false; } } published_report.packs[0].lifecycle == "published" && draft_report.packs[0].lifecycle == "draft" && old_report.packs[0].lifecycle == "deprecated" && draft_named && old_named && published_clean } — each lifecycle state yields exactly its declared checking behavior
fiber_kinds_typeableunit[[packs.namespaced_vocabulary]]base_table_kind_column_with_active_fiber_kind()**rust:** { let pack = specodelic::fixtures::packs::pack_file_with_kinds("data.pack", 20, &["data.dataset"]); let with_pack = specodelic::fixtures::packs::Corpus::new(&[("data.pack.md", pack.as_str()), ("consumer.md", v0.as_str())]); let without_pack = specodelic::fixtures::packs::Corpus::new(&[("consumer.md", v0.as_str())]); let active = with_pack.lint(); let inactive = without_pack.lint(); let mut active_closed = false; for i in &active.issues { if i.rule_id == "linter.constraint_kind_closed" { active_closed = true; } } let mut inactive_closed = false; for i in &inactive.issues { if i.rule_id == "linter.constraint_kind_closed" { inactive_closed = true; } } !active_closed && inactive_closed } — the base closed-set walkers accept the pack-qualified kind when the pack is active; the same token without the pack fires the labeled finding (base ∪ active-pack-fiber, never narrower)

Notes

Fiber kinds in base-table kind columns (2026-10-03, beads specodelic-ung): mechanism v1’s closed-set walkers (property_kind_closed / constraint_kind_closed, openspec/specs/linter-schema_shape/spec.md) walked the static base sets, so a pack-declared fiber kind in a base-table kind column fired the finding even with its pack discovered — the sibling packs never hit this because their kinds live in pack-added sections. The walkers’ effective set is now base ∪ active-pack-fiber: the ## Kinds tokens of every pack active for the file (declared uses edge or vocabulary match — the same advisory-first activation rule as everything else here). This completes namespaced_vocabulary: a fiber kind is typeable in fiber scope, per-file. The base sets themselves do not grow (no format Revision; base pins stay valid) and a fiber kind with no active declaring pack stays outside the closed set — the labeled finding fires, never a silent pass. First consumer: empirical.registry’s empirical.statistic (the empirical-registry-pack capability spec’s fiber_kinds_typeable constraint and kind_column_accepts_fiber_kinds property).

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: manifest_round_trips

  • WHEN pack_file_parsed_then_manifest_read()
  • THEN declared entries equal parsed manifest rows — no drift, no prose leakage
  • VERIFIES [[packs.manifest_round_trips]]

Scenario: discovery_finds_all_packs

  • WHEN corpus_with_n_profile_files()
  • THEN scan reports exactly n packs, order-independent
  • VERIFIES [[packs.discovery_finds_all_packs]]

Scenario: subdir_lint_discovers_workspace_packs

  • WHEN lint_subdirectory_with_pack_at_workspace_root()
  • THEN pack discovered, its vocabulary checks run, zero orphan findings
  • VERIFIES [[packs.subdir_lint_discovers_workspace_packs]]

Scenario: no_pack_no_change

  • WHEN corpus_linted_before_and_after_mechanism()
  • THEN lint findings byte-identical for a corpus using no pack vocabulary
  • VERIFIES [[packs.no_pack_no_change]]

Scenario: overlapping_vocabulary_activates_both

  • WHEN two_packs_declare_identical_vocabulary_and_a_file_uses_it()
  • THEN both packs' checkers run; findings attributed per pack
  • VERIFIES [[packs.overlapping_vocabulary_activates_both]]

Scenario: orphan_finding_names_pack

  • WHEN corpus_using_vocabulary_without_pack()
  • THEN failure finding names the candidate pack and both remediations, exit non-zero
  • VERIFIES [[packs.orphan_finding_names_pack]]

Scenario: uses_edge_typing

  • WHEN file_with_uses_edge_to_profile_id()
  • THEN graph edge typed uses resolves to the profile id; wrong-kind targets violate typing
  • VERIFIES [[packs.uses_edge_typing]]

Scenario: pack_self_activation_absent

  • WHEN pack_file_linted_alone()
  • THEN its checkers report an empty checked-set; no orphan findings from the pack's own manifest rows
  • VERIFIES [[packs.pack_self_activation_absent]]

Scenario: skew_is_warning_not_failure

  • WHEN pack_pinned_to_older_revision()
  • THEN exit 0 with warning-channel advisory naming the pack's base pin and the corpus revision
  • VERIFIES [[packs.skew_is_warning_not_failure]]

Scenario: empty_vocabulary_honest

  • WHEN pack_enabled_without_instances()
  • THEN checker reports empty checked-set; no fabricated findings
  • VERIFIES [[packs.empty_vocabulary_honest]]

Scenario: narrowing_rejected

  • WHEN pack_removing_previously_declared_kind()
  • THEN pack_shape fails naming the removed entry and the append-only law
  • VERIFIES [[packs.narrowing_rejected]]

Scenario: profile_file_is_four_layer

  • WHEN pack_parsed_as_standard_spec()
  • THEN all four layers parse from the pack file alone — no sidecar artifact needed
  • VERIFIES [[packs.profile_file_is_four_layer]]

Scenario: pack_vocabulary_qualified

  • WHEN two_packs_claim_same_mechanism()
  • THEN both packs' declared vocabulary resolves without cross-pack collision
  • VERIFIES [[packs.pack_vocabulary_qualified]]

Scenario: base_sets_unchanged_by_packs

  • WHEN guide_sets_compared_across_pack_enable()
  • THEN INTENT_KINDS and Reference Typing sets identical with and without packs discovered
  • VERIFIES [[packs.base_sets_unchanged_by_packs]]

Scenario: lifecycle_states_parsed

  • WHEN pack_model_section_parsed()
  • THEN each lifecycle state yields exactly its declared checking behavior
  • VERIFIES [[packs.lifecycle_states_parsed]]

Scenario: fiber_kinds_typeable

  • WHEN base_table_kind_column_with_active_fiber_kind()
  • THEN the base closed-set walkers accept the pack-qualified kind when the pack is active; the same token without the pack fires the labeled finding (base ∪ active-pack-fiber, never narrower)
  • VERIFIES [[packs.fiber_kinds_typeable]]

Using packs

A domain pack is specodelic’s extension mechanism: a way to give a domain — data lineage, numeric predicates, bioimage metadata — its own typed sections, kinds, and reference fields without a format revision and without touching the core’s closed kind sets. This page is the practical guide: what a pack is, how a workspace enables one, what it adds, and the CLI loop you run against a pack-enabled spec. The machine truth lives in the packs spec; this page explains how to use the mechanism, not how it is specified.

Everything shown below is real output from specodelic 0.12.0 (on a TTY spk prints human-readable text; piped, it emits a JSON envelope).

What a pack is

A pack is a four-layer spec file with kind: profile in frontmatter — the same Intent → Constraints → Model → Properties shape as every other spec, plus six per-facet manifest tables:

## Sections, ## Kinds, ## References, ## Checkers, ## Floors, ## Requires

There is no separate artifact format and no sidecar manifest: the pack file is self-hosting, and linter.pack_shape checks the six tables’ row shapes at lint time in every lifecycle state. A malformed manifest is a labeled failure, never a silent pass.

In this repo the pack definitions live in packs/*.md (packs/data-lineage.md, packs/numeric-predicates.md, …). The frontmatter there is the source of truth for the pack inventory — CI derives the pack set from it (scripts/check_pack_doc_counts.py, the specodelic-typ0 gate) so doc pages that talk about “the standard packs” cannot drift from what actually ships. The in-repo packs are the five standard packs (data.lineage, numeric.predicates, empirical.registry, quant.finance, and svc.contracts — the last still draft) plus the bioimage.data D6 pilot (the first cross-pack ## Requires user). Each pack also has a capability spec in the rendered corpus — e.g. data-lineage-pack.

How a pack is enabled: corpus scan, not a config file

This is the part people coming from other tools trip on, so it is stated plainly: there is no packs.toml, no config file, no registry outside the corpus. Enablement is corpus-scan discovery:

  • Every kind: profile file in the workspace is a candidate pack, found by scanning alone. Put a kind: profile file anywhere in the repo and it is a pack.
  • The scan is anchored at the git repository toplevel of each linted directory (the lint target directory itself when no git root exists). Every linted path contributes its anchor, so discovery is order-independent: spk lint spec/a.md spec/b.md and spk lint spec/b.md spec/a.md discover the same pack set. Linting a subdirectory still discovers packs living anywhere in the workspace, because the anchor is the toplevel, not the subdirectory.
  • The pack’s frontmatter id (e.g. data.lineage) is how everything else refers to it.

Activation is advisory-first and opt-in per file: a spec activates a discovered pack either by using its vocabulary (a word-boundary match; matching is longest-prefix) or by declaring a uses reference to the pack’s id on a Constraint row. A pack file is never a consumer of its own vocabulary — its manifest rows never trigger its checkers. Identical vocabulary declared by two discovered packs activates both, with findings attributed per pack.

What a pack adds

Once a pack is active for a file, the mechanism adds six things. All of them are namespaced: pack vocabulary is pack-qualified (data.dataset, not dataset), so two packs may independently claim a same-named concept and never collide — collision resolves by pack-qualified naming, not by error.

  1. Namespaced sections. The pack’s ## Sections table declares typed extra sections with a fixed row shape. data.lineage declares a ## Data section whose rows are | name | kind | dtype | units | binding |.
  2. Fiber kinds. Pack-declared kinds usable in the closed kind columns of base tables. The base closed sets never grow — the walkers accept a fiber kind only when its declaring pack is active for that file (base ∪ active-pack-fiber, never narrower); the same token without its pack is the labeled orphan_vocabulary finding below.
  3. Reference fields. Set-valued typed references such as produced_by / consumed_by, resolving to declared rows of the same file (see the pack’s ## References table).
  4. Pack-qualified checkers. Rules named inside the pack’s namespace, e.g. data.lineage.closure. Checkers ship as declarations — the mechanism interprets the declaration at activation and reports honestly.
  5. Kind-dependent case-label floors. A pack’s ## Floors table can require named cases for law-kind properties of specific fiber kinds (e.g. data.artifact laws must carry a provenance: case).
  6. A ## Requires pin. Each pack pins the base format revision it was written against; skew with the workspace corpus is advisory (below), never a failure.

Two hard guarantees round this off:

  • Byte-identical guarantee. A spec that uses none of the pack vocabulary lints byte-identically to pre-mechanism behavior — no pack advisory, no new findings, nothing. With zero kind: profile files discovered, the machinery is inert.
  • Append-only packs. A pack release may only add vocabulary; removing or narrowing a previously declared entry fails linter.pack_shape, naming the entry and the append-only law. The same law keeps base closed sets frozen — a pack can never narrow or retype an existing entry.

Lifecycle and honest-empty checkers

A pack is draft, published, or deprecated (declared through the pack’s own Model section). draft packs activate advisory-first with the draft status named in the finding; deprecated packs keep checking with the deprecation named. A checker with no workspace fixtures, data, or vocabulary instances reports an empty checked-set — honestly, with no fabricated discoveries. That is exactly what the activation advisories below show: empty checked-set (no violations to report).

The CLI loop

Set up a scratch workspace with a pack file and a consumer spec (here: data.lineage from the repo’s packs/ directory, and a lab-ETL spec):

mkdir demo && cd demo && git init
cp /path/to/specodelic/packs/data-lineage.md .

spk lint — discovery and activation

A consumer spec that declares a typed ## Data table using the pack’s vocabulary:

---
id: lab.etl
kind: intent
statement: "WHEN the lab runs its ETL pipeline THE system SHALL record every dataset the pipeline produces or consumes."
---

## Data

| name      | kind          | dtype | units | binding          |
|-----------|---------------|-------|-------|------------------|
| raw_reads | data.dataset  | fastq | reads | s3://lab/reads   |
| counts    | data.artifact | tsv   | count | parquet://counts |

| row       | produced_by | consumed_by |
|-----------|-------------|-------------|
| raw_reads |             | counts      |
| counts    | raw_reads   | qc_report   |

Lint it (the rest of the four-layer file is elided here):

spk lint lab-etl.md
lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory lab.etl [linter.observability] pack `data.lineage` activated for `lab.etl` (vocabulary match: data.dataset, data.artifact, Data, produced_by, consumed_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

exit 0 — the pack was discovered by corpus scan (the git toplevel is the anchor) and activated by vocabulary match. The advisory is the activation note on the warnings channel: the pack’s declared rules ran and found nothing to report. No uses edge was needed.

The explicit route is a declared uses edge — a uses column on a Constraint row pointing at the pack’s frontmatter id:

| id | kind      | expr     | traces_to     | uses            |
|----|-----------|----------|---------------|-----------------|
| c1 | invariant | `plain`  | [[lab.etl]]   | [[data.lineage]] |
lint: 1 file(s) linted, 0 finding(s), 2 advisory warning(s)
  advisory lab.etl [linter.skew_advisory] pack `data.lineage` pins base Revision 14, workspace corpus is at Revision 18 — revision skew is advisory (never failing); consider updating the pack's `## Requires` base pin
  advisory lab.etl [linter.observability] pack `data.lineage` activated for `lab.etl` (declared uses edge) — declared rules: 6; empty checked-set (no violations to report)
→ Run: specodelic graph

The skew_advisory fires because this copy of the pack pins an older base revision than the corpus — a labeled advisory on the warnings channel, never a failure.

spk lint — what failure looks like

A declared uses edge naming a pack that is not discovered — say you lint the consumer file in a directory with no pack file in it — fails with labeled findings, never a silent pass (exit 1):

lint: 1 file(s) linted, 2 finding(s), 0 advisory warning(s)
  lab-etl.md [linter.total_refs] dangling reference `[[data.lineage]]` from constraints.uses — target not defined in any spec file
  lab.etl [linter.orphan_vocabulary] orphan vocabulary: `uses` edge targets `data.lineage`, but no `kind: profile` pack with that id is discovered — candidate pack `data.lineage`; remediations: add/enable a `kind: profile` pack file declaring it, or fix the vocabulary (remove or retype the `uses` edge)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

The orphan_vocabulary finding always names the candidate pack — prefix-derived from the vocabulary token’s namespace when only the namespace is known (a data.* token with no data.lineage-like pack discovered names the data.* namespace) — and states both remediations: enable a pack declaring the vocabulary, or fix the vocabulary. Pack-qualified tokens in a base table’s kind column fire the same rule when their namespace has no discovered pack; the pack-added section’s own rows stay inert without the pack. A malformed pack manifest (wrong row shapes, a missing facet table, a non-pack-qualified kind) is a linter.pack_shape labeled failure on the pack file itself.

spk graph and spk compile — same loop, pack-aware

spk graph lab-etl.md
graph: 1 file(s), 5 node(s), 5 edge(s), 0 dangling, 0 typing violation(s), 0 supersedes cycle(s), 0 external boundary(ies)
→ Run: specodelic lint
spk compile lab-etl.md
compile: 1 compiled, 0 failed
  lab-etl.md [lab.etl] → specodelic/lab-etl.toml, specodelic/lab-etl_props.rs, specodelic/lab-etl.tla
→ Run: specodelic verify (consumes the *_props.rs artifacts)

The declared uses edge resolves corpus-wide: with the pack file in the linted corpus, both the dangling-reference finding and the orphan_vocabulary finding clear. It is an outbound leaf — it joins no reachability path and no acyclic edge set (mutual pack use is well-formed), and v1’s graph projection records no edge row for it: pack enablement is a lint-level fact. Compile and verify treat a pack-enabled spec like any other: pack vocabulary adds no compile-time artifacts, it extends what lint understands.

Where to go next

graph


id: graph kind: intent checked_against_core: clear statement: “THE graph tool SHALL derive, from every typed reference field in the repo, a single authoritative adjacency structure over 𝒦’s kinds, kept as a generated artifact that is never hand-edited, and SHALL answer transitive-closure (blast-radius) queries against it without re-walking markdown per query.”

Graph

Every checker in this repo (linter-referential_integrity.md, linter-graph_shape.md, rename.md) already walks the reference edges specodelic.md’s Reference Typing table defines — but each does it independently, on demand, by re-reading markdown. Nothing keeps a single standing structure of “what points at what” that a tool could query directly. This file specifies that structure: a derived artifact, not a hand-authored one, so merge.md’s conflict check and refactor.md’s fan-in signal can both query it instead of each re-deriving reachability their own way — the same “one stated fact, not several hand-maintained copies” discipline specodelic.md Revision 6 already applied to append_only_variants, here applied to the graph itself rather than a constraint.

Purpose

Every checker in this repo (linter-referential_integrity.md, linter-graph_shape.md, rename.md) already walks the reference edges specodelic.md’s Reference Typing table defines — but each does it independently, on demand, by re-reading markdown. Nothing keeps a single standing structure of “what points at what” that a tool could query directly. This file specifies that structure: a derived artifact, not a hand-authored one, so merge.md’s conflict check and refactor.md’s fan-in signal can both query it instead of each re-deriving reachability their own way — the same “one stated fact, not several hand-maintained copies” discipline specodelic.md Revision 6 already applied to append_only_variants, here applied to the graph itself rather than a constraint.

Constraints

| id | kind | expr | traces_to | satisfies | |———————————–|———–|——————————————————————————————————————————————————————|–––––––––––| | graph_is_derived_not_authored | invariant | every edge in the graph artifact is produced by extraction from repo files; the artifact contains no information a hand edit to it could add that isn't already present in some file's reference field | [[graph]] | | | total_extraction | invariant | ∀ reference field instance (traces_to/derives_from/guard/from/to/supersedes/emits/satisfies/observes/given/on/asserts/verifies) in any parsed file: exactly one corresponding edge exists in the graph — a guard’s conjunction of several [[id]] citations counts as one edge per citation, not one edge per transition; the enumeration restates the Reference Typing table’s field set (the authority — satisfies joined it in Revision 7, the four scenario_binding columns in Revision 23) and links in non-reference columns (expr, predicate, frontmatter) are total_refs’ beat, never edges | [[graph]] | | | edge_kind_matches_typing | invariant | ∀ edge (source, field, target): (source.kind, field, target.kind) ∈ [[specodelic]]'s Reference Typing table — the graph never records an edge the typing table wouldn't allow, whether or not the underlying file is otherwise well-formed | [[graph]] | | | deterministic_derivation | invariant | re-deriving the graph from an unchanged repo produces a byte-identical artifact | [[graph]] | | | blast_radius_is_transitive_closure | invariant | blast_radius(id) == the forward and backward transitive closure of edges reachable from id, computed entirely within the derived artifact — never by re-walking source files | [[graph]] | | | stale_graph_detected | invariant | ∃ file whose on-disk content hash differs from the hash recorded at the artifact's last extraction ⟹ the artifact reports itself stale rather than silently serving an outdated query result | [[graph]] | | | external_boundary_derived | invariant | a file is classified as an external boundary iff it hosts ≥1 extension_point Constraint — the classification is a pure derivation over extracted structure, never an authored tag: removing the rows removes the classification, so a stale boundary tag cannot exist | [[graph]] | | | extraction_failure | effect | graph.extraction_failure(detail) | [[graph]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • unindexed
  • extracting
  • indexed
  • queryable
  • failed (emits: [[graph.extraction_failure]])

Transitions

idfromtoguard
extractunindexedextracting[[specodelic.parsed]] — every file in the repo has independently reached that state (see specodelic.md’s own lifecycle)
extract_okextractingindexed[[graph.total_extraction]] ∧ [[graph.edge_kind_matches_typing]]
extract_failextractingfailed¬([[graph.total_extraction]] ∧ [[graph.edge_kind_matches_typing]])
publishindexedqueryable[[graph.deterministic_derivation]] ∧ [[graph.graph_is_derived_not_authored]]
invalidatequeryableunindexed[[graph.stale_graph_detected]]

Properties

idkindderives_fromgeneratorpredicate
every_edge_extractedunit[[graph.total_extraction]]arbitrary_spec_repo()count(edges(graph)) == count(reference_field_instances(repo))
wrongly_typed_edge_rejectedunit[[graph.edge_kind_matches_typing]]hand_inserted_edge(source_kind: State, field: "guard", target_kind: Property)check(artifact) == rejected — guard targets an invariant Constraint or a State (specodelic.md Revision 12); a Property target is still rejected
rerun_deterministicunit[[graph.deterministic_derivation]]run_extraction_twice_against_unchanged_repo()artifact(run_1) == artifact(run_2)
blast_radius_transitiveunit[[graph.blast_radius_is_transitive_closure]]chain(a traces_to b, b derives_from c)c ∈ blast_radius(a) — reachable through two hops, no direct edge required
blast_radius_bidirectionalunit[[graph.blast_radius_is_transitive_closure]]edge(a → b)a ∈ blast_radius(b) ∧ b ∈ blast_radius(a) — renaming a must be able to find dependent b, and vice versa
stale_detected_on_editunit[[graph.stale_graph_detected]]edit_one_reference_field_without_re_extracting()check(artifact) == stale
hand_authored_edge_rejectedunit[[graph.graph_is_derived_not_authored]]graph_artifact_with_a_manually_inserted_edge_absent_from_any_file()check(artifact) == rejected
boundary_tracks_extension_pointsunit[[graph.external_boundary_derived]]file_hosting_extension_point_row_then_all_removed()classified(file) == true before, == false after removal — no authored residue
observes_edge_extractedunit[[graph.total_extraction]]constraint_row_carrying_observes_pointing_at_effect()exactly one edge, kind constraints.observes — and zero edges when the column is absent
extraction_failure_label_assertedunit[[graph.extraction_failure]]extraction_failure_raised()error_label == "graph.extraction_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

checked_against_core: clear (see AGENTS.md’s convention). One resolved ambiguity worth recording anyway: total_extraction counts each [[id]] citation inside a conjunctive guard (A ∧ B ∧ C) as its own edge, not the whole guard as one edge — otherwise blast_radius would under-count what a transition actually depends on.

observes (specodelic.md Revision 9) joins total_extraction but no cycle set. An observation claim is not a dependency: the acyclic invariant’s edge set (linter-graph_shape.md) is a closed union that observes deliberately does not join — satisfies and emits are excluded by the same closure — so mutual cross-file observation is well-formed. The external-boundary classification is the same derived-not-authored discipline applied to visibility: a file is an external boundary because it published a contract, and the fact disappears when the publication does.

given/on/asserts/verifies (specodelic.md Revision 23) join total_extraction the same way. A binding claim is not a dependency and not a reachability path: the four columns join no cycle set and — being own-file-only, with nothing targeting a binding row — confer no single_root_reachable linkage either. The binding row is a claim ABOUT the file’s machine; the machine’s own edges were already in the graph.

Scope boundary, Needs Human Review: this file does not replace linter-referential_integrity.md’s total_refs/unique_id or linter-graph_shape.md’s acyclic_traces/single_root_reachable — those checkers still own those constraints. What’s genuinely open is whether those two files should be refactored to query this artifact internally rather than independently re-deriving reachability, now that a shared artifact exists. That’s an efficiency and single-source-of-truth question, not a correctness gap, so it’s flagged rather than forced — changing either linter file’s internal mechanism without changing what it checks is exactly the kind of edit AGENTS.md’s workflow should route through a deliberate decision, not a side effect of adding this file.

Why extraction only requires parsed, not linted. Building the adjacency structure needs a reference field’s syntactic presence, not its resolution — a dangling [[typo_id]] still produces an edge (to a target that doesn’t yet exist), which is precisely the shape total_refs needs to check against. Requiring linted first would make the graph unable to represent the very files whose brokenness the existing checkers need to detect.

merge.md and refactor.md both depend on this file for blast-radius and fan-in queries respectively, rather than each re-deriving reachability — see each file’s own Constraints for how.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: every_edge_extracted

  • WHEN arbitrary_spec_repo()
  • THEN count(edges(graph)) == count(reference_field_instances(repo))
  • VERIFIES [[graph.every_edge_extracted]]

Scenario: wrongly_typed_edge_rejected

  • WHEN hand_inserted_edge(source_kind: State, field: "guard", target_kind: Property)
  • THEN check(artifact) == rejected — guard targets an invariant Constraint or a State (specodelic.md Revision 12); a Property target is still rejected
  • VERIFIES [[graph.wrongly_typed_edge_rejected]]

Scenario: rerun_deterministic

  • WHEN run_extraction_twice_against_unchanged_repo()
  • THEN artifact(run_1) == artifact(run_2)
  • VERIFIES [[graph.rerun_deterministic]]

Scenario: blast_radius_transitive

  • WHEN chain(a traces_to b, b derives_from c)
  • THEN c ∈ blast_radius(a) — reachable through two hops, no direct edge required
  • VERIFIES [[graph.blast_radius_transitive]]

Scenario: blast_radius_bidirectional

  • WHEN edge(a → b)
  • THEN a ∈ blast_radius(b) ∧ b ∈ blast_radius(a) — renaming a must be able to find dependent b, and vice versa
  • VERIFIES [[graph.blast_radius_bidirectional]]

Scenario: stale_detected_on_edit

  • WHEN edit_one_reference_field_without_re_extracting()
  • THEN check(artifact) == stale
  • VERIFIES [[graph.stale_detected_on_edit]]

Scenario: hand_authored_edge_rejected

  • WHEN graph_artifact_with_a_manually_inserted_edge_absent_from_any_file()
  • THEN check(artifact) == rejected
  • VERIFIES [[graph.hand_authored_edge_rejected]]

Scenario: boundary_tracks_extension_points

  • WHEN file_hosting_extension_point_row_then_all_removed()
  • THEN classified(file) == true before, == false after removal — no authored residue
  • VERIFIES [[graph.boundary_tracks_extension_points]]

Scenario: observes_edge_extracted

  • WHEN constraint_row_carrying_observes_pointing_at_effect()
  • THEN exactly one edge, kind constraints.observes — and zero edges when the column is absent
  • VERIFIES [[graph.observes_edge_extracted]]

Scenario: extraction_failure_label_asserted

  • WHEN extraction_failure_raised()
  • THEN error_label == "graph.extraction_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[graph.extraction_failure_label_asserted]]

compile


id: compile kind: intent checked_against_core: clear statement: “THE Compile transition SHALL translate a linted-and-covered spec file’s Constraints table, Model section, and Properties table into a TOML document, a TLA+ module, and a set of proptest! blocks respectively, without dropping or altering any id.”

Compile

specodelic.md names compile as the transition from linted to compiled, gated on coverage and law_requires_cases, but never specifies what compiling actually produces (STATUS.md §4, P0). This file is that specification: Compile is the functor Set^𝒦 → TOML (constraints), Set^𝒦 → TLA+ (the model), and Set^𝒦 → proptest! (properties) that STATUS.md §1 describes — one functor with three target categories, not three unrelated tools that happen to run at the same pipeline stage.

Purpose

specodelic.md names compile as the transition from linted to compiled, gated on coverage and law_requires_cases, but never specifies what compiling actually produces (STATUS.md §4, P0). This file is that specification: Compile is the functor Set^𝒦 → TOML (constraints), Set^𝒦 → TLA+ (the model), and Set^𝒦 → proptest! (properties) that STATUS.md §1 describes — one functor with three target categories, not three unrelated tools that happen to run at the same pipeline stage.

Notes

This file is what makes specodelic.md’s rename_naturality law fully stated. That property’s naturality case reads compile(rename(I)) == rename(compile(I)) — until now that referenced a compile function with no specification of its own, so the claim was unfalsifiable in practice even though it was written down. With constraint_table_to_toml, model_to_tla, and properties_to_proptest now pinned down field-for-field, compile(·) in that law means something concrete: three specific, checkable translations, not an unnamed black box.

compile_is_total’s “never a silent partial result” is the reason extracting/emitting are split into two states rather than one: a failure during extraction (a malformed Constraint/Model/Property row) and a failure during emission (the three extracted representations don’t agree well enough to produce one coherent output — e.g. a Transition’s guard references a Constraint id that extraction resolved but the TOML and TLA+ passes disagree about its type) are different failure classes, and collapsing them into one failed transition would have been the same God-transition pattern specodelic.md Revision 2 already removed from lint.

Updated for specodelic.md Revision 6: model_to_tla now also compiles a State’s optional emits field into a small Output function alongside Next — the piece that turns a compiled automaton into a compiled Moore machine. This is additive to the existing translation, not a restructuring of it: a Model with no emits fields anywhere compiles exactly as before, Output is simply empty.

checked_against_core: clear (see AGENTS.md’s convention) — every constraint here traces to this file’s own intent rather than to a top-level invariant, the same shape linter-frontmatter.md through linter-coverage.md use for constraints scoped entirely to one feature.

The .tla module is a product of compile alone, not of any checker choice. model_check may run a native interpreter backend that never reads the module (see model_check.md’s Notes on backends), but the module is still emitted: it is the human-reviewable, engine-portable form of the compiled model, and TLC — the opt-in reference engine — consumes it directly. Correspondingly the corpus language no longer offers “or Alloy”: with a native default backend and a reference TLA+ engine it had no remaining role, and dropping it keeps model_to_tla a single, fully specified translation.

model_check and verify (STATUS.md §4, both now done — see model_check.md and verify.md) both consume this file’s output directly: model_check runs a model-check backend against the TLA+ module model_to_tla produces, and verify runs the proptest! blocks properties_to_proptest produces — each specified in its own checker file.

Executable predicate fragments (specodelic.md Revision 15, specodelic-rjb). Every predicate and expr cell may now opt into executable translation with a **rust:** marker — the cell text after the marker is a Rust boolean expression, emitted verbatim, no mini-language in between. This closes the gap the compile functor shipped with: a predicate was compiled to a todo_predicate! placeholder that compiles and panics at execution, so verify’s properties gate failed honestly but could never pass. The four rejection rows keep the marker honest: a fragment on a law row, a non-invariant Constraint, or a Transition guard is a labeled extraction failure, not a silently ignored marker (guards have no binding over the program-counter model — deferred of record). Revision 21 narrows the law-row arm of that sentence: a law row’s fragment is accepted exactly when it is a per-case body (below) — every other law-row fragment is still a labeled extraction failure. fragment_hygiene is the security/totality guard, deliberately defense-in-depth rather than a sandbox: fragments run on the invoking user’s machine with the invoking user’s privileges, the same trust every compiled artifact already had — the banned-token list catches the escape hatches a table cell should never legitimately need. The scaffolding’s element type is now String (the GenVal tuple-struct wrapper retired in the same Revision) so fragments bind plain generator values — the wrapper existed only to carry the placeholder story, and fragments make that story optional.

The closed language-tag grammar (specodelic.md Revision 16, specodelic-lf3). The opt-in marker’s tag is drawn from the closed set {rust, py, ts}; a marker is ** + a tag-shaped label + :** where the tag matches [a-z][a-z0-9_-]* — the lowercase-initial shape is what separates a marker from ordinary bold prose (**Note:** stays prose). Acceptance is grammar-level and emitter-independent: **py:** and **ts:** extract like **rust:**, but gate compile labeled (no_emitter_labeled_failure) until their emitters land, since an accepted tag without an emitter would silently fall through to Rust — the vacuous outcome the closed set exists to prevent. A tag-shaped marker outside the closed set fails labeled, naming the tag and the closed set (unknown_tag_rejected). The one grammar collision is resolved by row kind: a law-kind predicate’s **label:** occurrences are the law-case grammar (Revision 13), never fragment markers, so the fragment grammar exempts law rows; every other fragment-position occurrence is checked.

Per-case bodies on law-kind rows (specodelic.md Revision 21, specodelic-1nhe). A law Property row names its cases as **name:** labels, and Revision 21 lets each of those cases carry its own executable body: a case key — **name::** — immediately followed by the fragment marker in fragment position, as **identity::** `**rust:** v0.len() >= 1` . The body is emitted verbatim as that case’s block body; a case with no body keeps the todo_predicate! placeholder. The labels stay the enumeration of record — a body never adds a case — and the shared parser (law.rs) is what keeps the linter’s law_cases rule and the compiler’s block expansion from disagreeing on what a case is. The closed tag set, the fragment-position rule, the hygiene list and the mention-vs-extraction rule are untouched: a per-case body is a fragment like any other, so **rust:** is never a case label, and a marker outside fragment position is still only a mention.

Two binding layers, one per tool, never merged (decision of record 2026-10-04, specodelic-lf3 — corrected review finding CORR-001, design openspec/changes/add-language-neutral-property-binding D3): the artifact’s // id: / // case: metadata comments and contract-TOML flags are not two spellings of one neutral ABI. The comments key per-block verdicts inside a specodelic artifact — properties_to_proptest emits them, properties_to_proptest’s own metadata comments key them, and nothing outside this file’s emission consumes them. Contract-TOML flags bind existing tests — pytest node ids, shell escape hatches — to scenarios, which is espectacular’s layer and stays there. Ownership: compile.md owns fragment extraction and artifact emission (the closed-tag grammar above); espectacular owns contract binding of existing tests (its [runners] config, already shipped — no parallel registry is built here, CORR-002); specodelic.md owns the format grammar (Revision 16’s closed set). Nothing in this file consumes or produces espectacular contract binding — merging the layers would couple scaffold execution policy to contract-binding policy with different wall-clock, caching, and toolchain stories.

Constraints

idkindexprtraces_tosatisfies
precondition_satisfiedinvariantCompile only runs on a file that has passed both lint and coverage — restates [[specodelic.compile]]’s own guard (transition, not row)[[compile]]
constraint_table_to_tomlinvariantevery Constraint row compiles to one TOML table entry {id, kind, expr, traces_to}, field-for-field, with no lossy transformation[[compile]]
model_to_tlainvariantthe Model section compiles to one TLA+ module — always emitted, regardless of which model_check backend (native stateright or TLC) later runs against the model: the module opens with a single-line TLA+ module header (dashes + MODULE name + dashes — the only form an engine parses); each State becomes a value in the module's state variable's range, each Transition becomes one disjunct of the Next action guarded by its guard field, and one closing stuttering disjunct (UNCHANGED vpc) ends Next — guards travel as prose comments, so a terminal state must not read as an engine-side deadlock; a State with an emitsfield additionally becomes one entry in anOutputfunction from that state value to the effect-kind Constraint'sexpr— absent for a state with noemits, never a default/null entry[[compile]]
properties_to_proptestinvarianteach Property row compiles to one proptest! block: generator becomes the block's input strategy, predicate becomes its assertion body — verbatim as a **rust:** fragment when the row opts in ([[compile.predicate_fragment_opt_in]]), else the un-translated todo_predicate! placeholder that compiles here and fails only at execution; a law-kind property compiles to one block per case enumerated in its predicate's **name:** case labels (the identity and associativity floor is lint-enforced ahead of compile, specodelic.md Revision 13) — Revision 21 gives each case its own body: the case's per-case body (a fragment marker under the case's key name::) becomes that case's block body verbatim, and a case with no body keeps the todo_predicate! placeholder[[compile]]
predicate_fragment_opt_ininvarianta Property's predicate cell may opt into executable translation with exactly one **rust:** marker and a non-empty fragment after it — the fragment is a Rust boolean expression emitted verbatim as the block's assertion body, the cell text after the marker — to the cell's end or the code span's closing backtick — is the fragment, binding the block's generated values (v0…, one per generator named in the generator cell, each a String); the marker opts in only in fragment position — starting the cell or immediately opening the fragment's code span, a backtick directly before it — an occurrence anywhere else (mid-span, as in the defining rows of this very table, or in prose between spans) is a mention of the mechanism and never extracts (specodelic-sd1); a cell with no marker compiles exactly as before (the placeholder) — pure widening, nothing valid before this Revision is invalidated; a law-kind Property row's predicate cell is the one cell that carries more than one marker: one per named case, each under its case key (name::), the case labels themselves staying the law-case grammar and never fragment markers (specodelic.md Revision 21)[[compile]]
invariant_fragment_opt_ininvarianta Constraint's expr cell may carry the same **rust:** fragment when the row's kind is invariant, under the same fragment-position rule as [[compile.predicate_fragment_opt_in]] — the fragment becomes an executable invariant model_check's native backend executes (model_check.md Revision 15); a fragment on a Constraint of any other kind (effect, advisory, a pack fiber kind) is a labeled extraction failure, never a silently ignored marker[[compile]]
fragment_law_rejectedinvarianta law-kind Property row's predicate cell carries at most one executable body per named case, each written under its case key (name::) — each required case needs its own assertion body and one fragment cannot honestly serve several named cases; a fragment that no case key introduces, a second body for one case, a body naming a case the row does not enumerate, an empty body, and a case key that introduces no body are each a labeled extraction failure naming the case, and a case key on a non-law row is rejected the same way — the per-case body grammar is law-only (specodelic.md Revision 21)[[compile]]
fragment_guard_rejectedinvarianta Transition's guard cell must not carry a **rust:** fragment in this Revision — the program-counter model has no data binding a guard could constrain, so executable guards have no defined semantics; violation is a labeled extraction failure, never a silently ignored marker (decision of record: deferred to a future Revision alongside a data-carrying state space)[[compile]]
fragment_language_closedinvariantthe executable-fragment tag set is closed: a cell in fragment position may carry exactly one **rust:**, **py:**, or **ts:** marker per the grammar below — one per cell, except a law-kind Property row's predicate cell, which carries one marker per named case (specodelic.md Revision 21) — the same closed-set discipline as [[specodelic.property_kind_closed]] and [[specodelic.constraint_kind_closed]]; the fragment-position rule and the non-empty-fragment requirement carry over verbatim per tag, and **rust:** remains the fully specified case with byte-identical semantics (widening [[compile.predicate_fragment_opt_in]]/[[compile.invariant_fragment_opt_in]]'s grammar; specodelic-lf3 Revision 16)[[compile]]
unknown_tag_rejectedinvarianta marker in fragment position whose tag is not in the closed set — **go:**, **java:**, any non-member — is a labeled extraction failure naming the unknown tag and the closed set, never a silently ignored marker (sd1's no-silent-markers discipline carried into the widened grammar; specodelic-lf3 Revision 16)[[compile]]
kernel_expr_opt_ininvariantan expr cell may opt into kernel translation per cell with exactly one **kernel:** marker and a non-empty kernel expression after it, under the same fragment-position rule as [[compile.predicate_fragment_opt_in]] — the expression is parsed against the closed atomic grammar (equality, comparisons, bounded ∀/∃ over the finite instances, ∧/¬, and the reference-typed atomics resolves/unique/acyclic/reachable; the closed set's name is kernel_grammar_closed) and evaluates three-valued per model_check.md; an expression using a non-member atomic fails labeled naming the atomic and the closed set — never prose, never silently ignored; a cell without the marker compiles exactly as before (pure widening, nothing valid before this Revision is invalidated; add-min-expr-kernel Revision 17)[[compile]]
kernel_binding_opaqueinvariantan invariant-kind Constraint's kernel.binding cell extracts as an opaque string surfaced verbatim in the compiled Constraints artifact — no parse, no validation, no interpretation of its internals by the toolchain — and the claim path for an external checker is its contract-TOML flags binding (a test node id, a filter expression, or a shell command payload), not a toolchain registry; a row with no binding column compiles exactly as before (design D4, add-min-expr-kernel Revision 17)[[compile]]
rust_back_compatinvariantevery cell that extracted a **rust:** fragment under Revision 15's grammar extracts a byte-identical fragment under the widened grammar, and a cell without any marker compiles exactly as before — pure widening, nothing valid at Revision 15 is invalidated (specodelic-lf3 Revision 16)[[compile]]
no_emitter_labeled_failureinvarianta **py:** or **ts:** fragment in fragment position fails compile labeled, with a remediation hint naming the per-language emitter follow-up — executable emission for those languages is deferred of record (specodelic-lf3 Revision 16, follow-ups add-py-fragment-emission/add-ts-fragment-emission); an accepted tag without an emitter would silently fall through to Rust, the vacuous outcome the closed set exists to prevent[[compile]]
mention_not_extractioninvarianta **rust:**/**py:**/**ts:** occurrence anywhere other than fragment position — mid-span, as in the defining rows of this very table, or in prose between spans — is a mention of the mechanism and never extracts (sd1's rule carried into the widened grammar; specodelic-lf3 Revision 16)[[compile]]
fragment_hygieneinvarianta fragment's text must not contain unsafe, extern, include!, include_str!, include_bytes!, std::fs, std::process, std::net, std::env, asm!, or Command — defense-in-depth against a fragment escaping its artifact's role (fragments run on the invoking user's machine with the invoking user's privileges, exactly like every other compiled artifact; the Rust compiler is not a sandbox); violation is a labeled extraction failure naming the token[[compile]]
compile_is_totalinvariant∀ file that has passed lint and coverage: Compile either produces all three artifacts or reports, for exactly one of them, which stage failed and why — it never returns a silent partial result[[compile]]
compile_preserves_idsinvariantevery id present in the source file appears, unchanged, in at least one compiled artifact — no id is silently dropped in translation[[compile]]
no_semantic_driftinvariantre-parsing a compiled artifact and re-emitting it yields output identical to the original compile — Compile is idempotent under its own round trip[[compile]]
artifact_stem_uniqueinvariant∀ literal compile invocation: two distinct collected files never produce one artifact stem — a corpus whose files collide is refused up front with the label duplicate_artifact_stem, naming both colliding file paths and a remediation hint, before lint, before every artifact write, and before the out-dir exists; a corpus whose stems are unique compiles unchanged, and one path collected twice (repeated argument or overlapping roots) is one file with one artifact set, never a collision[[compile]]
scope_refusal_envelopeinvarianta duplicate-stem refusal rides the error envelope: the label names both colliding files, the remediation hint names the escape (rename one file or compile in separate --out-dir runs), exit is 2, zero artifacts are reported or written, and every parse/hostile-input note collected while building the corpus is re-attached to the refusal envelope — an early refusal never swallows a skipped file's note[[compile]]
extraction_failureeffectcompile.extraction_failure(row_id, reason) — the extraction stage failed on row row_id because reason; the failure rides the errors capability's published error contract (envelope kind, exit code, remediation hint)[[compile]][[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]]
emission_failureeffectcompile.emission_failure(detail) — the emission stage failed because detail; the failure rides the errors capability's published error contract (envelope kind, exit code, remediation hint)[[compile]][[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]]
shared_fragment_defsinvarianta spec file MAY carry an optional ## Fragments section of def <name>: lines each followed by a fenced rust body; any fragment cell in the same file MAY reference a definition by the @name token, and compile SHALL inline each referenced definition's body at every use site as a ({ <items> <name> }) block expression — per-row blocks stay self-contained (the inline-not-shared-module decision of record; add-shared-fragment-helpers)[[compile]]
helper_reference_resolvesinvariantan @name reference naming no def in the file's ## Fragments section fails compile labeled at fragment_extraction, naming the unresolved reference — and a malformed or duplicate def line fails labeled the same way; never a silently ignored marker[[compile]]
helper_collision_labeledinvarianta def name colliding with a generated symbol — spec_gen, todo_predicate, an emitted block fn, or the v0, v1, … strategy-binding namespace — fails compile labeled naming both symbols; never a silent shadow[[compile]]
helper_hygiene_inheritedinvarianta def body containing a fragment_hygiene banned token fails compile labeled naming the token — helper bodies inherit the fragment token ban verbatim, documented imprecision included (defense-in-depth, not a sandbox)[[compile]]
helper_cycle_labeledinvariantdefinitions referencing each other in a cycle fail compile labeled naming the cycle — inlining terminates by construction; an acyclic chain (a fragment references a helper that references another) inlines fully at the use site[[compile]]
dead_helper_warnsadvisorya def reachable from no fragment cell — directly or transitively — is reported as a dead-helper warning on the compile warnings channel, and compile still succeeds: a warning, never a failure[[compile]]
fragments_section_opaqueinvariantthe linter treats ## Fragments as opaque prose — the section carries no frontmatter, tables, or typed references and disturbs no gating rule — and a file without the section compiles byte-identically to the pre-change compiler's output (pure widening)[[compile]]

Model

States

  • not_started
  • extracting
  • emitting
  • compiled
  • extract_failed (emits: [[compile.extraction_failure]])
  • emit_failed (emits: [[compile.emission_failure]])

Transitions

idfromtoguard
beginnot_startedextracting[[compile.precondition_satisfied]] ∧ [[compile.artifact_stem_unique]]
extract_okextractingemitting[[compile.constraint_table_to_toml]] ∧ [[compile.model_to_tla]] ∧ [[compile.properties_to_proptest]]
extract_failextractingextract_failed¬([[compile.constraint_table_to_toml]] ∧ [[compile.model_to_tla]] ∧ [[compile.properties_to_proptest]])
acceptemittingcompiled[[compile.compile_preserves_ids]] ∧ [[compile.no_semantic_drift]]
rejectemittingemit_failed¬([[compile.compile_preserves_ids]] ∧ [[compile.no_semantic_drift]])

Properties

idkindderives_fromgeneratorpredicate
precondition_violation_rejectedunit[[compile.precondition_satisfied]]file_that_has_not_passed_lint()**rust:** { let mut spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); spec.path = Some(std::path::PathBuf::from("file_that_has_not_passed_lint.md")); let report = specodelic::lint::lint_corpus(std::slice::from_ref(&spec)); match specodelic::compile::precondition_satisfied(&spec, &report) { Err(err) => err.stage == "precondition_satisfied" && err.message.contains("lint finding"), Ok(()) => false } } — check(file) == failed — the fixture is given its file identity so the lint labels the finding the way the CLI labels a file on disk
toml_roundtripsunit[[compile.constraint_table_to_toml]]arbitrary_constraint_row()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let doc = specodelic::compile::constraints_to_toml(&spec); let row = spec.constraints.first().expect("the fixture carries a Constraint row"); let cells = row.cells.clone(); let entry = format!("id = {:?}\nkind = {:?}\nexpr = {:?}\ntraces_to = {:?}\n", cells.get("id").cloned().unwrap_or_default(), cells.get("kind").cloned().unwrap_or_default(), cells.get("expr").cloned().unwrap_or_default(), cells.get("traces_to").cloned().unwrap_or_default()); doc.contains(&entry) && doc.matches("[[constraints]]").count() == 1 && specodelic::compile::compile_spec(&spec).is_ok() } — parse_toml(compile(row)) == row
tla_disjunct_count_matchesunit[[compile.model_to_tla]]arbitrary_model_section(n_transitions)**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let tla = specodelic::compile::model_to_tla(&spec); let next = tla.split("Next ==").nth(1).expect("the module carries a Next action"); let mut disjuncts = 0usize; for line in next.lines() { if line.trim_start().starts_with("\\/") { disjuncts += 1; } } disjuncts == spec.transitions.len() + 1 } — count(disjuncts(compile(model).Next)) == n_transitions + 1 — the closing stuttering disjunct
output_function_covers_emitting_states_onlyunit[[compile.model_to_tla]]arbitrary_model_section(n_states_with_emits, n_states_without)**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let tla = specodelic::compile::model_to_tla(&spec); let out = tla.split("Output ==").nth(1).expect("the module carries an Output function"); let body = out.split("====").next().unwrap_or_default(); let ir = specodelic::compile::extract_model_ir(&spec); let mut expected: Vec<String> = vec![]; for state in &spec.states { if state.cells.get("emits").is_some() { expected.push(state.id.clone()); } } let mut keys: Vec<String> = vec![]; for line in body.lines() { let trimmed = line.trim(); if trimmed.is_empty() { continue; } if let Some((key, _value)) = trimmed.split_once(" :> ") { keys.push(key.trim().trim_matches('"').to_string()); } } let mut values_ok = true; for (state, value) in &ir.emits_values { if !body.contains(&format!("{:?} :> {:?}", state, value)) { values_ok = false; } } keys == expected && values_ok && ir.emits.len() == expected.len() } — domain(compile(model).Output) == the_states_with_emits — no entry for the rest
proptest_block_per_propertyunit[[compile.properties_to_proptest]]property_row_with_one_property()**rust:** specodelic::verify::blocks_from_source(&specodelic::compile::properties_to_proptest(&specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"))).len() >= 1
law_property_compiles_required_casesunit[[compile.properties_to_proptest]]law_property_row_with(cases: ["identity", "associativity"])**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let row = spec.properties.first().expect("the fixture carries a Property row"); let predicate = row.cells.get("predicate").cloned().unwrap_or_default(); let src = specodelic::compile::properties_to_proptest(&spec); let blocks = specodelic::verify::blocks_from_source(&src); let mut cases = 0usize; for block in &blocks { if block.case.is_some() { cases += 1; } } let mut labels = 0usize; for label in ["**identity:**", "**associativity:**"] { if predicate.contains(label) { labels += 1; } } blocks.len() == cases && cases == 2 && labels == 2 } — count(compile(row).blocks) == 2
compile_completes_or_fails_cleanlyunit[[compile.compile_is_total]]arbitrary_linted_and_covered_file()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Ok(compiled) => !compiled.toml.is_empty() && !compiled.props.is_empty() && !compiled.tla.is_empty(), Err(err) => !err.stage.is_empty() && !err.message.is_empty() } } — compile(file) ∈ {all_three_artifacts, single_labeled_failure} — never partial
id_preservation_holdsunit[[compile.compile_preserves_ids]]arbitrary_linted_and_covered_file()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let compiled = specodelic::compile::compile_spec(&spec).expect("the fixture compiles"); let mut artifact_ids: Vec<String> = vec![]; for line in compiled.props.lines() { let trimmed = line.trim(); if let Some(rest) = trimmed.strip_prefix("// id: ") { artifact_ids.push(rest.trim().to_string()); } } for line in compiled.toml.lines() { let trimmed = line.trim(); if let Some(rest) = trimmed.strip_prefix("id = ") { artifact_ids.push(rest.trim().trim_matches('"').to_string()); } } let mut ok = compiled.toml.contains(&format!("source = {:?}", spec.intent.id)); for id in spec.defined_ids() { if !artifact_ids.contains(&id) && !compiled.tla.contains(id.as_str()) { ok = false; } } ok } — ids_in(file) ⊆ ids_in(compile(file))
roundtrip_stableunit[[compile.no_semantic_drift]]arbitrary_linted_and_covered_file()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let first = specodelic::compile::compile_spec(&spec).expect("the fixture compiles"); let reparsed = specodelic::spec::parse_str(&v0).expect("the fixture parses again"); let second = specodelic::compile::compile_spec(&reparsed).expect("the fixture compiles again"); first.toml == second.toml && first.props == second.props && first.tla == second.tla } — compile(file) == compile(parse(compile(file))) — the executable form re-parses the spec text and compiles again, comparing the three artifacts byte for byte; the tool exposes no re-parse of a compiled artifact, so that half of the round trip is checked at the spec level
extraction_failure_label_assertedunit[[compile.extraction_failure]]extraction_stage_fails_on_row()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains("p_empty_fragment") && err.message.contains("row"), Ok(_) => false } } — error_label == "compile.extraction_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
emission_failure_label_assertedunit[[compile.emission_failure]]emission_stage_fails()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "compile.emission_failure" && err.message.contains("add-py-fragment-emission"), Ok(_) => false } } — error_label == "compile.emission_failure" — same three-site rename rule (EDGE-002)
fragment_body_emitted_verbatimunit[[compile.predicate_fragment_opt_in]]property_row_with_rust_fragment()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let row = spec.properties.first().expect("the fixture carries a Property row"); let cell = row.cells.get("predicate").cloned().unwrap_or_default(); let fragment = specodelic::compile::fragment_of_strict(&cell).expect("the predicate parses").expect("the predicate carries a fragment"); let src = specodelic::compile::properties_to_proptest(&spec); src.contains(&fragment.text) } — the emitted block body contains the fragment verbatim
prose_predicate_stays_placeholderunit[[compile.predicate_fragment_opt_in]]property_row_without_fragment()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let row = spec.properties.first().expect("the fixture carries a Property row"); let cell = row.cells.get("predicate").cloned().unwrap_or_default(); let src = specodelic::compile::properties_to_proptest(&spec); specodelic::compile::fragment_of_strict(&cell).expect("the predicate parses").is_none() && src.contains("todo_predicate!") } — compile(row).body contains todo_predicate! — no widening of pre-Revision behavior
fragment_values_bind_generatorsunit[[compile.predicate_fragment_opt_in]]property_row_with_two_generators()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let row = spec.properties.first().expect("the fixture carries a Property row"); let cell = row.cells.get("generator").cloned().unwrap_or_default(); let src = specodelic::compile::properties_to_proptest(&spec); let mut names: Vec<String> = vec![]; for part in cell.split(',') { let name = part.trim().trim_matches('\u{60}').trim().trim_end_matches("()").trim().to_string(); if !name.is_empty() { names.push(name); } } let mut bound = 0usize; for name in &names { if src.contains(&format!("spec_gen::{}()", name)) { bound += 1; } } let mut args = 0usize; for line in src.lines() { if line.contains("v0 in spec_gen::") { args = line.matches(", v").count() + 1; } } names.len() == 2 && bound == 2 && args == 2 && src.contains("Value = String") } — the emitted block’s args are v0, v1 — one per named generator, each a String
rust_fragment_semantics_unchangedunit[[compile.rust_back_compat]]revision_15_rust_fragment_cell()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let row = spec.properties.first().expect("the fixture carries a Property row"); let cell = row.cells.get("predicate").cloned().unwrap_or_default(); let fragment = specodelic::compile::fragment_of_strict(&cell).expect("the predicate parses").expect("the predicate carries a fragment"); let after = cell.split("**rust:**").nth(1).expect("the cell carries the marker"); let expected = after.split('\u{60}').next().unwrap_or_default().trim(); fragment.text == expected && fragment.lang == specodelic::compile::FragmentLang::Rust } — extract(cell) == revision_15_extract(cell) — byte-identical, pure widening
unknown_tag_labeledunit[[compile.unknown_tag_rejected]]property_row_with_marker_tag("**go:")**rust:** { let mut spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let mut only_go: Vec<specodelic::spec::Row> = vec![]; for row in &spec.properties { if row.id == "p_go_tag" { only_go.push(row.clone()); } } spec.properties = only_go; match specodelic::compile::validate_fragments(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains("go") && err.message.contains("rust, py, ts"), Ok(()) => false } } — error_stage == fragment_extraction ∧ message names the tag and the closed set
non_fragment_tag_is_mentionunit[[compile.mention_not_extraction]]property_row_with_mid_span_marker_tag("**py:")**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let row = spec.properties.first().expect("the fixture carries a Property row"); let cell = row.cells.get("predicate").cloned().unwrap_or_default(); let compiled = specodelic::compile::compile_spec(&spec).expect("the fixture compiles — the mid-span mention never extracts"); specodelic::compile::fragment_of_strict(&cell).expect("the predicate parses").is_none() && compiled.props.contains("todo_predicate!") } — compile(row) == compile(row_without_marker) — mid-span occurrence never extracts
one_tag_extracts_per_cellunit[[compile.fragment_language_closed]]property_row_with_marker_tag("**py:")**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let mut extracted = 0usize; let mut tag = ""; for row in &spec.properties { let cell = row.cells.get("predicate").cloned().unwrap_or_default(); if let Ok(Some(fragment)) = specodelic::compile::fragment_of_strict(&cell) { extracted += 1; tag = fragment.lang.tag(); } } extracted == 1 && tag == "py" } — extract(cell) == Some(fragment_under("py")) — a fragment-position cell extracts under exactly one tag from the closed set {rust, py, ts}; acceptance is grammar-level and emitter-independent
missing_emitter_labeledunit[[compile.no_emitter_labeled_failure]]property_row_with_marker_tag("**py:")**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "compile.emission_failure" && err.message.contains("add-py-fragment-emission") && err.message.contains("py"), Ok(_) => false } } — error_label == "compile.emission_failure" ∧ the remediation hint names the per-language emitter follow-up — never a silent fall-through to Rust emission
law_fragment_labeledunit[[compile.fragment_law_rejected]]law_row_with_fragment()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains("law"), Ok(_) => false } } — error_stage == fragment_extraction
hygiene_violation_labeledunit[[compile.fragment_hygiene]]fragment_with(banned_token: "std::fs")**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains(&["std", "fs"].join("::")), Ok(_) => false } } — the banned token is assembled from its parts so this fragment stays hygiene-clean itself — error_stage == fragment_extraction ∧ message names the token
guard_fragment_labeledunit[[compile.fragment_guard_rejected]]transition_row_with_fragment_guard()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains("guard"), Ok(_) => false } } — error_stage == fragment_extraction
non_invariant_fragment_labeledunit[[compile.invariant_fragment_opt_in]]effect_row_with_fragment()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains("invariant"), Ok(_) => false } } — error_stage == fragment_extraction
kernel_expr_extractsunit[[compile.kernel_expr_opt_in]]invariant_cell_with_kernel_marker()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let row = spec.constraints.first().expect("the fixture carries a Constraint row"); let cell = row.cells.get("expr").cloned().unwrap_or_default(); let expr = specodelic::kernel::parse_kernel_expr(&cell).expect("the kernel expression parses under the closed grammar").expect("the cell opts into kernel translation"); let env = specodelic::kernel::KernelEnv::from_specs(std::slice::from_ref(&spec)); let value = env.evaluate(&expr); matches!(value, specodelic::compile::ThreeValued::Verified) } — the expression extracts under the closed grammar and evaluates to exactly one of verified, counterexample, unknown
kernel_nonmember_labeledunit[[compile.kernel_expr_opt_in]]invariant_cell_with_nonmember_atomic()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "kernel_grammar" && err.message.contains("frobnicate"), Ok(_) => false } } — error_stage == kernel_grammar ∧ the message names the offending atomic and the closed set
binding_text_surfaces_verbatimunit[[compile.kernel_binding_opaque]]constraint_row_with_arbitrary_binding_text()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let row = spec.constraints.first().expect("the fixture carries a Constraint row"); let binding = row.cells.get("kernel.binding").cloned().unwrap_or_default().trim().trim_matches('\u{60}').to_string(); let doc = specodelic::compile::constraints_to_toml(&spec); doc.contains(&format!("binding = {:?}", binding)) } — the compiled TOML carries the binding cell text verbatim — no interpretation, no validation of its internals
claim_path_is_flagsunit[[compile.kernel_binding_opaque]]external_checker_claiming_a_constraint()**rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let row = spec.constraints.first().expect("the fixture carries a Constraint row"); let binding = row.cells.get("kernel.binding").cloned().unwrap_or_default().trim().trim_matches('\u{60}').to_string(); let compiled = specodelic::compile::compile_spec(&spec).expect("the fixture compiles — the binding text is opaque, never interpreted"); compiled.toml.contains(&format!("binding = {:?}", binding)) && !compiled.props.contains(&binding) && !compiled.tla.contains(&binding) } — the claim is carried by contract-TOML flags binding; the toolchain builds no registry

| helper_inlines_at_each_use_site | unit | [[compile.shared_fragment_defs]] | spec_with_one_helper_and_two_referencing_fragments() | **rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let src = specodelic::compile::properties_to_proptest(&spec); let mut bodies = 0usize; let mut stray = 0usize; for line in src.lines() { if line.contains("fn shared_helper") { bodies += 1; } if line.contains(&format!("@{}", "shared_helper")) && !line.trim_start().starts_with("// predicate:") { stray += 1; } } bodies == 2 && stray == 0 } — the helper body appears in the emitted props artifact once per use site, and no @name marker survives outside the verbatim row-quote metadata comments | | unknown_helper_reference_labeled | unit | [[compile.helper_reference_resolves]] | property_fragment_referencing("@ghost(&v0)") | **rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains("ghost"), Ok(_) => false } } — error_stage == fragment_extraction ∧ the message names the unresolved reference | | helper_collision_labeled_asserted | unit | [[compile.helper_collision_labeled]] | helper_named("v0") | **rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains("v0") && err.message.contains("strategy-binding namespace"), Ok(_) => false } } — error_stage == fragment_extraction ∧ the message names both the helper and the generated symbol | | helper_hygiene_labeled | unit | [[compile.helper_hygiene_inherited]] | helper_body_with(banned_token: "std::fs") | **rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains(&["std", "fs"].join("::")) && err.message.contains("fragment_hygiene"), Ok(_) => false } } — the banned token is assembled from its parts so this fragment stays hygiene-clean itself — error_stage == fragment_extraction ∧ the message names the token and the fragment_hygiene rule | | helper_cycle_labeled_asserted | unit | [[compile.helper_cycle_labeled]] | mutually_referencing_helpers("is_a", "is_b") | **rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); match specodelic::compile::compile_spec(&spec) { Err(err) => err.stage == "fragment_extraction" && err.message.contains("is_a") && err.message.contains("is_b"), Ok(_) => false } } — error_stage == fragment_extraction ∧ the message names the cycle; a transitive acyclic chain inlines all bodies at the use site | | dead_helper_warns_asserted | unit | [[compile.dead_helper_warns]] | spec_with_an_unreferenced_def() | **rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let compiled = specodelic::compile::compile_spec(&spec).expect("the fixture compiles — a dead helper warns, never fails"); let mut named = 0usize; for warning in &compiled.warnings { if warning.contains("unused_helper") { named += 1; } } named == 1 && compiled.warnings.len() == 1 } — compile succeeds ∧ the warnings channel names the dead def ∧ referenced defs are not warned | | absent_section_preserves_bytes_p | unit | [[compile.fragments_section_opaque]] | linted_and_covered_file_without_a_fragments_section() | **rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let with_text = specodelic::fixtures::materialize("linted_and_covered_file_with_a_fragments_section").expect("the with-section fixture materializes"); let with_section = specodelic::spec::parse_str(&with_text).expect("the with-section fixture parses"); let without = specodelic::compile::compile_spec(&spec).expect("the without-section file compiles"); let with = specodelic::compile::compile_spec(&with_section).expect("the with-section file compiles"); without.toml == with.toml && without.props == with.props && without.tla == with.tla } — every compiled artifact is byte-identical to the pre-change compiler’s output for that file | | fragments_section_lints_clean_p | unit | [[compile.fragments_section_opaque]] | linted_and_covered_file_with_a_fragments_section() | **rust:** { let spec = specodelic::spec::parse_str(&v0).expect("the materialized fixture parses"); let report = specodelic::lint::lint_corpus(std::slice::from_ref(&spec)); report.issues.len() == 0 } — lint issues == 0 — the section is opaque prose, no gating rule disturbed | | duplicate_stem_refused | unit | [[compile.artifact_stem_unique]] | spec_file_named_pipeline() | **rust:** { let a = specodelic::fixtures::specs::materialize("spec_file_named_pipeline").expect("fixture"); let mut sa = specodelic::spec::parse_str(&a).expect("parses"); sa.path = Some(std::path::PathBuf::from("/corpus/a/pipeline.md")); let mut sb = specodelic::spec::parse_str(&a).expect("parses"); sb.path = Some(std::path::PathBuf::from("/corpus/b/pipeline.md")); match specodelic::compile::artifact_stem_collision(&[sa, sb]) { Some((msg, hint)) => msg.contains("duplicate_artifact_stem") && msg.contains("/corpus/a/pipeline.md") && msg.contains("/corpus/b/pipeline.md") && hint.contains("rename"), None => false } } | | unique_stems_compile | unit | [[compile.artifact_stem_unique]] | spec_file_named_alpha() | **rust:** { let a = specodelic::fixtures::specs::materialize("spec_file_named_pipeline").expect("fixture"); let b = specodelic::fixtures::specs::materialize("spec_file_named_alpha").expect("fixture"); let mut sa = specodelic::spec::parse_str(&a).expect("parses"); sa.path = Some(std::path::PathBuf::from("/corpus/a/pipeline.md")); let mut sb = specodelic::spec::parse_str(&b).expect("parses"); sb.path = Some(std::path::PathBuf::from("/corpus/b/alpha.md")); specodelic::compile::artifact_stem_collision(&[sa, sb]).is_none() } | | repeated_path_is_one_file | unit | [[compile.artifact_stem_unique]] | spec_file_named_alpha() | **rust:** { let a = specodelic::fixtures::specs::materialize("spec_file_named_alpha").expect("fixture"); let mut sa = specodelic::spec::parse_str(&a).expect("parses"); sa.path = Some(std::path::PathBuf::from("/corpus/alpha.md")); let mut sb = specodelic::spec::parse_str(&a).expect("parses"); sb.path = Some(std::path::PathBuf::from("/corpus/alpha.md")); specodelic::compile::artifact_stem_collision(&[sa, sb]).is_none() } | | refusal_names_label_and_remediation | unit | [[compile.scope_refusal_envelope]] | spec_file_named_pipeline() | **rust:** { let a = specodelic::fixtures::specs::materialize("spec_file_named_pipeline").expect("fixture"); let mut sa = specodelic::spec::parse_str(&a).expect("parses"); sa.path = Some(std::path::PathBuf::from("/corpus/a/pipeline.md")); let mut sb = specodelic::spec::parse_str(&a).expect("parses"); sb.path = Some(std::path::PathBuf::from("/corpus/b/pipeline.md")); match specodelic::compile::artifact_stem_collision(&[sa, sb]) { Some((msg, hint)) => msg.contains("duplicate_artifact_stem") && msg.contains("/corpus/a/pipeline.md") && msg.contains("/corpus/b/pipeline.md") && hint.contains("rename"), None => false } } |

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: precondition_violation_rejected

  • WHEN file_that_has_not_passed_lint()
  • THEN check(file) == failed
  • VERIFIES [[compile.precondition_violation_rejected]]

Scenario: toml_roundtrips

  • WHEN arbitrary_constraint_row()
  • THEN parse_toml(compile(row)) == row
  • VERIFIES [[compile.toml_roundtrips]]

Scenario: tla_disjunct_count_matches

  • WHEN arbitrary_model_section(n_transitions)
  • THEN count(disjuncts(compile(model).Next)) == n_transitions + 1 — the closing stuttering disjunct
  • VERIFIES [[compile.tla_disjunct_count_matches]]

Scenario: output_function_covers_emitting_states_only

  • WHEN arbitrary_model_section(n_states_with_emits, n_states_without)
  • THEN domain(compile(model).Output) == the_states_with_emits — no entry for the rest
  • VERIFIES [[compile.output_function_covers_emitting_states_only]]

Scenario: proptest_block_per_property

  • WHEN property_row_with_one_property() — a materialized fixture, not the generator’s own name
  • THEN count(compile(row).blocks) >= 1 — the compiled **rust:** fragment counts the blocks the real compiler emitted for the fixture
  • VERIFIES [[compile.proptest_block_per_property]]

Scenario: law_property_compiles_required_cases

  • WHEN law_property_row_with(cases: ["identity", "associativity"])
  • THEN count(compile(row).blocks) == 2
  • VERIFIES [[compile.law_property_compiles_required_cases]]

Scenario: compile_completes_or_fails_cleanly

  • WHEN arbitrary_linted_and_covered_file()
  • THEN compile(file) ∈ {all_three_artifacts, single_labeled_failure} — never partial
  • VERIFIES [[compile.compile_completes_or_fails_cleanly]]

Scenario: id_preservation_holds

  • WHEN arbitrary_linted_and_covered_file()
  • THEN ids_in(file) ⊆ ids_in(compile(file))
  • VERIFIES [[compile.id_preservation_holds]]

Scenario: roundtrip_stable

  • WHEN arbitrary_linted_and_covered_file()
  • THEN compile(file) == compile(parse(compile(file)))
  • VERIFIES [[compile.roundtrip_stable]]

Scenario: extraction_failure_label_asserted

  • WHEN extraction_stage_fails_on_row()
  • THEN error_label == "compile.extraction_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[compile.extraction_failure_label_asserted]]

Scenario: emission_failure_label_asserted

  • WHEN emission_stage_fails()
  • THEN error_label == "compile.emission_failure" — same three-site rename rule (EDGE-002)
  • VERIFIES [[compile.emission_failure_label_asserted]]

Scenario: fragment_body_emitted_verbatim

  • WHEN property_row_with_rust_fragment()
  • THEN the emitted block body contains the fragment verbatim
  • VERIFIES [[compile.fragment_body_emitted_verbatim]]

Scenario: prose_predicate_stays_placeholder

  • WHEN property_row_without_fragment()
  • THEN compile(row).body contains todo_predicate! — no widening of pre-Revision behavior
  • VERIFIES [[compile.prose_predicate_stays_placeholder]]

Scenario: fragment_values_bind_generators

  • WHEN property_row_with_two_generators()
  • THEN the emitted block's args are v0, v1 — one per named generator, each a String
  • VERIFIES [[compile.fragment_values_bind_generators]]

Scenario: rust_fragment_semantics_unchanged

  • WHEN revision_15_rust_fragment_cell()
  • THEN extract(cell) == revision_15_extract(cell) — byte-identical, pure widening
  • VERIFIES [[compile.rust_fragment_semantics_unchanged]]

Scenario: unknown_tag_labeled

  • WHEN property_row_with_marker_tag("**go:")
  • THEN error_stage == fragment_extraction ∧ message names the tag and the closed set
  • VERIFIES [[compile.unknown_tag_labeled]]

Scenario: non_fragment_tag_is_mention

  • WHEN property_row_with_mid_span_marker_tag("**py:")
  • THEN compile(row) == compile(row_without_marker) — mid-span occurrence never extracts
  • VERIFIES [[compile.non_fragment_tag_is_mention]]

Scenario: one_tag_extracts_per_cell

  • WHEN property_row_with_marker_tag("**py:")
  • THEN extract(cell) == Some(fragment_under("py")) — a fragment-position cell extracts under exactly one tag from the closed set {rust, py, ts}; acceptance is grammar-level and emitter-independent
  • VERIFIES [[compile.one_tag_extracts_per_cell]]

Scenario: missing_emitter_labeled

  • WHEN property_row_with_marker_tag("**py:")
  • THEN error_label == "compile.emission_failure" ∧ the remediation hint names the per-language emitter follow-up — never a silent fall-through to Rust emission
  • VERIFIES [[compile.missing_emitter_labeled]]

Scenario: law_fragment_labeled

  • WHEN law_row_with_fragment()
  • THEN error_stage == fragment_extraction
  • VERIFIES [[compile.law_fragment_labeled]]

Scenario: hygiene_violation_labeled

  • WHEN fragment_with(banned_token: "std::fs")
  • THEN error_stage == fragment_extraction ∧ message names the token
  • VERIFIES [[compile.hygiene_violation_labeled]]

Scenario: guard_fragment_labeled

  • WHEN transition_row_with_fragment_guard()
  • THEN error_stage == fragment_extraction
  • VERIFIES [[compile.guard_fragment_labeled]]

Scenario: non_invariant_fragment_labeled

  • WHEN effect_row_with_fragment()
  • THEN error_stage == fragment_extraction
  • VERIFIES [[compile.non_invariant_fragment_labeled]]

Scenario: kernel_expr_extracts

  • WHEN invariant_cell_with_kernel_marker()
  • THEN the expression extracts under the closed grammar and evaluates to exactly one of verified, counterexample, unknown
  • VERIFIES [[compile.kernel_expr_extracts]]

Scenario: kernel_nonmember_labeled

  • WHEN invariant_cell_with_nonmember_atomic()
  • THEN error_stage == kernel_grammar ∧ the message names the offending atomic and the closed set
  • VERIFIES [[compile.kernel_nonmember_labeled]]

Scenario: binding_text_surfaces_verbatim

  • WHEN constraint_row_with_arbitrary_binding_text()
  • THEN the compiled TOML carries the binding cell text verbatim — no interpretation, no validation of its internals
  • VERIFIES [[compile.binding_text_surfaces_verbatim]]

Scenario: claim_path_is_flags

  • WHEN external_checker_claiming_a_constraint()
  • THEN the claim is carried by contract-TOML flags binding; the toolchain builds no registry
  • VERIFIES [[compile.claim_path_is_flags]]

Requirement: Shared fragment definitions

A spec file MAY carry an optional ## Fragments section of def-lines (def <name>: followed by a fenced rust body); any fragment cell in the same file MAY reference a definition by name, and compile SHALL inline each referenced definition’s body at every use site. The linter treats the section as opaque prose — it carries no frontmatter, tables, or typed references. Referencing, hygiene, and termination behaviors are specified in the scenarios.

Scenario: Helper inlines at each use site

  • WHEN a file defines one helper and two property fragments reference it
  • THEN each emitted block carries the helper’s body inlined, and the helper definition itself is emitted once per use site — not referenced by a generated indirection

Scenario: Unknown reference fails labeled

  • WHEN a fragment references a name no ## Fragments row defines
  • THEN compile fails labeled, naming the unresolved reference

Scenario: Name collision fails labeled

  • WHEN a definition’s name collides with a generated symbol
  • THEN compile fails labeled, naming both symbols — never a silent shadow

Scenario: Helper cycle fails labeled

  • WHEN definitions reference each other in a cycle (def a: uses b, def b: uses a)
  • THEN compile fails labeled naming the cycle — inlining terminates by construction

Scenario: Transitive reference inlines fully

  • WHEN a fragment references a helper that references another helper
  • THEN both bodies are inlined at the use site

Scenario: Unused definition warns

  • WHEN a definition is referenced by zero fragment cells
  • THEN compile emits a dead-helper warning on the warnings channel and still succeeds

Scenario: Absent section preserves bytes

  • WHEN a file has no ## Fragments section
  • THEN its compiled artifacts are byte-identical to the pre-change compiler’s output for that file

Requirement: Duplicate artifact stems refused before any write

spk compile over a corpus SHALL refuse an invocation in which two distinct collected files produce the same artifact stem (compile::artifact_stem) with a duplicate_artifact_stem error envelope naming both colliding paths and the remediation hint (rename one file, or compile in separate --out-dir runs), exiting 2 before lint, before compilation, before every artifact write, and before the out-dir is created, so a refused run leaves no artifacts.

Scenario: Duplicate stems refuse with no artifacts written

  • WHEN two distinct files in one spk compile invocation share an artifact stem
  • THEN the run exits 2 with an error envelope whose label is duplicate_artifact_stem, whose message names both colliding file paths, and whose hint names the rename / separate---out-dir remediation — and the out-dir is never created

Scenario: Unique stems compile unchanged

  • WHEN every collected file in the invocation has a distinct artifact stem
  • THEN every file compiles and writes its artifacts with exit 0 — the guard is collide-only

Scenario: A repeated path is one file, not a collision

  • WHEN the same path is collected twice by one invocation (repeated argument or overlapping roots)
  • THEN the run does not refuse: the repeat is one file with one artifact set, exit 0, and the refusal label never appears

Requirement: Scope refusal keeps the corpus notes

The duplicate-stem refusal SHALL re-attach every parse and hostile-input note collected while building the corpus to the refusal envelope’s warnings channel, exactly as the adjacent empty-corpus refusal does — an early refusal never swallows the note that names a skipped file.

Scenario: Hostile-input note survives the refusal

  • WHEN a corpus carries both a stem collision and a non-ingestable file skipped with a labeled note
  • THEN the error envelope reports the collision label and the skip note naming the skipped file, exits 2, and writes nothing

model_check


id: model_check kind: intent checked_against_core: clear statement: “THE model_check step SHALL run a model-check backend — stateright (embedded, default) or TLC (opt-in) — against the model compile.md’s model_to_tla produces, and SHALL report either that no counterexample was found within a stated bound, or a minimal counterexample trace naming the violated invariant.”

Model check

specodelic.md names model_check as the compiled → model_checked transition, guarded only by model_present — a structural check that a Model section exists. Whether the model actually holds (no_counterexample) is a separate invariant, consumed later by the verify transition’s guard, not by model_check itself. That split was never made explicit anywhere (STATUS.md §4, P0): this file specifies the run model_check names — what “invoking the checker” actually does to the module compile.md produces, and what a stated result must contain.

Purpose

specodelic.md names model_check as the compiled → model_checked transition, guarded only by model_present — a structural check that a Model section exists. Whether the model actually holds (no_counterexample) is a separate invariant, consumed later by the verify transition’s guard, not by model_check itself. That split was never made explicit anywhere (STATUS.md §4, P0): this file specifies the run model_check names — what “invoking the checker” actually does to the module compile.md produces, and what a stated result must contain.

Constraints

idkindexprtraces_to
checker_invokedinvariantreaching model_checked always corresponds to an actual checker run, by the selected backend, against the current compiled model — model_present's structural check is not itself that run[[model_check]]
exhaustive_within_boundinvarianta run explores all reachable states up to a stated bound (state-space size or step count) before it may report no counterexample; the bound is part of the report, since unbounded checking of a spec with no finite state space never terminates[[model_check]]
counterexample_is_minimalinvariantwhen a run finds a counterexample, it reports the shortest violating transition sequence found, not merely the first one encountered[[model_check]]
counterexample_names_violated_invariantinvarianta counterexample report names exactly one violated invariant, by its Constraints-table id, together with the full state trace leading to it[[model_check]]
backend_identifiedinvarianta run report names the backend engine and version that produced it, so two backends' reports on the same compiled model and bound are attributable and comparable[[model_check]]
no_counterexample_feeds_verifyinvariant[[specodelic.no_counterexample]] holds iff the most recent run on the current compiled module reported clean within its stated bound[[model_check]]
rerun_on_model_changeinvarianta run's clean result does not satisfy [[specodelic.no_counterexample]] once the Model section (States or Transitions) or any executable invariant fragment has changed since that run — the model must be re-run, not assumed still clean (the fragment extension is specodelic.md Revision 15; the compiled module carries the fragment manifest, so the artifact hash covers it)[[model_check]]
executable_invariants_executeinvariantthe native backend executes every executable invariant fragment (the **rust:** marker in a kind == invariant Constraint's expr — specodelic.md Revision 15) as an invariant over the compiled model: each evaluated at every reachable state, each named by its Constraints-table id in the report's invariants_checked. Fragments are Rust, compiled verbatim — executed by a scratch-crate run, since the interpreter backend cannot evaluate user Rust in-process; a backend that cannot execute fragments reports exploration_only, never a fabricated clean[[model_check]]
invariant_totalityinvariantan executable invariant fragment evaluation that panics reports the invariant violated at the state where the panic occurred — a panicking predicate is never a pass and never silently skipped[[model_check]]
required_claims_classifiedinvarianta run partitions each parsed file's invariant-kind Constraints into a required set — those opted into executable (rust: fragment), kernel, or citation evaluation — and an unchecked set of prose-only invariants: prose wording, a constraint's name, or merely having a deriving Property never implies evaluation, and advisory/effect/extension-point rows are never required[[model_check]]
claim_aggregate_governsinvariantthe run outcome is governed by the required claims' statuses with fixed priority: any refuted required claim yields counterexample_found naming it; absent refutation, an exhausted time/state/depth budget yields timed_out; otherwise any unknown, unsupported, or missing required claim yields exploration_only with reasons — and so does an empty required set; a nonempty required set all verified over a completed bounded exploration is the only clean[[model_check]]
claim_report_schemainvariantthe run's persisted report declares claim_schema_version 1, canonical qualified claim records (id, evaluator kind, status, reason where not verified), expected_claim_ids, unchecked_claim_ids, and a scope_sha256 digest of the parsed structured content and the consumed compiled artifacts — the digest binds structured content, not filesystem paths: reordering CLI paths or editing prose alone preserves it, while two inputs differing in invariant content never share one[[model_check]]
corpus_identity_scopeinvarianta model-check, verify, or orchestrate invocation refuses, before compilation, evaluation, or report writes, any input set in which two parsed files claim the same intent id — labeled duplicate_corpus_identity with a rename hint (Revision 18: the former isolated-scope rule retired with id: spec itself; dual-format files carry real intent ids and compose like any corpus, so identity uniqueness is the only scope law left)[[model_check]]

Model

States

  • not_run
  • running
  • clean
  • counterexample_found
  • timed_out
  • exploration_only

Transitions

idfromtoguard
beginnot_runrunning[[model_check.checker_invoked]]
finish_cleanrunningclean[[model_check.exhaustive_within_bound]] ∧ [[model_check.claim_aggregate_governs]] ∧ no violation found within the bound ∧ every required claim verified
finish_violationrunningcounterexample_found[[model_check.counterexample_is_minimal]] ∧ [[model_check.counterexample_names_violated_invariant]]
finish_timeoutrunningtimed_outthe stated bound was not reached before the run's time/state budget expired
finish_explorationrunningexploration_only[[model_check.exhaustive_within_bound]] ∧ the backend executed no invariant predicates — a completed exploration is evidence the space ends within the bound, never that the model holds

Properties

idkindderives_fromgeneratorpredicate
stale_claim_rejectedunit[[model_check.checker_invoked]]compiled_module_with_zero_runs_against_it()no_counterexample(file) == undetermined — never defaults to true
bound_must_be_statedunit[[model_check.exhaustive_within_bound]]run_report_with_no_stated_bound()check(report) == invalid
shortest_counterexample_reportedunit[[model_check.counterexample_is_minimal]]model_with(two_violating_traces_of_different_length: true)reported_trace(check(model)) == the_shorter_of_the_two
violated_invariant_namedunit[[model_check.counterexample_names_violated_invariant]]model_with_exactly_one_violated_invariant()check(model).violated_invariant_id == the_expected_id
backend_named_in_reportunit[[model_check.backend_identified]]run_report_from_any_backend()check(report).backend == a named engine and version
clean_run_satisfies_verify_gateunit[[model_check.no_counterexample_feeds_verify]]arbitrary_model_with_no_violation_within_bound()no_counterexample(file) == true
stale_result_invalidated_by_editunit[[model_check.rerun_on_model_change]](clean_run, model_edited_afterward_with_no_rerun)no_counterexample(file) == false — until re-run
clean_model_passesunit[[model_check.checker_invoked]]arbitrary_model_with_no_violation_within_bound()check(model) == clean
exploration_run_is_not_a_clean_verdictunit[[model_check.no_counterexample_feeds_verify]]model_with_only_prose_invariants_exhausted_within_bound()check(model).outcome == exploration_only — never read as no_counterexample
fragment_invariants_checkedunit[[model_check.executable_invariants_execute]]compiled_model_with_one_executable_invariant()check(model).invariants_checked == [the_invariant_id]
fragment_clean_run_is_no_counterexampleunit[[model_check.executable_invariants_execute]]model_with_executable_invariants_no_violation()check(model).outcome == no_counterexample — the model gate’s reachable leg
panicking_fragment_violatesunit[[model_check.invariant_totality]]model_with_panicking_invariant_fragment()check(model).outcome == counterexample_found ∧ violated_invariant_id == the_panicking_id
fragment_violation_tracesunit[[model_check.counterexample_names_violated_invariant]]model_with_falsifiable_executable_invariant()check(model).trace == the_reachable_state_path — the trace leg is the existing constraint’s, not a new one
false_claim_is_counterexample_foundunit[[model_check.claim_aggregate_governs]]model_with(passing_rust_claim, counterexample_kernel_claim)check(model) == counterexample_found naming the false claim id — a passing Rust claim never hides it
unknown_or_missing_claim_blocks_cleanunit[[model_check.claim_aggregate_governs]]model_with(unknown_or_missing_required_claim)check(model) == exploration_only with reasons naming the claim ids
exhausted_bound_stays_timed_outunit[[model_check.claim_aggregate_governs]]model_with(all_verified_claims_but_exhausted_bound)check(model) == timed_out — verified claims cannot outrank an incomplete exploration
prose_only_is_unchecked_not_requiredunit[[model_check.required_claims_classified]]model_with_only_prose_invariants()required_claims(model) == [] ∧ unchecked_claims(model) == those ids — never implied verified
report_binds_claims_and_scope_digestunit[[model_check.claim_report_schema]]run_report_from_current_inputs()report.claim_schema_version == 1 ∧ expected/unchecked ids present ∧ scope_sha256 present
reordered_paths_and_prose_preserve_scopeunit[[model_check.claim_report_schema]]same_structured_inputs_in_different_cli_order()scope_sha256 unchanged — the digest binds content, not paths
swapped_reports_rejected_unrewrittenunit[[model_check.claim_report_schema]]two_files_same_claim_names_opposite_invariants()digest(a) ≠ digest(b) ∧ each run rejects the other's report without rewriting it
combined_same_identity_scope_refusedunit[[model_check.corpus_identity_scope]]two_parsed_files_claiming_the_same_intent_id()check(invocation) == duplicate_corpus_identity before any artifact or report write (Revision 18)
distinct_ids_compose_and_lint_togetherunit[[model_check.corpus_identity_scope]]several_dual_format_files_with_distinct_ids_linted_and_checked_together()check(lint) == valid — files with distinct real ids compose like any corpus (Revision 18)

Notes

This clarifies a naming trap in specodelic.md’s lifecycle, flagged as CLAR-003 (same shape as CLAR-001, CLAR-002 — not resolved here for the same reason: renaming a live state name should go through rename_naturality, not be done by hand). model_checked sounds like it means “the model was checked and holds,” but its guard, [[specodelic.model_present]], only confirms a Model section exists — checker_invoked above is what “a run actually happened” means, and whether that run found a counterexample (no_counterexample) is a fact consumed only by the next transition, verify. A file can be in state model_checked while its most recent run found a counterexample, or before any run has happened at all if model_present alone were treated as sufficient. no_counterexample_feeds_verify and rerun_on_model_change above are what close that gap: no one may claim no_counterexample without having actually run this state machine to clean, and a clean result older than the last Model edit doesn’t count.

timed_out is a real terminal outcome, not a failure this file papers over as “counterexample” or “clean” by default: an unbounded or very large state space may exhaust its budget before exhaustive_within_bound is satisfied either way. So is exploration_only (specodelic-len): the native stateright backend interprets guards as prose (Decision 3, Option A) and executes zero invariant predicates, so its completed runs terminate in finish_exploration, NOT finish_clean — a completed exploration proves the space ends within the bound and nothing more. no_counterexample is reserved for a backend that actually executed invariant predicates and found no violation; consumers (verify’s gate, the no_counterexample_feeds_verify property above) must treat exploration_only exactly like timed_out — not-clean, though not evidence of a violation either. Backends. The contract above is engine-neutral, and any backend satisfying it sits behind the same state machine. Two are specified: stateright (default) — an embedded Rust model-checking crate, no external dependencies: its breadth-first exploration makes counterexample_is_minimal hold by construction (the first counterexample found is the shortest), target_max_depth/timeout/target_state_count give exhaustive_within_bound’s stated bound and timed_out’s budget-exhausted outcome directly, and its named properties give counterexample_names_violated_invariant when each property is named after the Constraint id it derives from. The native backend interprets the compiled model (states as values, transitions as actions) rather than generating Rust source. TLC (opt-in) — the mature JVM reference engine, run as a subprocess against the .tla module compile.md emits, with -depth as the stated bound. Alloy was dropped from the corpus language alongside this change: with a native default and a reference TLA+ engine it had no remaining role, and a SAT-based engine returns an instance, not a minimal trace — which would fight counterexample_is_minimal rather than satisfy it. verify’s downstream guard treats timed_out the same as counterexample_found for the purpose of no_counterexample (both are not-clean), but they are reported differently, since a timeout is not evidence of a violation — just of an inconclusive run.

checked_against_core: clear (see AGENTS.md’s convention) — no_counterexample and model_present already existed there and are referenced, not restated. verify (STATUS.md §4, now done — see verify.md) consumes this file’s clean/counterexample_found outcome alongside compile.md’s proptest! blocks.

Executable invariants (specodelic.md Revision 15, specodelic-rjb). Decision 3’s Option C ships: the **rust:** fragment (see compile.md) turns a kind == invariant Constraint into something the native backend actually executes — as a scratch-crate run, because a Rust expression cannot be evaluated in-process from source text. The scratch runner is a dependency-free breadth-first search over the same program-counter model the embedded interpreter walks, which keeps counterexample_is_minimal holding by construction (BFS discovers the shortest violating path) and keeps the bound semantics honest: a completed exploration with ≥ 1 executed invariant and no violation is no_counterexample; zero executed invariants stays exploration_only; a budget cap is timed_out. A panicking fragment is a violation at the state where it panicked (invariant_totality — a predicate that explodes is not a predicate that holds). The engine attribution of the scratch run is native-bfs with the tool’s own version — it is not stateright, and backend_identified requires the report not to imply otherwise. TLC cannot execute Rust fragments at all: against the same artifact it still reports exploration_only, which is the honesty this file already pinned for prose predicates.

The module’s staleness key now covers fragments: model_to_tla emits the executable-invariant manifest (id + fragment verbatim) as module comments, so editing a fragment changes the artifact hash and rerun_on_model_change (reworded above to name fragments explicitly) fails the stale report closed — an invariant that changed since the clean run is not the invariant the run checked.

Claim-gated aggregation (define-verification-claim-gates). claim_aggregate_governs refines what a clean run means without redefining any state: a refuted required claim is a real counterexample_found (named, via the existing minimal-trace machinery), an exhausted bound is still timed_out, and an incomplete required set — unknown, unsupported, missing, or empty — lands in exploration_only, joining the zero-predicates case the Notes above already pinned. The priority order matters and is normative: refutation outranks exhaustion outranks incompleteness, so a passing Rust claim can never launder a false kernel or citation claim into no_counterexample. claim_report_schema gives the verdict an evidence carrier: a versioned report whose scope_sha256 digest binds the parsed structured content and consumed artifacts — not filesystem paths — so reordering CLI inputs or editing prose alone reuses a report, while genuinely different invariant content never does. corpus_identity_scope (named dual_format_isolated_scope before Revision 18) is the corpus-identity side of the same policy: the intent ids of a command’s parsed inputs must be unique. Before Revision 18 this was two rules — the identity law plus a separate isolated-scope refusal for id: spec files — but id: spec itself retired in Revision 18 (specodelic-mcy): dual-format files now carry real ids and the identity law is the only scope law left, strictly stronger than the old pair (a same-id delta/deployed pair is now refused outright, where the old law’s per-file exemption let them coexist).

Cross-evaluator citation composition (specodelic-9o1h, E2 finding F2). A citation target resolves against the same invocation’s evidence from BOTH evaluators: the same-run executable-invariant outcomes AND the corpus-static kernel-evaluated claim statuses. Before this rule the algebra consulted the executable outcomes only, so a citation over a kernel-evaluated claim was undischargable — [[exec]] ∧ [[kernel]] evaluated unknown (“no same-run evidence”), and Rule 4 of claim_aggregate_governs then held the file at exploration_only, which no amount of correct authoring could clear. The composition is one-way: the closed kernel grammar contains no [[..]] references, so a kernel claim can never cite back and no citation cycle arises from it. The Kleene discipline is unchanged across the evaluators — an unknown kernel claim keeps the citing citation unknown, with a reason naming the kernel cause; a refuted kernel claim makes the citing citation a counterexample, so Rule 2 names the citation row and no state trace is invented; and a backend that cannot evaluate kernel claims reports them as labeled unsupported, so a citation over such a claim stays unknown — never an implied pass. The aggregate itself is untouched: claim_aggregate_governs still governs the verdict, and every required claim must discharge for the file to report no_counterexample.

Revision-discipline note. These rows deliberately do NOT touch specodelic.md (this file’s scope-law revision rode specodelic.md Revision 18 without touching no_counterexample’s expr there): “the selected model-check backend finds no violated invariant”, and this file — already the owner of that row’s precise meaning via no_counterexample_feeds_verify — narrows the reachable clean leg instead of restating it in the core (the AGENTS.md rule 3a preference for widening an existing constraint’s scope over restating it). verify.md carries the acceptance-side twins: the claim gate on verified, scope-bound evidence, and view parity. All three implementations share one aggregation path (design D4 of openspec/changes/define-verification-claim-gates), so model-check, verify, and orchestrate cannot drift apart on these rules.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: stale_claim_rejected

  • WHEN compiled_module_with_zero_runs_against_it()
  • THEN no_counterexample(file) == undetermined — never defaults to true
  • VERIFIES [[model_check.stale_claim_rejected]]

Scenario: bound_must_be_stated

  • WHEN run_report_with_no_stated_bound()
  • THEN check(report) == invalid
  • VERIFIES [[model_check.bound_must_be_stated]]

Scenario: shortest_counterexample_reported

  • WHEN model_with(two_violating_traces_of_different_length: true)
  • THEN reported_trace(check(model)) == the_shorter_of_the_two
  • VERIFIES [[model_check.shortest_counterexample_reported]]

Scenario: violated_invariant_named

  • WHEN model_with_exactly_one_violated_invariant()
  • THEN check(model).violated_invariant_id == the_expected_id
  • VERIFIES [[model_check.violated_invariant_named]]

Scenario: backend_named_in_report

  • WHEN run_report_from_any_backend()
  • THEN check(report).backend == a named engine and version
  • VERIFIES [[model_check.backend_named_in_report]]

Scenario: clean_run_satisfies_verify_gate

  • WHEN arbitrary_model_with_no_violation_within_bound()
  • THEN no_counterexample(file) == true
  • VERIFIES [[model_check.clean_run_satisfies_verify_gate]]

Scenario: stale_result_invalidated_by_edit

  • WHEN (clean_run, model_edited_afterward_with_no_rerun)
  • THEN no_counterexample(file) == false — until re-run
  • VERIFIES [[model_check.stale_result_invalidated_by_edit]]

Scenario: clean_model_passes

  • WHEN arbitrary_model_with_no_violation_within_bound()
  • THEN check(model) == clean
  • VERIFIES [[model_check.clean_model_passes]]

Scenario: exploration_run_is_not_a_clean_verdict

  • WHEN model_with_only_prose_invariants_exhausted_within_bound()
  • THEN check(model).outcome == exploration_only — never read as no_counterexample
  • VERIFIES [[model_check.exploration_run_is_not_a_clean_verdict]]

Scenario: fragment_invariants_checked

  • WHEN compiled_model_with_one_executable_invariant()
  • THEN check(model).invariants_checked == [the_invariant_id]
  • VERIFIES [[model_check.fragment_invariants_checked]]

Scenario: fragment_clean_run_is_no_counterexample

  • WHEN model_with_executable_invariants_no_violation()
  • THEN check(model).outcome == no_counterexample — the model gate’s reachable leg
  • VERIFIES [[model_check.fragment_clean_run_is_no_counterexample]]

Scenario: panicking_fragment_violates

  • WHEN model_with_panicking_invariant_fragment()
  • THEN check(model).outcome == counterexample_found ∧ violated_invariant_id == the_panicking_id
  • VERIFIES [[model_check.panicking_fragment_violates]]

Scenario: fragment_violation_traces

  • WHEN model_with_falsifiable_executable_invariant()
  • THEN check(model).trace == the_reachable_state_path — the trace leg is the existing constraint’s, not a new one
  • VERIFIES [[model_check.fragment_violation_traces]]

Scenario: false_claim_is_counterexample_found

  • WHEN model_with(passing_rust_claim, counterexample_kernel_claim)
  • THEN check(model) == counterexample_found naming the false claim id — a passing Rust claim never hides it
  • VERIFIES [[model_check.false_claim_is_counterexample_found]]

Scenario: unknown_or_missing_claim_blocks_clean

  • WHEN model_with(unknown_or_missing_required_claim)
  • THEN check(model) == exploration_only with reasons naming the claim ids
  • VERIFIES [[model_check.unknown_or_missing_claim_blocks_clean]]

Scenario: exhausted_bound_stays_timed_out

  • WHEN model_with(all_verified_claims_but_exhausted_bound)
  • THEN check(model) == timed_out — verified claims cannot outrank an incomplete exploration
  • VERIFIES [[model_check.exhausted_bound_stays_timed_out]]

Scenario: prose_only_is_unchecked_not_required

  • WHEN model_with_only_prose_invariants()
  • THEN required_claims(model) == [] ∧ unchecked_claims(model) == those ids — never implied verified
  • VERIFIES [[model_check.prose_only_is_unchecked_not_required]]

Scenario: report_binds_claims_and_scope_digest

  • WHEN run_report_from_current_inputs()
  • THEN report.claim_schema_version == 1 ∧ expected/unchecked ids present ∧ scope_sha256 present
  • VERIFIES [[model_check.report_binds_claims_and_scope_digest]]

Scenario: reordered_paths_and_prose_preserve_scope

  • WHEN same_structured_inputs_in_different_cli_order()
  • THEN scope_sha256 unchanged — the digest binds content, not paths
  • VERIFIES [[model_check.reordered_paths_and_prose_preserve_scope]]

Scenario: swapped_reports_rejected_unrewritten

  • WHEN two_files_same_claim_names_opposite_invariants()
  • THEN digest(a) ≠ digest(b) ∧ each run rejects the other's report without rewriting it
  • VERIFIES [[model_check.swapped_reports_rejected_unrewritten]]

Scenario: combined_same_identity_scope_refused

  • WHEN two_parsed_files_claiming_the_same_intent_id()
  • THEN check(invocation) == duplicate_corpus_identity before any artifact or report write (Revision 18)
  • VERIFIES [[model_check.combined_same_identity_scope_refused]]

Scenario: distinct_ids_compose_and_lint_together

  • WHEN several_dual_format_files_with_distinct_ids_linted_and_checked_together()
  • THEN check(lint) == valid — files with distinct real ids compose like any corpus (Revision 18)
  • VERIFIES [[model_check.distinct_ids_compose_and_lint_together]]

verify


id: verify kind: intent checked_against_core: clear statement: “THE verify step SHALL run every proptest! block compile.md’s properties_to_proptest produced to completion, and SHALL transition a file to verified only when all of them pass and model_check.md’s most recent run against the current compiled artifact reported clean.”

Verify

specodelic.md names verify as the model_checked → verified transition, guarded by no_counterexample ∧ properties_pass — but neither what “running the properties” means nor how that conjunction is actually enforced was ever specified (STATUS.md §4, P0, last of the three pipeline items). This file closes it: verify is what actually executes compile.md’s output and combines it with model_check.md’s outcome into the one fact specodelic.md’s lifecycle calls verified.

Purpose

specodelic.md names verify as the model_checked → verified transition, guarded by no_counterexample ∧ properties_pass — but neither what “running the properties” means nor how that conjunction is actually enforced was ever specified (STATUS.md §4, P0, last of the three pipeline items). This file closes it: verify is what actually executes compile.md’s output and combines it with model_check.md’s outcome into the one fact specodelic.md’s lifecycle calls verified.

Notes

This closes STATUS.md §4’s P0. The three pipeline items — compile.md, model_check.md, and this file — now cover the full linted → compiled → model_checked → verified lifecycle specodelic.md names but had never specified past the data-shape level. STATUS.md §1 describes “something you can simulate before writing code” as one of the four things a spec file gives you; compile.md is what makes the simulation buildable, model_check.md is what makes running it meaningful, and this file is what makes trusting its result well-defined rather than an unstated conjunction of two booleans.

both_gates_required is the one constraint doing the most work here: it restates specodelic.md’s bare no_counterexample ∧ properties_pass guard, but as an actual mechanism — single_gate_insufficient’s test case (properties pass, model doesn’t) is exactly the failure mode a project would hit if someone treated a green proptest run alone as sufficient to ship, skipping the model checker.

law_cases_unexecuted is a deliberate echo of specodelic.md’s law_requires_cases (which gates compiling a law-kind property on it having ≥ 2 cases in the first place). That constraint ensures the cases exist before compilation; this one ensures they’re all actually run and passing before verification — the same discipline applied at two different pipeline stages, on either side of compile.md.

checked_against_core: clear (see AGENTS.md’s convention). With this file, STATUS.md §4’s P0 is fully done; P1 (the rename/refactor tool) is next.

Executable fragments make verified reachable (specodelic.md Revision 15, specodelic-rjb). Before that Revision the verdict’s verified status was unreachable by construction — every compiled block carried a todo_predicate! placeholder that panics at execution, and the native backend executed zero invariant predicates, so both gates failed honestly on every file. fragments_reach_verified pins the way out without touching both_gates_required or any honesty rule: a predicate opting in with **rust:** executes for real, an executable invariant gives the model run a predicate to actually check, and verified becomes the conjunction both gates always demanded — reachable, never redefined. Files whose cells carry no fragment behave exactly as before.

Claim-gated acceptance and scope-bound evidence (define-verification-claim-gates). required_claims_govern_acceptance completes both_gates_required rather than replacing it: the two gates already demanded — a clean model run and passing properties — are now joined by the third input they were silently missing, the per-claim statuses the model report carries. A refuted or unknown kernel/citation claim blocks verified even with a green proptest run; prose-only invariants stay explicitly unchecked, and having a deriving Property never makes one executable. evidence_scope_bound is what makes the first constraint trustworthy: verify recomputes scope and the required set from the current inputs instead of trusting the stored report’s word, so a stale, swapped, or malformed report fails with a rerun hint — old evidence is rejected, never silently re-scored or rewritten. This is deliberately stricter than the pre-change acceptance path; the rerun instruction ships with the release. assurance_views_agree keeps the three report surfaces (CLI JSON, human output, the persisted <stem>.check.json) from telling different stories about the same run.

The claim-side machine itself (required/unchecked classification, the aggregate priority, the report schema, and dual-format command isolation) is specified once, in model_check.md — this file consumes it, mirroring how it already consumes model_check’s clean outcome rather than restating specodelic.md’s bare guard. No specodelic.md Constraint is touched, so no Revision bump: the acceptance conjunction lives here (see the Revision-discipline note there).

Constraints

| id | kind | expr | traces_to | satisfies | |————————————|———–|——————————————————————————————————————————————————|–––––––––––| | blocks_run_to_completion | invariant | verify actually executes every proptest! block compile.md produced against the current compiled artifact — properties_pass is never satisfied by a partial run or a cached prior result | [[verify]] | | | properties_pass_reflects_latest_run | invariant | [[specodelic.properties_pass]] holds iff every block from the most recent run against the current compiled artifact passed; a run predating the last edit to Properties, Constraints, or Model does not count | [[verify]] | | | failure_reports_shrunk_counterexample | invariant | when a proptest! block fails, the report gives the shrunk (minimal) failing input, not the first randomly-generated failing input encountered | [[verify]] | | | both_gates_required | invariant | verify only transitions a file to verified when both [[specodelic.no_counterexample]] (model_check.md's clean outcome) and [[specodelic.properties_pass]] hold — passing properties alone, or a clean model alone, is insufficient | [[verify]] | | | law_cases_unexecuted | invariant | for a law-kind property compiled into multiple blocks (one per required case), all compiled blocks must pass — a partial pass (identity passes, associativity fails) is a failure of the property, not a partial success | [[verify]] | | | verify_is_idempotent | invariant | re-running verify against an unchanged compiled artifact yields the same pass/fail outcome as the prior run, even though proptest may resample inputs each run for coverage | [[verify]] | | | bounded_wall_clock | invariant | the verify runner bounds its cargo test run on a wall-clock clock (default 600s, –timeout-secs 0 disables the bound); a run exceeding the bound is killed and reported as a labeled timeout — never a silent hang, and never indistinguishable from a block failure | [[verify]] | | | routed_artifact_resolution | invariant | every artifact location verify consumes for one spec — the <stem>_props.rs properties source, the <stem>.check.json model-check report, every <stem>.tla module the scope digest hashes, and therefore the digest's per-file artifact hashes — resolves through citation_corpus::artifact_dir, the ONE shared per-file routing decision the compile stage and the model-check backend pass already use; verify never re-derives an artifact directory of its own | [[verify]] | | | no_cross_file_evidence | invariant | a duplicate-stem corpus is read per file: each file's artifacts route under out_dir/<stem>/<encoded source path> injectively, so one file's gates read only its own artifacts and a same-stem sibling's report, module, or props source can never satisfy — or mask — them | [[verify]] | | | unique_stem_layout_stable | invariant | a corpus whose artifact stems are unique keeps the flat layout under out_dir — <stem>_props.rs, <stem>.check.json, <stem>.tla — byte-identically to the pre-routing layout, and a single-spec entry point treats its spec as its own corpus, so verified evidence paths are unchanged for non-colliding invocations | [[verify]] | | | verification_failure | effect | verify.verification_failure(detail) — the verification stage failed because detail; the failure rides the errors capability's published error contract (envelope kind, exit code, remediation hint) | [[verify]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | required_claims_govern_acceptance | invariant | verify only transitions a file to verified when every required claim (model_check.md's required_claims_classified set) is verified in the current report AND every generated property block passes — a passing property run alone never covers an unknown, missing, or refuted claim; invalid or duplicate claim records are rejected as malformed evidence, never inferred as unknown success, and prose-only invariants stay unchecked | [[verify]] | | | evidence_scope_bound | invariant | verify recomputes the scope digest and the required claim set from the current inputs and compares them against the stored report: old or unrecognized claim-schema versions, absent scope fingerprints, omitted or duplicate records, changed contributing inputs, or artifact mismatch fail with a rerun hint naming the model-check command — a stored report is never rewritten to manufacture evidence, and the digest binds structured content, not filesystem paths, so swapped reports from different scopes never verify | [[verify]] | | | assurance_views_agree | invariant | CLI JSON, human output, and the persisted report agree on evaluated, unchecked, and blocking claims — no view reports verified while another names a blocker — and release documentation distinguishes structural lint, bounded model exploration, verified declared claims, and external application-test binding without advertising pending capabilities as implemented | [[verify]] | | | properties_scope_verdict | invariant | a properties-only scope verdict reports properties_failed exactly when a compiled proptest! block failed, and never for a missing or stale model run — the scoped verdict reads the properties stage alone, so a skipped model stage can neither hide nor fake a properties failure; and the scoped verdict never reports verified, leaving the verified transition's both_gates_required conjunction unchanged | [[verify]] | |

Model

States

  • not_run
  • routed
  • running
  • properties_evaluated
  • verified
  • failed (emits: [[verify.verification_failure]])

Transitions

idfromtoguard
routenot_runrouted[[verify.routed_artifact_resolution]] ∧ [[verify.unique_stem_layout_stable]]
beginroutedrunning[[verify.blocks_run_to_completion]]
evaluaterunningproperties_evaluatedevery compiled proptest! block has recorded pass or fail
acceptproperties_evaluatedverified[[verify.both_gates_required]] ∧ [[verify.properties_pass_reflects_latest_run]] ∧ [[verify.law_cases_unexecuted]] ∧ [[verify.required_claims_govern_acceptance]] ∧ [[verify.evidence_scope_bound]]
rejectproperties_evaluatedfailed¬([[verify.both_gates_required]] ∧ [[verify.properties_pass_reflects_latest_run]] ∧ [[verify.law_cases_unexecuted]] ∧ [[verify.required_claims_govern_acceptance]] ∧ [[verify.evidence_scope_bound]])

Properties

idkindderives_fromgeneratorpredicate
partial_run_rejectedunit[[verify.blocks_run_to_completion]]run_that_skips_one_compiled_block()check(run) == invalid
cached_result_rejectedunit[[verify.properties_pass_reflects_latest_run]](passing_run, properties_edited_afterward_with_no_rerun)properties_pass(file) == false — until re-run
shrunk_counterexample_reportedunit[[verify.failure_reports_shrunk_counterexample]]block_with(large_random_failing_input: true, smaller_reachable_by_shrinking: true)reported_input(check(block)) == the_smaller_one
single_gate_insufficientunit[[verify.both_gates_required]]file_with(properties_pass: true, no_counterexample: false)check(file) == failed
both_gates_clean_passesunit[[verify.both_gates_required]]file_with(properties_pass: true, no_counterexample: true)check(file) == verified
partial_law_case_rejectedunit[[verify.law_cases_unexecuted]]law_property_with(identity_case: "pass", associativity_case: "fail")check(property) == failed
rerun_matches_prior_outcomeunit[[verify.verify_is_idempotent]](run_1, run_2) on an unchanged compiled artifactoutcome(run_1) == outcome(run_2)
verification_failure_label_assertedunit[[verify.verification_failure]]verification_failure_raised()error_label == "verify.verification_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
hang_reported_as_labeled_timeoutunit[[verify.bounded_wall_clock]]runner_with(predicate_that_never_terminates, timeout: 1)check(run) == timeout_labeled ∧ outcome(run) ≠ failed — a timeout is no verdict on the property: distinct from properties_failed so a legitimately long suite can be re-run with a raised bound instead of misread as a failing predicate
fragments_reach_verifiedunit[[verify.both_gates_required]]fixture_with(fragment_predicate_passing, executable_invariant_clean)check(file) == verified — with executable fragments (specodelic.md Revision 15) both gates are reachable: a passing executable predicate and a clean executable-invariant run verify a real file, the state the gate could never reach before this Revision
claim_complete_evidence_verifiesunit[[verify.required_claims_govern_acceptance]]fixture_with(all_required_claims_verified, properties_pass)check(file) == verified with the exact required and unchecked sets
false_claim_blocks_verifiedunit[[verify.required_claims_govern_acceptance]]file_with(properties_pass: true, counterexample_kernel_claim)check(file) == failed naming the false claim id — properties never cover a refuted claim
malformed_records_rejectedunit[[verify.required_claims_govern_acceptance]]report_with(missing_or_duplicate_claim_record)check(file) == failed with a rerun hint — never inferred as unknown success
stale_report_rejected_with_rerun_hintunit[[verify.evidence_scope_bound]](clean_report, structurally_edited_inputs_afterward)check(file) == failed naming the rerun command — the report is never rewritten
swapped_scope_report_rejectedunit[[verify.evidence_scope_bound]]report_from_a_different_structured_scope()check(file) == failed — the digest binds structured content, not paths
views_agree_on_blockersunit[[verify.assurance_views_agree]]run_with(required_unknown_claim_and_prose_invariant)json.blockers == human.blockers == report.blockers ∧ unchecked sets agree
release_docs_match_implemented_capabilitiesunit[[verify.assurance_views_agree]]docs_built_for_a_release()version derives from Cargo metadata ∧ pending capabilities not advertised as implemented
properties_scope_isolatedunit[[verify.properties_scope_verdict]]run_with(properties_failed: true, model_run: missing)the scoped verdict reports properties_failed exactly when a compiled block failed ∧ a missing or stale model run never produces it ∧ the scoped verdict never reports verified
duplicate_stems_resolve_own_reportunit[[verify.routed_artifact_resolution]]duplicate_stem_corpus_with_no_reports_on_disk()the model gate names its OWN routed <stem>.check.json ∧ never the flat path
scope_digest_reads_routed_modulesunit[[verify.routed_artifact_resolution]]duplicate_stem_corpus_with_reports_and_no_modules()the scope digest names the first ROUTED <stem>.tla ∧ never the flat <stem>.tla
sibling_artifacts_never_satisfyunit[[verify.no_cross_file_evidence]]duplicate_stem_pair_with_one_side_compiled()the uncompiled file's gates stay missing/stale — sibling artifacts never satisfy them
unique_stem_paths_flatunit[[verify.unique_stem_layout_stable]]corpus_with_distinct_artifact_stems()paths == <out_dir>/<stem>_props.rs ∧ <out_dir>/<stem>.check.json ∧ <out_dir>/<stem>.tla

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: partial_run_rejected

  • WHEN run_that_skips_one_compiled_block()
  • THEN check(run) == invalid
  • VERIFIES [[verify.partial_run_rejected]]

Scenario: cached_result_rejected

  • WHEN (passing_run, properties_edited_afterward_with_no_rerun)
  • THEN properties_pass(file) == false — until re-run
  • VERIFIES [[verify.cached_result_rejected]]

Scenario: shrunk_counterexample_reported

  • WHEN block_with(large_random_failing_input: true, smaller_reachable_by_shrinking: true)
  • THEN reported_input(check(block)) == the_smaller_one
  • VERIFIES [[verify.shrunk_counterexample_reported]]

Scenario: single_gate_insufficient

  • WHEN file_with(properties_pass: true, no_counterexample: false)
  • THEN check(file) == failed
  • VERIFIES [[verify.single_gate_insufficient]]

Scenario: both_gates_clean_passes

  • WHEN file_with(properties_pass: true, no_counterexample: true)
  • THEN check(file) == verified
  • VERIFIES [[verify.both_gates_clean_passes]]

Scenario: partial_law_case_rejected

  • WHEN law_property_with(identity_case: "pass", associativity_case: "fail")
  • THEN check(property) == failed
  • VERIFIES [[verify.partial_law_case_rejected]]

Scenario: rerun_matches_prior_outcome

  • WHEN (run_1, run_2) on an unchanged compiled artifact
  • THEN outcome(run_1) == outcome(run_2)
  • VERIFIES [[verify.rerun_matches_prior_outcome]]

Scenario: verification_failure_label_asserted

  • WHEN verification_failure_raised()
  • THEN error_label == "verify.verification_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[verify.verification_failure_label_asserted]]

Scenario: hang_reported_as_labeled_timeout

  • WHEN runner_with(predicate_that_never_terminates, timeout: 1)
  • THEN check(run) == timeout_labeled ∧ outcome(run) ≠ failed — a timeout is no verdict on the property: distinct from properties_failed so a legitimately long suite can be re-run with a raised bound instead of misread as a failing predicate
  • VERIFIES [[verify.hang_reported_as_labeled_timeout]]

Scenario: fragments_reach_verified

  • WHEN fixture_with(fragment_predicate_passing, executable_invariant_clean)
  • THEN check(file) == verified — with executable fragments (specodelic.md Revision 15) both gates are reachable: a passing executable predicate and a clean executable-invariant run verify a real file, the state the gate could never reach before this Revision
  • VERIFIES [[verify.fragments_reach_verified]]

Scenario: claim_complete_evidence_verifies

  • WHEN fixture_with(all_required_claims_verified, properties_pass)
  • THEN check(file) == verified with the exact required and unchecked sets
  • VERIFIES [[verify.claim_complete_evidence_verifies]]

Scenario: false_claim_blocks_verified

  • WHEN file_with(properties_pass: true, counterexample_kernel_claim)
  • THEN check(file) == failed naming the false claim id — properties never cover a refuted claim
  • VERIFIES [[verify.false_claim_blocks_verified]]

Scenario: malformed_records_rejected

  • WHEN report_with(missing_or_duplicate_claim_record)
  • THEN check(file) == failed with a rerun hint — never inferred as unknown success
  • VERIFIES [[verify.malformed_records_rejected]]

Scenario: stale_report_rejected_with_rerun_hint

  • WHEN (clean_report, structurally_edited_inputs_afterward)
  • THEN check(file) == failed naming the rerun command — the report is never rewritten
  • VERIFIES [[verify.stale_report_rejected_with_rerun_hint]]

Scenario: swapped_scope_report_rejected

  • WHEN report_from_a_different_structured_scope()
  • THEN check(file) == failed — the digest binds structured content, not paths
  • VERIFIES [[verify.swapped_scope_report_rejected]]

Scenario: views_agree_on_blockers

  • WHEN run_with(required_unknown_claim_and_prose_invariant)
  • THEN json.blockers == human.blockers == report.blockers ∧ unchecked sets agree
  • VERIFIES [[verify.views_agree_on_blockers]]

Scenario: release_docs_match_implemented_capabilities

  • WHEN docs_built_for_a_release()
  • THEN version derives from Cargo metadata ∧ pending capabilities not advertised as implemented
  • VERIFIES [[verify.release_docs_match_implemented_capabilities]]

Requirement: Properties-only scope verdict

spk verify SHALL expose a properties-only scope verdict that reports properties_failed exactly when a compiled proptest! block failed, never for a missing or stale model run, and never verified — the verified transition keeps both gates required. The per-file envelope carries the same distinction: the properties gate’s state rides its own field, the model gate’s state another, so a scoped CI gate can read the properties stage without the model stage hiding it.

Scenario: Failed block reports properties_failed

  • WHEN a compiled proptest! block failed
  • THEN the properties-only scope verdict reports properties_failed, with the same status, message and hint the full verdict uses for a failed property

Scenario: Missing model run never reports properties_failed

  • WHEN the model-check run report is missing or stale and the properties gate passed
  • THEN the properties-only scope verdict does not report properties_failed, and the full verdict names the model stage

Scenario: Scoped pass is never verified

  • WHEN every compiled proptest! block passed
  • THEN the properties-only scope verdict reports properties_passed, never verified — a properties-only pass can never be mistaken for a verified file

Requirement: Artifact locations share one routing decision

spk verify SHALL resolve every artifact location it consumes — the <stem>_props.rs properties source, the <stem>.check.json model-check report, every <stem>.tla module the scope digest hashes, and the digest’s per-file hashes — through citation_corpus::artifact_dir, the one shared per-file routing decision, so a duplicate-stem corpus routes per file under out_dir/<stem>/<encoded source path> injectively while a corpus-unique stem keeps the flat layout byte-identically.

Scenario: Duplicate stems read their own report

  • WHEN a duplicate-stem corpus is verified with no reports on disk
  • THEN each file’s model gate names its own routed <stem>.check.json and never the flat path a same-stem sibling would collapse onto

Scenario: Scope digest hashes routed modules

  • WHEN the duplicate-stem corpus has reports present and modules absent from disk
  • THEN the scope digest names the first routed <stem>.tla module and never the flat <stem>.tla — no cross-read of a sibling’s module

Scenario: A sibling’s artifacts never satisfy a gate

  • WHEN only one same-stem file of a duplicate-stem corpus has artifacts on disk
  • THEN the other file’s gates stay missing or stale — the sibling’s evidence is never read as this file’s

Scenario: Unique stems keep the flat layout

  • WHEN every file in the invocation has a distinct artifact stem
  • THEN the consumed paths are <out_dir>/<stem>_props.rs, <out_dir>/<stem>.check.json, and <out_dir>/<stem>.tla, unchanged, and a single-spec entry point treats its spec as its own corpus

rename


Rename Tool

rename_naturality is asserted as a property in three other files (specodelic.md, linter-referential_integrity.md, linter-graph_shape.md’s topo_sort_naturality), but the tool those properties are about has never had its own Intent, Constraints, Model, or Properties (STATUS.md §4, P0). This file is that spec: what a rename request actually does, step by step, and what must hold before it’s allowed to report success.

A rename is the concrete operation whose existence makes η : I ⇒ I' (STATUS.md §1’s natural transformation between two instances of 𝒦) more than a formal description — it’s the thing that has to actually construct I' from I and a single (old_id, new_id) pair, honoring naturality rather than merely being checked against it after the fact.

Purpose

rename_naturality is asserted as a property in three other files (specodelic.md, linter-referential_integrity.md, linter-graph_shape.md’s topo_sort_naturality), but the tool those properties are about has never had its own Intent, Constraints, Model, or Properties (STATUS.md §4, P0). This file is that spec: what a rename request actually does, step by step, and what must hold before it’s allowed to report success. A rename is the concrete operation whose existence makes η : I ⇒ I' (STATUS.md §1’s natural transformation between two instances of 𝒦) more than a formal description — it’s the thing that has to actually construct I' from I and a single (old_id, new_id) pair, honoring naturality rather than merely being checked against it after the fact.

Constraints

| id | kind | expr | traces_to | satisfies | |––––––––––––––|———–|–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––|–––––––––––| | new_id_available | invariant | new_id ∉ index(repo) — renaming never collides with an existing id | [[rename]] | | | new_id_matches_filename | invariant | if the renamed row is a file's own Intent, [[specodelic.id_matches_file]] must hold between new_id and the (possibly also renamed) filename | [[rename]] | | | old_id_fully_replaced | invariant | ∀ [[old_id]] reference anywhere in repo: rewritten to [[new_id]]; zero occurrences of old_id remain post-rename | [[rename]] | | | atomic_operation | invariant | the definition-row update, every reference rewrite, and any required filename change apply as one transaction: all succeed, or the repo is left byte-identical to its pre-rename state | [[rename]] | | | kind_unchanged | invariant | assigned_kind(row) is the same before and after rename — both 𝒦's five-object kind and, where present, the row's own kind/sub-kind column — see [[kinds.kind_shape_naturality]] | [[rename]] | | | prose_untouched_by_rename | invariant | rename rewrites only [[id]] wiki-link syntax and structured id fields (frontmatter id, table id/traces_to/derives_from/guard/from/to cells) — it never edits rationale/description prose, even if the prose happens to mention the old name in words | [[rename]] | | | validation_failure | effect | rename.validation_failure(new_id, reason) | [[rename]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | apply_failure | effect | rename.apply_failure(detail) | [[rename]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | post_check_failure | effect | rename.post_check_failure(detail) | [[rename]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • requested
  • checked
  • applying
  • applied
  • verifying
  • passed
  • validate_failed (emits: [[rename.validation_failure]])
  • apply_failed (emits: [[rename.apply_failure]])
  • check_failed (emits: [[rename.post_check_failure]])

Transitions

idfromtoguard
validaterequestedchecked[[rename.new_id_available]] ∧ [[rename.new_id_matches_filename]]
validate_failrequestedvalidate_failed¬([[rename.new_id_available]] ∧ [[rename.new_id_matches_filename]])
applycheckedapplying[[rename.atomic_operation]]
apply_okapplyingapplied[[rename.old_id_fully_replaced]] ∧ [[rename.kind_unchanged]] ∧ [[rename.prose_untouched_by_rename]]
apply_failapplyingapply_failed¬([[rename.old_id_fully_replaced]] ∧ [[rename.kind_unchanged]] ∧ [[rename.prose_untouched_by_rename]]) — atomic_operation requires this path to roll back to the pre-rename repo, not to leave a partial edit
verifyappliedverifyinglinter.referential_integrity and linter.graph_shape are re-run against the renamed repo
acceptverifyingpassed[[linter.referential_integrity.ref_resolves]] ∧ [[linter.graph_shape.acyclic]]
rejectverifyingcheck_failed¬([[linter.referential_integrity.ref_resolves]] ∧ [[linter.graph_shape.acyclic]])

Properties

idkindderives_fromgeneratorpredicate
rename_naturalitylaw[[rename.old_id_fully_replaced]]arbitrary_spec_repo(), arbitrary_id_rename()identity: rename(I, a, a) == I associativity: rename(rename(I,a,b), b,c) == rename(I,a,c) naturality: compile(rename(I)) == rename(compile(I))
collision_rejectedunit[[rename.new_id_available]](repo_with_id: "x", new_id: "x_taken_by_other_row")check(request) == failed
filename_mismatch_rejectedunit[[rename.new_id_matches_filename]]rename_of_a_files_own_intent_id_without_a_matching_filename_change()check(request) == failed
partial_failure_rolls_backunit[[rename.atomic_operation]]apply_interrupted_after_definition_row_updated_but_before_all_refs_rewritten()post_state(repo) == pre_state(repo)
stray_ref_caught_by_verifyunit[[rename.old_id_fully_replaced]]rename_that_misses_one_[[old_id]]_occurrence()check(request) == failed — caught at verify, not silently accepted
prose_mention_left_aloneunit[[rename.prose_untouched_by_rename]]row_whose_rationale_prose_contains_the_old_id_as_a_word()rationale_text(post_rename_row) == rationale_text(pre_rename_row)
clean_rename_passesunit[[rename.old_id_fully_replaced]]well_formed_repo(), id_not_used_elsewhere()check(request) == passed
kind_preserved_by_renameunit[[rename.kind_unchanged]]rename_of_a_constraint_row_to_a_new_id()assigned_kind(post_rename_row) == assigned_kind(pre_rename_row) — both the five-object kind and, where present, the row’s own kind column survive the rewrite
validation_failure_label_assertedunit[[rename.validation_failure]]validation_failure_raised()error_label == "rename.validation_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
apply_failure_label_assertedunit[[rename.apply_failure]]apply_failure_raised()error_label == "rename.apply_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
post_check_failure_label_assertedunit[[rename.post_check_failure]]post_check_failure_raised()error_label == "rename.post_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

checked_against_core: clear (see AGENTS.md’s convention). The properties this file needs (atomicity, prose-non-interference, kind-preservation) are local to what a rename operation must guarantee, the same way compile.md, model_check.md, and verify.md each carry constraints specific to their own step of the lifecycle without requiring new entries in specodelic.md itself — this file’s Intent is the fourth instance of that pattern, not an exception to it.

rename_naturality now exists in four places (specodelic.md, linter-referential_integrity.md, linter-graph_shape.md’s topo_sort_naturality, and here). That’s intentional, not duplication to clean up: each site states the same law at the altitude that site owns — specodelic.md as the format’s top-level refactor-safety guarantee, the two linter files as “this is exactly the check that would catch a naive rename tool,” and this file as the actual operation those laws are about. This file is the one whose apply/apply_ok/apply_fail transitions give the law something to be a law of, rather than a fact asserted with no corresponding process.

Why verify re-runs two checkers instead of all six. apply_ok already establishes old_id_fully_replaced (no dangling old-id refs) and kind_unchanged directly as this file’s own constraints. What apply_ok can’t see on its own is whether the rewrite altered anything at the repo-graph level it wasn’t watching for — a same-file collision the local check missed, or a graph edge that only becomes visible once every file’s refs are re-indexed together. linter.referential_integrity and linter.graph_shape are exactly the two checkers whose owned constraints (unique_across_repo, ref_resolves, acyclic, single_root_reachable) depend on cross-file state a single-rename’s local bookkeeping can’t fully self-certify. The other four checkers (model_shape, ears_syntax, schema_shape, coverage) check properties a rename can’t perturb — it never changes a transition’s guard-presence, a statement’s EARS pattern, a table’s column shape, or whether a constraint has a deriving property — so re-running them would be redundant Needs Human Review overhead, not signal.

Decision of record (2026-09-30, user-approved; advised by a typed Jev evaluation, jev-1.13.0, conf 0.74): a batch rename is one atomic transaction, not n independent ones. All files touched by the batch are staged and validated as a set — the same precondition-then-apply-then-reverify shape a single rename already uses — and any validation failure aborts the whole batch, leaving every file byte-identical to before. Partial success is exactly the failure mode the single-rename atomic_operation constraint exists to prevent: a half-renamed namespace is a corpus where ref_resolves dangles by design, and the whole-commit atomicity git already provides makes per-file partial commits a policy choice a tool shouldn’t silently make. atomic_operation therefore means the same thing at batch scope as at single-rename scope: all-or-nothing. A batch-rename implementation is a separate follow-up ticket; nothing in this file’s constraint text changes.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: rename_naturality

  • WHEN arbitrary_spec_repo(), arbitrary_id_rename()
  • THEN identity: rename(I, a, a) == I associativity: rename(rename(I,a,b), b,c) == rename(I,a,c) naturality: compile(rename(I)) == rename(compile(I))
  • VERIFIES [[rename.rename_naturality]]

Scenario: collision_rejected

  • WHEN (repo_with_id: "x", new_id: "x_taken_by_other_row")
  • THEN check(request) == failed
  • VERIFIES [[rename.collision_rejected]]

Scenario: filename_mismatch_rejected

  • WHEN rename_of_a_files_own_intent_id_without_a_matching_filename_change()
  • THEN check(request) == failed
  • VERIFIES [[rename.filename_mismatch_rejected]]

Scenario: partial_failure_rolls_back

  • WHEN apply_interrupted_after_definition_row_updated_but_before_all_refs_rewritten()
  • THEN post_state(repo) == pre_state(repo)
  • VERIFIES [[rename.partial_failure_rolls_back]]

Scenario: stray_ref_caught_by_verify

  • WHEN rename_that_misses_one_[[old_id]]_occurrence()
  • THEN check(request) == failed — caught at verify, not silently accepted
  • VERIFIES [[rename.stray_ref_caught_by_verify]]

Scenario: prose_mention_left_alone

  • WHEN row_whose_rationale_prose_contains_the_old_id_as_a_word()
  • THEN rationale_text(post_rename_row) == rationale_text(pre_rename_row)
  • VERIFIES [[rename.prose_mention_left_alone]]

Scenario: clean_rename_passes

  • WHEN well_formed_repo(), id_not_used_elsewhere()
  • THEN check(request) == passed
  • VERIFIES [[rename.clean_rename_passes]]

Scenario: kind_preserved_by_rename

  • WHEN rename_of_a_constraint_row_to_a_new_id()
  • THEN assigned_kind(post_rename_row) == assigned_kind(pre_rename_row) — both the five-object kind and, where present, the row’s own kind column survive the rewrite
  • VERIFIES [[rename.kind_preserved_by_rename]]

Scenario: validation_failure_label_asserted

  • WHEN validation_failure_raised()
  • THEN error_label == "rename.validation_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[rename.validation_failure_label_asserted]]

Scenario: apply_failure_label_asserted

  • WHEN apply_failure_raised()
  • THEN error_label == "rename.apply_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[rename.apply_failure_label_asserted]]

Scenario: post_check_failure_label_asserted

  • WHEN post_check_failure_raised()
  • THEN error_label == "rename.post_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[rename.post_check_failure_label_asserted]]

merge


id: merge kind: intent checked_against_core: clear statement: “WHEN two branches derived from a common ancestor spec repo are joined, THE merge tool SHALL detect id collisions and reference breaks introduced by the union of their edits — using [[graph]]’s blast-radius query rather than re-deriving reachability independently — before reporting the merge complete, and SHALL never report success against a tree that [[linter.referential_integrity]] or [[linter.graph_shape]] would reject.”

Merge

A textually clean 3-way merge (no conflict markers) can still produce a semantically broken repo: two branches mint the same new id independently, or one branch renames an id (rename.md) while the other adds a fresh reference to the old name in a file the rename never touched. Git’s line-based merge can’t see either problem — both are clean at the text layer. This file specifies the check that runs after git’s merge succeeds: it reuses graph.md’s derived reachability rather than re-deriving it, and rename.md’s actual rewrite mechanism rather than inventing a second one, applied across two histories instead of one linear line — the “existing mechanism, new scope” move AGENTS.md #3a asks for before adding anything new.

Purpose

A textually clean 3-way merge (no conflict markers) can still produce a semantically broken repo: two branches mint the same new id independently, or one branch renames an id (rename.md) while the other adds a fresh reference to the old name in a file the rename never touched. Git’s line-based merge can’t see either problem — both are clean at the text layer. This file specifies the check that runs after git’s merge succeeds: it reuses graph.md’s derived reachability rather than re-deriving it, and rename.md’s actual rewrite mechanism rather than inventing a second one, applied across two histories instead of one linear line — the “existing mechanism, new scope” move AGENTS.md #3a asks for before adding anything new.

Constraints

| id | kind | expr | traces_to | satisfies | |——————————————|———–|––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––|–––––––––––| | graph_reused_not_rederived | invariant | merge's collision and blast-radius checks query [[graph]]'s artifact for both branch tips; merge never independently re-walks markdown for reachability | [[merge]] | | | no_new_id_collision | invariant | ∀ id ∈ index(branch_A) ∩ index(branch_B): id was already defined, identically, in the common ancestor — an id newly minted by both branches independently is a collision, not a merge | [[merge]] | | | blast_radii_recorded_pre_merge | invariant | before applying the union of edits, merge records [[graph]].blast_radius(touched_ids) for each branch separately, against the common ancestor's graph | [[merge]] | | | semantic_conflict_iff_blast_radius_intersects | invariant | blast_radius_A(touched_A) ∩ blast_radius_B(touched_B) ≠ ∅ ⟹ the merge requires human review, even when the two branches' literal file diffs don't overlap | [[merge]] | | | rename_replayed_onto_foreign_edits | invariant | if branch A contains a [[rename]] application of (old_id, new_id) and branch B independently adds a new [[old_id]] reference within blast_radius_A, the merge rewrites that reference to [[new_id]] using rename.md's own rewrite mechanism — it is never left dangling and never silently dropped | [[merge]] | | | post_merge_relint_required | invariant | merge is not reported passed until [[linter.referential_integrity]] and [[linter.graph_shape]] are re-run against the merged tree and both report passed | [[merge]] | | | sequential_number_reassigned_on_conflict | invariant | if both branches independently claim the same next sequential number (a CHANGELOG entry or Revision heading), the merge tool renumbers one of the two rather than allowing a silent duplicate | [[merge]] | | | collision_failure | effect | merge.collision_failure(detail) | [[merge]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | reverification_failure | effect | merge.reverification_failure(detail) | [[merge]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | merge_aborted | effect | merge.merge_aborted(detail) | [[merge]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • diverged
  • collision_checked
  • needs_review
  • rename_replayed
  • ref_integrity_reverified
  • merged
  • collision_failed (emits: [[merge.collision_failure]])
  • reverification_failed (emits: [[merge.reverification_failure]])
  • merge_failed (emits: [[merge.merge_aborted]])

Transitions

idfromtoguard
check_collisionsdivergedcollision_checked[[merge.no_new_id_collision]] ∧ [[merge.graph_reused_not_rederived]]
collision_faildivergedcollision_failed¬([[merge.no_new_id_collision]] ∧ [[merge.graph_reused_not_rederived]])
flag_reviewcollision_checkedneeds_review[[merge.semantic_conflict_iff_blast_radius_intersects]] ∧ [[merge.blast_radii_recorded_pre_merge]]
auto_proceedcollision_checkedrename_replayed¬flag_review.guard ∧ [[merge.rename_replayed_onto_foreign_edits]]
resolvedneeds_reviewrename_replayeda human has explicitly approved merging the intersecting blast radii ∧ [[merge.rename_replayed_onto_foreign_edits]]
reverifyrename_replayedref_integrity_reverified[[merge.post_merge_relint_required]]
reverify_failrename_replayedreverification_failed¬([[merge.post_merge_relint_required]])
acceptref_integrity_reverifiedmerged[[merge.sequential_number_reassigned_on_conflict]]
rejectref_integrity_reverifiedmerge_failed¬([[merge.sequential_number_reassigned_on_conflict]])

Properties

idkindderives_fromgeneratorpredicate
collision_across_branches_rejectedunit[[merge.no_new_id_collision]]two_branches_each_independently_defining_new_id("x")check(merge) == failed
inherited_id_not_falsely_flaggedunit[[merge.no_new_id_collision]]id_defined_in_common_ancestor_unchanged_in_both_branches()check(merge) != failed
textually_clean_semantic_conflict_flaggedunit[[merge.semantic_conflict_iff_blast_radius_intersects]]branch_A(renames x to y), branch_B(adds a new [[x]] reference in a file branch_A never touched)check(merge) == needs_review
rename_replay_repairs_dangling_refunit[[merge.rename_replayed_onto_foreign_edits]]same scenario, after human approvalpost_merge_repo has zero occurrences of [[x]]; branch_B's new reference now reads [[y]]
disjoint_blast_radii_auto_mergeunit[[merge.semantic_conflict_iff_blast_radius_intersects]]two_branches_touching_disjoint_namespaces_with_disjoint_blast_radii()check(merge) == merged — no human review required
duplicate_sequential_number_renumberedunit[[merge.sequential_number_reassigned_on_conflict]]both_branches_add_a_CHANGELOG_entry_claiming_the_same_next_number()post_merge_repo has two distinct sequential numbers; neither is duplicated
relint_gates_mergeunit[[merge.post_merge_relint_required]]merge_where(linter.referential_integrity or linter.graph_shape: fails against the merged tree)check(merge) == failed — mirrors rename.md’s stray_ref_caught_by_verify
blast_radius_recorded_before_applyunit[[merge.blast_radii_recorded_pre_merge]]merge_history_where_edits_were_applied_before_both_branches'_radii_were_recorded()check(merge) == failed — apply never precedes the recording step, for either branch
reachability_from_graph_artifact_onlyunit[[merge.graph_reused_not_rederived]]merge_invoked_with_the_markdown_walker_patched_to_panic()merge of an otherwise-clean diverged repo succeeds — collision and blast-radius checks only query [[graph]]’s artifact
collision_failure_label_assertedunit[[merge.collision_failure]]collision_failure_raised()error_label == "merge.collision_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
reverification_failure_label_assertedunit[[merge.reverification_failure]]reverification_failure_raised()error_label == "merge.reverification_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
merge_aborted_label_assertedunit[[merge.merge_aborted]]merge_aborted_raised()error_label == "merge.merge_aborted" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

checked_against_core: clear (see AGENTS.md’s convention). rename_replayed_onto_foreign_edits was checked against AGENTS.md #3a specifically before being added as a new row rather than reusing rename.md’s old_id_fully_replaced as-is: it isn’t a duplicate, because it operates over two divergent histories being joined, not one linear history — old_id_fully_replaced guarantees completeness within a single rename’s own transaction, and says nothing about a reference minted on a different branch that the rename operation never saw. This file’s constraint is what makes that reference get rewritten anyway, once the branches meet.

What this file doesn’t replace. Two edits to the same row’s own field on both branches is an ordinary textual conflict — git already marks it, already forces a human to resolve it, and nothing here changes that. This file exists only for the cases where the text merge is clean but the result isn’t: id collisions and rename/reference splits that don’t overlap a single line.

Depends on graph.md, not a local reachability walk. Every blast-radius computation in this file’s Constraints is a graph query, computed once against the common ancestor for each branch (blast_radii_recorded_pre_merge) rather than recomputed after the union is applied — recomputing post-union would already have mixed the two branches’ edges together and lost the ability to tell which branch’s change reached which id.

Depends on rename.md, not a second rewrite mechanism. resolved/ auto_proceed’s rewrite step calls the same rewrite rename.md’s apply transition performs — this file only decides when a cross-branch replay is required, never how the rewrite itself works.

Decision of record (2026-09-30, user-approved; HITL ticket specodelic-mp1 row 2): “a human has explicitly approved” means an explicit, attributable, recorded human decision by the operator — a deliberate approve step (never inferred, timed-out into, or defaulted) whose decision lands in the repo’s decision trail (change notes / ticket). No CI gate or role requirement is assumed: the format describes tool contracts, not hosting policy, and an implementation may layer a gate or role on top, but the floor the resolved guard checks is the attributable operator decision itself. CI gates and roles were deliberately excluded — both presume infrastructure the spec cannot see, whereas a recorded operator decision is checkable by the merge lifecycle itself. This paragraph records the decision; constraint text is unchanged, same treatment as rename.md’s batch-rename decision.

Resolved question (was Needs Human Review): what “a human has explicitly approved” (the resolved transition’s guard) means operationally is now decided — see the decision of record above. The mechanism-agnostic floor stands: an attributable operator decision, recorded in the repo’s decision trail; gates and roles are layers an implementation may add, not assumptions the format makes.

Open question, relationship to refactor.md: a blast-radius intersection that triggers needs_review here may also be exactly the “unrelated fan-in” shape refactor.md flags as a tidy-first candidate — both files answer different questions (can this merge proceed safely, vs. should this node be split before more changes land on it) and are deliberately left as two files rather than merged into one, but a same-session finding from both on the same node is worth surfacing together rather than as two unrelated notices. Left open rather than wired automatically.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: collision_across_branches_rejected

  • WHEN two_branches_each_independently_defining_new_id("x")
  • THEN check(merge) == failed
  • VERIFIES [[merge.collision_across_branches_rejected]]

Scenario: inherited_id_not_falsely_flagged

  • WHEN id_defined_in_common_ancestor_unchanged_in_both_branches()
  • THEN check(merge) != failed
  • VERIFIES [[merge.inherited_id_not_falsely_flagged]]

Scenario: textually_clean_semantic_conflict_flagged

  • WHEN branch_A(renames x to y), branch_B(adds a new [[x]] reference in a file branch_A never touched)
  • THEN check(merge) == needs_review
  • VERIFIES [[merge.textually_clean_semantic_conflict_flagged]]

Scenario: rename_replay_repairs_dangling_ref

  • WHEN same scenario, after human approval
  • THEN post_merge_repo has zero occurrences of [[x]]; branch_B's new reference now reads [[y]]
  • VERIFIES [[merge.rename_replay_repairs_dangling_ref]]

Scenario: disjoint_blast_radii_auto_merge

  • WHEN two_branches_touching_disjoint_namespaces_with_disjoint_blast_radii()
  • THEN check(merge) == merged — no human review required
  • VERIFIES [[merge.disjoint_blast_radii_auto_merge]]

Scenario: duplicate_sequential_number_renumbered

  • WHEN both_branches_add_a_CHANGELOG_entry_claiming_the_same_next_number()
  • THEN post_merge_repo has two distinct sequential numbers; neither is duplicated
  • VERIFIES [[merge.duplicate_sequential_number_renumbered]]

Scenario: relint_gates_merge

  • WHEN merge_where(linter.referential_integrity or linter.graph_shape: fails against the merged tree)
  • THEN check(merge) == failed — mirrors rename.md’s stray_ref_caught_by_verify
  • VERIFIES [[merge.relint_gates_merge]]

Scenario: blast_radius_recorded_before_apply

  • WHEN merge_history_where_edits_were_applied_before_both_branches'_radii_were_recorded()
  • THEN check(merge) == failed — apply never precedes the recording step, for either branch
  • VERIFIES [[merge.blast_radius_recorded_before_apply]]

Scenario: reachability_from_graph_artifact_only

  • WHEN merge_invoked_with_the_markdown_walker_patched_to_panic()
  • THEN merge of an otherwise-clean diverged repo succeeds — collision and blast-radius checks only query [[graph]]’s artifact
  • VERIFIES [[merge.reachability_from_graph_artifact_only]]

Scenario: collision_failure_label_asserted

  • WHEN collision_failure_raised()
  • THEN error_label == "merge.collision_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[merge.collision_failure_label_asserted]]

Scenario: reverification_failure_label_asserted

  • WHEN reverification_failure_raised()
  • THEN error_label == "merge.reverification_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[merge.reverification_failure_label_asserted]]

Scenario: merge_aborted_label_asserted

  • WHEN merge_aborted_raised()
  • THEN error_label == "merge.merge_aborted" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[merge.merge_aborted_label_asserted]]

refactor


id: refactor kind: intent checked_against_core: clear statement: “WHEN a proposed changeset would edit rows owned by a node with high, unrelated fan-in in [[graph]], THE refactor advisor SHALL surface a non-gating suggestion to split that node first, and SHALL never block or delay any transition in [[specodelic]]’s or [[orchestrate]]’s lifecycle.”

Refactor Advisor

STATUS.md §2 already names the pathology this mechanizes — “God object / cyclic dependency” — and specodelic.md Revision 2 already fixed one real instance of it by hand (splitting the flat 7-clause lint guard into the Checker Ownership table) before anyone had a tool that would have flagged it proactively. This file is that tool’s spec: Kent Beck’s tidy-first rule (“separate the structural change from the behavioral one”) read as a graph query — a node with fan-in from unrelated namespaces, or a changeset that only needs a fraction of what a node owns, is a candidate for splitting before the behavioral edit lands, not after.

Purpose

STATUS.md §2 already names the pathology this mechanizes — “God object / cyclic dependency” — and specodelic.md Revision 2 already fixed one real instance of it by hand (splitting the flat 7-clause lint guard into the Checker Ownership table) before anyone had a tool that would have flagged it proactively. This file is that tool’s spec: Kent Beck’s tidy-first rule (“separate the structural change from the behavioral one”) read as a graph query — a node with fan-in from unrelated namespaces, or a changeset that only needs a fraction of what a node owns, is a candidate for splitting before the behavioral edit lands, not after.

Constraints

idkindexprtraces_toobserves
fan_in_read_from_graphinvariantthe advisor's dependent-count for node N is [[graph]]'s blast_radius(N) restricted to incoming edges — never independently recomputed by walking markdown[[refactor]]
unrelated_fan_in_definedinvarianta dependent is "unrelated" to N when N and the dependent share no namespace segment below the repo root — i.e. their nearest common ancestor in the id namespace is the root itself[[refactor]]
narrow_diff_heuristicinvarianta changeset naming a strict subset of node N's owned Constraint/Property rows as its actual target, while depending on none of N's other owned rows, is flagged regardless of N's fan-in count[[refactor]]
threshold_is_per_repo_settinginvariantthe fan-in count that counts as "high" is a configured value, not a number fixed in this file — "high" is relative to a given repo's typical fan-in[[refactor]]
advisory_finding_emittedeffectoutput == {node_id, dependent_count, unrelated_namespace_count, suggested_split: bool}[[refactor]]
finding_surfaced_as_advisoryadvisorythe emitted finding surfaces in the advisor's report — naming node_id, dependent_count, unrelated_namespace_count, and suggested_split — as a suggestion on the advisory surface, and never blocks or delays a transition in [[specodelic]]'s or [[orchestrate]]'s lifecycle[[refactor]][[refactor.advisory_finding_emitted]]

Model

States

  • idle
  • analyzing
  • clean
  • found emits: [[refactor.advisory_finding_emitted]]

Transitions

idfromtoguard
analyzeidleanalyzing[[graph.queryable]] — graph’s artifact is published and queryable (see graph.md’s own lifecycle)
flaganalyzingfound[[refactor.unrelated_fan_in_defined]] ∨ [[refactor.narrow_diff_heuristic]]
clearanalyzingclean¬flag.guard

Properties

idkindderives_fromgeneratorpredicate
fan_in_graph_sourcedunit[[refactor.fan_in_read_from_graph]]node_with_precomputed_blast_radius_in_graph()advisor_source_calls(markdown_walker) == 0 — every count comes from graph’s artifact
unrelated_fan_in_flaggedunit[[refactor.unrelated_fan_in_defined]]node_referenced_by_dependents_in_three_disjoint_top_level_namespaces()check(node) == found
related_fan_in_not_flaggedunit[[refactor.unrelated_fan_in_defined]]node_referenced_only_by_dependents_within_its_own_namespace_subtree()check(node) == clean
narrow_diff_flagged_low_fan_inunit[[refactor.narrow_diff_heuristic]]changeset_touching_one_of_five_constraints_owned_by_a_node_with_fan_in(1)check(node) == found — flagged even though fan-in alone wouldn’t trigger it
emitted_finding_shapeunit[[refactor.advisory_finding_emitted]]found state reached for node N with dependent_count 4, 2 unrelatedemits(found) == {node_id: N, dependent_count: 4, unrelated_namespace_count: 2, suggested_split: true}
threshold_read_from_configunit[[refactor.threshold_is_per_repo_setting]]same_node_same_changeset_under_two_repo_configs_with_different_high_fan_in_values()flagged(config_A) != flagged(config_B) — the decision follows the repo’s configured threshold, never a constant embedded in this file
surfaced_finding_never_gatesunit[[refactor.finding_surfaced_as_advisory]]advisor_finding_emitted_for_node_N()exit_code == 0 ∧ no lifecycle transition blocked or delayed — the finding rides the advisory surface

Notes

checked_against_core: clear (see AGENTS.md’s convention). Nothing new was needed to make the finding non-gating: advisory_finding_emitted is kind == effect, and [[specodelic.ref_kind_compatible]]’s own typing already restricts every transition’s guard field to kind == invariant Constraints only, tested generically by [[specodelic.advisory_cannot_gate]]. An effect-kind Constraint is excluded from guard-eligibility by that same rule, for the same reason an advisory-kind one is — so this file needed no invariant of its own asserting “the finding can’t gate anything”; that was already true, globally, before this file existed. (An earlier draft of this file carried two such invariants plus a redundant unit test — removed as an instance of the exact “one rule, restated three ways” pattern specodelic.md Revision 6 already caught once, for append_only_variants.) advisory_finding_emitted’s emits reuses the Moore-machine mechanism Revision 6 built for State; this file adds no sixth 𝒦 object and no new kind of Constraint — a new consumer of an existing mechanism, not a new one.

This file never decides how to split a node. It only detects the fan-in/narrow-diff shape and emits a finding; the actual split — a new file, an updated traces_to, an updated Checker Ownership-style table if the node is itself a dependency hub — is an ordinary edit, checked the normal way by the six existing linters. Deciding how to split is a design judgment this file deliberately doesn’t automate.

Depends on graph.md, not on re-deriving reachability: analyze’s guard cites graph’s own queryable state by typed citation ([[graph.queryable]] — a State, which Revision 10’s guard typing admits) instead of bare prose (the same “cite another file’s state fact when it isn’t itself a Constraint row” pattern orchestrate.md already uses for model_check.md/verify.md), and every fan-in count is a graph.blast_radius query, never an independent markdown walk.

Decision of record (2026-09-30, user-approved; advised by a typed Jev evaluation, jev-1.13.0, conf 0.54): “unrelated fan-in” keys off the id namespace — the “shares no namespace segment below root” test stands as written. Physical directory placement is rejected as the keying: ids are the format’s primary identity (id_matches_file ties them to filenames, the Reference Typing table types them as foreign keys), so relatedness judged by namespace is consistent with how every other checker reads the corpus, while directory placement would make the advisory’s meaning depend on filesystem layout the format doesn’t own. The flat-namespace failure mode is real but contained: the finding is kind == advisory-shaped (non-gating by typing), and the threshold is already per-repo configurable — a flat-namespace repo raises the threshold or lives with noise. A configurable keying mode (namespace or directory) stays a possible future widening under kind_field_extensible-style governance if a real flat-namespace corpus ever adopts the format; nothing in this file’s constraint text changes.

Open question, Needs Human Review: threshold_is_per_repo_setting deliberately leaves the actual number unset here — this file specifies that the threshold is configurable, not what a reasonable default is.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: fan_in_graph_sourced

  • WHEN node_with_precomputed_blast_radius_in_graph()
  • THEN advisor_source_calls(markdown_walker) == 0 — every count comes from graph’s artifact
  • VERIFIES [[refactor.fan_in_graph_sourced]]

Scenario: unrelated_fan_in_flagged

  • WHEN node_referenced_by_dependents_in_three_disjoint_top_level_namespaces()
  • THEN check(node) == found
  • VERIFIES [[refactor.unrelated_fan_in_flagged]]
  • WHEN node_referenced_only_by_dependents_within_its_own_namespace_subtree()
  • THEN check(node) == clean
  • VERIFIES [[refactor.related_fan_in_not_flagged]]

Scenario: narrow_diff_flagged_low_fan_in

  • WHEN changeset_touching_one_of_five_constraints_owned_by_a_node_with_fan_in(1)
  • THEN check(node) == found — flagged even though fan-in alone wouldn’t trigger it
  • VERIFIES [[refactor.narrow_diff_flagged_low_fan_in]]

Scenario: emitted_finding_shape

  • WHEN found state reached for node N with dependent_count 4, 2 unrelated
  • THEN emits(found) == {node_id: N, dependent_count: 4, unrelated_namespace_count: 2, suggested_split: true}
  • VERIFIES [[refactor.emitted_finding_shape]]

Scenario: threshold_read_from_config

  • WHEN same_node_same_changeset_under_two_repo_configs_with_different_high_fan_in_values()
  • THEN flagged(config_A) != flagged(config_B) — the decision follows the repo’s configured threshold, never a constant embedded in this file
  • VERIFIES [[refactor.threshold_read_from_config]]

Scenario: surfaced_finding_never_gates

  • WHEN advisor_finding_emitted_for_node_N()
  • THEN exit_code == 0 ∧ no lifecycle transition blocked or delayed — the finding rides the advisory surface
  • VERIFIES [[refactor.surfaced_finding_never_gates]]

orchestrate


id: orchestrate kind: intent checked_against_core: clear statement: “WHEN a repo’s files have each reached parsed, THE orchestrator SHALL run every Checker Ownership checker in dependency order and then drive compile, model_check, and verify in sequence, halting at the first stage that fails.”

Orchestrator

STATUS.md §4’s last prioritized item: something that actually runs the pipeline specodelic.md describes, the way ddl orchestrates the rest of that tool ecosystem. Every stage already has its own spec — linter-frontmatter.md through linter-schema_shape.md plus linter-coverage.md for lint, compile.md for compile, model_check.md for model_check, verify.md for verify — but nothing until now specified the thing that calls them in the right order, on the right inputs, and stops (or doesn’t) when one of them fails. This file is that spec, not a reimplementation of any stage’s own logic: it owns sequencing and gating, and defers every actual check to the file that already owns it.

Purpose

STATUS.md §4’s last prioritized item: something that actually runs the pipeline specodelic.md describes, the way ddl orchestrates the rest of that tool ecosystem. Every stage already has its own spec — linter-frontmatter.md through linter-schema_shape.md plus linter-coverage.md for lint, compile.md for compile, model_check.md for model_check, verify.md for verify — but nothing until now specified the thing that calls them in the right order, on the right inputs, and stops (or doesn’t) when one of them fails. This file is that spec, not a reimplementation of any stage’s own logic: it owns sequencing and gating, and defers every actual check to the file that already owns it.

Constraints

| id | kind | expr | traces_to | satisfies | |—————————————|———–|————————————————————————————————————————————————|–––––––––––| | lint_gate_matches_checker_ownership | invariant | orchestrator reports lint success iff every terminal node of specodelic.md's Checker Ownership table reports passed — never a subset or a superset of that table | [[orchestrate]] | | | dependency_respecting_skip | invariant | a checker is invoked only after every checker listed in its Checker Ownership 'Depends on' column has reported passed; if a dependency reports failed, its dependents are skipped (not invoked, not reported as failed) rather than run against input the failed checker hasn't validated | [[orchestrate]] | | | independent_branches_run_regardless | invariant | two checkers with no dependency relation between them (referential_integrity→graph_shape→model_shape vs. ears_syntax vs. schema_shape) each run and report independently — one branch failing never skips or blocks the other | [[orchestrate]] | | | compile_gate_matches_coverage | invariant | orchestrator advances to model_check iff linter.coverage reports passed — exactly specodelic.md's compile transition gate (coverage + law_requires_cases), not a looser or stricter check | [[orchestrate]] | | | stage_order_fixed | invariant | compile is never invoked before every file's lint stage reports passed; model_check is never invoked before compile reports compiled; verify is never invoked before model_check reports model_checked | [[orchestrate]] | | | external_completeness_never_gating | invariant | linter.external_completeness runs only if the repo declares a checklist, and its outcome (passed/failed/not_applicable) never blocks or delays lint, compile, model_check, or verify | [[orchestrate]] | | | deterministic_rerun | invariant | running the orchestrator twice against an unchanged repo produces byte-identical reports | [[orchestrate]] | | | lint_stage_failure | effect | orchestrate.lint_stage_failure(stage, detail) | [[orchestrate]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | compile_stage_failure | effect | orchestrate.compile_stage_failure(stage, detail) | [[orchestrate]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | model_check_stage_failure | effect | orchestrate.model_check_stage_failure(stage, detail) | [[orchestrate]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | verify_stage_failure | effect | orchestrate.verify_stage_failure(stage, detail) | [[orchestrate]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • idle
  • lint_stage
  • compile_stage
  • model_check_stage
  • verify_stage
  • succeeded
  • lint_failed (emits: [[orchestrate.lint_stage_failure]])
  • compile_failed (emits: [[orchestrate.compile_stage_failure]])
  • model_check_failed (emits: [[orchestrate.model_check_stage_failure]])
  • verify_failed (emits: [[orchestrate.verify_stage_failure]])

Transitions

idfromtoguard
start_lintidlelint_stage[[specodelic.parsed]] — every file in the repo has independently reached that state (see specodelic.md’s own lifecycle)
lint_oklint_stagecompile_stage[[orchestrate.lint_gate_matches_checker_ownership]] ∧ [[orchestrate.dependency_respecting_skip]] ∧ [[orchestrate.independent_branches_run_regardless]]
lint_faillint_stagelint_failed¬lint_ok.guard
compile_okcompile_stagemodel_check_stage[[orchestrate.compile_gate_matches_coverage]]
compile_failcompile_stagecompile_failed¬compile_ok.guard
model_check_okmodel_check_stageverify_stage[[orchestrate.stage_order_fixed]] ∧ model_check.md's model_checked/no_counterexample distinction resolved
model_check_failmodel_check_stagemodel_check_failed¬model_check_ok.guard
verify_okverify_stagesucceeded[[orchestrate.stage_order_fixed]] ∧ verify.md's both_gates_required holds
verify_failverify_stageverify_failed¬verify_ok.guard

Properties

idkindderives_fromgeneratorpredicate
upstream_failure_skips_dependentsunit[[orchestrate.dependency_respecting_skip]]repo_where(linter.frontmatter: fails)invocation_count(linter.referential_integrity) == 0 — never run against unvalidated input
independent_branch_failure_isolatedunit[[orchestrate.independent_branches_run_regardless]]repo_where(linter.ears_syntax: fails, linter.referential_integrity_branch: passes)report(linter.graph_shape) == passed — the passing branch’s own outcome is unaffected
compile_blocked_on_partial_lintunit[[orchestrate.stage_order_fixed]]repo_where(five_of_six_checkers_pass, one_still_pending)invocation_count(compile) == 0
external_completeness_failure_ignoredunit[[orchestrate.external_completeness_never_gating]]repo_where(all_seven_checkers_and_pipeline_pass, declared_checklist: fails)orchestrate reaches succeeded
rerun_idempotentunit[[orchestrate.deterministic_rerun]]run_orchestrator_twice_against_unchanged_repo()report(run_1) == report(run_2)
clean_repo_succeedsunit[[orchestrate.lint_gate_matches_checker_ownership]]arbitrary_repo_that_independently_passes_lint_compile_model_check_verify()orchestrate reaches succeeded
coverage_failure_holds_compileunit[[orchestrate.compile_gate_matches_coverage]]repo_where(linter.coverage: failed, every_other_checker_and_pipeline_stage: passed)orchestrate halts at compile_stage — never reaches model_check_stage, and by exactly the coverage checker’s verdict, not a looser or stricter one
lint_stage_failure_label_assertedunit[[orchestrate.lint_stage_failure]]lint_stage_failure_raised()error_label == "orchestrate.lint_stage_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
compile_stage_failure_label_assertedunit[[orchestrate.compile_stage_failure]]compile_stage_failure_raised()error_label == "orchestrate.compile_stage_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
model_check_stage_failure_label_assertedunit[[orchestrate.model_check_stage_failure]]model_check_stage_failure_raised()error_label == "orchestrate.model_check_stage_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
verify_stage_failure_label_assertedunit[[orchestrate.verify_stage_failure]]verify_stage_failure_raised()error_label == "orchestrate.verify_stage_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

checked_against_core: clear (see AGENTS.md’s convention). As with rename.md and linter-external_completeness.md, this file’s constraints are local to what sequencing and gating specifically require — none of them assert anything about spec-file content that specodelic.md itself should own.

Scope boundary: this file drives the four-stage pipeline, not rename. rename.md’s (old_id, new_id) operation is invoked on demand by a person or tool, never automatically as part of a lint/compile/model_check/verify run — folding it in here would make an ordinary pipeline run capable of silently mutating the repo it’s checking, which is exactly the kind of implicit side effect AGENTS.md’s workflow rules exist to prevent. If a repo’s CI wants “verify, then rename some stale id, then re-verify” as one recipe, that’s a policy composed of orchestrate and rename calls by whatever invokes both — not a fact either file should assert about the other.

Why model_check_ok/verify_ok use a plain-text clause alongside a bracketed one. stage_order_fixed only says when model_check/ verify may start, not what result they must report to count as success — that’s model_check.md’s model_checked/no_counterexample distinction (CLAR-003) and verify.md‘s both_gates_required, respectively, neither of which is itself phrased as a single Constraint row this file could point a guard at. Rather than restate those files’ internal logic as a new orchestrate-local constraint (duplicating logic this file doesn’t own), the guard names the fact in prose and leaves the actual check to the file that already owns it — the same “same claim, different altitude, don’t restate the logic” discipline linter-referential_integrity.md’s Notes describe for rename_naturality.

Where graph.md, refactor.md, and merge.md fit. None of the three are part of this file’s own four-stage pipeline. This file needs no refactor_advisory_never_gates-style invariant of its own: refactor.md’s finding is emitted via emits (kind == effect), and [[specodelic.ref_kind_compatible]]’s existing typing already makes any effect- or advisory-kind Constraint ineligible as a guard target, tested generically by [[specodelic.advisory_cannot_gate]] — nothing here can reference refactor.md’s output as a guard even by mistake, so asserting it again would only restate an already-proven fact. Contrast external_completeness_never_gating above, which is still needed: that checker’s own constraints are invariant-kind, so its non-gating status holds only because no transition below happens to cite it — a wiring fact this file must keep asserting, not a typing fact guaranteed forever the way refactor.md’s is. graph.md is a standing derived artifact other files query, not a pipeline stage, and merge.md runs at merge time, outside a single repo’s own lint→verify run, the same way rename.md is explicitly out of scope above. This orchestrator stays scoped to the four stages specodelic.md already defines; it doesn’t grow a fifth or sixth stage just because new files exist to query.

graph.md’s reference graph and this file’s Checker Ownership table are two different graphs, not one generalized into the other. Checker Ownership’s “Depends on” column is tool-execution-order metadata — which linter must finish before another starts — fixed at design time and never derived from any spec file’s content. graph.md’s adjacency structure is content-reference edges (traces_to/guard/emits/etc.) mechanically extracted from spec files. They happen to look similar (both are small dependency graphs over roughly the same set of files) but answer different questions, and folding Checker Ownership into graph.md — replacing this table with a graph.md query — would conflate tooling sequencing with content dependency. Flagged here specifically because the resemblance makes that an easy mistake to make later, not because either file is unclear on its own.

With this file, every item STATUS.md §4 had prioritized (P0 through the old P2) is now specced: the compile/verify pipeline, the rename tool, external completeness, and this orchestrator. What’s left in §4 is the lower-severity, already-flagged loose ends (CLAR-001 through CLAR-003, EXCL-001, and the acknowledged no_prose_field_parsed shape mismatch) — none of which block one another or this file, and none of which were newly surfaced by writing it.

Decision of record (mp1 row 4, 2026-09-30): the orchestrator stays scoped to parsed → verified. The original open question — whether this file should also own driving draft → parsed for each file, or only assume files have independently reached parsed as start_lint’s precondition — is resolved in favor of scope: parsing remains outside this file’s Model. The orchestrator still runs the parse step and reports its outcome (a spec parse error is the only parse failure; hostile-input and non-spec skips are labeled warnings per the ingestion gate), and parse failures gate lint through start_lint’s precondition — but the draft→parsed transition’s guards ([[specodelic.frontmatter_valid]] ∧ [[specodelic.id_matches_file]]) are enforced where they already live, in the frontmatter checker and the parser, not re-owned here. Rationale: the spec deliberately scoped the Model to the four pipeline stages; nothing in pipeline v1 requires a single entry point that owns parsing, and a run against a draft-only repo is simply a run whose parse stage reports the files that never reached parsed — not a different Model.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: upstream_failure_skips_dependents

  • WHEN repo_where(linter.frontmatter: fails)
  • THEN invocation_count(linter.referential_integrity) == 0 — never run against unvalidated input
  • VERIFIES [[orchestrate.upstream_failure_skips_dependents]]

Scenario: independent_branch_failure_isolated

  • WHEN repo_where(linter.ears_syntax: fails, linter.referential_integrity_branch: passes)
  • THEN report(linter.graph_shape) == passed — the passing branch’s own outcome is unaffected
  • VERIFIES [[orchestrate.independent_branch_failure_isolated]]

Scenario: compile_blocked_on_partial_lint

  • WHEN repo_where(five_of_six_checkers_pass, one_still_pending)
  • THEN invocation_count(compile) == 0
  • VERIFIES [[orchestrate.compile_blocked_on_partial_lint]]

Scenario: external_completeness_failure_ignored

  • WHEN repo_where(all_seven_checkers_and_pipeline_pass, declared_checklist: fails)
  • THEN orchestrate reaches succeeded
  • VERIFIES [[orchestrate.external_completeness_failure_ignored]]

Scenario: rerun_idempotent

  • WHEN run_orchestrator_twice_against_unchanged_repo()
  • THEN report(run_1) == report(run_2)
  • VERIFIES [[orchestrate.rerun_idempotent]]

Scenario: clean_repo_succeeds

  • WHEN arbitrary_repo_that_independently_passes_lint_compile_model_check_verify()
  • THEN orchestrate reaches succeeded
  • VERIFIES [[orchestrate.clean_repo_succeeds]]

Scenario: coverage_failure_holds_compile

  • WHEN repo_where(linter.coverage: failed, every_other_checker_and_pipeline_stage: passed)
  • THEN orchestrate halts at compile_stage — never reaches model_check_stage, and by exactly the coverage checker’s verdict, not a looser or stricter one
  • VERIFIES [[orchestrate.coverage_failure_holds_compile]]

Scenario: lint_stage_failure_label_asserted

  • WHEN lint_stage_failure_raised()
  • THEN error_label == "orchestrate.lint_stage_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[orchestrate.lint_stage_failure_label_asserted]]

Scenario: compile_stage_failure_label_asserted

  • WHEN compile_stage_failure_raised()
  • THEN error_label == "orchestrate.compile_stage_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[orchestrate.compile_stage_failure_label_asserted]]

Scenario: model_check_stage_failure_label_asserted

  • WHEN model_check_stage_failure_raised()
  • THEN error_label == "orchestrate.model_check_stage_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[orchestrate.model_check_stage_failure_label_asserted]]

Scenario: verify_stage_failure_label_asserted

  • WHEN verify_stage_failure_raised()
  • THEN error_label == "orchestrate.verify_stage_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[orchestrate.verify_stage_failure_label_asserted]]

conform — checking a spec against reality, not against itself

Every other verb in the pipeline evaluates the spec’s own claims: lint checks the file’s shape, compile and model-check explore the model the file declares, verify checks the file’s opt-in claims. spk conform is the one verb that brings in evidence from outside the spec: it classifies traces recorded from an external oracle — a legacy system, a curated set of cases, a reference implementation — against what the spec declares and can actually execute.

Usage

$ spk conform <spec-file> --oracle scenarios.jsonl [--closed-world]

The scenario corpus is JSONL: one record per line, each carrying id, an optional setup state, and a trace of actions with observations. Anything else — unknown fields, malformed lines, missing or duplicate ids — is refused with a remediation hint, never silently ignored.

The verdict taxonomy

Every trace receives exactly one verdict from a closed set, each with a labeled reason:

VerdictMeaning
permitteda declared, executable claim covers the trace and the trace agrees with it
forbiddenthe trace violates a declared executable claim (any invocation mode), or — only under --closed-world — nothing declared covers it
underspecifiedno declared Model element or claim covers the trace (open-world default: a missing transition is a spec gap, never a prohibition)
unknowna claim covers the trace but is prose-only — prose is never silently checked
unsupportedthe covering claim’s evaluator kind is not executable in this run

Exit codes follow the same honesty discipline as the rest of the pipeline: 0 = no forbidden or unsupported verdict; 1 = any such verdict; 2 = invocation error or gate refusal. unknown and underspecified are surfaced as counts but never fail the run — they are spec-gap findings, not refutations.

Gates and lifecycle

conform runs only over a file that parses, lints clean, and has current compiled artifacts — the same stage discipline orchestrate applies between stages. A stale artifact or a lint-dirty file is refused with the remediation hint (spk compile / spk lint), and no verdicts are derived from it.

conform is deliberately outside the artifact lifecycle: it never advances draft → parsed → linted → compiled → model_checked → verified, is never a stage of spk orchestrate, and a conform run — even one that ends in forbidden verdicts — never gates or blocks a lifecycle transition, and writes nothing: not the spec, not the artifacts, not the report. It consumes, classifies, and reports.

Evidence scope

The report — in both the JSON envelope and the --human view — carries a fixed evidence_scope field. It is data, not documentation, so no reformatting can strip it:

agreement on the supplied corpus; not a proof of behavioral equality

A finite set of recorded traces can agree with the spec without the spec describing the system. conform tells you exactly how far its evidence reaches — and no further. For how that fits the other verbs’ guarantees, see verification boundaries; for the lifecycle stages conform stays outside of, see orchestrate and the command reference.

conform — capability


id: conform kind: intent statement: “WHEN an oracle scenario record optionally declares expect: forbidden and conform classifies its trace, THE conform capability SHALL echo the declaration and its met or unmet outcome in the verdict record, SHALL account met expectations as non-gating agreement-tier evidence while keeping the mechanical verdict, SHALL account unmet expectations in the hard forbidden bucket so the run exits 1, SHALL preserve unchanged semantics for undeclared records, and SHALL account prose-only advisory records separately so they never gate.”

conform Specification

Purpose

Check a spec against reality instead of against itself: classify traces recorded from an external oracle (a legacy system, curated cases, a reference implementation) against what the spec declares and can execute. conform is the external-evidence leg the pipeline lacks — every other verb evaluates the spec’s own claims. Its discipline is the negative space: a missing transition is underspecification, never prohibition; prose is never silently checked; agreement on a finite corpus is never behavioral equality. conform is read-only over specs and oracles alike — it evaluates, it never generates traces, implementations, or verdicts beyond its declared scope.

Constraints

idkindexprtraces_to
closed_expectation_schemainvariantthe scenario schema accepts an optional expect drawn only from {forbidden}; an out-of-set value or an unknown field is a corpus_parse refusal naming the field, the closed set, and the one-JSON-object-per-line remediation — never a silent "no expectation"[[conform]]
expectation_echoedinvariantevery verdict record echoes the declared expectation in expect and its qualification in expectation_met, both null when no declaration exists[[conform]]
agreement_tierinvarianta met expectation is counted in agreement_counts keyed by the verdict spelling, excluded from verdict_counts and from the forbidden + unsupported exit predicate, exits 0, and renders as the oracle agreeing[[conform]]
unmet_gatesinvariantan unmet expectation keeps the mechanical verdict, leads its reason with the expectation_unmet marker, counts in the hard forbidden bucket, and exits 1[[conform]]
absence_preservedinvariantrecords without expect keep their previous verdict, reason, count placement, gating, and rendering, differing only by the two new null fields[[conform]]
advisory_non_gatinginvariantundeclared prose-only covering evidence keeps the closed unknown verdict, is marked advisory: true, counted in advisory_counts, excluded from verdict_counts and the exit predicate, and named non-gating in the human view[[conform]]

Model

States

  • gated
  • classified
  • tiered
  • reported

Transitions

idfromtoguard
classifygatedclassified[[conform.closed_expectation_schema]] ∧ [[conform.expectation_echoed]]
tierclassifiedtiered[[conform.agreement_tier]] ∧ [[conform.unmet_gates]]
reporttieredreported[[conform.absence_preserved]] ∧ [[conform.advisory_non_gating]]

Properties

idkindderives_fromgeneratorpredicate
p_schemaunit[[conform.closed_expectation_schema]]arbitrary_scenario_corpus()invalid expect or unknown field ⇒ corpus_parse refusal naming field, closed set, and remediation; forbidden ⇒ parses
p_echounit[[conform.expectation_echoed]]arbitrary_declared_scenario()record.expect equals the declaration ∧ record.expectation_met equals the verdict match
p_agreementunit[[conform.agreement_tier]]met_forbidden_expectation()agreement_counts counts the verdict ∧ verdict_counts excludes it ∧ exit 0
p_unmetunit[[conform.unmet_gates]]unmet_forbidden_expectation()mechanical verdict retained ∧ reason leads expectation_unmet ∧ hard forbidden count grows ∧ exit 1
p_absenceunit[[conform.absence_preserved]]arbitrary_undeclared_scenario()expect null ∧ expectation_met null ∧ prior verdict, reason, count placement, and gating unchanged
p_advisoryunit[[conform.advisory_non_gating]]prose_only_covering_claim()advisory true ∧ verdict unknown ∧ advisory_counts counted ∧ verdict_counts excluded ∧ exit 0

Requirements

Requirement: Oracle trace classification

The system SHALL provide spk conform <spec-path> --oracle <scenarios.jsonl> classifying each trace in the corpus with exactly one verdict from the closed taxonomy {permitted, forbidden, underspecified, unknown, unsupported}, each verdict record carrying its reason and the ids of the claims evaluated, deriving only from structural Model facts and executable claims — never from prose, never from a constraint’s name, and never from the existence of a deriving Property.

Scenario: Executable claim contradicts a trace

  • WHEN a corpus trace’s observed transition violates an executable invariant claim (**rust:** fragment or kernel atom) over the compiled model
  • THEN the trace is classified forbidden and the verdict record names the contradicted claim id in its reason

Scenario: Prose-only claim covers a trace

  • WHEN the only claim covering a trace has a prose-only expr (no kernel, **rust:**, or citation marker)
  • THEN the trace’s verdict is unknown with a reason naming the prose claim — never permitted or forbidden

Scenario: No declared claim covers a trace

  • WHEN a trace references a transition or observation no declared Model element or claim covers
  • THEN the verdict is underspecified in the default open-world mode

Requirement: Closed-world gate

The system SHALL separate the two prohibition evidence classes: a trace that violates a declared, executable claim SHALL be forbidden in any invocation mode, and the closed-world declaration SHALL be recorded in every verdict record and the report header.

Scenario: Contradiction forbidden in any mode

  • WHEN a trace violates an executable claim and the run was invoked without --closed-world
  • THEN the verdict is forbidden and its record carries closed_world: false with the contradicted claim id in the reason

Requirement: Uncovered traces follow the closed-world declaration

A trace no declared Model element or claim covers SHALL be forbidden only when the invocation explicitly declared closed-world mode via --closed-world; in the default open-world mode, absence of coverage SHALL yield underspecified, never forbidden.

Scenario: Uncovered trace forbidden under the declaration

  • WHEN a trace no declared claim or Model element covers and the run was invoked with --closed-world
  • THEN the verdict is forbidden and its record carries closed_world: true with the exhaustiveness declaration named in the reason

Scenario: Uncovered trace underspecified without the declaration

  • WHEN the same uncovered trace occurs in a run without --closed-world
  • THEN the verdict is underspecified, never forbidden

Requirement: Verdict report schema and evidence scope

The system SHALL emit the verdict report through the standard envelope conventions (JSON default for pipes, --human for TTYs), carrying a conform-local report_schema_version, per-trace verdict records (scenario id, verdict, reason, evaluated claim ids, closed_world flag), and an evidence_scope field stating that the report establishes agreement on the supplied corpus and not behavioral equality.

Scenario: Evidence scope present in both views

  • WHEN the report is rendered as JSON and as --human
  • THEN both views carry the same evidence_scope statement — no view can omit it

Requirement: Scope digest and deterministic re-runs

The report SHALL carry a scope digest binding the parsed structured content and the consumed scenario corpus bytes. Re-running conform over unchanged inputs SHALL produce byte-identical reports — verdict records sorted by scenario id, no timestamps, no iteration-order leakage — and a corpus with zero traces SHALL yield a valid report with zero records and the evidence_scope intact.

Scenario: Scope digest binds inputs

  • WHEN two runs consume identical spec content but scenario corpora differing by one byte
  • THEN the two reports carry different scope digests; identical inputs yield identical digests

Scenario: Re-runs are byte-identical

  • WHEN conform runs twice over unchanged spec and corpus inputs
  • THEN both reports are byte-identical — records sorted by scenario id, no timestamps

Scenario: Empty corpus yields a valid empty report

  • WHEN the --oracle file contains zero trace records
  • THEN conform exits 0 with a valid report carrying zero verdict records and the evidence_scope intact

Requirement: Exit-code contract

The system SHALL map exit codes to verdict classes: exit 0 when no verdict in the report is forbidden or unsupported; exit 1 when any verdict is forbidden or unsupported; unknown and underspecified verdicts SHALL NOT affect the exit code and SHALL be surfaced with counts in both report views. Invocation errors and gate refusals SHALL remain exit 2.

Scenario: Violation-class verdict fails the run

  • WHEN the report contains at least one forbidden or unsupported verdict
  • THEN conform exits 1

Scenario: Coverage gaps do not fail the run

  • WHEN the report contains only permitted, unknown, and underspecified verdicts
  • THEN conform exits 0 with the unknown and underspecified counts visible in both views

Scenario: Invocation error stays exit 2

  • WHEN the spec path does not exist or the corpus is refused by the artifact gate
  • THEN conform exits 2 without emitting verdict records

Requirement: Artifact gate

The system SHALL refuse to run conform over a spec file that does not parse, does not lint clean, or whose compiled artifacts are not current, with a remediation hint naming the failing stage (run spk lint / run spk compile), and SHALL NOT emit verdict records from such an invocation.

Scenario: Stale artifacts refused

  • WHEN the spec file’s structured content changed after its last compile
  • THEN conform refuses with a hint naming compile, and no verdict records are emitted

Scenario: Lint-dirty file refused

  • WHEN the target file carries lint findings
  • THEN conform refuses with a hint naming lint, and no verdict records are emitted

Requirement: Outside the artifact lifecycle

The system SHALL keep conform outside the artifact lifecycle: a conform run SHALL NOT advance the spec artifact’s lifecycle stage, SHALL NOT gate any lifecycle transition, and SHALL NOT be part of orchestrate runs.

Scenario: Orchestrate never runs conform

  • WHEN spk orchestrate runs over a spec file with conform available
  • THEN the pipeline is lint → compile → model_check → verify as specified and conform is not invoked

Scenario: Conform does not advance lifecycle

  • WHEN conform completes over a model_checked artifact
  • THEN the artifact’s lifecycle stage is unchanged after the run

Requirement: Scenario expectation declaration

The oracle scenario corpus schema SHALL accept an optional, string-valued expect field drawn from the closed set {forbidden} on every ScenarioTrace record, SHALL keep deny_unknown_fields, and SHALL refuse a value outside the closed set or an unknown field as a corpus_parse schema error naming the offending field, the accepted closed set, and the one-JSON-object-per-line remediation hint — never silently treating an unrecognized expectation as “no expectation”.

Scenario: Expected forbidden declaration parses

  • GIVEN a scenario record with "expect": "forbidden"
  • WHEN the oracle corpus is parsed
  • THEN the record parses with its id, setup, trace, and the declaration preserved, and the declaration is available to classification

Scenario: Invalid expectation value refused

  • GIVEN a scenario record whose expect value is not in the closed set (for example "banana")
  • WHEN the oracle corpus is parsed
  • THEN parsing fails with a corpus_parse schema error that names the expect field, names the accepted closed set (forbidden) through the serde unknown-variant path, and carries the one-JSON-object-per-line remediation hint — never a silently ignored declaration

Scenario: Unknown field still refused

  • GIVEN a scenario record carrying a field the schema does not declare (for example "expected": "confirmed")
  • WHEN the oracle corpus is parsed
  • THEN parsing fails with a corpus_parse refusal carrying the remediation hint — adding expect does not open the record schema

Requirement: Expectation echo and agreement tier

Every VerdictRecord SHALL echo the scenario’s declared expectation in expect and the classification outcome in expectation_met, both null when none was declared. A verdict that meets its declaration SHALL count in agreement_counts rather than verdict_counts, SHALL NOT enter the forbidden + unsupported exit predicate, SHALL exit 0, and SHALL render as the oracle agreeing; a record without expect SHALL keep its previous verdict, reason, counts, gating, and rendering.

Scenario: Expected forbidden agrees with the oracle

  • GIVEN a corpus whose scenario declares expect: forbidden and whose trace the compiled Model forbids
  • WHEN conform classifies the trace and builds the report
  • THEN the record carries verdict: forbidden, expect: forbidden, and expectation_met: true; the verdict is counted in agreement_counts and absent from verdict_counts; the run exits 0; and the human view states that the oracle agreed

Scenario: Unexpected forbidden with no declaration fails the run

  • GIVEN a corpus whose scenario declares no expect and whose trace contradicts an executable claim
  • WHEN conform classifies the trace and builds the report
  • THEN the record keeps verdict: forbidden, is counted in the hard verdict_counts, the run exits 1, and no agreement tier is recorded

Scenario: Absent declaration leaves the record unchanged

  • GIVEN a scenario record with no expect field
  • WHEN conform classifies it and builds the report
  • THEN its verdict, reason, count placement, gating, and human rendering are those of the pre-expectation behavior, expect and expectation_met are null, and its previously serialized fields are unchanged apart from the two new null fields

Requirement: Unmet expectations are hard disagreements

When a scenario declares an expectation and the classified verdict does not match it, the record SHALL retain its mechanical verdict and SHALL carry a reason that leads with the expectation_unmet: marker naming the declared expectation and the observed verdict. The report SHALL count the record in the hard forbidden bucket of verdict_counts, so the forbidden + unsupported exit predicate fires and the run exits 1 — never a silent pass and never a rewritten verdict.

Scenario: Declared prohibition the Model permits fails the run

  • GIVEN a trace the compiled Model permits but whose scenario declares expect: forbidden
  • WHEN conform classifies the trace and builds the report
  • THEN the record keeps verdict: permitted with expectation_met: false, its reason leads with expectation_unmet: and names the declared forbidden expectation, the report counts one hard forbidden, and the run exits 1

Requirement: Advisory prose-only evidence tier

A verdict record that declares no expectation and whose covering evidence is a prose-only claim SHALL set advisory to true, SHALL keep the closed verdict unknown with the prose_claim_not_interpretable reason naming the covering claim, and SHALL be counted in advisory_counts instead of verdict_counts; it SHALL NOT enter the forbidden + unsupported exit predicate, and the human view SHALL name the tier as non-gating and not a model judgment.

Scenario: Prose-only advisory evidence is non-gating

  • GIVEN a corpus trace that declares no expectation and whose only covering claim has a prose-only expr
  • WHEN conform classifies the trace and builds the report
  • THEN the record carries verdict: unknown, advisory: true, and a prose_claim_not_interpretable reason naming the claim; the record is counted in advisory_counts and absent from verdict_counts; the run exits 0; and the human view names the advisory tier as non-gating

check — the judge verb


id: check kind: intent statement: “WHEN a lint-clean spec file with current compiled artifacts is judged by one invocation, THE check capability SHALL compose the existing evidence producers — conform’s gate and trace walk, verify’s both-gates evaluation, audit’s classification and ladder derivation — into one row layer carrying exactly one existing verdict and one existing audit class per row, one audit-shaped report, and one exit contract in which 0 and 1 mean a judgement was emitted and 2 means none was — and SHALL name every judged claim by its file-qualified claim id and SHALL list every declared invariant claim of the judged file with its evidence status, placed only by the declared placement rule, so an uncovered expected behaviour is countable rather than invisible.”

check Specification

Purpose

Give the pipeline one judging verb. check composes the evidence producers that already exist — conform’s artifact gate and trace walk, verify’s both-gates evaluation, audit’s classification, fold and ladder-rung derivation — and emits one row layer, one vocabulary, one report and one exit contract over the evidence a single spec revision actually has. It introduces no contract runner, no adapter registry, and no fourth vocabulary: it is the verb G13/G14 name, built by fusion rather than accretion.

Constraints

idkindexprtraces_tosatisfiesobserves
gate_reuseinvariantcheck admits only a lint-clean file with current compiled artifacts in the out-dir, through conform's and audit's existing artifact gate — it compiles nothing and never re-derives an artifact location of its own[[check]]
reuse_stagesinvariantone invocation composes verify's both-gates evaluation, conform's trace walk when an oracle is supplied, and audit's row assembly, classification, prior diff and rung derivation — no second evaluator, artifact gate, or report family is introduced[[check]]
execution_boundedinvariantthe only execution check performs is verify's own compiled property blocks, under verify's wall-clock bound (default 600s, --timeout-secs 0 unbounded); a run killed at the bound is a labeled termination and produces no verdict[[check]]
evidence_presentinvarianta run that produces zero evidence rows is a refusal with exit 2 — an evidence-less pass is impossible, and a row exists only for a producer that actually ran[[check]]
one_vocabularyinvariantevery record carries exactly one verdict spelling from conform's existing closed set and exactly one audit class from audit's existing closed set; no fourth vocabulary and no new enum value is introduced, and inconclusive is never emitted while reserved[[check]]
verdict_mappinginvariantevery producer outcome maps to the row the normative mapping table declares, and every outcome that is not a judgement (unavailable, stale, unparseable, terminated, scope-mismatched, or empty evidence) produces no row — a verdict is never fabricated in its place[[check]]
rung_derivedinvariantthe ladder rung is derived at report time from evidence actually present — this run's verify verdict included — never exceeds that evidence, and rung 4 requires both gates green in this run while rung 5 still outranks a verify pass[[check]]
exit_contractinvariantexit 0 iff a judgement was emitted with no contradicted row and no stale row under a declared expectation; exit 1 iff a judgement was emitted with a contradicted or declared-expectation-stale row; exit 2 iff no judgement was emitted — and exit 2 never reads as a pass or a contradiction[[check]]the refusal output is this row’s subject — its exit code is what the contract fixes: [[check.evidence_unavailable]]
report_interopinvariantthe report is the audit report's shape — same schema version, field set, row keys and evidence-scope discipline — so either verb's report is accepted as the other's prior; identical inputs serialize byte-identically, and check writes no persisted evidence artifact[[check]]
evidence_read_onlyinvariantcheck writes no evidence artifact, never compiles, never rewrites the model-check report, and leaves the spec and the compiled artifacts byte-identical on every refusal[[check]]
no_foreign_authorityinvariantcheck never executes a consumer's contract suite, instantiate an adapter or registry, read sidecar bindings, demote the corpus, or claim independence for agent-authored evidence — scope B stays demand-gated and untouched[[check]]
claim_key_file_qualifiedinvariantevery judged claim is named by its file-qualified claim id — <file id>.<claim id> — the form the corpus already guarantees unique corpus-wide; a report row never abbreviates a claim to its bare id, and no claim is matched by name, slug, or similarity[[check]]
claim_placement_declaredinvariantan evidence row places a declared claim only when it names that claim directly or names a property whose derives_from names that claim — the corpus's declared edge — and a row that places no claim belongs to the section's residual bucket, never to a claim[[check]]
claim_coverage_listedinvariantevery declared invariant claim of the judged file appears in the report's claim-coverage section carrying exactly one audit class from audit's existing closed set {current, stale, unchecked, contradicted, binds_nothing, new}; a claim with no placing row carries unchecked — knowledge absence in this run — and is never absent from the section, never reported as evidence it does not have, and never given a new vocabulary value; a claim placed by several rows carries the strongest class in the order contradicted > stale > current > new > binds_nothing > unchecked; the section is materialized in the check envelope and leaves the audit report's schema version and field set unchanged[[check]]
claim_coverage_non_gatinginvariantthe claim-coverage section is countable and never gates the exit code — an uncovered claim is knowledge absence, not a contradiction, and its count is surfaced in every output view alongside the existing evidence counts and on the verdict line[[check]]
evidence_unavailableeffectcheck.evidence_unavailable(detail) — the run could not obtain evidence to judge because detail; the refusal rides the errors capability's published contract (envelope kind, exit code, remediation hint)[[check]][[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]]

Model

States

  • requested
  • collected
  • judged
  • reported
  • evidence_failed (emits: [[check.evidence_unavailable]])

Transitions

idfromtoguard
collectrequestedcollected[[check.gate_reuse]] ∧ [[check.reuse_stages]] ∧ [[check.execution_bounded]] ∧ [[check.evidence_present]] ∧ [[check.no_foreign_authority]]
judgecollectedjudged[[check.one_vocabulary]] ∧ [[check.verdict_mapping]] ∧ [[check.rung_derived]]
emitjudgedreported[[check.exit_contract]] ∧ [[check.report_interop]] ∧ [[check.evidence_read_only]]
refuserequestedevidence_failed¬([[check.gate_reuse]] ∧ [[check.reuse_stages]] ∧ [[check.execution_bounded]] ∧ [[check.evidence_present]] ∧ [[check.no_foreign_authority]])

Properties

idkindderives_fromgeneratorpredicate
p_gateunit[[check.gate_reuse]]lint_dirty_or_stale_artifact()check(file) == failed ∧ zero records emitted ∧ the hint names the failing gate
p_stagesunit[[check.reuse_stages]]arbitrary_evidence_corpus()rows name only the declared producers ∧ oracle verdicts equal a conform reference run over the same inputs
p_boundedunit[[check.execution_bounded]]hanging_property_block()run killed at the bound ⇒ labeled termination ∧ no verdict row
p_presentunit[[check.evidence_present]]corpus_with_no_evidence_units()zero rows ⇒ exit 2 ∧ zero records
p_vocabularyunit[[check.one_vocabulary]]arbitrary_check_report()every row carries exactly one Verdict ∧ one AuditClass ∧ the output never spells inconclusive
p_mappingunit[[check.verdict_mapping]]producer_outcome_matrix()each outcome maps to its declared table row ∧ every non-judgement outcome yields no row
p_rungunit[[check.rung_derived]]verified_run()rung == 4 iff both gates were green in this run ∧ rung never exceeds the evidence present
p_exitunit[[check.exit_contract]]arbitrary_class_mix()exit 0 iff no contradicted row (and no declared-expectation stale) ∧ exit 1 iff one exists ∧ exit 2 iff no judgement
p_interopunit[[check.report_interop]]check_report_bytes()audit's prior-report parser accepts it ∧ rows diff by key ∧ rerun byte-identical
p_read_onlyunit[[check.evidence_read_only]]refused_run()spec and artifacts byte-identical ∧ zero records ∧ no artifact written
p_scopeunit[[check.no_foreign_authority]]foreign_suite_offered()no adapter or registry path exists ∧ no independence claim emitted
p_claim_keyunit[[check.claim_key_file_qualified]]two_files_declaring_the_same_claim_id()the two rows carry distinct keys ∧ each key resolves to its own file's claim ∧ no key is derived from a name or slug
p_placementunit[[check.claim_placement_declared]]row_naming_a_property_derives_from_a_claim()the claim that property derives from is listed ∧ no other claim is listed for that row ∧ a row placing no claim lands in the residual bucket
p_coverage_listedunit[[check.claim_coverage_listed]]declared_claim_with_no_evidence_row()the claim is listed with class unchecked ∧ the section counts it ∧ no row claims evidence for it ∧ no new vocabulary value appears ∧ the section states that its classes describe this run's producers ∧ the audit report's schema version and field set are unchanged
p_coverage_non_gatingunit[[check.claim_coverage_non_gating]]run_with_an_unchecked_claim()the exit code is unchanged ∧ the unchecked-claim count is surfaced in every output view ∧ the count appears on the verdict line
p_labelunit[[check.evidence_unavailable]]evidence_unavailable_raised()error_label == "check.evidence_unavailable"

Requirements

Requirement: Single judge verb over existing evidence

spk check <spec-file> SHALL compose the existing evidence producers in one invocation — conform’s artifact gate and trace walk, verify’s both-gates evaluation, and audit’s row assembly, classification, diff and rung derivation — and SHALL introduce no second evaluator, artifact gate, report family, contract runner, or adapter registry.

Scenario: Verify-only run judges the spec’s own evidence

  • WHEN spk check demo.md --out-dir out runs with a current compiled artifact and a current model-check report, and no --oracle
  • THEN the report carries the verify-stage rows (verify:prop:*, verify:model), a derived ladder rung, and the fixed evidence-scope statement naming that only the spec’s own evidence was consumed

Scenario: Oracle run reuses conform’s walk

  • WHEN spk check demo.md --oracle corpus.jsonl runs over the same inputs as spk conform demo.md --oracle corpus.jsonl
  • THEN every oracle row carries the verdict spk conform produced for that trace id, and no second trace evaluator is invoked

Scenario: Gate refusal names its cause

  • WHEN the spec file has lint findings or its compiled artifacts are stale
  • THEN the run refuses with a labeled error naming the failing gate and a remediation hint, emits zero records, and exits 2

Requirement: One evidence vocabulary

Every record SHALL carry exactly one verdict spelling from conform’s existing closed set (permitted, forbidden, underspecified, unknown, unsupported, agree) and exactly one audit class from the existing closed set (current, stale, unchecked, contradicted, binds_nothing, new); check SHALL introduce no fourth vocabulary, no new enum value, and SHALL NOT emit inconclusive while that value remains reserved.

Scenario: Every row carries both layers

  • WHEN any check report is emitted, in any output view
  • THEN every record names both its verdict and its audit class, and every value is one the existing Verdict and AuditClass closed sets declare

Scenario: Inconclusive is never emitted

  • WHEN a run cannot decide — a killed runner, a missing report, or an undecidable claim
  • THEN the output spells no inconclusive verdict; the run either records the existing honest value (unknown, unchecked) or refuses with exit 2

Scenario: The evidence-axes table stays the single source

  • WHEN the change lands
  • THEN scripts/check_evidence_axes.py still passes with no new value row: the documented axes and the code enums are unchanged

Requirement: Verify-stage outcome mapping

Every verify-stage outcome SHALL map to exactly one evidence row whose verdict and audit class come from the existing closed sets, per the scenarios below.

Scenario: A passed property block is current evidence

  • WHEN a compiled property block ran and passed
  • THEN its row is keyed verify:prop:<block-id> with verdict permitted and class current, and the exit code is 0

Scenario: A failed property block is a contradiction

  • WHEN a compiled property block fails
  • THEN its row is keyed verify:prop:<block-id> with verdict forbidden and class contradicted, the reason carries the shrunk failing input, and the run exits 1

Scenario: A clean model report is current evidence

  • WHEN the model report’s outcome is no_counterexample and every required claim is verified
  • THEN the row is keyed verify:model with verdict permitted and class current, and the exit code is 0

Scenario: A refuted claim is a contradiction

  • WHEN the model report’s outcome is counterexample_found or a required claim’s status is refuted
  • THEN the row is keyed verify:model:<claim-id> with verdict forbidden and class contradicted, and the run exits 1

Scenario: Knowledge absence is not a contradiction

  • WHEN a required claim’s status is unknown, or the outcome is exploration_only or timed_out
  • THEN the row’s verdict is unknown, its class unchecked, the warning is counted, and the run exits 0

Requirement: Recorded and citation evidence mapping

Every oracle, pack, binding and prior-report outcome SHALL map to exactly one evidence row per the scenarios below, reusing the existing verdicts and audit classes unchanged.

Scenario: Oracle verdicts carry through

  • WHEN conform’s walk returns permitted or forbidden for a trace
  • THEN the row keeps the corpus id and that verdict, with class current or contradicted respectively, and the exit code is 0 or 1

Scenario: Unchecked oracle verdicts never gate

  • WHEN a trace’s verdict is underspecified, unknown, unsupported, or agree
  • THEN its row keeps the verdict, carries class unchecked, and the exit code is 0

Scenario: A pack violation is a contradiction

  • WHEN a pack checker produces a violation over the judged file
  • THEN its row is forbidden with contradicted, names the violated rule, and the run exits 1

Scenario: An empty checked-set is not a pass

  • WHEN a pack checker produces an empty checked-set
  • THEN its row is agree with class unchecked, countable in the summary, and the exit code is 0

Scenario: Vacuous evidence never gates

  • WHEN an evidence unit cites no declared model element
  • THEN its row is binds_nothing on the warnings channel, counted in the summary, and the exit code is unchanged

Scenario: Prior-report overlays are currency, not verdicts

  • WHEN a row worsened since the prior report, or was absent from it
  • THEN its class is stale or new and its verdict is unchanged; stale exits 1 only under a declared expectation, and new never affects the exit

Requirement: Non-judgement outcomes produce no row

An outcome that is not a judgement — a gate refusal, unavailable, stale, unparseable or scope-mismatched evidence, a terminated runner, a digest or schema mismatch, or zero rows — SHALL produce no record and SHALL refuse with exit 2; a verdict is never fabricated for evidence that was not obtained.

Scenario: A killed runner yields no verdict

  • WHEN the properties runner is killed at its wall-clock bound
  • THEN no row and no verdict are emitted, the run reports a labeled termination naming the bound, and exits 2

Scenario: A stale model report is refused

  • WHEN <stem>.check.json is missing, stale, unparseable, or fails the scope check
  • THEN the run exits 2 with a hint naming the model-check command — the stored report is never rewritten and no verdict is inferred

Scenario: Zero evidence rows are refused

  • WHEN no producer yields a row for the judged file
  • THEN the run emits zero records and exits 2 — an evidence-less pass is impossible

Requirement: Exit contract

spk check SHALL exit 0 when a judgement was emitted and the report carries no contradicted row (and no stale row under a declared expectation), 1 when a judgement was emitted and at least one such row exists (the contradicted set is classified before the prior-report overlay), and 2 when no judgement was emitted — with exit 2 never reading as a pass or a contradiction.

Scenario: Honest unchecked run exits zero

  • WHEN every row is unchecked or binds_nothing
  • THEN the exit code is 0 and the counts are surfaced in both output views

Scenario: A contradiction fails the run

  • WHEN any row is contradicted
  • THEN the exit code is 1 in both output views

Scenario: Could not judge is exit two

  • WHEN the run emits zero records because the evidence was unavailable
  • THEN the exit code is 2, the cause and remediation hint are stated, and the output nowhere reads as a pass or a contradiction

Scenario: Declared-expectation staleness gates

  • WHEN a row is stale and the prior report was recorded with --declare-expectation
  • THEN the exit code is 1; without the declaration the same row is informational and the exit code is 0

Requirement: Ladder rung derived from evidence present

The report SHALL carry the highest verification-ladder rung the evidence actually supports, derived at report time — including this run’s verify verdict — and SHALL never exceed that evidence.

Scenario: A fully verified run reaches rung four

  • WHEN every compiled property block passed and the current model-check report is clean with all required claims verified
  • THEN the reported rung is 4 with the verify-pass basis stated

Scenario: A failed verify does not lift the rung

  • WHEN the properties gate or the model gate fails
  • THEN the rung is derived from the remaining current evidence and never reports 4, stating the basis it did use

Scenario: Better-design still outranks a verify pass

  • WHEN the current model-check run reported counterexample_found
  • THEN the rung is 5 — a refuted claim is the design lesson — and check does not override the ladder

Requirement: Report interoperability and determinism

The check report SHALL be the audit report’s shape — the same schema version, field set, row keys and evidence-scope discipline — so a check report is accepted as a prior report by the audit verb and vice versa, and identical inputs SHALL yield a byte-identical report. check SHALL write no persisted evidence artifact.

Scenario: A check report is a valid prior

  • WHEN spk audit demo.md --oracle corpus.jsonl --before check-report.json consumes a check report
  • THEN the prior parses and its rows diff per row key, with no schema divergence

Scenario: Re-runs are byte-identical

  • WHEN the same inputs are judged twice
  • THEN the two reports serialize identically — no timestamps, no iteration-order leakage, stable row order

Scenario: No oracle states its scope

  • WHEN a run supplies no oracle corpus
  • THEN the evidence-scope statement names the spec-internal evidence the run consumed, and the scope digest is the empty corpus’s digest

Requirement: Scope boundary

check SHALL NOT execute a consumer’s contract suite, instantiate an adapter or adapter registry, read sidecar bindings, demote the corpus, or claim independence for agent-authored evidence; scope B remains demand-gated and unchanged by this verb.

Scenario: No adapter surface exists

  • WHEN the command surface is inspected
  • THEN no adapter, registry, or suite-binding flag exists, and the only execution path is verify’s own bounded property runner

Scenario: The claim of record is stated honestly

  • WHEN any report or its documentation describes what was established
  • THEN it states that drift is visible and graded, and claims neither a second authoritative copy nor independent evidence

Scenario: Existing verbs keep their contracts

  • WHEN the change lands
  • THEN verify, conform, and audit keep their status strings, report schemas and exit codes unchanged

Requirement: Judged claims are named by their file-qualified claim id

spk check SHALL name every judged claim by its file-qualified claim id — <file id>.<claim id>, the form the corpus already guarantees unique corpus-wide — and SHALL never abbreviate a claim to its bare id in a report row, nor match a claim by name, slug, filename, or similarity.

Scenario: Two files declaring the same claim id stay distinguishable

  • WHEN spk check demo.md judges a file whose claim id also appears in another capability file
  • THEN the report’s rows carry the file-qualified form, each row resolves to the claim of the file it names, and neither claim borrows the other’s id

Scenario: A claim is never matched by name or slug

  • WHEN a claim id, file name, or sidecar-style slug resembles a claim without being it
  • THEN no row is attributed to that claim, and the resemblance produces no row of any kind

Requirement: An evidence row places a claim only by the declared placement rule

spk check SHALL place a declared claim only when an evidence row names that claim directly or names a property whose derives_from names that claim, and SHALL account for every row that places no claim in the coverage section’s residual bucket.

Scenario: A row places a claim through the property it derives from

  • WHEN an evidence row names a property whose derives_from names a declared invariant claim of the judged file
  • THEN the claim-coverage section lists that claim, and the row places no other claim

Scenario: A row that places no claim is not attributed to one

  • WHEN an evidence row names neither a declared claim nor a property that derives from one
  • THEN the row appears in the section’s residual bucket and no claim carries it

Requirement: Claim coverage is listed and never gates

spk check SHALL list every declared invariant claim of the judged file in the report’s claim-coverage section, each carrying exactly one audit class from audit’s existing closed set, and SHALL count the classes in every output view. A claim with no evidence row SHALL carry unchecked — the class the vocabulary already reserves for knowledge absence. The section SHALL NOT affect the exit code: an unchecked claim is not a contradiction.

Scenario: A claim with no evidence is listed as unchecked

  • WHEN a declared invariant claim of the judged file has no evidence row
  • THEN the coverage section lists that claim with class unchecked, the count is surfaced, and no row claims evidence on its behalf

Scenario: An unchecked claim does not fail the run

  • WHEN a run’s rows are all current and one declared claim is unchecked
  • THEN the exit code is the one the evidence rows alone determine, and the unchecked-claim count is reported next to the other counts

Scenario: A contradicted claim is listed as contradicted

  • WHEN a declared invariant claim’s evidence row is contradicted
  • THEN the coverage section lists that claim with class contradicted, and the run’s exit code is unchanged by the section itself

Scenario: The section adds no vocabulary value

  • WHEN the change lands
  • THEN scripts/check_evidence_axes.py passes with no new value row: the coverage section reuses audit’s existing closed set unchanged

Scenario: The section is countable and stable

  • WHEN the same inputs are judged twice
  • THEN the coverage section lists the same claims in the same order with the same classes — the report remains byte-identical

Scenario: A row that places no claim is accounted for

  • WHEN the run produces an evidence row that corresponds to no declared claim of the judged file (for example a model-level row)
  • THEN the coverage section accounts for that row in its residual bucket rather than dropping it, using the existing class set

Requirement: A claim’s coverage class is the strongest class among the rows that place it

spk check SHALL give a claim exactly one coverage class: the strongest class among the rows that place it, ordered contradicted, then stale, then current, then new, then binds_nothing, then unchecked. A claim placed by no row SHALL carry unchecked.

Scenario: A claim with several rows takes the strongest class

  • WHEN a declared claim is placed by a current row and by a contradicted row
  • THEN the coverage section lists that claim once, with class contradicted

Scenario: A vacuous placement is not an unchecked claim

  • WHEN a declared claim is placed only by a row whose text cites no declared id
  • THEN the coverage section lists that claim with class binds_nothing, not with class unchecked

Requirement: The coverage section states its scope and leaves the audit report untouched

spk check SHALL state that the coverage section’s classes describe the evidence the run’s own producers produced, and SHALL materialize the section in the check envelope without changing the audit report’s schema version or field set.

Scenario: The section says which evidence it describes

  • WHEN the report renders the claim-coverage section
  • THEN the section states that its classes describe the evidence this run’s producers produced, so unchecked is never read as “no evidence exists”

Scenario: The section leaves the audit report untouched

  • WHEN the report is emitted
  • THEN the audit report’s schema version and field set are unchanged, and the coverage section is carried by the check envelope

errors


id: errors kind: intent statement: “THE error contract SHALL publish the cross-cutting output contract — error-kind envelopes with ok:false, the 0/1/2 exit-code mapping, one file-id-namespaced labeled error per failing stage, and a non-empty remediation hint — as extension_point rows that tool files satisfy from their own files, and SHALL require every failure terminal in a tool file’s Model to emit a labeled error Constraint backed by a falsifying property asserting the exact label.”

Errors

Purpose

Errors in the corpus become typed, namespaced, and falsifiable facts instead of CHANGELOG lore and mute failed states. The cross-cutting output contract (envelope kind, exit codes, one labeled failure per stage, remediation hints) lives here as extension_point rows every tool file points satisfies at; every tool file’s failure terminal emits a file-owned labeled error Constraint; every label carries a unit property asserting the exact label — the same red→green discipline every other corpus fact already has.

Scope note: this file spans two altitudes, kept distinct throughout — lint-time corpus rules (failure states, guards: about the content of specs/*.md files) and the runtime output contract (envelope, exit codes: about tool behavior). “Emits” names the format mechanism; runtime reporting is “reports”. Enforcement routing is itself specced: enforcement_routed below states which tier enforces each rule today, which waits for linter-failure_shape, and which rides the compile/verify pipeline.

Constraints

idkindexprtraces_toobserves
error_expr_shapeinvariantevery error Constraint's expr is a file-id-namespaced variant head: <owning-file-id>.<variant_head>(field, …) — the label names its owning file, so label uniqueness is a per-file property and cross-file collisions are structurally impossible (pattern-checking the structured expr field follows the ears_statement precedent — expr is not rationale; prose_untouched is untouched)[[errors]]
failure_state_emitsinvariantevery failure terminal state in a tool file's Model carries an emits edge to an effect Constraint owned by that file, whose expr satisfies error_expr_shape — a failure state emits nothing is a malformed model (phase-2 terminals timed_out / exploration_only are excluded in v1)[[errors]]
failure_class_is_stateinvarianta state with ≥2 inbound failure transitions whose guard citation sets differ is malformed — each distinct failure class is its own failure state; decidable from the graph alone (compile.md's two-class prose argument is the rationale, never the check — prose is not read)[[errors]]
guard_negation_typedinvarianta failure transition whose guard cites ≥1 [[id]] must cite exactly the citation set of the success transition(s) it negates — a negated disjunction cites the union of its branches' citation sets; a failure transition citing no ids at all is either on the recorded carve-out list (orchestrate.md's stage pipeline, per its own Notes) or malformed — the carve-out is a checked list in linter-failure_shape.md, never a silent assumption[[errors]]
single_labeled_failureinvarianta failing tool stage reports exactly one labeled error naming the failing stage and class — never a silent partial result and never an unlabeled failure (restates compile_is_total at contract altitude)[[errors]]the labeled failure outputs this reporting path consumes — each is a declared observable of the tool pipeline this contract governs: [[compile.emission_failure]] ∧ [[compile.extraction_failure]] ∧ [[graph.extraction_failure]] ∧ [[kinds.kind_assignment_failure]] ∧ [[kinds.shape_check_failure]] ∧ [[linter.coverage.count_failure]] ∧ [[linter.coverage.law_case_failure]] ∧ [[linter.ears_syntax.id_check_failure]] ∧ [[linter.ears_syntax.pattern_failure]] ∧ [[linter.external_completeness.manifest_failure]] ∧ [[linter.external_completeness.mapping_failure]] ∧ [[linter.external_completeness.resolution_failure]] ∧ [[linter.failure_shape.check_failure]] ∧ [[linter.frontmatter.check_failure]] ∧ [[linter.graph_shape.check_failure]] ∧ [[linter.model_shape.field_check_failure]] ∧ [[linter.model_shape.pairing_failure]] ∧ [[linter.referential_integrity.index_failure]] ∧ [[linter.referential_integrity.resolution_failure]] ∧ [[linter.schema_shape.diff_failure]] ∧ [[linter.schema_shape.kind_check_failure]] ∧ [[linter.schema_shape.parser_audit_failure]] ∧ [[merge.collision_failure]] ∧ [[merge.merge_aborted]] ∧ [[merge.reverification_failure]] ∧ [[orchestrate.compile_stage_failure]] ∧ [[orchestrate.lint_stage_failure]] ∧ [[orchestrate.model_check_stage_failure]] ∧ [[orchestrate.verify_stage_failure]] ∧ [[rename.apply_failure]] ∧ [[rename.post_check_failure]] ∧ [[rename.validation_failure]] ∧ [[verify.verification_failure]]
envelope_error_kindextension_pointa failing stage's report is an error-kind envelope with ok == false — the ok:false ↔ "error" correspondence is the published contract row, not CHANGELOG lore[[errors]]
exit_code_mappingextension_pointthe output contract maps outcomes to exit codes: 0 for a clean run, 1 for findings-or-failure, 2 for invocation error — the mapping is part of the published contract, not per-tool convention[[errors]]
remediation_hint_presentextension_pointevery error report carries a non-empty remediation hint (one row per concern: envelope kind, exit codes, and hint are separate rows, so satisfies edges compose granularly and each concern has its own falsifying property)[[errors]]
error_property_names_labelinvariantevery error Constraint has ≥1 unit property whose predicate asserts the exact label string — a label with no falsifying property is not specced, only named[[errors]]
contract_publishedinvariantthe output contract rows live in openspec/specs/errors/spec.md as kind == extension_point, and exist only there — capability constraints state requirements about them, never duplicate them; tool files point satisfies at the errors.md rows from their own files, per the extension_point mechanism[[errors]]
enforcement_routedinvariantevery rule in this file states its enforcement tier and no scenario overclaims the present tool: tier 1 — enforced today by existing checkers (emits→effect typing via ref_kind_compatible, every_state_used, coverage); tier 2 — enforced by linter-failure_shape once implemented (label-shape pattern check, mute failure states, carve-out list, negation-set equality), its scenarios are normative for that checker, not claims about today's spk lint; tier 3 — runtime rows (single labeled failure, remediation hint, exit codes) enforced via the compile/verify pipeline fixtures[[errors]]

Model

States

  • draft
  • published

Transitions

idfromtoguard
publishdraftpublished[[errors.contract_published]] — the rows exist here, extension_point-kind, and only here

Properties

idkindderives_fromgeneratorpredicate
unnamespaced_label_rejectedunit[[errors.error_expr_shape]]error_constraint_with_label_lacking_file_id_prefix()check(file) == failed — a bare extraction_failure(...) head is not a valid label (tier 2)
mute_failure_state_detectedunit[[errors.failure_state_emits]]tool_file_with_failure_terminal_and_no_emits_edge()check(file) == failed — the corpus’s pre-change shape, asserting the red is real (tier 2; the emits-typing half is tier 1)
emits_wrong_kind_rejectedunit[[errors.failure_state_emits]]failure_state_emitting_an_invariant_constraint()check(file) == failed — existing ref_kind_compatible typing, restated as the contract’s edge (tier 1)
multiclass_single_state_detectedunit[[errors.failure_class_is_state]]failed_state_with_inbound_failure_transitions_citing_different_constraint_sets()check(file) == failed — compile.md’s pre-change shape, detected from the graph (tier 2)
untyped_negation_detectedunit[[errors.guard_negation_typed]]failure_transition_whose_citation_set_differs_from_its_success_transition()check(file) == failed — citation-set inequality is graph-decidable (tier 2)
zero_citation_failure_flaggedunit[[errors.guard_negation_typed]]failure_transition_citing_zero_intrafile_constraints_not_on_carveout_list()check(file) == failed — the carve-out is a checked list, not an escape hatch (tier 2)
carved_out_guard_not_flaggedunit[[errors.guard_negation_typed]]orchestrate_stage_fail_transition()check(file) == passed — the carve-out is checked, not assumed (tier 2)
labeled_failure_is_singleunit[[errors.single_labeled_failure]]failing_stage_with_two_extractable_errors()report(stage) == one labeled error naming stage and class — never a partial bundle (tier 3)
envelope_kind_wrong_rejectedunit[[errors.envelope_error_kind]]failing_stage_reported_as_ok_envelope()check(report) == failed — a failure must never ride a success-shaped envelope (tier 3)
exit_code_mismatch_rejectedunit[[errors.exit_code_mapping]]failure_stage_with_wrong_exit_code()check(report) == failed — exit codes are contract, not convention (tier 3)
hint_missing_rejectedunit[[errors.remediation_hint_present]]error_report_with_empty_remediation_hint()check(report) == failed (tier 3)
label_property_asserts_exact_labelunit[[errors.error_property_names_label]]error_constraint_with_property_predicating_a_different_label()check(file) == failed — coverage alone cannot catch this; the property must name the label
routing_matches_realityunit[[errors.enforcement_routed]]each_rule_checked_against_its_stated_tier()every scenario's tool claim agrees with its tier — no scenario claims today's spk lint for a tier-2 rule
contract_satisfied_from_consumerunit[[errors.contract_published]]tool_file_with_satisfies_pointing_at_contract_row()extraction yields exactly one satisfies edge and lint passes — the satisfies precedent’s shape

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: unnamespaced_label_rejected

  • WHEN error_constraint_with_label_lacking_file_id_prefix()
  • THEN check(file) == failed — a bare extraction_failure(...) head is not a valid label (tier 2)
  • VERIFIES [[errors.unnamespaced_label_rejected]]

Scenario: mute_failure_state_detected

  • WHEN tool_file_with_failure_terminal_and_no_emits_edge()
  • THEN check(file) == failed — the corpus’s pre-change shape, asserting the red is real (tier 2; the emits-typing half is tier 1)
  • VERIFIES [[errors.mute_failure_state_detected]]

Scenario: emits_wrong_kind_rejected

  • WHEN failure_state_emitting_an_invariant_constraint()
  • THEN check(file) == failed — existing ref_kind_compatible typing, restated as the contract’s edge (tier 1)
  • VERIFIES [[errors.emits_wrong_kind_rejected]]

Scenario: multiclass_single_state_detected

  • WHEN failed_state_with_inbound_failure_transitions_citing_different_constraint_sets()
  • THEN check(file) == failed — compile.md’s pre-change shape, detected from the graph (tier 2)
  • VERIFIES [[errors.multiclass_single_state_detected]]

Scenario: untyped_negation_detected

  • WHEN failure_transition_whose_citation_set_differs_from_its_success_transition()
  • THEN check(file) == failed — citation-set inequality is graph-decidable (tier 2)
  • VERIFIES [[errors.untyped_negation_detected]]

Scenario: zero_citation_failure_flagged

  • WHEN failure_transition_citing_zero_intrafile_constraints_not_on_carveout_list()
  • THEN check(file) == failed — the carve-out is a checked list, not an escape hatch (tier 2)
  • VERIFIES [[errors.zero_citation_failure_flagged]]

Scenario: carved_out_guard_not_flagged

  • WHEN orchestrate_stage_fail_transition()
  • THEN check(file) == passed — the carve-out is checked, not assumed (tier 2)
  • VERIFIES [[errors.carved_out_guard_not_flagged]]

Scenario: labeled_failure_is_single

  • WHEN failing_stage_with_two_extractable_errors()
  • THEN report(stage) == one labeled error naming stage and class — never a partial bundle (tier 3)
  • VERIFIES [[errors.labeled_failure_is_single]]

Scenario: envelope_kind_wrong_rejected

  • WHEN failing_stage_reported_as_ok_envelope()
  • THEN check(report) == failed — a failure must never ride a success-shaped envelope (tier 3)
  • VERIFIES [[errors.envelope_kind_wrong_rejected]]

Scenario: exit_code_mismatch_rejected

  • WHEN failure_stage_with_wrong_exit_code()
  • THEN check(report) == failed — exit codes are contract, not convention (tier 3)
  • VERIFIES [[errors.exit_code_mismatch_rejected]]

Scenario: hint_missing_rejected

  • WHEN error_report_with_empty_remediation_hint()
  • THEN check(report) == failed (tier 3)
  • VERIFIES [[errors.hint_missing_rejected]]

Scenario: label_property_asserts_exact_label

  • WHEN error_constraint_with_property_predicating_a_different_label()
  • THEN check(file) == failed — coverage alone cannot catch this; the property must name the label
  • VERIFIES [[errors.label_property_asserts_exact_label]]

Scenario: routing_matches_reality

  • WHEN each_rule_checked_against_its_stated_tier()
  • THEN every scenario's tool claim agrees with its tier — no scenario claims today's spk lint for a tier-2 rule
  • VERIFIES [[errors.routing_matches_reality]]

Scenario: contract_satisfied_from_consumer

  • WHEN tool_file_with_satisfies_pointing_at_contract_row()
  • THEN extraction yields exactly one satisfies edge and lint passes — the satisfies precedent’s shape
  • VERIFIES [[errors.contract_satisfied_from_consumer]]

Notes

single_labeled_failure’s observes cell names the error-riding failure outputs whose owning files ride the tool pipeline’s compile/model-check dogfood gates (the CORPUS_DIRS file set in the justfile / tests/common corpus_dirs): there a corpus-referential observes edge is exercised by compile’s lint-clean precondition and the fixture gates. Files outside that set (acset-writer, check, parse) observe their failure outputs intra-file — a cross-file target from this file would dangle in their isolated gate lint. Maintenance rule: when a tool file’s failure effect is authored, its id joins this cell once the file rides CORPUS_DIRS, and stays observed intra-file until then; a failure output that deliberately does not ride this contract (refactor’s advisory finding) is observed by a consumer row in its own file, never here.

Graph views — derived diagrams of the corpus

Every diagram on this page is derived: rendered at docs build time by just docs-graphs from this repo’s own corpus — never committed, never hand-edited. That is the whole point: views are never more current or more correct than the graph artifact they were rendered from. If a diagram and the corpus disagree, the corpus wins and the diagram is stale — regenerate it (just docs-graphs), don’t fix it.

The embedded primer (spk explain graph-views) carries the same taxonomy and the one-pipe render recipes for your own corpora.

Wiring — producer→consumer connections

spk graph specs --view wiring --format mermaid: the file-level projection of constraints.satisfies edges — which spec file’s constraints consume which extension points. Self-loops are dropped; a corpus with no cross-file wiring renders a labeled no_wiring note, never a silently clean diagram.

flowchart LR
  check["check"]
  compile["compile"]
  errors["errors"]
  graph["graph"]
  kinds["kinds"]
  linter_coverage["linter.coverage"]
  linter_ears_syntax["linter.ears_syntax"]
  linter_external_completeness["linter.external_completeness"]
  linter_failure_shape["linter.failure_shape"]
  linter_frontmatter["linter.frontmatter"]
  linter_graph_shape["linter.graph_shape"]
  linter_model_shape["linter.model_shape"]
  linter_referential_integrity["linter.referential_integrity"]
  linter_schema_shape["linter.schema_shape"]
  merge["merge"]
  orchestrate["orchestrate"]
  rename["rename"]
  verify["verify"]
  check -->|"3 satisfies"| errors
  compile -->|"6 satisfies"| errors
  graph -->|"3 satisfies"| errors
  kinds -->|"6 satisfies"| errors
  linter_coverage -->|"6 satisfies"| errors
  linter_ears_syntax -->|"6 satisfies"| errors
  linter_external_completeness -->|"9 satisfies"| errors
  linter_failure_shape -->|"3 satisfies"| errors
  linter_frontmatter -->|"3 satisfies"| errors
  linter_graph_shape -->|"3 satisfies"| errors
  linter_model_shape -->|"6 satisfies"| errors
  linter_referential_integrity -->|"6 satisfies"| errors
  linter_schema_shape -->|"9 satisfies"| errors
  merge -->|"9 satisfies"| errors
  orchestrate -->|"12 satisfies"| errors
  rename -->|"9 satisfies"| errors
  verify -->|"3 satisfies"| errors

The same wiring, as the terminal sees it — rendered at docs build time through the family’s external renderer (spk graph --format dot | gently --as ascii, the D8 pipe; see the boundary decision, openspec/decisions/2026-10-16-gently-render-boundary.md). ASCII needs no JavaScript and survives llms.txt, cat, and every plain-text consumer:

+--------------------+  3 satisfies   +---------------------------------+
|       check        | -------------> |                                 |
+--------------------+                |                                 |
+--------------------+                |                                 |
|      compile       | -------------->|             errors              |
+--------------------+                |                                 |
+--------------------+                |                                 |
|       graph        | -------------->|                                 |
+--------------------+                +---------------------------------+
                                        ^
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
+--------------------+                  |
|       kinds        | -----------------|
+--------------------+                  |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
+--------------------+                  |
|  linter.coverage   | -----------------|
+--------------------+                  |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
+--------------------+                  |
| linter.ears_syntax | -----------------|
+--------------------+                  |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |
                                        |-------------------------------+
                                        |                               |
                                      +------------------------------+  |
                                      |            verify            |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------+
                                        |
                                        |
                                        |
                                        |
                                        |
                                        +-------------------------------+
                                        |                               |
                                      +------------------------------+  |
                                      | linter.external_completeness |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------|
                                        |                               |
                                      +------------------------------+  |
                                      |     linter.failure_shape     |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------|
                                        |                               |
                                      +------------------------------+  |
                                      |      linter.frontmatter      |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------|
                                        |                               |
                                      +------------------------------+  |
                                      |      linter.graph_shape      |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------|
                                        |                               |
                                      +------------------------------+  |
                                      |      linter.model_shape      |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------|
                                        |                               |
                                      +------------------------------+  |
                                      | linter.referential_integrity |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------|
                                        |                               |
                                      +------------------------------+  |
                                      |     linter.schema_shape      |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------|
                                        |                               |
                                      +------------------------------+  |
                                      |            merge             |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------|
                                        |                               |
                                      +------------------------------+  |
                                      |         orchestrate          |  |
                                      +------------------------------+  |
                                                                        |
                                        +-------------------------------+
                                        |
                                      +------------------------------+
                                      |            rename            |
                                      +------------------------------+
+--------------------+
|        node        |
+--------------------+
+--------------------+
|        edge        |
+--------------------+

Per-file state machines

graph_views.py states: one Mermaid flowchart per owning file, grouped by subgraph. States stay distinct, guard edges render dashed, typing violations render as annotated red elements, and fan-in counts distinct sources.

%% state view — derived from spk graph --format edges (transitions grouped by owning file; guards dashed per D8)
flowchart LR
  subgraph sg_acset_core["acset.core"]
    direction LR
    acset_core_approve["acset.core.approve"]
    acset_core_approved(["acset.core.approved (fan-in 2)"])
    acset_core_archive["acset.core.archive"]
    acset_core_archived(["acset.core.archived (fan-in 1)"])
    acset_core_implement["acset.core.implement"]
    acset_core_implemented(["acset.core.implemented (fan-in 2)"])
    acset_core_process_lifecycle["acset.core.process_lifecycle (fan-in 3)"]
    acset_core_proposed(["acset.core.proposed (fan-in 1)"])
    acset_core_approve -->|"transitions.from"| acset_core_proposed
    acset_core_approve -.->|"transitions.guard"| acset_core_process_lifecycle
    acset_core_approve -->|"transitions.to"| acset_core_approved
    acset_core_archive -->|"transitions.from"| acset_core_implemented
    acset_core_archive -.->|"transitions.guard"| acset_core_process_lifecycle
    acset_core_archive -->|"transitions.to"| acset_core_archived
    acset_core_implement -->|"transitions.from"| acset_core_approved
    acset_core_implement -.->|"transitions.guard"| acset_core_process_lifecycle
    acset_core_implement -->|"transitions.to"| acset_core_implemented
  end
  subgraph sg_acset_writer["acset.writer"]
    direction LR
    acset_writer_applied(["acset.writer.applied (fan-in 3)"])
    acset_writer_apply["acset.writer.apply"]
    acset_writer_apply_fail["acset.writer.apply_fail"]
    acset_writer_apply_failed(["acset.writer.apply_failed (fan-in 1)"])
    acset_writer_edit_application_faithful["acset.writer.edit_application_faithful (fan-in 2)"]
    acset_writer_edits_compose["acset.writer.edits_compose (fan-in 2)"]
    acset_writer_emit_identity["acset.writer.emit_identity (fan-in 2)"]
    acset_writer_filename_follows_intent_id["acset.writer.filename_follows_intent_id (fan-in 2)"]
    acset_writer_record["acset.writer.record"]
    acset_writer_record_fail["acset.writer.record_fail"]
    acset_writer_reparse["acset.writer.reparse"]
    acset_writer_reparse_fail["acset.writer.reparse_fail"]
    acset_writer_requested(["acset.writer.requested (fan-in 2)"])
    acset_writer_roundtrip_failed(["acset.writer.roundtrip_failed (fan-in 1)"])
    acset_writer_source_spans_recorded["acset.writer.source_spans_recorded (fan-in 2)"]
    acset_writer_span_failed(["acset.writer.span_failed (fan-in 1)"])
    acset_writer_spanned(["acset.writer.spanned (fan-in 3)"])
    acset_writer_untouched_bytes_preserved["acset.writer.untouched_bytes_preserved (fan-in 2)"]
    acset_writer_verified(["acset.writer.verified (fan-in 1)"])
    acset_writer_width_padding_policy["acset.writer.width_padding_policy (fan-in 2)"]
    acset_writer_write_set_atomic["acset.writer.write_set_atomic (fan-in 2)"]
    acset_writer_apply -->|"transitions.from"| acset_writer_spanned
    acset_writer_apply -.->|"transitions.guard"| acset_writer_filename_follows_intent_id
    acset_writer_apply -.->|"transitions.guard"| acset_writer_untouched_bytes_preserved
    acset_writer_apply -.->|"transitions.guard"| acset_writer_width_padding_policy
    acset_writer_apply -.->|"transitions.guard"| acset_writer_write_set_atomic
    acset_writer_apply -->|"transitions.to"| acset_writer_applied
    acset_writer_apply_fail -->|"transitions.from"| acset_writer_spanned
    acset_writer_apply_fail -.->|"transitions.guard"| acset_writer_filename_follows_intent_id
    acset_writer_apply_fail -.->|"transitions.guard"| acset_writer_untouched_bytes_preserved
    acset_writer_apply_fail -.->|"transitions.guard"| acset_writer_width_padding_policy
    acset_writer_apply_fail -.->|"transitions.guard"| acset_writer_write_set_atomic
    acset_writer_apply_fail -->|"transitions.to"| acset_writer_apply_failed
    acset_writer_record -->|"transitions.from"| acset_writer_requested
    acset_writer_record -.->|"transitions.guard"| acset_writer_emit_identity
    acset_writer_record -.->|"transitions.guard"| acset_writer_source_spans_recorded
    acset_writer_record -->|"transitions.to"| acset_writer_spanned
    acset_writer_record_fail -->|"transitions.from"| acset_writer_requested
    acset_writer_record_fail -.->|"transitions.guard"| acset_writer_emit_identity
    acset_writer_record_fail -.->|"transitions.guard"| acset_writer_source_spans_recorded
    acset_writer_record_fail -->|"transitions.to"| acset_writer_span_failed
    acset_writer_reparse -->|"transitions.from"| acset_writer_applied
    acset_writer_reparse -.->|"transitions.guard"| acset_writer_edit_application_faithful
    acset_writer_reparse -.->|"transitions.guard"| acset_writer_edits_compose
    acset_writer_reparse -->|"transitions.to"| acset_writer_verified
    acset_writer_reparse_fail -->|"transitions.from"| acset_writer_applied
    acset_writer_reparse_fail -.->|"transitions.guard"| acset_writer_edit_application_faithful
    acset_writer_reparse_fail -.->|"transitions.guard"| acset_writer_edits_compose
    acset_writer_reparse_fail -->|"transitions.to"| acset_writer_roundtrip_failed
  end
  subgraph sg_archive_companion["archive.companion"]
    direction LR
    archive_companion_archived(["archive.companion.archived (fan-in 3)"])
    archive_companion_archiver_bounded["archive.companion.archiver_bounded (fan-in 1)"]
    archive_companion_archiver_timed_out(["archive.companion.archiver_timed_out (fan-in 1)"])
    archive_companion_attach_shape_asserted["archive.companion.attach_shape_asserted (fan-in 1)"]
    archive_companion_deploy["archive.companion.deploy"]
    archive_companion_expire["archive.companion.expire"]
    archive_companion_fail_closed_unverifiable["archive.companion.fail_closed_unverifiable (fan-in 2)"]
    archive_companion_head_prose_derived["archive.companion.head_prose_derived (fan-in 1)"]
    archive_companion_layer_preserved["archive.companion.layer_preserved (fan-in 1)"]
    archive_companion_locate["archive.companion.locate"]
    archive_companion_openspec_not_forked["archive.companion.openspec_not_forked (fan-in 1)"]
    archive_companion_refused(["archive.companion.refused (fan-in 1)"])
    archive_companion_reject["archive.companion.reject"]
    archive_companion_resolved(["archive.companion.resolved (fan-in 2)"])
    archive_companion_restored(["archive.companion.restored (fan-in 1)"])
    archive_companion_deploy -->|"transitions.from"| archive_companion_archived
    archive_companion_deploy -.->|"transitions.guard"| archive_companion_attach_shape_asserted
    archive_companion_deploy -.->|"transitions.guard"| archive_companion_fail_closed_unverifiable
    archive_companion_deploy -.->|"transitions.guard"| archive_companion_head_prose_derived
    archive_companion_deploy -.->|"transitions.guard"| archive_companion_layer_preserved
    archive_companion_deploy -->|"transitions.to"| archive_companion_restored
    archive_companion_expire -->|"transitions.from"| archive_companion_resolved
    archive_companion_expire -.->|"transitions.guard"| archive_companion_archiver_bounded
    archive_companion_expire -->|"transitions.to"| archive_companion_archiver_timed_out
    archive_companion_locate -->|"transitions.from"| archive_companion_resolved
    archive_companion_locate -.->|"transitions.guard"| archive_companion_openspec_not_forked
    archive_companion_locate -->|"transitions.to"| archive_companion_archived
    archive_companion_reject -->|"transitions.from"| archive_companion_archived
    archive_companion_reject -.->|"transitions.guard"| archive_companion_fail_closed_unverifiable
    archive_companion_reject -->|"transitions.to"| archive_companion_refused
  end
  subgraph sg_audit["audit"]
    direction LR
    audit_classified(["audit.classified (fan-in 2)"])
    audit_classify["audit.classify"]
    audit_closed_classes["audit.closed_classes (fan-in 1)"]
    audit_contradiction_survives_diff["audit.contradiction_survives_diff (fan-in 1)"]
    audit_diff["audit.diff"]
    audit_diffed(["audit.diffed (fan-in 2)"])
    audit_digest_bound_diff["audit.digest_bound_diff (fan-in 1)"]
    audit_disambiguation_deterministic["audit.disambiguation_deterministic (fan-in 1)"]
    audit_gated(["audit.gated (fan-in 1)"])
    audit_honesty_channels["audit.honesty_channels (fan-in 1)"]
    audit_merge["audit.merge"]
    audit_merged(["audit.merged (fan-in 2)"])
    audit_read_only["audit.read_only (fan-in 1)"]
    audit_report["audit.report"]
    audit_reported(["audit.reported (fan-in 1)"])
    audit_reuse_walk["audit.reuse_walk (fan-in 1)"]
    audit_row_keys_unique["audit.row_keys_unique (fan-in 1)"]
    audit_rung_derived["audit.rung_derived (fan-in 1)"]
    audit_classify -->|"transitions.from"| audit_gated
    audit_classify -.->|"transitions.guard"| audit_closed_classes
    audit_classify -.->|"transitions.guard"| audit_reuse_walk
    audit_classify -->|"transitions.to"| audit_classified
    audit_diff -->|"transitions.from"| audit_merged
    audit_diff -.->|"transitions.guard"| audit_contradiction_survives_diff
    audit_diff -.->|"transitions.guard"| audit_digest_bound_diff
    audit_diff -->|"transitions.to"| audit_diffed
    audit_merge -->|"transitions.from"| audit_classified
    audit_merge -.->|"transitions.guard"| audit_disambiguation_deterministic
    audit_merge -.->|"transitions.guard"| audit_row_keys_unique
    audit_merge -->|"transitions.to"| audit_merged
    audit_report -->|"transitions.from"| audit_diffed
    audit_report -.->|"transitions.guard"| audit_honesty_channels
    audit_report -.->|"transitions.guard"| audit_read_only
    audit_report -.->|"transitions.guard"| audit_rung_derived
    audit_report -->|"transitions.to"| audit_reported
  end
  subgraph sg_bioimage_data_pack["bioimage.data.pack"]
    direction LR
    bioimage_data_pack_axes_section_shape["bioimage.data.pack.axes_section_shape (fan-in 1)"]
    bioimage_data_pack_deprecate["bioimage.data.pack.deprecate"]
    bioimage_data_pack_deprecated(["bioimage.data.pack.deprecated (fan-in 1)"])
    bioimage_data_pack_draft(["bioimage.data.pack.draft (fan-in 1)"])
    bioimage_data_pack_pack_file_declared["bioimage.data.pack.pack_file_declared (fan-in 2)"]
    bioimage_data_pack_publish["bioimage.data.pack.publish"]
    bioimage_data_pack_published(["bioimage.data.pack.published (fan-in 2)"])
    bioimage_data_pack_deprecate -->|"transitions.from"| bioimage_data_pack_published
    bioimage_data_pack_deprecate -.->|"transitions.guard"| bioimage_data_pack_pack_file_declared
    bioimage_data_pack_deprecate -->|"transitions.to"| bioimage_data_pack_deprecated
    bioimage_data_pack_publish -->|"transitions.from"| bioimage_data_pack_draft
    bioimage_data_pack_publish -.->|"transitions.guard"| bioimage_data_pack_axes_section_shape
    bioimage_data_pack_publish -.->|"transitions.guard"| bioimage_data_pack_pack_file_declared
    bioimage_data_pack_publish -->|"transitions.to"| bioimage_data_pack_published
  end
  subgraph sg_check["check"]
    direction LR
    check_collect["check.collect"]
    check_collected(["check.collected (fan-in 2)"])
    check_emit["check.emit"]
    check_evidence_failed(["check.evidence_failed (fan-in 1)"])
    check_evidence_present["check.evidence_present (fan-in 2)"]
    check_evidence_read_only["check.evidence_read_only (fan-in 1)"]
    check_execution_bounded["check.execution_bounded (fan-in 2)"]
    check_exit_contract["check.exit_contract (fan-in 1)"]
    check_gate_reuse["check.gate_reuse (fan-in 2)"]
    check_judge["check.judge"]
    check_judged(["check.judged (fan-in 2)"])
    check_no_foreign_authority["check.no_foreign_authority (fan-in 2)"]
    check_one_vocabulary["check.one_vocabulary (fan-in 1)"]
    check_refuse["check.refuse"]
    check_report_interop["check.report_interop (fan-in 1)"]
    check_reported(["check.reported (fan-in 1)"])
    check_requested(["check.requested (fan-in 2)"])
    check_reuse_stages["check.reuse_stages (fan-in 2)"]
    check_rung_derived["check.rung_derived (fan-in 1)"]
    check_verdict_mapping["check.verdict_mapping (fan-in 1)"]
    check_collect -->|"transitions.from"| check_requested
    check_collect -.->|"transitions.guard"| check_evidence_present
    check_collect -.->|"transitions.guard"| check_execution_bounded
    check_collect -.->|"transitions.guard"| check_gate_reuse
    check_collect -.->|"transitions.guard"| check_no_foreign_authority
    check_collect -.->|"transitions.guard"| check_reuse_stages
    check_collect -->|"transitions.to"| check_collected
    check_emit -->|"transitions.from"| check_judged
    check_emit -.->|"transitions.guard"| check_evidence_read_only
    check_emit -.->|"transitions.guard"| check_exit_contract
    check_emit -.->|"transitions.guard"| check_report_interop
    check_emit -->|"transitions.to"| check_reported
    check_judge -->|"transitions.from"| check_collected
    check_judge -.->|"transitions.guard"| check_one_vocabulary
    check_judge -.->|"transitions.guard"| check_rung_derived
    check_judge -.->|"transitions.guard"| check_verdict_mapping
    check_judge -->|"transitions.to"| check_judged
    check_refuse -->|"transitions.from"| check_requested
    check_refuse -.->|"transitions.guard"| check_evidence_present
    check_refuse -.->|"transitions.guard"| check_execution_bounded
    check_refuse -.->|"transitions.guard"| check_gate_reuse
    check_refuse -.->|"transitions.guard"| check_no_foreign_authority
    check_refuse -.->|"transitions.guard"| check_reuse_stages
    check_refuse -->|"transitions.to"| check_evidence_failed
  end
  subgraph sg_compile["compile"]
    direction LR
    compile_accept["compile.accept"]
    compile_artifact_stem_unique["compile.artifact_stem_unique (fan-in 1)"]
    compile_begin["compile.begin"]
    compile_compile_preserves_ids["compile.compile_preserves_ids (fan-in 2)"]
    compile_compiled(["compile.compiled (fan-in 1)"])
    compile_constraint_table_to_toml["compile.constraint_table_to_toml (fan-in 2)"]
    compile_emit_failed(["compile.emit_failed (fan-in 1)"])
    compile_emitting(["compile.emitting (fan-in 3)"])
    compile_extract_fail["compile.extract_fail"]
    compile_extract_failed(["compile.extract_failed (fan-in 1)"])
    compile_extract_ok["compile.extract_ok"]
    compile_extracting(["compile.extracting (fan-in 3)"])
    compile_model_to_tla["compile.model_to_tla (fan-in 2)"]
    compile_no_semantic_drift["compile.no_semantic_drift (fan-in 2)"]
    compile_not_started(["compile.not_started (fan-in 1)"])
    compile_precondition_satisfied["compile.precondition_satisfied (fan-in 1)"]
    compile_properties_to_proptest["compile.properties_to_proptest (fan-in 2)"]
    compile_reject["compile.reject"]
    compile_accept -->|"transitions.from"| compile_emitting
    compile_accept -.->|"transitions.guard"| compile_compile_preserves_ids
    compile_accept -.->|"transitions.guard"| compile_no_semantic_drift
    compile_accept -->|"transitions.to"| compile_compiled
    compile_begin -->|"transitions.from"| compile_not_started
    compile_begin -.->|"transitions.guard"| compile_artifact_stem_unique
    compile_begin -.->|"transitions.guard"| compile_precondition_satisfied
    compile_begin -->|"transitions.to"| compile_extracting
    compile_extract_fail -->|"transitions.from"| compile_extracting
    compile_extract_fail -.->|"transitions.guard"| compile_constraint_table_to_toml
    compile_extract_fail -.->|"transitions.guard"| compile_model_to_tla
    compile_extract_fail -.->|"transitions.guard"| compile_properties_to_proptest
    compile_extract_fail -->|"transitions.to"| compile_extract_failed
    compile_extract_ok -->|"transitions.from"| compile_extracting
    compile_extract_ok -.->|"transitions.guard"| compile_constraint_table_to_toml
    compile_extract_ok -.->|"transitions.guard"| compile_model_to_tla
    compile_extract_ok -.->|"transitions.guard"| compile_properties_to_proptest
    compile_extract_ok -->|"transitions.to"| compile_emitting
    compile_reject -->|"transitions.from"| compile_emitting
    compile_reject -.->|"transitions.guard"| compile_compile_preserves_ids
    compile_reject -.->|"transitions.guard"| compile_no_semantic_drift
    compile_reject -->|"transitions.to"| compile_emit_failed
  end
  subgraph sg_conform["conform"]
    direction LR
    conform_absence_preserved["conform.absence_preserved (fan-in 1)"]
    conform_advisory_non_gating["conform.advisory_non_gating (fan-in 1)"]
    conform_agreement_tier["conform.agreement_tier (fan-in 1)"]
    conform_classified(["conform.classified (fan-in 2)"])
    conform_classify["conform.classify"]
    conform_closed_expectation_schema["conform.closed_expectation_schema (fan-in 1)"]
    conform_expectation_echoed["conform.expectation_echoed (fan-in 1)"]
    conform_gated(["conform.gated (fan-in 1)"])
    conform_report["conform.report"]
    conform_reported(["conform.reported (fan-in 1)"])
    conform_tier["conform.tier"]
    conform_tiered(["conform.tiered (fan-in 2)"])
    conform_unmet_gates["conform.unmet_gates (fan-in 1)"]
    conform_classify -->|"transitions.from"| conform_gated
    conform_classify -.->|"transitions.guard"| conform_closed_expectation_schema
    conform_classify -.->|"transitions.guard"| conform_expectation_echoed
    conform_classify -->|"transitions.to"| conform_classified
    conform_report -->|"transitions.from"| conform_tiered
    conform_report -.->|"transitions.guard"| conform_absence_preserved
    conform_report -.->|"transitions.guard"| conform_advisory_non_gating
    conform_report -->|"transitions.to"| conform_reported
    conform_tier -->|"transitions.from"| conform_classified
    conform_tier -.->|"transitions.guard"| conform_agreement_tier
    conform_tier -.->|"transitions.guard"| conform_unmet_gates
    conform_tier -->|"transitions.to"| conform_tiered
  end
  subgraph sg_data_lineage_pack["data.lineage.pack"]
    direction LR
    data_lineage_pack_data_section_row_shape["data.lineage.pack.data_section_row_shape (fan-in 1)"]
    data_lineage_pack_deprecate["data.lineage.pack.deprecate"]
    data_lineage_pack_deprecated(["data.lineage.pack.deprecated (fan-in 1)"])
    data_lineage_pack_draft(["data.lineage.pack.draft (fan-in 1)"])
    data_lineage_pack_pack_file_declared["data.lineage.pack.pack_file_declared (fan-in 2)"]
    data_lineage_pack_publish["data.lineage.pack.publish"]
    data_lineage_pack_published(["data.lineage.pack.published (fan-in 2)"])
    data_lineage_pack_deprecate -->|"transitions.from"| data_lineage_pack_published
    data_lineage_pack_deprecate -.->|"transitions.guard"| data_lineage_pack_pack_file_declared
    data_lineage_pack_deprecate -->|"transitions.to"| data_lineage_pack_deprecated
    data_lineage_pack_publish -->|"transitions.from"| data_lineage_pack_draft
    data_lineage_pack_publish -.->|"transitions.guard"| data_lineage_pack_data_section_row_shape
    data_lineage_pack_publish -.->|"transitions.guard"| data_lineage_pack_pack_file_declared
    data_lineage_pack_publish -->|"transitions.to"| data_lineage_pack_published
  end
  subgraph sg_docs_site["docs.site"]
    direction LR
    docs_site_authored(["docs.site.authored (fan-in 1)"])
    docs_site_built(["docs.site.built (fan-in 2)"])
    docs_site_deployed(["docs.site.deployed (fan-in 1)"])
    docs_site_docs_build["docs.site.docs_build"]
    docs_site_docs_deploy["docs.site.docs_deploy"]
    docs_site_pages_deployed["docs.site.pages_deployed (fan-in 1)"]
    docs_site_site_present["docs.site.site_present (fan-in 1)"]
    docs_site_docs_build -->|"transitions.from"| docs_site_authored
    docs_site_docs_build -.->|"transitions.guard"| docs_site_site_present
    docs_site_docs_build -->|"transitions.to"| docs_site_built
    docs_site_docs_deploy -->|"transitions.from"| docs_site_built
    docs_site_docs_deploy -.->|"transitions.guard"| docs_site_pages_deployed
    docs_site_docs_deploy -->|"transitions.to"| docs_site_deployed
  end
  subgraph sg_doctor["doctor"]
    direction LR
    doctor_classified(["doctor.classified (fan-in 2)"])
    doctor_classify["doctor.classify"]
    doctor_currency["doctor.currency"]
    doctor_currency_checked(["doctor.currency_checked (fan-in 1)"])
    doctor_currency_warning["doctor.currency_warning (fan-in 1)"]
    doctor_mode_detection["doctor.mode_detection (fan-in 1)"]
    doctor_probed(["doctor.probed (fan-in 1)"])
    doctor_classify -->|"transitions.from"| doctor_probed
    doctor_classify -.->|"transitions.guard"| doctor_mode_detection
    doctor_classify -->|"transitions.to"| doctor_classified
    doctor_currency -->|"transitions.from"| doctor_classified
    doctor_currency -.->|"transitions.guard"| doctor_currency_warning
    doctor_currency -->|"transitions.to"| doctor_currency_checked
  end
  subgraph sg_embedded_guide["embedded.guide"]
    direction LR
    embedded_guide_explain_topics["embedded.guide.explain_topics (fan-in 1)"]
    embedded_guide_queried(["embedded.guide.queried (fan-in 1)"])
    embedded_guide_render["embedded.guide.render"]
    embedded_guide_rendered(["embedded.guide.rendered (fan-in 1)"])
    embedded_guide_resolve["embedded.guide.resolve"]
    embedded_guide_resolved(["embedded.guide.resolved (fan-in 2)"])
    embedded_guide_revision_pinned["embedded.guide.revision_pinned (fan-in 1)"]
    embedded_guide_render -->|"transitions.from"| embedded_guide_resolved
    embedded_guide_render -.->|"transitions.guard"| embedded_guide_revision_pinned
    embedded_guide_render -->|"transitions.to"| embedded_guide_rendered
    embedded_guide_resolve -->|"transitions.from"| embedded_guide_queried
    embedded_guide_resolve -.->|"transitions.guard"| embedded_guide_explain_topics
    embedded_guide_resolve -->|"transitions.to"| embedded_guide_resolved
  end
  subgraph sg_empirical_registry_pack["empirical.registry.pack"]
    direction LR
    empirical_registry_pack_deprecate["empirical.registry.pack.deprecate"]
    empirical_registry_pack_deprecated(["empirical.registry.pack.deprecated (fan-in 1)"])
    empirical_registry_pack_draft(["empirical.registry.pack.draft (fan-in 1)"])
    empirical_registry_pack_pack_file_declared["empirical.registry.pack.pack_file_declared (fan-in 2)"]
    empirical_registry_pack_publish["empirical.registry.pack.publish"]
    empirical_registry_pack_published(["empirical.registry.pack.published (fan-in 2)"])
    empirical_registry_pack_stat_test_section_shape["empirical.registry.pack.stat_test_section_shape (fan-in 1)"]
    empirical_registry_pack_deprecate -->|"transitions.from"| empirical_registry_pack_published
    empirical_registry_pack_deprecate -.->|"transitions.guard"| empirical_registry_pack_pack_file_declared
    empirical_registry_pack_deprecate -->|"transitions.to"| empirical_registry_pack_deprecated
    empirical_registry_pack_publish -->|"transitions.from"| empirical_registry_pack_draft
    empirical_registry_pack_publish -.->|"transitions.guard"| empirical_registry_pack_pack_file_declared
    empirical_registry_pack_publish -.->|"transitions.guard"| empirical_registry_pack_stat_test_section_shape
    empirical_registry_pack_publish -->|"transitions.to"| empirical_registry_pack_published
  end
  subgraph sg_error_contract["error.contract"]
    direction LR
    error_contract_approve["error.contract.approve"]
    error_contract_approved(["error.contract.approved (fan-in 2)"])
    error_contract_archive["error.contract.archive"]
    error_contract_archived(["error.contract.archived (fan-in 1)"])
    error_contract_implement["error.contract.implement"]
    error_contract_implemented(["error.contract.implemented (fan-in 2)"])
    error_contract_process_lifecycle["error.contract.process_lifecycle (fan-in 3)"]
    error_contract_proposed(["error.contract.proposed (fan-in 1)"])
    error_contract_approve -->|"transitions.from"| error_contract_proposed
    error_contract_approve -.->|"transitions.guard"| error_contract_process_lifecycle
    error_contract_approve -->|"transitions.to"| error_contract_approved
    error_contract_archive -->|"transitions.from"| error_contract_implemented
    error_contract_archive -.->|"transitions.guard"| error_contract_process_lifecycle
    error_contract_archive -->|"transitions.to"| error_contract_archived
    error_contract_implement -->|"transitions.from"| error_contract_approved
    error_contract_implement -.->|"transitions.guard"| error_contract_process_lifecycle
    error_contract_implement -->|"transitions.to"| error_contract_implemented
  end
  subgraph sg_errors["errors"]
    direction LR
    errors_contract_published["errors.contract_published (fan-in 1)"]
    errors_draft(["errors.draft (fan-in 1)"])
    errors_publish["errors.publish"]
    errors_published(["errors.published (fan-in 1)"])
    errors_publish -->|"transitions.from"| errors_draft
    errors_publish -.->|"transitions.guard"| errors_contract_published
    errors_publish -->|"transitions.to"| errors_published
  end
  subgraph sg_graph["graph"]
    direction LR
    graph_deterministic_derivation["graph.deterministic_derivation (fan-in 1)"]
    graph_edge_kind_matches_typing["graph.edge_kind_matches_typing (fan-in 2)"]
    graph_extract["graph.extract"]
    graph_extract_fail["graph.extract_fail"]
    graph_extract_ok["graph.extract_ok"]
    graph_extracting(["graph.extracting (fan-in 3)"])
    graph_failed(["graph.failed (fan-in 1)"])
    graph_graph_is_derived_not_authored["graph.graph_is_derived_not_authored (fan-in 1)"]
    graph_indexed(["graph.indexed (fan-in 2)"])
    graph_invalidate["graph.invalidate"]
    graph_publish["graph.publish"]
    graph_queryable(["graph.queryable (fan-in 3)"])
    graph_stale_graph_detected["graph.stale_graph_detected (fan-in 1)"]
    graph_total_extraction["graph.total_extraction (fan-in 2)"]
    graph_unindexed(["graph.unindexed (fan-in 2)"])
    specodelic_parsed(["specodelic.parsed (fan-in 4)"])
    graph_extract -->|"transitions.from"| graph_unindexed
    graph_extract -.->|"transitions.guard"| specodelic_parsed
    graph_extract -->|"transitions.to"| graph_extracting
    graph_extract_fail -->|"transitions.from"| graph_extracting
    graph_extract_fail -.->|"transitions.guard"| graph_edge_kind_matches_typing
    graph_extract_fail -.->|"transitions.guard"| graph_total_extraction
    graph_extract_fail -->|"transitions.to"| graph_failed
    graph_extract_ok -->|"transitions.from"| graph_extracting
    graph_extract_ok -.->|"transitions.guard"| graph_edge_kind_matches_typing
    graph_extract_ok -.->|"transitions.guard"| graph_total_extraction
    graph_extract_ok -->|"transitions.to"| graph_indexed
    graph_invalidate -->|"transitions.from"| graph_queryable
    graph_invalidate -.->|"transitions.guard"| graph_stale_graph_detected
    graph_invalidate -->|"transitions.to"| graph_unindexed
    graph_publish -->|"transitions.from"| graph_indexed
    graph_publish -.->|"transitions.guard"| graph_deterministic_derivation
    graph_publish -.->|"transitions.guard"| graph_graph_is_derived_not_authored
    graph_publish -->|"transitions.to"| graph_queryable
  end
  subgraph sg_graph_views["graph.views"]
    direction LR
    graph_views_approve["graph.views.approve"]
    graph_views_approved(["graph.views.approved (fan-in 2)"])
    graph_views_archive["graph.views.archive"]
    graph_views_archived(["graph.views.archived (fan-in 1)"])
    graph_views_implement["graph.views.implement"]
    graph_views_implemented(["graph.views.implemented (fan-in 2)"])
    graph_views_process_lifecycle["graph.views.process_lifecycle (fan-in 3)"]
    graph_views_proposed(["graph.views.proposed (fan-in 1)"])
    graph_views_approve -->|"transitions.from"| graph_views_proposed
    graph_views_approve -.->|"transitions.guard"| graph_views_process_lifecycle
    graph_views_approve -->|"transitions.to"| graph_views_approved
    graph_views_archive -->|"transitions.from"| graph_views_implemented
    graph_views_archive -.->|"transitions.guard"| graph_views_process_lifecycle
    graph_views_archive -->|"transitions.to"| graph_views_archived
    graph_views_implement -->|"transitions.from"| graph_views_approved
    graph_views_implement -.->|"transitions.guard"| graph_views_process_lifecycle
    graph_views_implement -->|"transitions.to"| graph_views_implemented
  end
  subgraph sg_hooks["hooks"]
    direction LR
    hooks_chain_preserved["hooks.chain_preserved (fan-in 2)"]
    hooks_honest_anchor["hooks.honest_anchor (fan-in 1)"]
    hooks_idempotent_lifecycle["hooks.idempotent_lifecycle (fan-in 2)"]
    hooks_install_ok["hooks.install_ok"]
    hooks_refuse["hooks.refuse"]
    hooks_refused(["hooks.refused (fan-in 1)"])
    hooks_reinstall_ok["hooks.reinstall_ok"]
    hooks_uninstall_notwired["hooks.uninstall_notwired"]
    hooks_uninstall_ok["hooks.uninstall_ok"]
    hooks_unwired(["hooks.unwired (fan-in 4)"])
    hooks_wired(["hooks.wired (fan-in 3)"])
    hooks_install_ok -->|"transitions.from"| hooks_unwired
    hooks_install_ok -.->|"transitions.guard"| hooks_chain_preserved
    hooks_install_ok -->|"transitions.to"| hooks_wired
    hooks_refuse -->|"transitions.from"| hooks_unwired
    hooks_refuse -.->|"transitions.guard"| hooks_honest_anchor
    hooks_refuse -->|"transitions.to"| hooks_refused
    hooks_reinstall_ok -->|"transitions.from"| hooks_wired
    hooks_reinstall_ok -.->|"transitions.guard"| hooks_idempotent_lifecycle
    hooks_reinstall_ok -->|"transitions.to"| hooks_wired
    hooks_uninstall_notwired -->|"transitions.from"| hooks_unwired
    hooks_uninstall_notwired -.->|"transitions.guard"| hooks_idempotent_lifecycle
    hooks_uninstall_notwired -->|"transitions.to"| hooks_unwired
    hooks_uninstall_ok -->|"transitions.from"| hooks_wired
    hooks_uninstall_ok -.->|"transitions.guard"| hooks_chain_preserved
    hooks_uninstall_ok -->|"transitions.to"| hooks_unwired
  end
  subgraph sg_kernel["kernel"]
    direction LR
    kernel_declare["kernel.declare"]
    kernel_discharge["kernel.discharge"]
    kernel_expr_absent(["kernel.expr_absent (fan-in 1)"])
    kernel_expr_evaluated(["kernel.expr_evaluated (fan-in 3)"])
    kernel_expr_unknown(["kernel.expr_unknown (fan-in 1)"])
    kernel_kernel_decidable["kernel.kernel_decidable (fan-in 1)"]
    kernel_kernel_grammar_closed["kernel.kernel_grammar_closed (fan-in 1)"]
    kernel_kernel_status_three_valued["kernel.kernel_status_three_valued (fan-in 1)"]
    kernel_widen["kernel.widen"]
    kernel_declare -->|"transitions.from"| kernel_expr_absent
    kernel_declare -.->|"transitions.guard"| kernel_kernel_grammar_closed
    kernel_declare -->|"transitions.to"| kernel_expr_evaluated
    kernel_discharge -->|"transitions.from"| kernel_expr_evaluated
    kernel_discharge -.->|"transitions.guard"| kernel_kernel_status_three_valued
    kernel_discharge -->|"transitions.to"| kernel_expr_unknown
    kernel_widen -->|"transitions.from"| kernel_expr_evaluated
    kernel_widen -.->|"transitions.guard"| kernel_kernel_decidable
    kernel_widen -->|"transitions.to"| kernel_expr_evaluated
  end
  subgraph sg_kinds["kinds"]
    direction LR
    kinds_accept["kinds.accept"]
    kinds_assign_fail["kinds.assign_fail"]
    kinds_assign_ok["kinds.assign_ok"]
    kinds_begin["kinds.begin"]
    kinds_constraint_row_shape["kinds.constraint_row_shape (fan-in 2)"]
    kinds_intent_row_shape["kinds.intent_row_shape (fan-in 2)"]
    kinds_kind_assigned(["kinds.kind_assigned (fan-in 3)"])
    kinds_kind_enum_closed["kinds.kind_enum_closed (fan-in 2)"]
    kinds_kind_failed(["kinds.kind_failed (fan-in 1)"])
    kinds_passed(["kinds.passed (fan-in 1)"])
    kinds_property_row_shape["kinds.property_row_shape (fan-in 2)"]
    kinds_reject["kinds.reject"]
    kinds_scenario_binding_row_shape["kinds.scenario_binding_row_shape (fan-in 2)"]
    kinds_shape_checked(["kinds.shape_checked (fan-in 3)"])
    kinds_shape_failed(["kinds.shape_failed (fan-in 1)"])
    kinds_state_row_shape["kinds.state_row_shape (fan-in 2)"]
    kinds_transition_row_shape["kinds.transition_row_shape (fan-in 2)"]
    kinds_unclassified(["kinds.unclassified (fan-in 1)"])
    kinds_accept -->|"transitions.from"| kinds_shape_checked
    kinds_accept -.->|"transitions.guard"| kinds_constraint_row_shape
    kinds_accept -.->|"transitions.guard"| kinds_intent_row_shape
    kinds_accept -.->|"transitions.guard"| kinds_property_row_shape
    kinds_accept -.->|"transitions.guard"| kinds_scenario_binding_row_shape
    kinds_accept -.->|"transitions.guard"| kinds_state_row_shape
    kinds_accept -.->|"transitions.guard"| kinds_transition_row_shape
    kinds_accept -->|"transitions.to"| kinds_passed
    kinds_assign_fail -->|"transitions.from"| kinds_kind_assigned
    kinds_assign_fail -.->|"transitions.guard"| kinds_kind_enum_closed
    kinds_assign_fail -->|"transitions.to"| kinds_kind_failed
    kinds_assign_ok -->|"transitions.from"| kinds_kind_assigned
    kinds_assign_ok -.->|"transitions.guard"| kinds_kind_enum_closed
    kinds_assign_ok -->|"transitions.to"| kinds_shape_checked
    kinds_begin -->|"transitions.from"| kinds_unclassified
    kinds_begin -->|"transitions.to"| kinds_kind_assigned
    kinds_reject -->|"transitions.from"| kinds_shape_checked
    kinds_reject -.->|"transitions.guard"| kinds_constraint_row_shape
    kinds_reject -.->|"transitions.guard"| kinds_intent_row_shape
    kinds_reject -.->|"transitions.guard"| kinds_property_row_shape
    kinds_reject -.->|"transitions.guard"| kinds_scenario_binding_row_shape
    kinds_reject -.->|"transitions.guard"| kinds_state_row_shape
    kinds_reject -.->|"transitions.guard"| kinds_transition_row_shape
    kinds_reject -->|"transitions.to"| kinds_shape_failed
  end
  subgraph sg_lint_findings["lint.findings"]
    direction LR
    lint_findings_emit["lint.findings.emit"]
    lint_findings_emitted(["lint.findings.emitted (fan-in 1)"])
    lint_findings_found(["lint.findings.found (fan-in 1)"])
    lint_findings_self_describing["lint.findings.self_describing (fan-in 1)"]
    lint_findings_emit -->|"transitions.from"| lint_findings_found
    lint_findings_emit -.->|"transitions.guard"| lint_findings_self_describing
    lint_findings_emit -->|"transitions.to"| lint_findings_emitted
  end
  subgraph sg_linter_content_advisories["linter.content_advisories"]
    direction LR
    linter_content_advisories_clean(["linter.content_advisories.clean (fan-in 1)"])
    linter_content_advisories_forbidden_state_declared["linter.content_advisories.forbidden_state_declared (fan-in 1)"]
    linter_content_advisories_fragment_citation_required["linter.content_advisories.fragment_citation_required (fan-in 1)"]
    linter_content_advisories_placeholder_classes["linter.content_advisories.placeholder_classes (fan-in 1)"]
    linter_content_advisories_scan_clean["linter.content_advisories.scan_clean"]
    linter_content_advisories_scan_warned["linter.content_advisories.scan_warned"]
    linter_content_advisories_scanning(["linter.content_advisories.scanning (fan-in 2)"])
    linter_content_advisories_tautology_class["linter.content_advisories.tautology_class (fan-in 1)"]
    linter_content_advisories_warned(["linter.content_advisories.warned (fan-in 1)"])
    linter_content_advisories_scan_clean -->|"transitions.from"| linter_content_advisories_scanning
    linter_content_advisories_scan_clean -->|"transitions.to"| linter_content_advisories_clean
    linter_content_advisories_scan_warned -->|"transitions.from"| linter_content_advisories_scanning
    linter_content_advisories_scan_warned -.->|"transitions.guard"| linter_content_advisories_forbidden_state_declared
    linter_content_advisories_scan_warned -.->|"transitions.guard"| linter_content_advisories_fragment_citation_required
    linter_content_advisories_scan_warned -.->|"transitions.guard"| linter_content_advisories_placeholder_classes
    linter_content_advisories_scan_warned -.->|"transitions.guard"| linter_content_advisories_tautology_class
    linter_content_advisories_scan_warned -->|"transitions.to"| linter_content_advisories_warned
  end
  subgraph sg_linter_coverage["linter.coverage"]
    direction LR
    linter_coverage_accept["linter.coverage.accept"]
    linter_coverage_begin["linter.coverage.begin"]
    linter_coverage_count_fail["linter.coverage.count_fail"]
    linter_coverage_count_failed(["linter.coverage.count_failed (fan-in 1)"])
    linter_coverage_count_ok["linter.coverage.count_ok"]
    linter_coverage_counting(["linter.coverage.counting (fan-in 3)"])
    linter_coverage_every_constraint_covered["linter.coverage.every_constraint_covered (fan-in 2)"]
    linter_coverage_every_law_has_cases["linter.coverage.every_law_has_cases (fan-in 2)"]
    linter_coverage_law_check_failed(["linter.coverage.law_check_failed (fan-in 1)"])
    linter_coverage_law_checking(["linter.coverage.law_checking (fan-in 3)"])
    linter_coverage_no_orphan_property["linter.coverage.no_orphan_property (fan-in 2)"]
    linter_coverage_passed(["linter.coverage.passed (fan-in 1)"])
    linter_coverage_reject["linter.coverage.reject"]
    linter_coverage_unchecked(["linter.coverage.unchecked (fan-in 1)"])
    linter_coverage_accept -->|"transitions.from"| linter_coverage_law_checking
    linter_coverage_accept -.->|"transitions.guard"| linter_coverage_every_law_has_cases
    linter_coverage_accept -->|"transitions.to"| linter_coverage_passed
    linter_coverage_begin -->|"transitions.from"| linter_coverage_unchecked
    linter_coverage_begin -->|"transitions.to"| linter_coverage_counting
    linter_coverage_count_fail -->|"transitions.from"| linter_coverage_counting
    linter_coverage_count_fail -.->|"transitions.guard"| linter_coverage_every_constraint_covered
    linter_coverage_count_fail -.->|"transitions.guard"| linter_coverage_no_orphan_property
    linter_coverage_count_fail -->|"transitions.to"| linter_coverage_count_failed
    linter_coverage_count_ok -->|"transitions.from"| linter_coverage_counting
    linter_coverage_count_ok -.->|"transitions.guard"| linter_coverage_every_constraint_covered
    linter_coverage_count_ok -.->|"transitions.guard"| linter_coverage_no_orphan_property
    linter_coverage_count_ok -->|"transitions.to"| linter_coverage_law_checking
    linter_coverage_reject -->|"transitions.from"| linter_coverage_law_checking
    linter_coverage_reject -.->|"transitions.guard"| linter_coverage_every_law_has_cases
    linter_coverage_reject -->|"transitions.to"| linter_coverage_law_check_failed
  end
  subgraph sg_linter_ears_syntax["linter.ears_syntax"]
    direction LR
    linter_ears_syntax_accept["linter.ears_syntax.accept"]
    linter_ears_syntax_begin["linter.ears_syntax.begin"]
    linter_ears_syntax_ears_pattern_match["linter.ears_syntax.ears_pattern_match (fan-in 2)"]
    linter_ears_syntax_has_shall["linter.ears_syntax.has_shall (fan-in 2)"]
    linter_ears_syntax_id_check_failed(["linter.ears_syntax.id_check_failed (fan-in 1)"])
    linter_ears_syntax_id_checking(["linter.ears_syntax.id_checking (fan-in 3)"])
    linter_ears_syntax_no_conjoined_id["linter.ears_syntax.no_conjoined_id (fan-in 2)"]
    linter_ears_syntax_no_universal_in_id["linter.ears_syntax.no_universal_in_id (fan-in 2)"]
    linter_ears_syntax_passed(["linter.ears_syntax.passed (fan-in 1)"])
    linter_ears_syntax_pattern_fail["linter.ears_syntax.pattern_fail"]
    linter_ears_syntax_pattern_failed(["linter.ears_syntax.pattern_failed (fan-in 1)"])
    linter_ears_syntax_pattern_matching(["linter.ears_syntax.pattern_matching (fan-in 3)"])
    linter_ears_syntax_pattern_ok["linter.ears_syntax.pattern_ok"]
    linter_ears_syntax_reject["linter.ears_syntax.reject"]
    linter_ears_syntax_unchecked(["linter.ears_syntax.unchecked (fan-in 1)"])
    linter_ears_syntax_accept -->|"transitions.from"| linter_ears_syntax_id_checking
    linter_ears_syntax_accept -.->|"transitions.guard"| linter_ears_syntax_no_conjoined_id
    linter_ears_syntax_accept -.->|"transitions.guard"| linter_ears_syntax_no_universal_in_id
    linter_ears_syntax_accept -->|"transitions.to"| linter_ears_syntax_passed
    linter_ears_syntax_begin -->|"transitions.from"| linter_ears_syntax_unchecked
    linter_ears_syntax_begin -->|"transitions.to"| linter_ears_syntax_pattern_matching
    linter_ears_syntax_pattern_fail -->|"transitions.from"| linter_ears_syntax_pattern_matching
    linter_ears_syntax_pattern_fail -.->|"transitions.guard"| linter_ears_syntax_ears_pattern_match
    linter_ears_syntax_pattern_fail -.->|"transitions.guard"| linter_ears_syntax_has_shall
    linter_ears_syntax_pattern_fail -->|"transitions.to"| linter_ears_syntax_pattern_failed
    linter_ears_syntax_pattern_ok -->|"transitions.from"| linter_ears_syntax_pattern_matching
    linter_ears_syntax_pattern_ok -.->|"transitions.guard"| linter_ears_syntax_ears_pattern_match
    linter_ears_syntax_pattern_ok -.->|"transitions.guard"| linter_ears_syntax_has_shall
    linter_ears_syntax_pattern_ok -->|"transitions.to"| linter_ears_syntax_id_checking
    linter_ears_syntax_reject -->|"transitions.from"| linter_ears_syntax_id_checking
    linter_ears_syntax_reject -.->|"transitions.guard"| linter_ears_syntax_no_conjoined_id
    linter_ears_syntax_reject -.->|"transitions.guard"| linter_ears_syntax_no_universal_in_id
    linter_ears_syntax_reject -->|"transitions.to"| linter_ears_syntax_id_check_failed
  end
  subgraph sg_linter_external_completeness["linter.external_completeness"]
    direction LR
    linter_external_completeness_accept["linter.external_completeness.accept"]
    linter_external_completeness_check_fail["linter.external_completeness.check_fail"]
    linter_external_completeness_check_mapping["linter.external_completeness.check_mapping"]
    linter_external_completeness_checklist_well_formed["linter.external_completeness.checklist_well_formed (fan-in 2)"]
    linter_external_completeness_covered_maps_resolve["linter.external_completeness.covered_maps_resolve (fan-in 2)"]
    linter_external_completeness_every_item_accounted["linter.external_completeness.every_item_accounted (fan-in 2)"]
    linter_external_completeness_load["linter.external_completeness.load"]
    linter_external_completeness_load_fail["linter.external_completeness.load_fail"]
    linter_external_completeness_load_failed(["linter.external_completeness.load_failed (fan-in 1)"])
    linter_external_completeness_loaded(["linter.external_completeness.loaded (fan-in 3)"])
    linter_external_completeness_mapping_checked(["linter.external_completeness.mapping_checked (fan-in 3)"])
    linter_external_completeness_mapping_failed(["linter.external_completeness.mapping_failed (fan-in 1)"])
    linter_external_completeness_no_duplicate_claim["linter.external_completeness.no_duplicate_claim (fan-in 2)"]
    linter_external_completeness_not_applicable(["linter.external_completeness.not_applicable (fan-in 2)"])
    linter_external_completeness_passed(["linter.external_completeness.passed (fan-in 1)"])
    linter_external_completeness_reject["linter.external_completeness.reject"]
    linter_external_completeness_resolution_failed(["linter.external_completeness.resolution_failed (fan-in 1)"])
    linter_external_completeness_waiver_has_rationale["linter.external_completeness.waiver_has_rationale (fan-in 2)"]
    linter_external_completeness_accept -->|"transitions.from"| linter_external_completeness_mapping_checked
    linter_external_completeness_accept -.->|"transitions.guard"| linter_external_completeness_covered_maps_resolve
    linter_external_completeness_accept -.->|"transitions.guard"| linter_external_completeness_waiver_has_rationale
    linter_external_completeness_accept -->|"transitions.to"| linter_external_completeness_passed
    linter_external_completeness_check_fail -->|"transitions.from"| linter_external_completeness_loaded
    linter_external_completeness_check_fail -.->|"transitions.guard"| linter_external_completeness_every_item_accounted
    linter_external_completeness_check_fail -.->|"transitions.guard"| linter_external_completeness_no_duplicate_claim
    linter_external_completeness_check_fail -->|"transitions.to"| linter_external_completeness_mapping_failed
    linter_external_completeness_check_mapping -->|"transitions.from"| linter_external_completeness_loaded
    linter_external_completeness_check_mapping -.->|"transitions.guard"| linter_external_completeness_every_item_accounted
    linter_external_completeness_check_mapping -.->|"transitions.guard"| linter_external_completeness_no_duplicate_claim
    linter_external_completeness_check_mapping -->|"transitions.to"| linter_external_completeness_mapping_checked
    linter_external_completeness_load -->|"transitions.from"| linter_external_completeness_not_applicable
    linter_external_completeness_load -.->|"transitions.guard"| linter_external_completeness_checklist_well_formed
    linter_external_completeness_load -->|"transitions.to"| linter_external_completeness_loaded
    linter_external_completeness_load_fail -->|"transitions.from"| linter_external_completeness_not_applicable
    linter_external_completeness_load_fail -.->|"transitions.guard"| linter_external_completeness_checklist_well_formed
    linter_external_completeness_load_fail -->|"transitions.to"| linter_external_completeness_load_failed
    linter_external_completeness_reject -->|"transitions.from"| linter_external_completeness_mapping_checked
    linter_external_completeness_reject -.->|"transitions.guard"| linter_external_completeness_covered_maps_resolve
    linter_external_completeness_reject -.->|"transitions.guard"| linter_external_completeness_waiver_has_rationale
    linter_external_completeness_reject -->|"transitions.to"| linter_external_completeness_resolution_failed
  end
  subgraph sg_linter_failure_shape["linter.failure_shape"]
    direction LR
    linter_failure_shape_accept["linter.failure_shape.accept"]
    linter_failure_shape_begin["linter.failure_shape.begin"]
    linter_failure_shape_checking(["linter.failure_shape.checking (fan-in 3)"])
    linter_failure_shape_error_labels_unique["linter.failure_shape.error_labels_unique (fan-in 2)"]
    linter_failure_shape_failed(["linter.failure_shape.failed (fan-in 1)"])
    linter_failure_shape_guard_negation_total["linter.failure_shape.guard_negation_total (fan-in 2)"]
    linter_failure_shape_passed(["linter.failure_shape.passed (fan-in 1)"])
    linter_failure_shape_reject["linter.failure_shape.reject"]
    linter_failure_shape_terminal_states_emit["linter.failure_shape.terminal_states_emit (fan-in 2)"]
    linter_failure_shape_unchecked(["linter.failure_shape.unchecked (fan-in 1)"])
    linter_failure_shape_accept -->|"transitions.from"| linter_failure_shape_checking
    linter_failure_shape_accept -.->|"transitions.guard"| linter_failure_shape_error_labels_unique
    linter_failure_shape_accept -.->|"transitions.guard"| linter_failure_shape_guard_negation_total
    linter_failure_shape_accept -.->|"transitions.guard"| linter_failure_shape_terminal_states_emit
    linter_failure_shape_accept -->|"transitions.to"| linter_failure_shape_passed
    linter_failure_shape_begin -->|"transitions.from"| linter_failure_shape_unchecked
    linter_failure_shape_begin -->|"transitions.to"| linter_failure_shape_checking
    linter_failure_shape_reject -->|"transitions.from"| linter_failure_shape_checking
    linter_failure_shape_reject -.->|"transitions.guard"| linter_failure_shape_error_labels_unique
    linter_failure_shape_reject -.->|"transitions.guard"| linter_failure_shape_guard_negation_total
    linter_failure_shape_reject -.->|"transitions.guard"| linter_failure_shape_terminal_states_emit
    linter_failure_shape_reject -->|"transitions.to"| linter_failure_shape_failed
  end
  subgraph sg_linter_frontmatter["linter.frontmatter"]
    direction LR
    linter_frontmatter_accept["linter.frontmatter.accept"]
    linter_frontmatter_begin["linter.frontmatter.begin"]
    linter_frontmatter_checking(["linter.frontmatter.checking (fan-in 3)"])
    linter_frontmatter_failed(["linter.frontmatter.failed (fan-in 1)"])
    linter_frontmatter_has_id["linter.frontmatter.has_id (fan-in 2)"]
    linter_frontmatter_has_kind["linter.frontmatter.has_kind (fan-in 2)"]
    linter_frontmatter_has_statement["linter.frontmatter.has_statement (fan-in 2)"]
    linter_frontmatter_id_matches_file["linter.frontmatter.id_matches_file (fan-in 2)"]
    linter_frontmatter_passed(["linter.frontmatter.passed (fan-in 1)"])
    linter_frontmatter_reject["linter.frontmatter.reject"]
    linter_frontmatter_unchecked(["linter.frontmatter.unchecked (fan-in 1)"])
    linter_frontmatter_accept -->|"transitions.from"| linter_frontmatter_checking
    linter_frontmatter_accept -.->|"transitions.guard"| linter_frontmatter_has_id
    linter_frontmatter_accept -.->|"transitions.guard"| linter_frontmatter_has_kind
    linter_frontmatter_accept -.->|"transitions.guard"| linter_frontmatter_has_statement
    linter_frontmatter_accept -.->|"transitions.guard"| linter_frontmatter_id_matches_file
    linter_frontmatter_accept -->|"transitions.to"| linter_frontmatter_passed
    linter_frontmatter_begin -->|"transitions.from"| linter_frontmatter_unchecked
    linter_frontmatter_begin -->|"transitions.to"| linter_frontmatter_checking
    linter_frontmatter_reject -->|"transitions.from"| linter_frontmatter_checking
    linter_frontmatter_reject -.->|"transitions.guard"| linter_frontmatter_has_id
    linter_frontmatter_reject -.->|"transitions.guard"| linter_frontmatter_has_kind
    linter_frontmatter_reject -.->|"transitions.guard"| linter_frontmatter_has_statement
    linter_frontmatter_reject -.->|"transitions.guard"| linter_frontmatter_id_matches_file
    linter_frontmatter_reject -->|"transitions.to"| linter_frontmatter_failed
  end
  subgraph sg_linter_graph_shape["linter.graph_shape"]
    direction LR
    linter_graph_shape_accept["linter.graph_shape.accept"]
    linter_graph_shape_acyclic["linter.graph_shape.acyclic (fan-in 4)"]
    linter_graph_shape_build_graph["linter.graph_shape.build_graph"]
    linter_graph_shape_built(["linter.graph_shape.built (fan-in 2)"])
    linter_graph_shape_failed(["linter.graph_shape.failed (fan-in 1)"])
    linter_graph_shape_no_self_ref["linter.graph_shape.no_self_ref (fan-in 2)"]
    linter_graph_shape_passed(["linter.graph_shape.passed (fan-in 1)"])
    linter_graph_shape_reject["linter.graph_shape.reject"]
    linter_graph_shape_single_root_reachable["linter.graph_shape.single_root_reachable (fan-in 2)"]
    linter_graph_shape_supersedes_dag["linter.graph_shape.supersedes_dag (fan-in 2)"]
    linter_graph_shape_traverse["linter.graph_shape.traverse"]
    linter_graph_shape_traversing(["linter.graph_shape.traversing (fan-in 3)"])
    linter_graph_shape_unbuilt(["linter.graph_shape.unbuilt (fan-in 1)"])
    linter_graph_shape_accept -->|"transitions.from"| linter_graph_shape_traversing
    linter_graph_shape_accept -.->|"transitions.guard"| linter_graph_shape_acyclic
    linter_graph_shape_accept -.->|"transitions.guard"| linter_graph_shape_no_self_ref
    linter_graph_shape_accept -.->|"transitions.guard"| linter_graph_shape_single_root_reachable
    linter_graph_shape_accept -.->|"transitions.guard"| linter_graph_shape_supersedes_dag
    linter_graph_shape_accept -->|"transitions.to"| linter_graph_shape_passed
    linter_graph_shape_build_graph -->|"transitions.from"| linter_graph_shape_unbuilt
    linter_graph_shape_build_graph -->|"transitions.to"| linter_graph_shape_built
    linter_graph_shape_reject -->|"transitions.from"| linter_graph_shape_traversing
    linter_graph_shape_reject -.->|"transitions.guard"| linter_graph_shape_acyclic
    linter_graph_shape_reject -.->|"transitions.guard"| linter_graph_shape_no_self_ref
    linter_graph_shape_reject -.->|"transitions.guard"| linter_graph_shape_single_root_reachable
    linter_graph_shape_reject -.->|"transitions.guard"| linter_graph_shape_supersedes_dag
    linter_graph_shape_reject -->|"transitions.to"| linter_graph_shape_failed
    linter_graph_shape_traverse -->|"transitions.from"| linter_graph_shape_built
    linter_graph_shape_traverse -->|"transitions.to"| linter_graph_shape_traversing
  end
  subgraph sg_linter_model_shape["linter.model_shape"]
    direction LR
    linter_model_shape_accept["linter.model_shape.accept"]
    linter_model_shape_check_pairing["linter.model_shape.check_pairing"]
    linter_model_shape_every_state_used["linter.model_shape.every_state_used (fan-in 2)"]
    linter_model_shape_every_transition_valid["linter.model_shape.every_transition_valid (fan-in 2)"]
    linter_model_shape_field_check_failed(["linter.model_shape.field_check_failed (fan-in 1)"])
    linter_model_shape_guard_present["linter.model_shape.guard_present (fan-in 2)"]
    linter_model_shape_model_sections_paired["linter.model_shape.model_sections_paired (fan-in 2)"]
    linter_model_shape_no_bool_state_field["linter.model_shape.no_bool_state_field (fan-in 2)"]
    linter_model_shape_pairing_checked(["linter.model_shape.pairing_checked (fan-in 3)"])
    linter_model_shape_pairing_fail["linter.model_shape.pairing_fail"]
    linter_model_shape_pairing_failed(["linter.model_shape.pairing_failed (fan-in 1)"])
    linter_model_shape_pairing_ok["linter.model_shape.pairing_ok"]
    linter_model_shape_passed(["linter.model_shape.passed (fan-in 1)"])
    linter_model_shape_reject["linter.model_shape.reject"]
    linter_model_shape_states_checked(["linter.model_shape.states_checked (fan-in 3)"])
    linter_model_shape_ungrouped(["linter.model_shape.ungrouped (fan-in 1)"])
    linter_model_shape_accept -->|"transitions.from"| linter_model_shape_states_checked
    linter_model_shape_accept -.->|"transitions.guard"| linter_model_shape_guard_present
    linter_model_shape_accept -.->|"transitions.guard"| linter_model_shape_no_bool_state_field
    linter_model_shape_accept -->|"transitions.to"| linter_model_shape_passed
    linter_model_shape_check_pairing -->|"transitions.from"| linter_model_shape_ungrouped
    linter_model_shape_check_pairing -->|"transitions.to"| linter_model_shape_pairing_checked
    linter_model_shape_pairing_fail -->|"transitions.from"| linter_model_shape_pairing_checked
    linter_model_shape_pairing_fail -.->|"transitions.guard"| linter_model_shape_every_state_used
    linter_model_shape_pairing_fail -.->|"transitions.guard"| linter_model_shape_every_transition_valid
    linter_model_shape_pairing_fail -.->|"transitions.guard"| linter_model_shape_model_sections_paired
    linter_model_shape_pairing_fail -->|"transitions.to"| linter_model_shape_pairing_failed
    linter_model_shape_pairing_ok -->|"transitions.from"| linter_model_shape_pairing_checked
    linter_model_shape_pairing_ok -.->|"transitions.guard"| linter_model_shape_every_state_used
    linter_model_shape_pairing_ok -.->|"transitions.guard"| linter_model_shape_every_transition_valid
    linter_model_shape_pairing_ok -.->|"transitions.guard"| linter_model_shape_model_sections_paired
    linter_model_shape_pairing_ok -->|"transitions.to"| linter_model_shape_states_checked
    linter_model_shape_reject -->|"transitions.from"| linter_model_shape_states_checked
    linter_model_shape_reject -.->|"transitions.guard"| linter_model_shape_guard_present
    linter_model_shape_reject -.->|"transitions.guard"| linter_model_shape_no_bool_state_field
    linter_model_shape_reject -->|"transitions.to"| linter_model_shape_field_check_failed
  end
  subgraph sg_linter_observability["linter.observability"]
    direction LR
    linter_observability_observation_universe["linter.observability.observation_universe (fan-in 1)"]
    linter_observability_observed(["linter.observability.observed (fan-in 1)"])
    linter_observability_scan_effects["linter.observability.scan_effects"]
    linter_observability_scanning(["linter.observability.scanning (fan-in 2)"])
    linter_observability_unobserved_warned(["linter.observability.unobserved_warned (fan-in 1)"])
    linter_observability_warn_unobserved["linter.observability.warn_unobserved"]
    linter_observability_scan_effects -->|"transitions.from"| linter_observability_scanning
    linter_observability_scan_effects -->|"transitions.to"| linter_observability_observed
    linter_observability_warn_unobserved -->|"transitions.from"| linter_observability_scanning
    linter_observability_warn_unobserved -.->|"transitions.guard"| linter_observability_observation_universe
    linter_observability_warn_unobserved -->|"transitions.to"| linter_observability_unobserved_warned
  end
  subgraph sg_linter_referential_integrity["linter.referential_integrity"]
    direction LR
    linter_referential_integrity_accept["linter.referential_integrity.accept"]
    linter_referential_integrity_build_index["linter.referential_integrity.build_index"]
    linter_referential_integrity_index_fail["linter.referential_integrity.index_fail"]
    linter_referential_integrity_index_failed(["linter.referential_integrity.index_failed (fan-in 1)"])
    linter_referential_integrity_index_ok["linter.referential_integrity.index_ok"]
    linter_referential_integrity_indexed(["linter.referential_integrity.indexed (fan-in 2)"])
    linter_referential_integrity_indexing(["linter.referential_integrity.indexing (fan-in 3)"])
    linter_referential_integrity_passed(["linter.referential_integrity.passed (fan-in 1)"])
    linter_referential_integrity_ref_kind_compatible["linter.referential_integrity.ref_kind_compatible (fan-in 2)"]
    linter_referential_integrity_ref_resolves["linter.referential_integrity.ref_resolves (fan-in 4)"]
    linter_referential_integrity_reject["linter.referential_integrity.reject"]
    linter_referential_integrity_resolution_failed(["linter.referential_integrity.resolution_failed (fan-in 1)"])
    linter_referential_integrity_resolve_refs["linter.referential_integrity.resolve_refs"]
    linter_referential_integrity_resolving(["linter.referential_integrity.resolving (fan-in 3)"])
    linter_referential_integrity_unindexed(["linter.referential_integrity.unindexed (fan-in 1)"])
    linter_referential_integrity_unique_across_repo["linter.referential_integrity.unique_across_repo (fan-in 2)"]
    linter_referential_integrity_unique_within_file["linter.referential_integrity.unique_within_file (fan-in 2)"]
    linter_referential_integrity_accept -->|"transitions.from"| linter_referential_integrity_resolving
    linter_referential_integrity_accept -.->|"transitions.guard"| linter_referential_integrity_ref_kind_compatible
    linter_referential_integrity_accept -.->|"transitions.guard"| linter_referential_integrity_ref_resolves
    linter_referential_integrity_accept -->|"transitions.to"| linter_referential_integrity_passed
    linter_referential_integrity_build_index -->|"transitions.from"| linter_referential_integrity_unindexed
    linter_referential_integrity_build_index -->|"transitions.to"| linter_referential_integrity_indexing
    linter_referential_integrity_index_fail -->|"transitions.from"| linter_referential_integrity_indexing
    linter_referential_integrity_index_fail -.->|"transitions.guard"| linter_referential_integrity_unique_across_repo
    linter_referential_integrity_index_fail -.->|"transitions.guard"| linter_referential_integrity_unique_within_file
    linter_referential_integrity_index_fail -->|"transitions.to"| linter_referential_integrity_index_failed
    linter_referential_integrity_index_ok -->|"transitions.from"| linter_referential_integrity_indexing
    linter_referential_integrity_index_ok -.->|"transitions.guard"| linter_referential_integrity_unique_across_repo
    linter_referential_integrity_index_ok -.->|"transitions.guard"| linter_referential_integrity_unique_within_file
    linter_referential_integrity_index_ok -->|"transitions.to"| linter_referential_integrity_indexed
    linter_referential_integrity_reject -->|"transitions.from"| linter_referential_integrity_resolving
    linter_referential_integrity_reject -.->|"transitions.guard"| linter_referential_integrity_ref_kind_compatible
    linter_referential_integrity_reject -.->|"transitions.guard"| linter_referential_integrity_ref_resolves
    linter_referential_integrity_reject -->|"transitions.to"| linter_referential_integrity_resolution_failed
    linter_referential_integrity_resolve_refs -->|"transitions.from"| linter_referential_integrity_indexed
    linter_referential_integrity_resolve_refs -->|"transitions.to"| linter_referential_integrity_resolving
  end
  subgraph sg_linter_scenario_bindings["linter.scenario_bindings"]
    direction LR
    linter_scenario_bindings_coverage_own_file["linter.scenario_bindings.coverage_own_file (fan-in 1)"]
    linter_scenario_bindings_own_file_scope["linter.scenario_bindings.own_file_scope (fan-in 1)"]
    linter_scenario_bindings_report_violations["linter.scenario_bindings.report_violations"]
    linter_scenario_bindings_saturation_pinned["linter.scenario_bindings.saturation_pinned (fan-in 1)"]
    linter_scenario_bindings_slug_join_key["linter.scenario_bindings.slug_join_key (fan-in 1)"]
    linter_scenario_bindings_status_vocabulary["linter.scenario_bindings.status_vocabulary (fan-in 1)"]
    linter_scenario_bindings_unwalked(["linter.scenario_bindings.unwalked (fan-in 2)"])
    linter_scenario_bindings_violations_reported(["linter.scenario_bindings.violations_reported (fan-in 1)"])
    linter_scenario_bindings_walk_table["linter.scenario_bindings.walk_table"]
    linter_scenario_bindings_walked_clean(["linter.scenario_bindings.walked_clean (fan-in 1)"])
    linter_scenario_bindings_report_violations -->|"transitions.from"| linter_scenario_bindings_unwalked
    linter_scenario_bindings_report_violations -->|"transitions.to"| linter_scenario_bindings_violations_reported
    linter_scenario_bindings_walk_table -->|"transitions.from"| linter_scenario_bindings_unwalked
    linter_scenario_bindings_walk_table -.->|"transitions.guard"| linter_scenario_bindings_coverage_own_file
    linter_scenario_bindings_walk_table -.->|"transitions.guard"| linter_scenario_bindings_own_file_scope
    linter_scenario_bindings_walk_table -.->|"transitions.guard"| linter_scenario_bindings_saturation_pinned
    linter_scenario_bindings_walk_table -.->|"transitions.guard"| linter_scenario_bindings_slug_join_key
    linter_scenario_bindings_walk_table -.->|"transitions.guard"| linter_scenario_bindings_status_vocabulary
    linter_scenario_bindings_walk_table -->|"transitions.to"| linter_scenario_bindings_walked_clean
  end
  subgraph sg_linter_scenario_reconciliation["linter.scenario_reconciliation"]
    direction LR
    linter_scenario_reconciliation_divergences_reported(["linter.scenario_reconciliation.divergences_reported (fan-in 1)"])
    linter_scenario_reconciliation_exact_join["linter.scenario_reconciliation.exact_join (fan-in 1)"]
    linter_scenario_reconciliation_ledger_comparison["linter.scenario_reconciliation.ledger_comparison (fan-in 1)"]
    linter_scenario_reconciliation_reconcile["linter.scenario_reconciliation.reconcile"]
    linter_scenario_reconciliation_reconciled(["linter.scenario_reconciliation.reconciled (fan-in 1)"])
    linter_scenario_reconciliation_report_divergences["linter.scenario_reconciliation.report_divergences"]
    linter_scenario_reconciliation_unreconciled(["linter.scenario_reconciliation.unreconciled (fan-in 2)"])
    linter_scenario_reconciliation_reconcile -->|"transitions.from"| linter_scenario_reconciliation_unreconciled
    linter_scenario_reconciliation_reconcile -.->|"transitions.guard"| linter_scenario_reconciliation_exact_join
    linter_scenario_reconciliation_reconcile -.->|"transitions.guard"| linter_scenario_reconciliation_ledger_comparison
    linter_scenario_reconciliation_reconcile -->|"transitions.to"| linter_scenario_reconciliation_reconciled
    linter_scenario_reconciliation_report_divergences -->|"transitions.from"| linter_scenario_reconciliation_unreconciled
    linter_scenario_reconciliation_report_divergences -->|"transitions.to"| linter_scenario_reconciliation_divergences_reported
  end
  subgraph sg_linter_schema_shape["linter.schema_shape"]
    direction LR
    linter_schema_shape_accept["linter.schema_shape.accept"]
    linter_schema_shape_begin["linter.schema_shape.begin"]
    linter_schema_shape_constraint_kind_closed["linter.schema_shape.constraint_kind_closed (fan-in 2)"]
    linter_schema_shape_diff_fail["linter.schema_shape.diff_fail"]
    linter_schema_shape_diff_failed(["linter.schema_shape.diff_failed (fan-in 1)"])
    linter_schema_shape_diff_ok["linter.schema_shape.diff_ok"]
    linter_schema_shape_diff_skip["linter.schema_shape.diff_skip"]
    linter_schema_shape_diffing(["linter.schema_shape.diffing (fan-in 4)"])
    linter_schema_shape_id_set_grows_only["linter.schema_shape.id_set_grows_only (fan-in 2)"]
    linter_schema_shape_id_set_order_stable["linter.schema_shape.id_set_order_stable (fan-in 2)"]
    linter_schema_shape_kind_checking(["linter.schema_shape.kind_checking (fan-in 3)"])
    linter_schema_shape_kind_fail["linter.schema_shape.kind_fail"]
    linter_schema_shape_kind_failed(["linter.schema_shape.kind_failed (fan-in 1)"])
    linter_schema_shape_kind_ok["linter.schema_shape.kind_ok"]
    linter_schema_shape_no_prose_field_parsed["linter.schema_shape.no_prose_field_parsed (fan-in 2)"]
    linter_schema_shape_parser_audit_failed(["linter.schema_shape.parser_audit_failed (fan-in 1)"])
    linter_schema_shape_parser_audited(["linter.schema_shape.parser_audited (fan-in 4)"])
    linter_schema_shape_passed(["linter.schema_shape.passed (fan-in 1)"])
    linter_schema_shape_property_kind_closed["linter.schema_shape.property_kind_closed (fan-in 2)"]
    linter_schema_shape_prose_field_passthrough["linter.schema_shape.prose_field_passthrough (fan-in 2)"]
    linter_schema_shape_reject["linter.schema_shape.reject"]
    linter_schema_shape_unchecked(["linter.schema_shape.unchecked (fan-in 1)"])
    linter_schema_shape_accept -->|"transitions.from"| linter_schema_shape_parser_audited
    linter_schema_shape_accept -.->|"transitions.guard"| linter_schema_shape_no_prose_field_parsed
    linter_schema_shape_accept -.->|"transitions.guard"| linter_schema_shape_prose_field_passthrough
    linter_schema_shape_accept -->|"transitions.to"| linter_schema_shape_passed
    linter_schema_shape_begin -->|"transitions.from"| linter_schema_shape_unchecked
    linter_schema_shape_begin -->|"transitions.to"| linter_schema_shape_kind_checking
    linter_schema_shape_diff_fail -->|"transitions.from"| linter_schema_shape_diffing
    linter_schema_shape_diff_fail -.->|"transitions.guard"| linter_schema_shape_id_set_grows_only
    linter_schema_shape_diff_fail -.->|"transitions.guard"| linter_schema_shape_id_set_order_stable
    linter_schema_shape_diff_fail -->|"transitions.to"| linter_schema_shape_diff_failed
    linter_schema_shape_diff_ok -->|"transitions.from"| linter_schema_shape_diffing
    linter_schema_shape_diff_ok -.->|"transitions.guard"| linter_schema_shape_id_set_grows_only
    linter_schema_shape_diff_ok -.->|"transitions.guard"| linter_schema_shape_id_set_order_stable
    linter_schema_shape_diff_ok -->|"transitions.to"| linter_schema_shape_parser_audited
    linter_schema_shape_diff_skip -->|"transitions.from"| linter_schema_shape_diffing
    linter_schema_shape_diff_skip -->|"transitions.to"| linter_schema_shape_parser_audited
    linter_schema_shape_kind_fail -->|"transitions.from"| linter_schema_shape_kind_checking
    linter_schema_shape_kind_fail -.->|"transitions.guard"| linter_schema_shape_constraint_kind_closed
    linter_schema_shape_kind_fail -.->|"transitions.guard"| linter_schema_shape_property_kind_closed
    linter_schema_shape_kind_fail -->|"transitions.to"| linter_schema_shape_kind_failed
    linter_schema_shape_kind_ok -->|"transitions.from"| linter_schema_shape_kind_checking
    linter_schema_shape_kind_ok -.->|"transitions.guard"| linter_schema_shape_constraint_kind_closed
    linter_schema_shape_kind_ok -.->|"transitions.guard"| linter_schema_shape_property_kind_closed
    linter_schema_shape_kind_ok -->|"transitions.to"| linter_schema_shape_diffing
    linter_schema_shape_reject -->|"transitions.from"| linter_schema_shape_parser_audited
    linter_schema_shape_reject -.->|"transitions.guard"| linter_schema_shape_no_prose_field_parsed
    linter_schema_shape_reject -.->|"transitions.guard"| linter_schema_shape_prose_field_passthrough
    linter_schema_shape_reject -->|"transitions.to"| linter_schema_shape_parser_audit_failed
  end
  subgraph sg_merge["merge"]
    direction LR
    merge_accept["merge.accept"]
    merge_auto_proceed["merge.auto_proceed"]
    merge_blast_radii_recorded_pre_merge["merge.blast_radii_recorded_pre_merge (fan-in 1)"]
    merge_check_collisions["merge.check_collisions"]
    merge_collision_checked(["merge.collision_checked (fan-in 3)"])
    merge_collision_fail["merge.collision_fail"]
    merge_collision_failed(["merge.collision_failed (fan-in 1)"])
    merge_diverged(["merge.diverged (fan-in 2)"])
    merge_flag_review["merge.flag_review"]
    merge_graph_reused_not_rederived["merge.graph_reused_not_rederived (fan-in 2)"]
    merge_merge_failed(["merge.merge_failed (fan-in 1)"])
    merge_merged(["merge.merged (fan-in 1)"])
    merge_needs_review(["merge.needs_review (fan-in 2)"])
    merge_no_new_id_collision["merge.no_new_id_collision (fan-in 2)"]
    merge_post_merge_relint_required["merge.post_merge_relint_required (fan-in 2)"]
    merge_ref_integrity_reverified(["merge.ref_integrity_reverified (fan-in 3)"])
    merge_reject["merge.reject"]
    merge_rename_replayed(["merge.rename_replayed (fan-in 4)"])
    merge_rename_replayed_onto_foreign_edits["merge.rename_replayed_onto_foreign_edits (fan-in 2)"]
    merge_resolved["merge.resolved"]
    merge_reverification_failed(["merge.reverification_failed (fan-in 1)"])
    merge_reverify["merge.reverify"]
    merge_reverify_fail["merge.reverify_fail"]
    merge_semantic_conflict_iff_blast_radius_intersects["merge.semantic_conflict_iff_blast_radius_intersects (fan-in 1)"]
    merge_sequential_number_reassigned_on_conflict["merge.sequential_number_reassigned_on_conflict (fan-in 2)"]
    merge_accept -->|"transitions.from"| merge_ref_integrity_reverified
    merge_accept -.->|"transitions.guard"| merge_sequential_number_reassigned_on_conflict
    merge_accept -->|"transitions.to"| merge_merged
    merge_auto_proceed -->|"transitions.from"| merge_collision_checked
    merge_auto_proceed -.->|"transitions.guard"| merge_rename_replayed_onto_foreign_edits
    merge_auto_proceed -->|"transitions.to"| merge_rename_replayed
    merge_check_collisions -->|"transitions.from"| merge_diverged
    merge_check_collisions -.->|"transitions.guard"| merge_graph_reused_not_rederived
    merge_check_collisions -.->|"transitions.guard"| merge_no_new_id_collision
    merge_check_collisions -->|"transitions.to"| merge_collision_checked
    merge_collision_fail -->|"transitions.from"| merge_diverged
    merge_collision_fail -.->|"transitions.guard"| merge_graph_reused_not_rederived
    merge_collision_fail -.->|"transitions.guard"| merge_no_new_id_collision
    merge_collision_fail -->|"transitions.to"| merge_collision_failed
    merge_flag_review -->|"transitions.from"| merge_collision_checked
    merge_flag_review -.->|"transitions.guard"| merge_blast_radii_recorded_pre_merge
    merge_flag_review -.->|"transitions.guard"| merge_semantic_conflict_iff_blast_radius_intersects
    merge_flag_review -->|"transitions.to"| merge_needs_review
    merge_reject -->|"transitions.from"| merge_ref_integrity_reverified
    merge_reject -.->|"transitions.guard"| merge_sequential_number_reassigned_on_conflict
    merge_reject -->|"transitions.to"| merge_merge_failed
    merge_resolved -->|"transitions.from"| merge_needs_review
    merge_resolved -.->|"transitions.guard"| merge_rename_replayed_onto_foreign_edits
    merge_resolved -->|"transitions.to"| merge_rename_replayed
    merge_reverify -->|"transitions.from"| merge_rename_replayed
    merge_reverify -.->|"transitions.guard"| merge_post_merge_relint_required
    merge_reverify -->|"transitions.to"| merge_ref_integrity_reverified
    merge_reverify_fail -->|"transitions.from"| merge_rename_replayed
    merge_reverify_fail -.->|"transitions.guard"| merge_post_merge_relint_required
    merge_reverify_fail -->|"transitions.to"| merge_reverification_failed
  end
  subgraph sg_migrate["migrate"]
    direction LR
    migrate_begin_wrap["migrate.begin_wrap"]
    migrate_delta_text_preserved["migrate.delta_text_preserved (fan-in 1)"]
    migrate_dry_run_pass["migrate.dry_run_pass"]
    migrate_dry_run_writes_nothing["migrate.dry_run_writes_nothing (fan-in 1)"]
    migrate_merge_adds_only_missing["migrate.merge_adds_only_missing (fan-in 1)"]
    migrate_merge_only["migrate.merge_only"]
    migrate_refuse["migrate.refuse"]
    migrate_refuse_already_migrated["migrate.refuse_already_migrated (fan-in 1)"]
    migrate_refused(["migrate.refused (fan-in 3)"])
    migrate_rekey_derives_real_id["migrate.rekey_derives_real_id (fan-in 1)"]
    migrate_rekey_refusals["migrate.rekey_refusals (fan-in 1)"]
    migrate_rekey_refuse["migrate.rekey_refuse"]
    migrate_rekey_result["migrate.rekey_result"]
    migrate_rekeyed(["migrate.rekeyed (fan-in 1)"])
    migrate_scaffold_lints_clean["migrate.scaffold_lints_clean (fan-in 1)"]
    migrate_sidecar_generated["migrate.sidecar_generated (fan-in 1)"]
    migrate_unwrapping(["migrate.unwrapping (fan-in 6)"])
    migrate_upgrade_applied["migrate.upgrade_applied"]
    migrate_upgrade_begin["migrate.upgrade_begin"]
    migrate_upgrade_refuse["migrate.upgrade_refuse"]
    migrate_upgrade_registry_core_owned["migrate.upgrade_registry_core_owned (fan-in 1)"]
    migrate_upgrade_steps_applied_in_order["migrate.upgrade_steps_applied_in_order (fan-in 1)"]
    migrate_upgrade_unknown_revision_refused["migrate.upgrade_unknown_revision_refused (fan-in 1)"]
    migrate_upgraded(["migrate.upgraded (fan-in 1)"])
    migrate_upgrading(["migrate.upgrading (fan-in 2)"])
    migrate_verify_green["migrate.verify_green"]
    migrate_wrapping(["migrate.wrapping (fan-in 4)"])
    migrate_write_result["migrate.write_result"]
    migrate_written(["migrate.written (fan-in 3)"])
    migrate_begin_wrap -->|"transitions.from"| migrate_unwrapping
    migrate_begin_wrap -.->|"transitions.guard"| migrate_delta_text_preserved
    migrate_begin_wrap -->|"transitions.to"| migrate_wrapping
    migrate_dry_run_pass -->|"transitions.from"| migrate_wrapping
    migrate_dry_run_pass -.->|"transitions.guard"| migrate_dry_run_writes_nothing
    migrate_dry_run_pass -->|"transitions.to"| migrate_wrapping
    migrate_merge_only -->|"transitions.from"| migrate_wrapping
    migrate_merge_only -.->|"transitions.guard"| migrate_merge_adds_only_missing
    migrate_merge_only -->|"transitions.to"| migrate_written
    migrate_refuse -->|"transitions.from"| migrate_unwrapping
    migrate_refuse -.->|"transitions.guard"| migrate_refuse_already_migrated
    migrate_refuse -->|"transitions.to"| migrate_refused
    migrate_rekey_refuse -->|"transitions.from"| migrate_unwrapping
    migrate_rekey_refuse -.->|"transitions.guard"| migrate_rekey_refusals
    migrate_rekey_refuse -->|"transitions.to"| migrate_refused
    migrate_rekey_result -->|"transitions.from"| migrate_unwrapping
    migrate_rekey_result -.->|"transitions.guard"| migrate_rekey_derives_real_id
    migrate_rekey_result -->|"transitions.to"| migrate_rekeyed
    migrate_upgrade_applied -->|"transitions.from"| migrate_upgrading
    migrate_upgrade_applied -.->|"transitions.guard"| migrate_upgrade_steps_applied_in_order
    migrate_upgrade_applied -->|"transitions.to"| migrate_upgraded
    migrate_upgrade_begin -->|"transitions.from"| migrate_unwrapping
    migrate_upgrade_begin -.->|"transitions.guard"| migrate_upgrade_registry_core_owned
    migrate_upgrade_begin -->|"transitions.to"| migrate_upgrading
    migrate_upgrade_refuse -->|"transitions.from"| migrate_unwrapping
    migrate_upgrade_refuse -.->|"transitions.guard"| migrate_upgrade_unknown_revision_refused
    migrate_upgrade_refuse -->|"transitions.to"| migrate_refused
    migrate_verify_green -->|"transitions.from"| migrate_written
    migrate_verify_green -.->|"transitions.guard"| migrate_scaffold_lints_clean
    migrate_verify_green -->|"transitions.to"| migrate_written
    migrate_write_result -->|"transitions.from"| migrate_wrapping
    migrate_write_result -.->|"transitions.guard"| migrate_sidecar_generated
    migrate_write_result -->|"transitions.to"| migrate_written
  end
  subgraph sg_model_check["model.check"]
    direction LR
    model_check_activate["model.check.activate"]
    model_check_agreement_active(["model.check.agreement_active (fan-in 1)"])
    model_check_backend_agreement_ci["model.check.backend_agreement_ci (fan-in 1)"]
    model_check_citation_evaluated(["model.check.citation_evaluated (fan-in 2)"])
    model_check_citation_inert(["model.check.citation_inert (fan-in 1)"])
    model_check_guard_citation_evaluated["model.check.guard_citation_evaluated (fan-in 1)"]
    model_check_upgrade["model.check.upgrade"]
    model_check_activate -->|"transitions.from"| model_check_citation_evaluated
    model_check_activate -.->|"transitions.guard"| model_check_backend_agreement_ci
    model_check_activate -->|"transitions.to"| model_check_agreement_active
    model_check_upgrade -->|"transitions.from"| model_check_citation_inert
    model_check_upgrade -.->|"transitions.guard"| model_check_guard_citation_evaluated
    model_check_upgrade -->|"transitions.to"| model_check_citation_evaluated
  end
  subgraph sg_model_check_2["model_check"]
    direction LR
    model_check_begin["model_check.begin"]
    model_check_checker_invoked["model_check.checker_invoked (fan-in 1)"]
    model_check_claim_aggregate_governs["model_check.claim_aggregate_governs (fan-in 1)"]
    model_check_clean(["model_check.clean (fan-in 1)"])
    model_check_counterexample_found(["model_check.counterexample_found (fan-in 1)"])
    model_check_counterexample_is_minimal["model_check.counterexample_is_minimal (fan-in 1)"]
    model_check_counterexample_names_violated_invariant["model_check.counterexample_names_violated_invariant (fan-in 1)"]
    model_check_exhaustive_within_bound["model_check.exhaustive_within_bound (fan-in 2)"]
    model_check_exploration_only(["model_check.exploration_only (fan-in 1)"])
    model_check_finish_clean["model_check.finish_clean"]
    model_check_finish_exploration["model_check.finish_exploration"]
    model_check_finish_timeout["model_check.finish_timeout"]
    model_check_finish_violation["model_check.finish_violation"]
    model_check_not_run(["model_check.not_run (fan-in 1)"])
    model_check_running(["model_check.running (fan-in 5)"])
    model_check_timed_out(["model_check.timed_out (fan-in 1)"])
    model_check_begin -->|"transitions.from"| model_check_not_run
    model_check_begin -.->|"transitions.guard"| model_check_checker_invoked
    model_check_begin -->|"transitions.to"| model_check_running
    model_check_finish_clean -->|"transitions.from"| model_check_running
    model_check_finish_clean -.->|"transitions.guard"| model_check_claim_aggregate_governs
    model_check_finish_clean -.->|"transitions.guard"| model_check_exhaustive_within_bound
    model_check_finish_clean -->|"transitions.to"| model_check_clean
    model_check_finish_exploration -->|"transitions.from"| model_check_running
    model_check_finish_exploration -.->|"transitions.guard"| model_check_exhaustive_within_bound
    model_check_finish_exploration -->|"transitions.to"| model_check_exploration_only
    model_check_finish_timeout -->|"transitions.from"| model_check_running
    model_check_finish_timeout -->|"transitions.to"| model_check_timed_out
    model_check_finish_violation -->|"transitions.from"| model_check_running
    model_check_finish_violation -.->|"transitions.guard"| model_check_counterexample_is_minimal
    model_check_finish_violation -.->|"transitions.guard"| model_check_counterexample_names_violated_invariant
    model_check_finish_violation -->|"transitions.to"| model_check_counterexample_found
  end
  subgraph sg_numeric_predicates_pack["numeric.predicates.pack"]
    direction LR
    numeric_predicates_pack_deprecate["numeric.predicates.pack.deprecate"]
    numeric_predicates_pack_deprecated(["numeric.predicates.pack.deprecated (fan-in 1)"])
    numeric_predicates_pack_draft(["numeric.predicates.pack.draft (fan-in 1)"])
    numeric_predicates_pack_pack_file_declared["numeric.predicates.pack.pack_file_declared (fan-in 2)"]
    numeric_predicates_pack_publish["numeric.predicates.pack.publish"]
    numeric_predicates_pack_published(["numeric.predicates.pack.published (fan-in 2)"])
    numeric_predicates_pack_quantity_section_shape["numeric.predicates.pack.quantity_section_shape (fan-in 1)"]
    numeric_predicates_pack_deprecate -->|"transitions.from"| numeric_predicates_pack_published
    numeric_predicates_pack_deprecate -.->|"transitions.guard"| numeric_predicates_pack_pack_file_declared
    numeric_predicates_pack_deprecate -->|"transitions.to"| numeric_predicates_pack_deprecated
    numeric_predicates_pack_publish -->|"transitions.from"| numeric_predicates_pack_draft
    numeric_predicates_pack_publish -.->|"transitions.guard"| numeric_predicates_pack_pack_file_declared
    numeric_predicates_pack_publish -.->|"transitions.guard"| numeric_predicates_pack_quantity_section_shape
    numeric_predicates_pack_publish -->|"transitions.to"| numeric_predicates_pack_published
  end
  subgraph sg_observability["observability"]
    direction LR
    observability_approve["observability.approve"]
    observability_approved(["observability.approved (fan-in 2)"])
    observability_archive["observability.archive"]
    observability_archived(["observability.archived (fan-in 1)"])
    observability_implement["observability.implement"]
    observability_implemented(["observability.implemented (fan-in 2)"])
    observability_process_lifecycle["observability.process_lifecycle (fan-in 3)"]
    observability_proposed(["observability.proposed (fan-in 1)"])
    observability_approve -->|"transitions.from"| observability_proposed
    observability_approve -.->|"transitions.guard"| observability_process_lifecycle
    observability_approve -->|"transitions.to"| observability_approved
    observability_archive -->|"transitions.from"| observability_implemented
    observability_archive -.->|"transitions.guard"| observability_process_lifecycle
    observability_archive -->|"transitions.to"| observability_archived
    observability_implement -->|"transitions.from"| observability_approved
    observability_implement -.->|"transitions.guard"| observability_process_lifecycle
    observability_implement -->|"transitions.to"| observability_implemented
  end
  subgraph sg_orchestrate["orchestrate"]
    direction LR
    orchestrate_compile_fail["orchestrate.compile_fail"]
    orchestrate_compile_failed(["orchestrate.compile_failed (fan-in 1)"])
    orchestrate_compile_gate_matches_coverage["orchestrate.compile_gate_matches_coverage (fan-in 1)"]
    orchestrate_compile_ok["orchestrate.compile_ok"]
    orchestrate_compile_stage(["orchestrate.compile_stage (fan-in 3)"])
    orchestrate_dependency_respecting_skip["orchestrate.dependency_respecting_skip (fan-in 1)"]
    orchestrate_idle(["orchestrate.idle (fan-in 1)"])
    orchestrate_independent_branches_run_regardless["orchestrate.independent_branches_run_regardless (fan-in 1)"]
    orchestrate_lint_fail["orchestrate.lint_fail"]
    orchestrate_lint_failed(["orchestrate.lint_failed (fan-in 1)"])
    orchestrate_lint_gate_matches_checker_ownership["orchestrate.lint_gate_matches_checker_ownership (fan-in 1)"]
    orchestrate_lint_ok["orchestrate.lint_ok"]
    orchestrate_lint_stage(["orchestrate.lint_stage (fan-in 3)"])
    orchestrate_model_check_fail["orchestrate.model_check_fail"]
    orchestrate_model_check_failed(["orchestrate.model_check_failed (fan-in 1)"])
    orchestrate_model_check_ok["orchestrate.model_check_ok"]
    orchestrate_model_check_stage(["orchestrate.model_check_stage (fan-in 3)"])
    orchestrate_stage_order_fixed["orchestrate.stage_order_fixed (fan-in 2)"]
    orchestrate_start_lint["orchestrate.start_lint"]
    orchestrate_succeeded(["orchestrate.succeeded (fan-in 1)"])
    orchestrate_verify_fail["orchestrate.verify_fail"]
    orchestrate_verify_failed(["orchestrate.verify_failed (fan-in 1)"])
    orchestrate_verify_ok["orchestrate.verify_ok"]
    orchestrate_verify_stage(["orchestrate.verify_stage (fan-in 3)"])
    specodelic_parsed(["specodelic.parsed (fan-in 4)"])
    orchestrate_compile_fail -->|"transitions.from"| orchestrate_compile_stage
    orchestrate_compile_fail -->|"transitions.to"| orchestrate_compile_failed
    orchestrate_compile_ok -->|"transitions.from"| orchestrate_compile_stage
    orchestrate_compile_ok -.->|"transitions.guard"| orchestrate_compile_gate_matches_coverage
    orchestrate_compile_ok -->|"transitions.to"| orchestrate_model_check_stage
    orchestrate_lint_fail -->|"transitions.from"| orchestrate_lint_stage
    orchestrate_lint_fail -->|"transitions.to"| orchestrate_lint_failed
    orchestrate_lint_ok -->|"transitions.from"| orchestrate_lint_stage
    orchestrate_lint_ok -.->|"transitions.guard"| orchestrate_dependency_respecting_skip
    orchestrate_lint_ok -.->|"transitions.guard"| orchestrate_independent_branches_run_regardless
    orchestrate_lint_ok -.->|"transitions.guard"| orchestrate_lint_gate_matches_checker_ownership
    orchestrate_lint_ok -->|"transitions.to"| orchestrate_compile_stage
    orchestrate_model_check_fail -->|"transitions.from"| orchestrate_model_check_stage
    orchestrate_model_check_fail -->|"transitions.to"| orchestrate_model_check_failed
    orchestrate_model_check_ok -->|"transitions.from"| orchestrate_model_check_stage
    orchestrate_model_check_ok -.->|"transitions.guard"| orchestrate_stage_order_fixed
    orchestrate_model_check_ok -->|"transitions.to"| orchestrate_verify_stage
    orchestrate_start_lint -->|"transitions.from"| orchestrate_idle
    orchestrate_start_lint -.->|"transitions.guard"| specodelic_parsed
    orchestrate_start_lint -->|"transitions.to"| orchestrate_lint_stage
    orchestrate_verify_fail -->|"transitions.from"| orchestrate_verify_stage
    orchestrate_verify_fail -->|"transitions.to"| orchestrate_verify_failed
    orchestrate_verify_ok -->|"transitions.from"| orchestrate_verify_stage
    orchestrate_verify_ok -.->|"transitions.guard"| orchestrate_stage_order_fixed
    orchestrate_verify_ok -->|"transitions.to"| orchestrate_succeeded
  end
  subgraph sg_packs["packs"]
    direction LR
    packs_deprecate["packs.deprecate"]
    packs_deprecated(["packs.deprecated (fan-in 1)"])
    packs_draft(["packs.draft (fan-in 1)"])
    packs_lifecycle_labeled["packs.lifecycle_labeled (fan-in 1)"]
    packs_manifest_six_tables["packs.manifest_six_tables (fan-in 1)"]
    packs_pack_is_profile_file["packs.pack_is_profile_file (fan-in 1)"]
    packs_publish["packs.publish"]
    packs_published(["packs.published (fan-in 2)"])
    packs_deprecate -->|"transitions.from"| packs_published
    packs_deprecate -.->|"transitions.guard"| packs_lifecycle_labeled
    packs_deprecate -->|"transitions.to"| packs_deprecated
    packs_publish -->|"transitions.from"| packs_draft
    packs_publish -.->|"transitions.guard"| packs_manifest_six_tables
    packs_publish -.->|"transitions.guard"| packs_pack_is_profile_file
    packs_publish -->|"transitions.to"| packs_published
  end
  subgraph sg_parse["parse"]
    direction LR
    parse_C_parse_envelope["parse.C-parse-envelope (fan-in 1)"]
    parse_C_parse_ir["parse.C-parse-ir (fan-in 2)"]
    parse_emitted(["parse.emitted (fan-in 1)"])
    parse_failed(["parse.failed (fan-in 1)"])
    parse_parsed(["parse.parsed (fan-in 2)"])
    parse_reading(["parse.reading (fan-in 2)"])
    parse_t_emit["parse.t-emit"]
    parse_t_fail["parse.t-fail"]
    parse_t_parse["parse.t-parse"]
    parse_t_emit -->|"transitions.from"| parse_parsed
    parse_t_emit -.->|"transitions.guard"| parse_C_parse_envelope
    parse_t_emit -->|"transitions.to"| parse_emitted
    parse_t_fail -->|"transitions.from"| parse_reading
    parse_t_fail -.->|"transitions.guard"| parse_C_parse_ir
    parse_t_fail -->|"transitions.to"| parse_failed
    parse_t_parse -->|"transitions.from"| parse_reading
    parse_t_parse -.->|"transitions.guard"| parse_C_parse_ir
    parse_t_parse -->|"transitions.to"| parse_parsed
  end
  subgraph sg_quant_finance_pack["quant.finance.pack"]
    direction LR
    quant_finance_pack_deprecate["quant.finance.pack.deprecate"]
    quant_finance_pack_deprecated(["quant.finance.pack.deprecated (fan-in 1)"])
    quant_finance_pack_draft(["quant.finance.pack.draft (fan-in 1)"])
    quant_finance_pack_limits_section_shape["quant.finance.pack.limits_section_shape (fan-in 1)"]
    quant_finance_pack_pack_file_declared["quant.finance.pack.pack_file_declared (fan-in 2)"]
    quant_finance_pack_publish["quant.finance.pack.publish"]
    quant_finance_pack_published(["quant.finance.pack.published (fan-in 2)"])
    quant_finance_pack_deprecate -->|"transitions.from"| quant_finance_pack_published
    quant_finance_pack_deprecate -.->|"transitions.guard"| quant_finance_pack_pack_file_declared
    quant_finance_pack_deprecate -->|"transitions.to"| quant_finance_pack_deprecated
    quant_finance_pack_publish -->|"transitions.from"| quant_finance_pack_draft
    quant_finance_pack_publish -.->|"transitions.guard"| quant_finance_pack_limits_section_shape
    quant_finance_pack_publish -.->|"transitions.guard"| quant_finance_pack_pack_file_declared
    quant_finance_pack_publish -->|"transitions.to"| quant_finance_pack_published
  end
  subgraph sg_refactor["refactor"]
    direction LR
    graph_queryable(["graph.queryable (fan-in 3)"])
    refactor_analyze["refactor.analyze"]
    refactor_analyzing(["refactor.analyzing (fan-in 3)"])
    refactor_clean(["refactor.clean (fan-in 1)"])
    refactor_clear["refactor.clear"]
    refactor_flag["refactor.flag"]
    refactor_found(["refactor.found (fan-in 1)"])
    refactor_idle(["refactor.idle (fan-in 1)"])
    refactor_narrow_diff_heuristic["refactor.narrow_diff_heuristic (fan-in 1)"]
    refactor_unrelated_fan_in_defined["refactor.unrelated_fan_in_defined (fan-in 1)"]
    refactor_analyze -->|"transitions.from"| refactor_idle
    refactor_analyze -.->|"transitions.guard"| graph_queryable
    refactor_analyze -->|"transitions.to"| refactor_analyzing
    refactor_clear -->|"transitions.from"| refactor_analyzing
    refactor_clear -->|"transitions.to"| refactor_clean
    refactor_flag -->|"transitions.from"| refactor_analyzing
    refactor_flag -.->|"transitions.guard"| refactor_narrow_diff_heuristic
    refactor_flag -.->|"transitions.guard"| refactor_unrelated_fan_in_defined
    refactor_flag -->|"transitions.to"| refactor_found
  end
  subgraph sg_rename["rename"]
    direction LR
    linter_graph_shape_acyclic["linter.graph_shape.acyclic (fan-in 4)"]
    linter_referential_integrity_ref_resolves["linter.referential_integrity.ref_resolves (fan-in 4)"]
    rename_accept["rename.accept"]
    rename_applied(["rename.applied (fan-in 2)"])
    rename_apply["rename.apply"]
    rename_apply_fail["rename.apply_fail"]
    rename_apply_failed(["rename.apply_failed (fan-in 1)"])
    rename_apply_ok["rename.apply_ok"]
    rename_applying(["rename.applying (fan-in 3)"])
    rename_atomic_operation["rename.atomic_operation (fan-in 1)"]
    rename_check_failed(["rename.check_failed (fan-in 1)"])
    rename_checked(["rename.checked (fan-in 2)"])
    rename_kind_unchanged["rename.kind_unchanged (fan-in 2)"]
    rename_new_id_available["rename.new_id_available (fan-in 2)"]
    rename_new_id_matches_filename["rename.new_id_matches_filename (fan-in 2)"]
    rename_old_id_fully_replaced["rename.old_id_fully_replaced (fan-in 2)"]
    rename_passed(["rename.passed (fan-in 1)"])
    rename_prose_untouched_by_rename["rename.prose_untouched_by_rename (fan-in 2)"]
    rename_reject["rename.reject"]
    rename_requested(["rename.requested (fan-in 2)"])
    rename_validate["rename.validate"]
    rename_validate_fail["rename.validate_fail"]
    rename_validate_failed(["rename.validate_failed (fan-in 1)"])
    rename_verify["rename.verify"]
    rename_verifying(["rename.verifying (fan-in 3)"])
    rename_accept -->|"transitions.from"| rename_verifying
    rename_accept -.->|"transitions.guard"| linter_graph_shape_acyclic
    rename_accept -.->|"transitions.guard"| linter_referential_integrity_ref_resolves
    rename_accept -->|"transitions.to"| rename_passed
    rename_apply -->|"transitions.from"| rename_checked
    rename_apply -.->|"transitions.guard"| rename_atomic_operation
    rename_apply -->|"transitions.to"| rename_applying
    rename_apply_fail -->|"transitions.from"| rename_applying
    rename_apply_fail -.->|"transitions.guard"| rename_kind_unchanged
    rename_apply_fail -.->|"transitions.guard"| rename_old_id_fully_replaced
    rename_apply_fail -.->|"transitions.guard"| rename_prose_untouched_by_rename
    rename_apply_fail -->|"transitions.to"| rename_apply_failed
    rename_apply_ok -->|"transitions.from"| rename_applying
    rename_apply_ok -.->|"transitions.guard"| rename_kind_unchanged
    rename_apply_ok -.->|"transitions.guard"| rename_old_id_fully_replaced
    rename_apply_ok -.->|"transitions.guard"| rename_prose_untouched_by_rename
    rename_apply_ok -->|"transitions.to"| rename_applied
    rename_reject -->|"transitions.from"| rename_verifying
    rename_reject -.->|"transitions.guard"| linter_graph_shape_acyclic
    rename_reject -.->|"transitions.guard"| linter_referential_integrity_ref_resolves
    rename_reject -->|"transitions.to"| rename_check_failed
    rename_validate -->|"transitions.from"| rename_requested
    rename_validate -.->|"transitions.guard"| rename_new_id_available
    rename_validate -.->|"transitions.guard"| rename_new_id_matches_filename
    rename_validate -->|"transitions.to"| rename_checked
    rename_validate_fail -->|"transitions.from"| rename_requested
    rename_validate_fail -.->|"transitions.guard"| rename_new_id_available
    rename_validate_fail -.->|"transitions.guard"| rename_new_id_matches_filename
    rename_validate_fail -->|"transitions.to"| rename_validate_failed
    rename_verify -->|"transitions.from"| rename_applied
    rename_verify -->|"transitions.to"| rename_verifying
  end
  subgraph sg_scenario_rollout["scenario.rollout"]
    direction LR
    scenario_rollout_drift_reported(["scenario.rollout.drift_reported (fan-in 1)"])
    scenario_rollout_recipe_byte_stable["scenario.rollout.recipe_byte_stable (fan-in 1)"]
    scenario_rollout_render_twice["scenario.rollout.render_twice"]
    scenario_rollout_rendered_stable(["scenario.rollout.rendered_stable (fan-in 1)"])
    scenario_rollout_report_drift["scenario.rollout.report_drift"]
    scenario_rollout_unrendered(["scenario.rollout.unrendered (fan-in 2)"])
    scenario_rollout_render_twice -->|"transitions.from"| scenario_rollout_unrendered
    scenario_rollout_render_twice -.->|"transitions.guard"| scenario_rollout_recipe_byte_stable
    scenario_rollout_render_twice -->|"transitions.to"| scenario_rollout_rendered_stable
    scenario_rollout_report_drift -->|"transitions.from"| scenario_rollout_unrendered
    scenario_rollout_report_drift -->|"transitions.to"| scenario_rollout_drift_reported
  end
  subgraph sg_skill_pack["skill.pack"]
    direction LR
    skill_pack_doctor_flags_staleness["skill.pack.doctor_flags_staleness (fan-in 1)"]
    skill_pack_drift["skill.pack.drift"]
    skill_pack_embedded_single_source["skill.pack.embedded_single_source (fan-in 1)"]
    skill_pack_example_lints_clean["skill.pack.example_lints_clean (fan-in 1)"]
    skill_pack_generate["skill.pack.generate"]
    skill_pack_generated(["skill.pack.generated (fan-in 3)"])
    skill_pack_install["skill.pack.install"]
    skill_pack_install_writes_and_reports["skill.pack.install_writes_and_reports (fan-in 3)"]
    skill_pack_installed(["skill.pack.installed (fan-in 3)"])
    skill_pack_marker_marks_every_install["skill.pack.marker_marks_every_install (fan-in 1)"]
    skill_pack_mentions_membership_tested["skill.pack.mentions_membership_tested (fan-in 1)"]
    skill_pack_refresh["skill.pack.refresh"]
    skill_pack_refuse["skill.pack.refuse"]
    skill_pack_refused(["skill.pack.refused (fan-in 1)"])
    skill_pack_stale(["skill.pack.stale (fan-in 2)"])
    skill_pack_tracked(["skill.pack.tracked (fan-in 1)"])
    skill_pack_drift -->|"transitions.from"| skill_pack_installed
    skill_pack_drift -.->|"transitions.guard"| skill_pack_doctor_flags_staleness
    skill_pack_drift -->|"transitions.to"| skill_pack_stale
    skill_pack_generate -->|"transitions.from"| skill_pack_tracked
    skill_pack_generate -.->|"transitions.guard"| skill_pack_embedded_single_source
    skill_pack_generate -.->|"transitions.guard"| skill_pack_example_lints_clean
    skill_pack_generate -.->|"transitions.guard"| skill_pack_mentions_membership_tested
    skill_pack_generate -->|"transitions.to"| skill_pack_generated
    skill_pack_install -->|"transitions.from"| skill_pack_generated
    skill_pack_install -.->|"transitions.guard"| skill_pack_install_writes_and_reports
    skill_pack_install -.->|"transitions.guard"| skill_pack_marker_marks_every_install
    skill_pack_install -->|"transitions.to"| skill_pack_installed
    skill_pack_refresh -->|"transitions.from"| skill_pack_stale
    skill_pack_refresh -.->|"transitions.guard"| skill_pack_install_writes_and_reports
    skill_pack_refresh -->|"transitions.to"| skill_pack_installed
    skill_pack_refuse -->|"transitions.from"| skill_pack_generated
    skill_pack_refuse -.->|"transitions.guard"| skill_pack_install_writes_and_reports
    skill_pack_refuse -->|"transitions.to"| skill_pack_refused
  end
  subgraph sg_spec_integration["spec.integration"]
    direction LR
    spec_integration_both_parsers_accept["spec.integration.both_parsers_accept (fan-in 1)"]
    spec_integration_deploy_pair["spec.integration.deploy_pair"]
    spec_integration_deployed(["spec.integration.deployed (fan-in 2)"])
    spec_integration_deployed_shape_closed["spec.integration.deployed_shape_closed (fan-in 1)"]
    spec_integration_duplicate_corpus_identity["spec.integration.duplicate_corpus_identity (fan-in 1)"]
    spec_integration_gate["spec.integration.gate"]
    spec_integration_gated(["spec.integration.gated (fan-in 1)"])
    spec_integration_plain_delta(["spec.integration.plain_delta (fan-in 1)"])
    spec_integration_plain_deltas_carried["spec.integration.plain_deltas_carried (fan-in 1)"]
    spec_integration_deploy_pair -->|"transitions.from"| spec_integration_plain_delta
    spec_integration_deploy_pair -.->|"transitions.guard"| spec_integration_both_parsers_accept
    spec_integration_deploy_pair -.->|"transitions.guard"| spec_integration_plain_deltas_carried
    spec_integration_deploy_pair -->|"transitions.to"| spec_integration_deployed
    spec_integration_gate -->|"transitions.from"| spec_integration_deployed
    spec_integration_gate -.->|"transitions.guard"| spec_integration_deployed_shape_closed
    spec_integration_gate -.->|"transitions.guard"| spec_integration_duplicate_corpus_identity
    spec_integration_gate -->|"transitions.to"| spec_integration_gated
  end
  subgraph sg_specodelic["specodelic"]
    direction LR
    specodelic_compile["specodelic.compile"]
    specodelic_compiled(["specodelic.compiled (fan-in 2)"])
    specodelic_coverage["specodelic.coverage (fan-in 1)"]
    specodelic_draft(["specodelic.draft (fan-in 1)"])
    specodelic_frontmatter_valid["specodelic.frontmatter_valid (fan-in 1)"]
    specodelic_id_matches_file["specodelic.id_matches_file (fan-in 1)"]
    specodelic_law_requires_cases["specodelic.law_requires_cases (fan-in 1)"]
    specodelic_lint["specodelic.lint"]
    specodelic_linted(["specodelic.linted (fan-in 2)"])
    specodelic_model_check["specodelic.model_check"]
    specodelic_model_checked(["specodelic.model_checked (fan-in 2)"])
    specodelic_model_present["specodelic.model_present (fan-in 1)"]
    specodelic_no_counterexample["specodelic.no_counterexample (fan-in 1)"]
    specodelic_parse["specodelic.parse"]
    specodelic_parsed(["specodelic.parsed (fan-in 4)"])
    specodelic_properties_pass["specodelic.properties_pass (fan-in 1)"]
    specodelic_verified(["specodelic.verified (fan-in 1)"])
    specodelic_verify["specodelic.verify"]
    specodelic_compile -->|"transitions.from"| specodelic_linted
    specodelic_compile -.->|"transitions.guard"| specodelic_coverage
    specodelic_compile -.->|"transitions.guard"| specodelic_law_requires_cases
    specodelic_compile -->|"transitions.to"| specodelic_compiled
    specodelic_lint -->|"transitions.from"| specodelic_parsed
    specodelic_lint -->|"transitions.to"| specodelic_linted
    specodelic_model_check -->|"transitions.from"| specodelic_compiled
    specodelic_model_check -.->|"transitions.guard"| specodelic_model_present
    specodelic_model_check -->|"transitions.to"| specodelic_model_checked
    specodelic_parse -->|"transitions.from"| specodelic_draft
    specodelic_parse -.->|"transitions.guard"| specodelic_frontmatter_valid
    specodelic_parse -.->|"transitions.guard"| specodelic_id_matches_file
    specodelic_parse -->|"transitions.to"| specodelic_parsed
    specodelic_verify -->|"transitions.from"| specodelic_model_checked
    specodelic_verify -.->|"transitions.guard"| specodelic_no_counterexample
    specodelic_verify -.->|"transitions.guard"| specodelic_properties_pass
    specodelic_verify -->|"transitions.to"| specodelic_verified
  end
  subgraph sg_svc_contracts_pack["svc.contracts.pack"]
    direction LR
    svc_contracts_pack_deprecate["svc.contracts.pack.deprecate"]
    svc_contracts_pack_deprecated(["svc.contracts.pack.deprecated (fan-in 1)"])
    svc_contracts_pack_draft(["svc.contracts.pack.draft (fan-in 1)"])
    svc_contracts_pack_interfaces_section_shape["svc.contracts.pack.interfaces_section_shape (fan-in 1)"]
    svc_contracts_pack_pack_file_declared["svc.contracts.pack.pack_file_declared (fan-in 2)"]
    svc_contracts_pack_publish["svc.contracts.pack.publish"]
    svc_contracts_pack_published(["svc.contracts.pack.published (fan-in 2)"])
    svc_contracts_pack_deprecate -->|"transitions.from"| svc_contracts_pack_published
    svc_contracts_pack_deprecate -.->|"transitions.guard"| svc_contracts_pack_pack_file_declared
    svc_contracts_pack_deprecate -->|"transitions.to"| svc_contracts_pack_deprecated
    svc_contracts_pack_publish -->|"transitions.from"| svc_contracts_pack_draft
    svc_contracts_pack_publish -.->|"transitions.guard"| svc_contracts_pack_interfaces_section_shape
    svc_contracts_pack_publish -.->|"transitions.guard"| svc_contracts_pack_pack_file_declared
    svc_contracts_pack_publish -->|"transitions.to"| svc_contracts_pack_published
  end
  subgraph sg_verification_claims["verification.claims"]
    direction LR
    verification_claims_approve["verification.claims.approve"]
    verification_claims_approved(["verification.claims.approved (fan-in 2)"])
    verification_claims_deploy["verification.claims.deploy"]
    verification_claims_deployed(["verification.claims.deployed (fan-in 1)"])
    verification_claims_implement["verification.claims.implement"]
    verification_claims_implemented(["verification.claims.implemented (fan-in 2)"])
    verification_claims_process_lifecycle["verification.claims.process_lifecycle (fan-in 3)"]
    verification_claims_proposed(["verification.claims.proposed (fan-in 1)"])
    verification_claims_trust_base_derived["verification.claims.trust_base_derived (fan-in 1)"]
    verification_claims_trust_base_versioned["verification.claims.trust_base_versioned (fan-in 1)"]
    verification_claims_trust_base_views_agree["verification.claims.trust_base_views_agree (fan-in 1)"]
    verification_claims_approve -->|"transitions.from"| verification_claims_proposed
    verification_claims_approve -.->|"transitions.guard"| verification_claims_process_lifecycle
    verification_claims_approve -->|"transitions.to"| verification_claims_approved
    verification_claims_deploy -->|"transitions.from"| verification_claims_implemented
    verification_claims_deploy -.->|"transitions.guard"| verification_claims_process_lifecycle
    verification_claims_deploy -.->|"transitions.guard"| verification_claims_trust_base_derived
    verification_claims_deploy -.->|"transitions.guard"| verification_claims_trust_base_versioned
    verification_claims_deploy -.->|"transitions.guard"| verification_claims_trust_base_views_agree
    verification_claims_deploy -->|"transitions.to"| verification_claims_deployed
    verification_claims_implement -->|"transitions.from"| verification_claims_approved
    verification_claims_implement -.->|"transitions.guard"| verification_claims_process_lifecycle
    verification_claims_implement -->|"transitions.to"| verification_claims_implemented
  end
  subgraph sg_verify["verify"]
    direction LR
    verify_accept["verify.accept"]
    verify_begin["verify.begin"]
    verify_blocks_run_to_completion["verify.blocks_run_to_completion (fan-in 1)"]
    verify_both_gates_required["verify.both_gates_required (fan-in 2)"]
    verify_evaluate["verify.evaluate"]
    verify_evidence_scope_bound["verify.evidence_scope_bound (fan-in 2)"]
    verify_failed(["verify.failed (fan-in 1)"])
    verify_law_cases_unexecuted["verify.law_cases_unexecuted (fan-in 2)"]
    verify_not_run(["verify.not_run (fan-in 1)"])
    verify_properties_evaluated(["verify.properties_evaluated (fan-in 3)"])
    verify_properties_pass_reflects_latest_run["verify.properties_pass_reflects_latest_run (fan-in 2)"]
    verify_reject["verify.reject"]
    verify_required_claims_govern_acceptance["verify.required_claims_govern_acceptance (fan-in 2)"]
    verify_route["verify.route"]
    verify_routed(["verify.routed (fan-in 2)"])
    verify_routed_artifact_resolution["verify.routed_artifact_resolution (fan-in 1)"]
    verify_running(["verify.running (fan-in 2)"])
    verify_unique_stem_layout_stable["verify.unique_stem_layout_stable (fan-in 1)"]
    verify_verified(["verify.verified (fan-in 1)"])
    verify_accept -->|"transitions.from"| verify_properties_evaluated
    verify_accept -.->|"transitions.guard"| verify_both_gates_required
    verify_accept -.->|"transitions.guard"| verify_evidence_scope_bound
    verify_accept -.->|"transitions.guard"| verify_law_cases_unexecuted
    verify_accept -.->|"transitions.guard"| verify_properties_pass_reflects_latest_run
    verify_accept -.->|"transitions.guard"| verify_required_claims_govern_acceptance
    verify_accept -->|"transitions.to"| verify_verified
    verify_begin -->|"transitions.from"| verify_routed
    verify_begin -.->|"transitions.guard"| verify_blocks_run_to_completion
    verify_begin -->|"transitions.to"| verify_running
    verify_evaluate -->|"transitions.from"| verify_running
    verify_evaluate -->|"transitions.to"| verify_properties_evaluated
    verify_reject -->|"transitions.from"| verify_properties_evaluated
    verify_reject -.->|"transitions.guard"| verify_both_gates_required
    verify_reject -.->|"transitions.guard"| verify_evidence_scope_bound
    verify_reject -.->|"transitions.guard"| verify_law_cases_unexecuted
    verify_reject -.->|"transitions.guard"| verify_properties_pass_reflects_latest_run
    verify_reject -.->|"transitions.guard"| verify_required_claims_govern_acceptance
    verify_reject -->|"transitions.to"| verify_failed
    verify_route -->|"transitions.from"| verify_not_run
    verify_route -.->|"transitions.guard"| verify_routed_artifact_resolution
    verify_route -.->|"transitions.guard"| verify_unique_stem_layout_stable
    verify_route -->|"transitions.to"| verify_routed
  end

Traceability — file dependencies

graph_views.py trace: every edge collapsed to its owning intent, cross-file dependencies deduped, fan-in annotated per intent.

%% traceability view — derived from spk graph --format edges (edges collapsed to owning intents; fan-in over distinct source intents per D2)
flowchart LR
  acset_core["acset.core"]
  acset_writer["acset.writer"]
  archive_companion["archive.companion"]
  audit["audit"]
  bioimage_data_pack["bioimage.data.pack"]
  check["check"]
  compile["compile (fan-in 1)"]
  conform["conform"]
  data_lineage_pack["data.lineage.pack"]
  docs_site["docs.site"]
  doctor["doctor"]
  embedded_guide["embedded.guide"]
  empirical_registry_pack["empirical.registry.pack"]
  error_contract["error.contract"]
  errors["errors (fan-in 17)"]
  graph["graph (fan-in 2)"]
  graph_views["graph.views"]
  hooks["hooks"]
  kernel["kernel"]
  kinds["kinds (fan-in 1)"]
  lint_findings["lint.findings"]
  linter_content_advisories["linter.content_advisories"]
  linter_coverage["linter.coverage (fan-in 1)"]
  linter_ears_syntax["linter.ears_syntax (fan-in 1)"]
  linter_external_completeness["linter.external_completeness (fan-in 1)"]
  linter_failure_shape["linter.failure_shape (fan-in 1)"]
  linter_frontmatter["linter.frontmatter (fan-in 1)"]
  linter_graph_shape["linter.graph_shape (fan-in 2)"]
  linter_model_shape["linter.model_shape (fan-in 1)"]
  linter_observability["linter.observability"]
  linter_referential_integrity["linter.referential_integrity (fan-in 2)"]
  linter_scenario_bindings["linter.scenario_bindings"]
  linter_scenario_reconciliation["linter.scenario_reconciliation"]
  linter_schema_shape["linter.schema_shape (fan-in 1)"]
  merge["merge (fan-in 1)"]
  migrate["migrate"]
  model_check["model.check"]
  model_check_2["model_check"]
  numeric_predicates_pack["numeric.predicates.pack"]
  observability["observability"]
  orchestrate["orchestrate (fan-in 1)"]
  packs["packs"]
  parse["parse"]
  quant_finance_pack["quant.finance.pack"]
  refactor["refactor"]
  rename["rename (fan-in 1)"]
  scenario_rollout["scenario.rollout"]
  skill_pack["skill.pack"]
  spec_integration["spec.integration"]
  specodelic["specodelic (fan-in 5)"]
  svc_contracts_pack["svc.contracts.pack"]
  verification_claims["verification.claims"]
  verify["verify (fan-in 1)"]
  check --> errors
  compile --> errors
  errors --> compile
  errors --> graph
  errors --> kinds
  errors --> linter_coverage
  errors --> linter_ears_syntax
  errors --> linter_external_completeness
  errors --> linter_failure_shape
  errors --> linter_frontmatter
  errors --> linter_graph_shape
  errors --> linter_model_shape
  errors --> linter_referential_integrity
  errors --> linter_schema_shape
  errors --> merge
  errors --> orchestrate
  errors --> rename
  errors --> verify
  graph --> errors
  graph --> specodelic
  kinds --> errors
  linter_coverage --> errors
  linter_coverage --> specodelic
  linter_ears_syntax --> errors
  linter_external_completeness --> errors
  linter_external_completeness --> specodelic
  linter_failure_shape --> errors
  linter_frontmatter --> errors
  linter_graph_shape --> errors
  linter_model_shape --> errors
  linter_referential_integrity --> errors
  linter_referential_integrity --> specodelic
  linter_schema_shape --> errors
  merge --> errors
  orchestrate --> errors
  orchestrate --> specodelic
  refactor --> graph
  rename --> errors
  rename --> linter_graph_shape
  rename --> linter_referential_integrity
  verify --> errors

The typing diagram — revision-labeled

graph_views.py schema: the Reference Typing table (which reference field may point at what), rendered from the versioned acset Schema export (spk guide --schema --json) alone. The label carries the format revision the export was generated at (format_revision) — a diagram labeled Revision 17 was rendered from a Revision 17 binary.

%% schema view — derived from the acset Schema export (format revision: specodelic.md Revision 24)
flowchart LR
  schema["schema — specodelic.md Revision 24"]
  Constraint["Constraint"]
  Intent["Intent"]
  Property["Property"]
  State["State"]
  Transition["Transition"]
  scenario_binding["scenario_binding"]
  Constraint -- "observes [target=effect]" --> Constraint
  Constraint -- "satisfies [target=extension_point]" --> Constraint
  Constraint -- "supersedes" --> Constraint
  Constraint -- "traces_to" --> Intent
  Constraint -- "uses [target=profile]" --> Intent
  Property -- "derives_from" --> Constraint
  Property -- "derives_from_law (column: derives_from) [source=law]" --> Property
  Property -- "supersedes" --> Property
  State -- "emits [target=effect]" --> Constraint
  Transition -- "from" --> State
  Transition -- "guard [target=invariant]" --> Constraint
  Transition -- "guard_state (column: guard)" --> State
  Transition -- "to" --> State
  scenario_binding -- "asserts" --> State
  scenario_binding -- "given" --> State
  scenario_binding -- "on" --> Transition
  scenario_binding -- "verifies" --> Constraint

Whole-corpus terminal view

The complete corpus projection — every typed reference edge, same visual grammar (solid = state machine, dashed = guards, dotted = traceability) — rendered through gently --as ascii at build time:

gently could not render the whole-corpus projection — a labeled note, never a silently clean artifact; regenerate once upstream layout fixes land (repro: spk graph openspec/specs --format dot | gently --as ascii)

Rebuilding the views

The views live in docs/src/views/ (gitignored — build-time artifacts, never committed; if they disagree with the corpus, the corpus wins and they get regenerated). just docs-graphs regenerates all four — plus the two ASCII renderings (wiring.ascii, graph.ascii; a missing gently degrades to a labeled note, never a silently clean artifact) — before the docs build; the same commands by hand:

spk graph specs --format edges > edges.tsv
spk graph specs --json > graph.json
spk guide --schema --json > schema.json
python3 scripts/graph_views.py schema schema.json
python3 scripts/graph_views.py states edges.tsv --graph graph.json
python3 scripts/graph_views.py trace edges.tsv --graph graph.json
spk graph specs --view wiring --format mermaid > wiring.md

The DOT projections render externally (add-graph-views D8) — into Graphviz, or into the family’s native Graph::Easy port:

spk graph openspec/specs --format dot | dot -Tsvg > graph.svg
spk graph openspec/specs --format dot | gently --as ascii   # in-terminal diagram
spk graph openspec/specs --format dot | gently --as html    # styled table markup

gently parses the DOT projection natively (--as picks the format); rendering stays a user-chosen pipe — spk never shells out to a renderer (decision record: openspec/decisions/2026-10-16-gently-render-boundary.md).

For your own corpora, the one-pipe render recipes are in spk explain graph-views.

linter.frontmatter


id: linter.frontmatter kind: intent statement: “WHEN a spec file is parsed, THE linter SHALL reject it unless its frontmatter declares id, kind, and statement, with kind equal to intent.”

Linter: Frontmatter Check

The first gate every spec file passes through. Every other linter check assumes this one already succeeded — a file with no valid id has nothing for later checks to key off of.

Purpose

The first gate every spec file passes through. Every other linter check assumes this one already succeeded — a file with no valid id has nothing for later checks to key off of.

Constraints

| id | kind | expr | traces_to | satisfies | |——————|———–|–––––––––––––––––––––––––––––––––––|————————————| | has_id | invariant | frontmatter.id != null and matches(id, /^[a-z][a-z0-9_.]*$/) | [[linter.frontmatter]] | | | has_kind | invariant | frontmatter.kind == "intent" | [[linter.frontmatter]] | | | has_statement | invariant | frontmatter.statement != null and len(statement) > 0 | [[linter.frontmatter]] | | | id_matches_file | invariant | frontmatter.id == expected_id_from_path(path) — spec.md derives from its parent directory, any other file from its stem (Revision 18) | [[linter.frontmatter]] | | | check_failure | effect | linter.frontmatter.check_failure(detail) | [[linter.frontmatter]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • unchecked
  • checking
  • passed
  • failed (emits: [[linter.frontmatter.check_failure]])

Transitions

idfromtoguard
beginuncheckedcheckingfile exists and is UTF-8 markdown
acceptcheckingpassed[[linter.frontmatter.has_id]] ∧ [[linter.frontmatter.has_kind]] ∧ [[linter.frontmatter.has_statement]] ∧ [[linter.frontmatter.id_matches_file]]
rejectcheckingfailed¬([[linter.frontmatter.has_id]] ∧ [[linter.frontmatter.has_kind]] ∧ [[linter.frontmatter.has_statement]] ∧ [[linter.frontmatter.id_matches_file]])

Properties

idkindderives_fromgeneratorpredicate
missing_id_rejectedunit[[linter.frontmatter.has_id]]frontmatter_without("id")check(frontmatter) == failed
wrong_kind_rejectedunit[[linter.frontmatter.has_kind]]frontmatter_with_kind(≠ "intent")check(frontmatter) == failed
valid_passesunit[[linter.frontmatter.has_id]]arbitrary_valid_frontmatter()check(frontmatter) == passed
filename_mismatchunit[[linter.frontmatter.id_matches_file]](id, path) pairs where id ≠ expected_id_from_path(path) (stem files, spec.md files under their capability directory, and bare spec.md all covered)check(id, path) == failed
missing_statement_rejectedunit[[linter.frontmatter.has_statement]]frontmatter_without("statement") and frontmatter_with(statement: "")check(frontmatter) == failed — absent and empty are both rejections
check_failure_label_assertedunit[[linter.frontmatter.check_failure]]check_failure_raised()error_label == "linter.frontmatter.check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

Reference-typing reconciliation (2026-09-30, specodelic-cxq): the Constraints table’s traces_to cells previously pointed at the specodelic.md rows these checks re-own — a Constraint→Constraint target, which the Reference Typing table forbids (traces_to resolves to Intent only). Each now traces to this file’s own intent: specodelic.md keeps the corpus-wide statement of record, this file owns the checkable one (the “same claim, two altitudes” pattern the Notes below already use).

Revision 18 (specodelic-mcy, 2026-10-08): id_matches_file’s expected_id_from_filename(path) became expected_id_from_path(path) — a file named spec.md (the openspec-mandated filename) derives its expected id from its PARENT DIRECTORY name, so a single-tree openspec/specs/<cap>/spec.md layout carries real ids and id: spec retires (it survives only as the stem-fallback for a bare spec.md with no parent directory). The gap flagged below is long resolved: specodelic.md’s Constraints table has carried the invariant since Revision 2, and it applies to every spec file, top-level or not.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: missing_id_rejected

  • WHEN frontmatter_without("id")
  • THEN check(frontmatter) == failed
  • VERIFIES [[linter.frontmatter.missing_id_rejected]]

Scenario: wrong_kind_rejected

  • WHEN frontmatter_with_kind(≠ "intent")
  • THEN check(frontmatter) == failed
  • VERIFIES [[linter.frontmatter.wrong_kind_rejected]]

Scenario: valid_passes

  • WHEN arbitrary_valid_frontmatter()
  • THEN check(frontmatter) == passed
  • VERIFIES [[linter.frontmatter.valid_passes]]

Scenario: filename_mismatch

  • WHEN (id, path) pairs where id ≠ expected_id_from_path(path) (stem files, spec.md files under their capability directory, and bare spec.md all covered)
  • THEN check(id, path) == failed
  • VERIFIES [[linter.frontmatter.filename_mismatch]]

Scenario: missing_statement_rejected

  • WHEN frontmatter_without("statement") and frontmatter_with(statement: "")
  • THEN check(frontmatter) == failed — absent and empty are both rejections
  • VERIFIES [[linter.frontmatter.missing_statement_rejected]]

Scenario: check_failure_label_asserted

  • WHEN check_failure_raised()
  • THEN error_label == "linter.frontmatter.check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.frontmatter.check_failure_label_asserted]]

linter.schema_shape


id: linter.schema_shape kind: intent statement: “WHEN a spec file’s frontmatter has passed, THE linter SHALL reject it if any 𝒦-governed id-set (a variant table, a Constraint/Property kind value-set, or the Reference Typing table’s field set) shrinks, reorders, or silently retypes an existing member across revisions, if a Constraint or Property row’s own kind value falls outside its closed set, or if the parser has touched content inside a rationale/description field.”

Linter: Schema Shape Check

Runs after linter.frontmatter only, in parallel with linter.ears_syntax and the referential/graph/model branch — per specodelic.md’s Checker Ownership table, this checker and linter.ears_syntax are independent terminal nodes that both feed into linted, not a sequential continuation of one another.

Note this checker’s scope narrowed relative to its first mention in the decomposition plan: no_boolean_columns ended up owned by linter-model_shape.md instead, scoped specifically to state/transition rows where a boolean column would actually manifest as an ad-hoc state machine. What’s left here is schema evolution discipline (append_only_variants), the closed-set discipline on the kind column that Constraint and Property rows each separately carry (see kinds.md), and the parser’s own restraint around prose (prose_untouched) — three properties about how the tooling behaves across time, across the kind column specifically, and across fields generally, rather than about any single file’s current shape.

Purpose

Runs after linter.frontmatter only, in parallel with linter.ears_syntax and the referential/graph/model branch — per specodelic.md’s Checker Ownership table, this checker and linter.ears_syntax are independent terminal nodes that both feed into linted, not a sequential continuation of one another. Note this checker’s scope narrowed relative to its first mention in the decomposition plan: no_boolean_columns ended up owned by linter-model_shape.md instead, scoped specifically to state/transition rows where a boolean column would actually manifest as an ad-hoc state machine. What’s left here is schema evolution discipline (append_only_variants), the closed-set discipline on the kind column that Constraint and Property rows each separately carry (see kinds.md), and the parser’s own restraint around prose (prose_untouched) — three properties about how the tooling behaves across time, across the kind column specifically, and across fields generally, rather than about any single file’s current shape.

Constraints

| id | kind | expr | traces_to | satisfies | |–––––––––––––|———–|–––––––––––––––––––––––––––––––––––––––––––––––––|—————————————————–| | id_set_grows_only | invariant | ∀ 𝒦-governed id-set S (a variant-table's ids, a Constraint/Property row's own kind value-set, or the Reference Typing table's field set), revision r < r': S(r) ⊆ S(r'), appended only under a new Revision heading — no member removed or renumbered; a member's typing may narrow only in the same Revision that introduces the kind-split it depends on, and only if it invalidates nothing valid at r | [[linter.schema_shape]] | | | id_set_order_stable | invariant | ∀ 𝒦-governed id-set S, revision r < r': the relative order of members present in both r and r' is unchanged | [[linter.schema_shape]] | | | constraint_kind_closed | invariant | ∀ Constraint row: row.kind ∈ {invariant, advisory, effect, extension_point}, extended per-file by the active packs' declared kinds (openspec/specs/packs/spec.md fiber kinds — base ∪ active-pack-fiber, never narrower; without the pack active the token stays outside the closed set and the labeled finding fires) — see [[kinds.constraint_row_shape]] | [[linter.schema_shape]] | | | property_kind_closed | invariant | ∀ Property row: row.kind ∈ {unit, law}, extended per-file by the active packs' declared kinds (openspec/specs/packs/spec.md fiber kinds — base ∪ active-pack-fiber, never narrower; without the pack active the token stays outside the closed set and the labeled finding fires) — see [[kinds.property_row_shape]] | [[linter.schema_shape]] | | | no_prose_field_parsed | invariant | the parser's AST never branches on the text content of a rationale/description field | [[linter.schema_shape]] | | | prose_field_passthrough | invariant | rationale/description content is stored verbatim and emitted verbatim in the compiled TOML | [[linter.schema_shape]] | | | kind_check_failure | effect | linter.schema_shape.kind_check_failure(detail) | [[linter.schema_shape]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | diff_failure | effect | linter.schema_shape.diff_failure(detail) | [[linter.schema_shape]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | parser_audit_failure | effect | linter.schema_shape.parser_audit_failure(detail) | [[linter.schema_shape]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • unchecked
  • kind_checking
  • diffing
  • parser_audited
  • passed
  • kind_failed (emits: [[linter.schema_shape.kind_check_failure]])
  • diff_failed (emits: [[linter.schema_shape.diff_failure]])
  • parser_audit_failed (emits: [[linter.schema_shape.parser_audit_failure]])

Transitions

idfromtoguard
beginuncheckedkind_checkingfile passed linter.frontmatter
kind_okkind_checkingdiffing[[linter.schema_shape.constraint_kind_closed]] ∧ [[linter.schema_shape.property_kind_closed]]
kind_failkind_checkingkind_failed¬([[linter.schema_shape.constraint_kind_closed]] ∧ [[linter.schema_shape.property_kind_closed]])
diff_okdiffingparser_audited[[linter.schema_shape.id_set_grows_only]] ∧ [[linter.schema_shape.id_set_order_stable]]
diff_skipdiffingparser_auditedno prior revision exists in repo history — nothing to diff against yet
diff_faildiffingdiff_failed¬([[linter.schema_shape.id_set_grows_only]] ∧ [[linter.schema_shape.id_set_order_stable]])
acceptparser_auditedpassed[[linter.schema_shape.no_prose_field_parsed]] ∧ [[linter.schema_shape.prose_field_passthrough]]
rejectparser_auditedparser_audit_failed¬([[linter.schema_shape.no_prose_field_parsed]] ∧ [[linter.schema_shape.prose_field_passthrough]])

Properties

idkindderives_fromgeneratorpredicate
shrunk_id_set_rejectedunit[[linter.schema_shape.id_set_grows_only]](revision_n, revision_n_plus_1) where a member was removed from a variant table, a kind value-set, or the Reference Typing tablecheck(revisions) == failed — one generator, parametrized over which of the three id-sets it targets
reordered_id_set_rejectedunit[[linter.schema_shape.id_set_order_stable]](revision_n, revision_n_plus_1) where two existing members of any 𝒦-governed id-set swapped ordercheck(revisions) == failed
silent_narrowing_rejectedunit[[linter.schema_shape.id_set_grows_only]](revision_n, revision_n_plus_1) where a Reference Typing field’s target narrowed with no accompanying kind-split citedcheck(revisions) == failed
constraint_kind_invalid_rejectedunit[[linter.schema_shape.constraint_kind_closed]]constraint_row_with(kind: "made_up")check(file) == failed
property_kind_invalid_rejectedunit[[linter.schema_shape.property_kind_closed]]property_row_with(kind: "audit")check(file) == failed
kind_closed_passesunit[[linter.schema_shape.constraint_kind_closed]]arbitrary_file_with(only_closed_kind_values: true)check(file) == passed
prose_roundtripsunit[[linter.schema_shape.prose_field_passthrough]]arbitrary_unicode_string() as rationale contentcompile(parse(s)).rationale == s — no normalization, no truncation
appended_id_set_member_passesunit[[linter.schema_shape.id_set_grows_only]](revision_n, revision_n_plus_1) where only new members were added, to any of the three id-setscheck(revisions) == passed
constraint_kind_advisory_passesunit[[linter.schema_shape.constraint_kind_closed]]constraint_row_with(kind: "advisory")check(file) == passed
constraint_kind_effect_passesunit[[linter.schema_shape.constraint_kind_closed]]constraint_row_with(kind: "effect")check(file) == passed
constraint_kind_extension_point_passesunit[[linter.schema_shape.constraint_kind_closed]]constraint_row_with(kind: "extension_point")check(file) == passed
parser_ast_prose_freeunit[[linter.schema_shape.no_prose_field_parsed]]spec_file_with(prose_in_rationale_and_description: arbitrary_unicode_string())∀ parsed row: the row's parsed fields contain no fragment of the planted prose — a planted-prose differential parse (see Notes)
kind_check_failure_label_assertedunit[[linter.schema_shape.kind_check_failure]]kind_check_failure_raised()error_label == "linter.schema_shape.kind_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
diff_failure_label_assertedunit[[linter.schema_shape.diff_failure]]diff_failure_raised()error_label == "linter.schema_shape.diff_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
parser_audit_failure_label_assertedunit[[linter.schema_shape.parser_audit_failure]]parser_audit_failure_raised()error_label == "linter.schema_shape.parser_audit_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

Fiber-kind acceptance (2026-10-03, beads specodelic-ung): the two closed-set walkers above walk the static base sets — a pack-declared fiber kind (e.g. empirical.statistic, the empirical-registry pack’s property kind, which targets the base Properties kind column directly) fired the finding even with the pack discovered. The walkers’ effective set is now base ∪ active-pack-fiber: the ## Kinds tokens of every pack active for the file (declared uses edge or vocabulary match, the advisory-first activation rule in openspec/specs/packs/spec.md). Never narrower than the base set — a base-set member is accepted unconditionally, the base sets themselves do not grow (id_set_grows_only untouched, no format Revision), and a fiber kind with no active declaring pack stays outside the closed set, firing the labeled finding — never a silent pass. The existing acceptance rows (constraint_kind_invalid_rejected, property_kind_invalid_rejected, kind_closed_passes) keep their meaning: made_up/audit are still outside any effective set, declared or not.

Reference-typing reconciliation (2026-09-30, specodelic-cxq): the Constraints table’s traces_to cells previously pointed at the specodelic.md rows these checks re-own — a Constraint→Constraint target, which the Reference Typing table forbids (traces_to resolves to Intent only). Each now traces to this file’s own intent: specodelic.md keeps the corpus-wide statement of record, this file owns the checkable one (the “same claim, two altitudes” pattern the Notes below already use).

Resolves the follow-up kinds.md recorded when it landed: that file defined property_row_shape’s kind ∈ {unit, law} and constraint_row_shape’s kind ∈ {invariant}, and specodelic.md Revision 4 added the corresponding top-level invariants (constraint_kind_closed, property_kind_closed), but no checker enforced either yet. This file now does, as the first gate after linter.frontmatter and before the existing revision-diffing — a Property row with an invalid kind should fail here regardless of whether the file has any revision history to diff against at all, which is why kind_checking sits ahead of diffing rather than folded into it: the two checks have genuinely different preconditions (kind_checking needs only the current file; diffing needs a prior revision, hence the new diff_skip edge for a file with none).

no_prose_field_parsed was originally framed as a property of the parser’s implementation, not of any spec file’s content — “no generator can produce a bad spec file to test this against, only an audit of whether the parser code path for rationale/description ever appears on the left side of a conditional.” The parser_ast_prose_free row above reflects the pre-decision audit framing and predates the decision below.

Decision of record (2026-09-30, user-approved; HITL ticket specodelic-mp1 row 5, EXCL-001): the audit framing was wrong — the claim is mechanically testable by a planted-prose differential parse (generate a spec with prose in rationale/description, parse, assert no parsed row contains it). The property is to be rewritten as a runnable unit row on that basis (lands with specodelic-cxq); no audit kind was added — kinds.md Revision 6 records the dissolution and {unit, law} stays closed. This row’s Needs Human Review flag is retired. Landed here with specodelic-cxq: parser_ast_prose_free is now the runnable planted-prose differential parse (generate a spec with prose in rationale/description, parse, assert no parsed row contains it) — no generator-preclusion claim remains.

Checker Ownership table in specodelic.md is now fully accounted for except linter-coverage.md, the last remaining file.

Previous pass (resolving specodelic.md Revision 5’s two pending items): constraint_kind_closed widened to {invariant, advisory} in step with kinds.md Revision 2, and a reference_table_grows_only constraint was added for the Reference Typing table specifically.

This pass (specodelic.md Revision 6): that separate reference_table_grows_only constraint, along with the older variant_set_grows_only/variant_order_stable pair, is retired and replaced by the two rows above — id_set_grows_only and id_set_order_stable — stated once, over any 𝒦-governed id-set, rather than three times over three id-sets that all follow the identical rule. No enforcement was lost: the same three id-sets (variant tables, kind value-sets, the Reference Typing table) are still covered, by the same diffing state and the same diff_skip fallback for a file with no prior revision to diff against — only the naming collapsed from three constraints to two. constraint_kind_closed widens again, to {invariant, advisory, effect}, in step with kinds.md Revision 3. no_prose_field_parsed remains the one row here still marked Needs Human Review; nothing in this pass touches it. (Historical note: the flag was retired 2026-09-30 — see the decision of record above; this paragraph predates that.)

This pass (specodelic.md Revision 7): constraint_kind_closed widens a third time, to {invariant, advisory, effect, extension_point}, in step with kinds.md Revision 4. constraint_kind_extension_point_passes added as the matching acceptance case, same shape as the advisory/ effect rows above it. Nothing else in this file changes: id_set_grows_only already covers any Constraint-kind value-set widening generically, so an extension_point addition is diffed by the same diffing state as any other, with no new branch.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: shrunk_id_set_rejected

  • WHEN (revision_n, revision_n_plus_1) where a member was removed from a variant table, a kind value-set, or the Reference Typing table
  • THEN check(revisions) == failed — one generator, parametrized over which of the three id-sets it targets
  • VERIFIES [[linter.schema_shape.shrunk_id_set_rejected]]

Scenario: reordered_id_set_rejected

  • WHEN (revision_n, revision_n_plus_1) where two existing members of any 𝒦-governed id-set swapped order
  • THEN check(revisions) == failed
  • VERIFIES [[linter.schema_shape.reordered_id_set_rejected]]

Scenario: silent_narrowing_rejected

  • WHEN (revision_n, revision_n_plus_1) where a Reference Typing field’s target narrowed with no accompanying kind-split cited
  • THEN check(revisions) == failed
  • VERIFIES [[linter.schema_shape.silent_narrowing_rejected]]

Scenario: constraint_kind_invalid_rejected

  • WHEN constraint_row_with(kind: "made_up")
  • THEN check(file) == failed
  • VERIFIES [[linter.schema_shape.constraint_kind_invalid_rejected]]

Scenario: property_kind_invalid_rejected

  • WHEN property_row_with(kind: "audit")
  • THEN check(file) == failed
  • VERIFIES [[linter.schema_shape.property_kind_invalid_rejected]]

Scenario: kind_closed_passes

  • WHEN arbitrary_file_with(only_closed_kind_values: true)
  • THEN check(file) == passed
  • VERIFIES [[linter.schema_shape.kind_closed_passes]]

Scenario: prose_roundtrips

  • WHEN arbitrary_unicode_string() as rationale content
  • THEN compile(parse(s)).rationale == s — no normalization, no truncation
  • VERIFIES [[linter.schema_shape.prose_roundtrips]]

Scenario: appended_id_set_member_passes

  • WHEN (revision_n, revision_n_plus_1) where only new members were added, to any of the three id-sets
  • THEN check(revisions) == passed
  • VERIFIES [[linter.schema_shape.appended_id_set_member_passes]]

Scenario: constraint_kind_advisory_passes

  • WHEN constraint_row_with(kind: "advisory")
  • THEN check(file) == passed
  • VERIFIES [[linter.schema_shape.constraint_kind_advisory_passes]]

Scenario: constraint_kind_effect_passes

  • WHEN constraint_row_with(kind: "effect")
  • THEN check(file) == passed
  • VERIFIES [[linter.schema_shape.constraint_kind_effect_passes]]

Scenario: constraint_kind_extension_point_passes

  • WHEN constraint_row_with(kind: "extension_point")
  • THEN check(file) == passed
  • VERIFIES [[linter.schema_shape.constraint_kind_extension_point_passes]]

Scenario: parser_ast_prose_free

  • WHEN spec_file_with(prose_in_rationale_and_description: arbitrary_unicode_string())
  • THEN ∀ parsed row: the row's parsed fields contain no fragment of the planted prose — a planted-prose differential parse (see Notes)
  • VERIFIES [[linter.schema_shape.parser_ast_prose_free]]

Scenario: kind_check_failure_label_asserted

  • WHEN kind_check_failure_raised()
  • THEN error_label == "linter.schema_shape.kind_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.schema_shape.kind_check_failure_label_asserted]]

Scenario: diff_failure_label_asserted

  • WHEN diff_failure_raised()
  • THEN error_label == "linter.schema_shape.diff_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.schema_shape.diff_failure_label_asserted]]

Scenario: parser_audit_failure_label_asserted

  • WHEN parser_audit_failure_raised()
  • THEN error_label == "linter.schema_shape.parser_audit_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.schema_shape.parser_audit_failure_label_asserted]]

linter.ears_syntax


id: linter.ears_syntax kind: intent statement: “WHEN a spec file’s frontmatter has passed, THE linter SHALL reject it if the intent statement does not match one of the five EARS patterns or if any row id joins two capabilities.”

Linter: EARS Syntax Check

Runs after linter.frontmatter only — unlike the other checks, it doesn’t need the reference graph or model, since it operates purely on the statement string and the shape of id cells. Corresponds to testability-implementability-evaluator’s EARS-compliance and NLP-anti-pattern steps, narrowed to what can be checked structurally rather than by judging prose quality.

Purpose

Runs after linter.frontmatter only — unlike the other checks, it doesn’t need the reference graph or model, since it operates purely on the statement string and the shape of id cells. Corresponds to testability-implementability-evaluator’s EARS-compliance and NLP-anti-pattern steps, narrowed to what can be checked structurally rather than by judging prose quality.

Constraints

| id | kind | expr | traces_to | satisfies | |–––––––––––|———–|–––––––––––––––––––––––––––––––––––––––––––––––––––––––|––––––––––––––––––––––––––| | ears_pattern_match | invariant | statement matches one of: Ubiquitous / Event-Driven / State-Driven / Unwanted-Behavior / Optional-Feature | [[linter.ears_syntax]] | | | has_shall | invariant | statement contains an imperative "SHALL" (or "SHALL NOT") | [[linter.ears_syntax]] | | | no_conjoined_id | invariant | ∀ row.id: id does not encode two capabilities joined by "and"/"or" (checked on the id token, not prose) — the top-level rule this row re-owns from specodelic.md’s higher-altitude one_capability_per_row restatement | [[linter.ears_syntax]]| | | no_universal_in_id | invariant | ∀ row.id: id does not contain "all"/"every"/"any"/"always"/"never" as a token — applies to every table row id (Intent, Constraint, State, Transition, Property), not only Constraint rows; the top-level rule this row re-owns from specodelic.md’s higher-altitude one_capability_per_row restatement | [[linter.ears_syntax]]| | | pattern_failure | effect | linter.ears_syntax.pattern_failure(detail) | [[linter.ears_syntax]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | id_check_failure | effect | linter.ears_syntax.id_check_failure(detail) | [[linter.ears_syntax]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • unchecked
  • pattern_matching
  • id_checking
  • passed
  • pattern_failed (emits: [[linter.ears_syntax.pattern_failure]])
  • id_check_failed (emits: [[linter.ears_syntax.id_check_failure]])

Transitions

idfromtoguard
beginuncheckedpattern_matchingfile passed linter.frontmatter
pattern_okpattern_matchingid_checking[[linter.ears_syntax.ears_pattern_match]] ∧ [[linter.ears_syntax.has_shall]]
pattern_failpattern_matchingpattern_failed¬([[linter.ears_syntax.ears_pattern_match]] ∧ [[linter.ears_syntax.has_shall]])
acceptid_checkingpassed[[linter.ears_syntax.no_conjoined_id]] ∧ [[linter.ears_syntax.no_universal_in_id]]
rejectid_checkingid_check_failed¬([[linter.ears_syntax.no_conjoined_id]] ∧ [[linter.ears_syntax.no_universal_in_id]])

Properties

idkindderives_fromgeneratorpredicate
non_ears_rejectedunit[[linter.ears_syntax.ears_pattern_match]]statement_not_matching_any_ears_pattern()check(file) == failed
missing_shall_rejectedunit[[linter.ears_syntax.has_shall]]statement_matching_pattern_but_missing("SHALL")check(file) == failed
conjoined_id_rejectedunit[[linter.ears_syntax.no_conjoined_id]]row_with(id: "order.cancel_and_refund")check(file) == failed
universal_token_rejectedunit[[linter.ears_syntax.no_universal_in_id]]row_with(id: "order.always_validate")check(file) == failed
valid_ears_passesunit[[linter.ears_syntax.ears_pattern_match]]arbitrary_ears_compliant_statement()check(file) == passed
pattern_failure_label_assertedunit[[linter.ears_syntax.pattern_failure]]pattern_failure_raised()error_label == "linter.ears_syntax.pattern_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
id_check_failure_label_assertedunit[[linter.ears_syntax.id_check_failure]]id_check_failure_raised()error_label == "linter.ears_syntax.id_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

This check deliberately does not attempt weak-phrase detection (“adequate,” “as appropriate”), passive-voice detection, or non-specific temporals (“immediately,” “quickly”) — those are exactly the prose-quality judgments specodelic.md’s prose_untouched invariant puts out of the linter’s scope, and are correctly testability-implementability-evaluator’s job to run separately over the compiled statement field, not this schema’s job to structurally forbid. The line drawn here: EARS pattern conformance is a grammar fact (does the sentence have the right shape), weak-phrase/temporal/passive-voice detection is a judgment about word choice within a grammatically valid sentence — the former belongs in the linter, the latter doesn’t.

no_conjoined_id/no_universal_in_id check the id token, not the prose statement — e.g. rejecting id: "cancel_and_refund" structurally, while a compound statement in prose still isn’t caught (correctly, since that would require judging prose). Scope decision of record (2026-09-30, specodelic-cxq): the check covers every table row id — Intent, Constraint, State, Transition, and Property rows alike. A property named law_cases_unexecuted or a transition named scan_effects carries the same compound/universal-token problem a constraint id does, so the corpus’s six such rows were renamed in the same change rather than carving the row kinds out of the rule. This is narrower than specification-evaluation-diagnostician’s “Compound Requirements” finding, which also reads sentence structure — worth flagging as a known gap this checker doesn’t close, rather than one it silently claims to.

No new specodelic.md gaps surfaced this time — this is the first check whose constraints all trace cleanly to invariants already on the list.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: non_ears_rejected

  • WHEN statement_not_matching_any_ears_pattern()
  • THEN check(file) == failed
  • VERIFIES [[linter.ears_syntax.non_ears_rejected]]

Scenario: missing_shall_rejected

  • WHEN statement_matching_pattern_but_missing("SHALL")
  • THEN check(file) == failed
  • VERIFIES [[linter.ears_syntax.missing_shall_rejected]]

Scenario: conjoined_id_rejected

  • WHEN row_with(id: "order.cancel_and_refund")
  • THEN check(file) == failed
  • VERIFIES [[linter.ears_syntax.conjoined_id_rejected]]

Scenario: universal_token_rejected

  • WHEN row_with(id: "order.always_validate")
  • THEN check(file) == failed
  • VERIFIES [[linter.ears_syntax.universal_token_rejected]]

Scenario: valid_ears_passes

  • WHEN arbitrary_ears_compliant_statement()
  • THEN check(file) == passed
  • VERIFIES [[linter.ears_syntax.valid_ears_passes]]

Scenario: pattern_failure_label_asserted

  • WHEN pattern_failure_raised()
  • THEN error_label == "linter.ears_syntax.pattern_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.ears_syntax.pattern_failure_label_asserted]]

Scenario: id_check_failure_label_asserted

  • WHEN id_check_failure_raised()
  • THEN error_label == "linter.ears_syntax.id_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.ears_syntax.id_check_failure_label_asserted]]

linter.coverage


id: linter.coverage kind: intent statement: “WHEN a spec file’s graph shape and model shape have both passed, THE linter SHALL reject it if any constraint has no property deriving from it, or if any law-kind property fails to enumerate its required cases as machine-findable **name:** labels with the identity and associativity floor present.”

Linter: Coverage Check

The last checker in the Checker Ownership table — it needs graph_shape’s acyclicity result to know the derives_from edges it’s counting form a well-defined graph, and model_shape’s result to know every constraint it’s checking coverage for is actually attached to a real transition, not a dangling row that would make “100% coverage” a vacuous claim.

This is the check most directly aimed at the gap this whole exercise kept surfacing — every prior checker file found something missing from specodelic.md itself. Coverage is what would have caught those mechanically instead of by manual inspection: id_matches_file, ref_kind_compatible, single_root_reachable, and the model well-formedness pair were all constraints with no corresponding property until Revision 2 added both together. Had this checker existed first, the gap and its fix would have been a single failing/passing pair, not two separate passes.

Purpose

The last checker in the Checker Ownership table — it needs graph_shape’s acyclicity result to know the derives_from edges it’s counting form a well-defined graph, and model_shape’s result to know every constraint it’s checking coverage for is actually attached to a real transition, not a dangling row that would make “100% coverage” a vacuous claim. This is the check most directly aimed at the gap this whole exercise kept surfacing — every prior checker file found something missing from specodelic.md itself. Coverage is what would have caught those mechanically instead of by manual inspection: id_matches_file, ref_kind_compatible, single_root_reachable, and the model well-formedness pair were all constraints with no corresponding property until Revision 2 added both together. Had this checker existed first, the gap and its fix would have been a single failing/passing pair, not two separate passes.

Constraints

| id | kind | expr | traces_to | satisfies | |—————————|———–|———————————————————————————————–|———————————————–| | every_constraint_covered | invariant | ∀ constraint c: ∃ property p. p.derives_from == c.id — the rule this row re-owns from specodelic.md’s higher-altitude restatement (see Notes) | [[linter.coverage]] | | | every_law_has_cases | invariant | ∀ property p where p.kind == "law": p's predicate enumerates its required cases as **name:** case labels, and the label set includes identity and associativity — the rule this row re-owns from specodelic.md’s higher-altitude restatement (see Notes; machine form ratified in specodelic.md Revision 13) | [[linter.coverage]] | | | no_orphan_property | invariant | ∀ property p: p.derives_from resolves to a real constraint (restates total_refs, scoped to this edge) | [[linter.coverage]] | | | coverage_is_computable | invariant | the derives_from multiplicity per constraint is countable in finite time from the parsed AST alone | [[linter.coverage]] | | | count_failure | effect | linter.coverage.count_failure(detail) | [[linter.coverage]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | law_case_failure | effect | linter.coverage.law_case_failure(detail) | [[linter.coverage]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • unchecked
  • counting
  • law_checking
  • passed
  • count_failed (emits: [[linter.coverage.count_failure]])
  • law_check_failed (emits: [[linter.coverage.law_case_failure]])

Transitions

idfromtoguard
beginuncheckedcountingfile passed linter.graph_shape and linter.model_shape
count_okcountinglaw_checking[[linter.coverage.every_constraint_covered]] ∧ [[linter.coverage.no_orphan_property]]
count_failcountingcount_failed¬([[linter.coverage.every_constraint_covered]] ∧ [[linter.coverage.no_orphan_property]])
acceptlaw_checkingpassed[[linter.coverage.every_law_has_cases]]
rejectlaw_checkinglaw_check_failed¬([[linter.coverage.every_law_has_cases]])

Properties

idkindderives_fromgeneratorpredicate
uncovered_constraint_rejectedunit[[linter.coverage.every_constraint_covered]]spec_file_with(constraint_with_no_deriving_property: true)check(file) == failed
orphan_property_rejectedunit[[linter.coverage.no_orphan_property]]spec_file_with(property.derives_from_pointing_at_nonexistent_id: true)check(file) == failed
incomplete_law_rejectedunit[[linter.coverage.every_law_has_cases]]law_property_missing("identity")check(file) == failed
full_coverage_passesunit[[linter.coverage.every_constraint_covered]]arbitrary_fully_covered_spec_file()check(file) == passed
coverage_naturalitylaw[[specodelic.rename_naturality]]arbitrary_spec_file(), arbitrary_id_rename()identity: coverage_ratio(coverage_ratio_placeholder_renamed_to_itself) == coverage_ratio(placeholder) — the rename identity case, instantiated at the coverage_ratio observation point associativity: coverage_ratio(rename(rename(I, a, b), b, c)) == coverage_ratio(rename(I, a, c)) — the rename associativity case at the same observation point naturality: coverage_ratio(rename(I)) == coverage_ratio(I) — renaming a constraint doesn’t change whether it’s covered
computed_derives_from_rejectedunit[[linter.coverage.coverage_is_computable]]spec_file_with(computed_or_templated_derives_from_id: true)check(file) == failed — a non-literal id cannot be counted from the parsed AST alone
count_failure_label_assertedunit[[linter.coverage.count_failure]]count_failure_raised()error_label == "linter.coverage.count_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
law_case_failure_label_assertedunit[[linter.coverage.law_case_failure]]law_case_failure_raised()error_label == "linter.coverage.law_case_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
unlabeled_law_rejectedunit[[linter.coverage.every_law_has_cases]]law_predicate_mentioning_cases_without_labels()check(file) == failed — a prose mention of a case name is not an enumeration (Revision 13 machine form)
extra_case_is_declarationunit[[linter.coverage.every_law_has_cases]]law_property_with_extra_case("commutativity")compile(file) emits one block per enumerated case — an extra named case is a first-class checkable declaration, never prose

Notes

Machine-form ratification (2026-10-01, specodelic-9qw): every_law_has_cases now executes specodelic.md Revision 13: a law row’s required cases are whatever its predicate enumerates as **name:** case labels — the exact form compile’s required_law_cases has always parsed — with the identity and associativity floor mandatory. A predicate that only mentions a case name in prose is not an enumeration and fails the check; the label set may exceed the floor freely (see extra_case_is_declaration), which is what makes extra cases (commutativity, idempotence, …) checkable declarations that compile one proptest block each.

Reference-typing reconciliation (2026-09-30, specodelic-cxq): every_constraint_covered, every_law_has_cases, no_orphan_property, and coverage_is_computable previously pointed their traces_to at the specodelic.md rows they re-own ([[specodelic.coverage]], [[specodelic.law_requires_cases]]) — a Constraint→Constraint target, which the Reference Typing table forbids (traces_to resolves to Intent only). Each now traces to [[linter.coverage]], its own file’s intent — the same re-anchoring linter-referential_integrity.md’s rename_naturality Notes call the “same claim, two altitudes” pattern: specodelic.md keeps the corpus-wide statement of record, this file owns the checkable one.

Decision of record (2026-09-30, specodelic-cxq): coverage_naturality was one of the three law rows lacking the identity/associativity cases [[specodelic.law_requires_cases]] requires. Its identity case is the trivial instantiations rename(I, a, a) == I at the coverage_ratio observation point; the naturality case remains the substantive one — renaming a constraint doesn’t change whether it’s covered.

coverage_is_computable is worth stating explicitly even though it looks tautological: it’s the thing that fails if expr fields were ever allowed to contain arbitrary logic requiring evaluation to determine derives_from targets dynamically (e.g. a templated or generated id). specodelic.md’s decision to keep id values as static string literals in every table row — never computed — is what makes this checker decidable at all. If that ever changes, this constraint is the one that breaks first and should be treated as a tripwire, not just a check.

No new gaps in specodelic.md surfaced this time — this is the third checker of seven to close clean, and notably the one built specifically to catch what the first four checkers found by hand. That its own pass here is clean is a weaker signal than it looks: it confirms specodelic.md’s constraint list is self-consistent as of Revision 2, not that Revision 2 is complete — a coverage check can only tell you every constraint present has a property; it cannot tell you a constraint is missing, which is exactly the class of gap the first four checkers caught by inspection rather than by any mechanism this framework has yet.

All eight gating checker files in the Checker Ownership table now exist (linter-frontmatter, linter-referential_integrity, linter-graph_shape, linter-model_shape, linter-failure_shape, linter-ears_syntax, linter-schema_shape, and linter-coverage.md itself — this checker joined the table as a gating row once its checks landed) — linted in specodelic.md is fully specified as the join over all eight.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: uncovered_constraint_rejected

  • WHEN spec_file_with(constraint_with_no_deriving_property: true)
  • THEN check(file) == failed
  • VERIFIES [[linter.coverage.uncovered_constraint_rejected]]

Scenario: orphan_property_rejected

  • WHEN spec_file_with(property.derives_from_pointing_at_nonexistent_id: true)
  • THEN check(file) == failed
  • VERIFIES [[linter.coverage.orphan_property_rejected]]

Scenario: incomplete_law_rejected

  • WHEN law_property_missing("identity")
  • THEN check(file) == failed
  • VERIFIES [[linter.coverage.incomplete_law_rejected]]

Scenario: full_coverage_passes

  • WHEN arbitrary_fully_covered_spec_file()
  • THEN check(file) == passed
  • VERIFIES [[linter.coverage.full_coverage_passes]]

Scenario: coverage_naturality

  • WHEN arbitrary_spec_file(), arbitrary_id_rename()
  • THEN identity: coverage_ratio(coverage_ratio_placeholder_renamed_to_itself) == coverage_ratio(placeholder) — the rename identity case, instantiated at the coverage_ratio observation point associativity: coverage_ratio(rename(rename(I, a, b), b, c)) == coverage_ratio(rename(I, a, c)) — the rename associativity case at the same observation point naturality: coverage_ratio(rename(I)) == coverage_ratio(I) — renaming a constraint doesn’t change whether it’s covered
  • VERIFIES [[linter.coverage.coverage_naturality]]

Scenario: computed_derives_from_rejected

  • WHEN spec_file_with(computed_or_templated_derives_from_id: true)
  • THEN check(file) == failed — a non-literal id cannot be counted from the parsed AST alone
  • VERIFIES [[linter.coverage.computed_derives_from_rejected]]

Scenario: count_failure_label_asserted

  • WHEN count_failure_raised()
  • THEN error_label == "linter.coverage.count_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.coverage.count_failure_label_asserted]]

Scenario: law_case_failure_label_asserted

  • WHEN law_case_failure_raised()
  • THEN error_label == "linter.coverage.law_case_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.coverage.law_case_failure_label_asserted]]

Scenario: unlabeled_law_rejected

  • WHEN law_predicate_mentioning_cases_without_labels()
  • THEN check(file) == failed — a prose mention of a case name is not an enumeration (Revision 13 machine form)
  • VERIFIES [[linter.coverage.unlabeled_law_rejected]]

Scenario: extra_case_is_declaration

  • WHEN law_property_with_extra_case("commutativity")
  • THEN compile(file) emits one block per enumerated case — an extra named case is a first-class checkable declaration, never prose
  • VERIFIES [[linter.coverage.extra_case_is_declaration]]

linter.graph_shape


id: linter.graph_shape kind: intent statement: “WHEN a spec repo has passed referential integrity, THE linter SHALL reject it if the traces_to/derives_from reference graph contains a cycle, or if the supersedes reference graph contains a cycle.”

Linter: Graph Shape Check

Runs after linter.referential_integrity — it needs every reference already proven to resolve before it can walk the graph those references form. Corresponds to the modularity-diagnostician’s “dependency graph must form a DAG” check, applied to specs instead of code modules.

Purpose

Runs after linter.referential_integrity — it needs every reference already proven to resolve before it can walk the graph those references form. Corresponds to the modularity-diagnostician’s “dependency graph must form a DAG” check, applied to specs instead of code modules.

Constraints

| id | kind | expr | traces_to | satisfies | |———————–|———–|——————————————————————————————|––––––––––––––––––––––| | acyclic | invariant | the directed graph formed by constraint-traces_to ∪ property-derives_from ∪ guard-as-edge has no cycle — the edge set is closed and property-sourced: derives_from edges are taken from Property rows only, because the Reference Typing table’s Appears-on column is normative (a Constraint-row derives_from is out-of-format — ref_kind_compatible’s beat, never an edge here; decided of record 2026-10-01, specodelic-huf) | [[linter.graph_shape]] | | | single_root_reachable | invariant | ∀ constraint/property/state/transition row: reachable(row, the file's own intent row through own-file primary linkage) — same claim as [[specodelic.single_root_reachable]] at checker altitude | [[linter.graph_shape]] | | | no_self_ref | invariant | ∀ row: row.traces_to != row.id and row.derives_from != row.id | [[linter.graph_shape]] | | | supersedes_dag | invariant | the directed graph formed by supersedes edges alone (Constraint→Constraint, Property→Property) has no cycle | [[linter.graph_shape]] | | | check_failure | effect | linter.graph_shape.check_failure(detail) | [[linter.graph_shape]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • unbuilt
  • built
  • traversing
  • passed
  • failed (emits: [[linter.graph_shape.check_failure]])

Transitions

idfromtoguard
build_graphunbuiltbuiltrepo passed linter.referential_integrity
traversebuilttraversinggraph built successfully
accepttraversingpassed[[linter.graph_shape.acyclic]] ∧ [[linter.graph_shape.single_root_reachable]] ∧ [[linter.graph_shape.no_self_ref]] ∧ [[linter.graph_shape.supersedes_dag]]
rejecttraversingfailed¬([[linter.graph_shape.acyclic]] ∧ [[linter.graph_shape.single_root_reachable]] ∧ [[linter.graph_shape.no_self_ref]] ∧ [[linter.graph_shape.supersedes_dag]])

Properties

idkindderives_fromgeneratorpredicate
cycle_rejectedunit[[linter.graph_shape.acyclic]]spec_repo_with(traces_to_cycle: length ≥ 2)check(repo) == failed
self_ref_rejectedunit[[linter.graph_shape.no_self_ref]]spec_row_with(traces_to == self.id)check(repo) == failed
orphan_subgraph_rejectedunit[[linter.graph_shape.single_root_reachable]]spec_repo_with(disconnected_constraint_cluster: true)check(repo) == failed
dag_passesunit[[linter.graph_shape.acyclic]]arbitrary_dag_shaped_repo()check(repo) == passed
supersedes_cycle_rejectedunit[[linter.graph_shape.supersedes_dag]]spec_repo_with(supersedes_cycle: length ≥ 2)check(repo) == failed
supersedes_dag_ignores_traces_cycleunit[[linter.graph_shape.supersedes_dag]]spec_repo_with(traces_to_cycle: true, supersedes: acyclic)check(repo).supersedes_dag == passed — the two graphs are checked independently; a cycle in one must not be attributed to the other
derives_from_edges_property_sourcedunit[[linter.graph_shape.acyclic]]spec_repo_with(constraint_row_carrying_derives_from: true)check(repo) == failed — the malformed edge is typing’s finding (the graph layer reports it and records no edge), so it is not recorded in the acyclic edge set; the invariant and the checker now agree on the same closed edge set (specodelic-huf)
topo_sort_naturalitylaw[[linter.graph_shape.acyclic]]arbitrary_dag_repo(), arbitrary_id_rename()identity: topo_sort(rename(I, a, a)) == topo_sort(I) — the rename identity case at the topo_sort observation point associativity: topo_sort(rename(rename(I, a, b), b, c)) == topo_sort(rename(I, a, c)) — the rename associativity case at the same point naturality: topo_sort(rename(I)) == rename(topo_sort(I)) — renaming a node doesn’t change relative order of unrelated nodes
check_failure_label_assertedunit[[linter.graph_shape.check_failure]]check_failure_raised()error_label == "linter.graph_shape.check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

Reference-typing reconciliation (2026-09-30, specodelic-cxq): the Constraints table’s traces_to cells previously pointed at the specodelic.md rows these checks re-own — a Constraint→Constraint target, which the Reference Typing table forbids (traces_to resolves to Intent only). Each now traces to this file’s own intent: specodelic.md keeps the corpus-wide statement of record, this file owns the checkable one (the “same claim, two altitudes” pattern the Notes below already use).

single_root_reachable is new relative to specodelic.md’s original acyclic_traces invariant — acyclicity alone permits an orphaned island of constraints/properties that trace only to each other and never up to a real intent. That’s not a cycle, but it is the spec-level equivalent of modularity-diagnostician’s “missing boundary”: a cluster with no owning purpose. The gap was folded back into specodelic.md’s constraint list, and the open question this file raised (any intent vs the file’s own) was decided of record 2026-09-30 (HITL specodelic-mp1 row 8): reachability lands on the file’s OWN intent through own-file primary linkage, with cross-file typed edges (guard citations of foreign constraints, satisfies, observes) counted as outbound leaves per specodelic.md’s Reference Typing carve-out; see Revision 10 for the Revision 10 change. This file’s constraint expr reflects the decided reading.

topo_sort_naturality is included because the model-checking and PBT-generation pipeline both need a stable topological order to compile against — if renaming perturbed that order, generated artifacts (TLA+ modules, proptest! blocks) would churn on every unrelated rename, which defeats the “refactor-safe end to end” property specodelic.md promises.

supersedes_dag (added per specodelic.md’s Revision 5) is kept as its own constraint and its own conjunct in accept’s guard, rather than unioned into acyclic’s edge set. Lineage (supersedes) and provenance (traces_to/derives_from/guard) answer different questions about a row, and a cycle in one says nothing about the other — supersedes_dag_ignores_traces_cycle exists specifically to pin that independence down, so a future edit can’t accidentally merge the two graphs back into one God-check.

acyclic’s edge set is qualified (2026-10-01, specodelic-huf). The invariant previously read “traces_to ∪ derives_from ∪ guard-as-edge has no cycle” — unqualified, while the checker built the edge set from (constraints, traces_to), (properties, derives_from) and (transitions, guard) only. A constraint↔constraint derives_from cycle therefore escaped both the acyclic check and edge typing (the typing check read only the Must-resolve-to column). The decision of record: constraint-level derives_from is out-of-format — a constraint is derived FROM by properties; it does not derive. The Reference Typing table’s Appears on: Property column is normative, and ref_kind_compatible now reads it source-side (a Constraint-row derives_from is a labeled typing violation, recorded as no edge), making the cycle unrepresentable rather than merely uncycled. The invariant text above is amended to name the exact implemented edge set — same discipline as the observes exclusion note below: the union is closed, and it grows only under a new Revision of this file.

observes (specodelic.md Revision 9) is deliberately absent from acyclic’s edge set. The union above is closed — satisfies and emits never joined it either — and an observation claim is not a dependency: two files mutually observing each other’s effects are well-formed. The edge set grows only under a new Revision of this file (same discipline as supersedes_dag’s independence, pinned by supersedes_dag_ignores_traces_cycle).

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: cycle_rejected

  • WHEN spec_repo_with(traces_to_cycle: length ≥ 2)
  • THEN check(repo) == failed
  • VERIFIES [[linter.graph_shape.cycle_rejected]]

Scenario: self_ref_rejected

  • WHEN spec_row_with(traces_to == self.id)
  • THEN check(repo) == failed
  • VERIFIES [[linter.graph_shape.self_ref_rejected]]

Scenario: orphan_subgraph_rejected

  • WHEN spec_repo_with(disconnected_constraint_cluster: true)
  • THEN check(repo) == failed
  • VERIFIES [[linter.graph_shape.orphan_subgraph_rejected]]

Scenario: dag_passes

  • WHEN arbitrary_dag_shaped_repo()
  • THEN check(repo) == passed
  • VERIFIES [[linter.graph_shape.dag_passes]]

Scenario: supersedes_cycle_rejected

  • WHEN spec_repo_with(supersedes_cycle: length ≥ 2)
  • THEN check(repo) == failed
  • VERIFIES [[linter.graph_shape.supersedes_cycle_rejected]]

Scenario: supersedes_dag_ignores_traces_cycle

  • WHEN spec_repo_with(traces_to_cycle: true, supersedes: acyclic)
  • THEN check(repo).supersedes_dag == passed — the two graphs are checked independently; a cycle in one must not be attributed to the other
  • VERIFIES [[linter.graph_shape.supersedes_dag_ignores_traces_cycle]]

Scenario: derives_from_edges_property_sourced

  • WHEN spec_repo_with(constraint_row_carrying_derives_from: true)
  • THEN check(repo) == failed — the malformed edge is typing’s finding (the graph layer reports it and records no edge), so it is not recorded in the acyclic edge set; the invariant and the checker now agree on the same closed edge set (specodelic-huf)
  • VERIFIES [[linter.graph_shape.derives_from_edges_property_sourced]]

Scenario: topo_sort_naturality

  • WHEN arbitrary_dag_repo(), arbitrary_id_rename()
  • THEN identity: topo_sort(rename(I, a, a)) == topo_sort(I) — the rename identity case at the topo_sort observation point associativity: topo_sort(rename(rename(I, a, b), b, c)) == topo_sort(rename(I, a, c)) — the rename associativity case at the same point naturality: topo_sort(rename(I)) == rename(topo_sort(I)) — renaming a node doesn’t change relative order of unrelated nodes
  • VERIFIES [[linter.graph_shape.topo_sort_naturality]]

Scenario: check_failure_label_asserted

  • WHEN check_failure_raised()
  • THEN error_label == "linter.graph_shape.check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.graph_shape.check_failure_label_asserted]]

linter.model_shape


id: linter.model_shape kind: intent statement: “WHEN a spec file’s graph shape has passed, THE linter SHALL reject it if any transition lacks a guard or if the file declares a model without both a states section and a transitions section.”

Linter: Model Shape Check

Runs after linter.graph_shape — it needs the reference graph already proven acyclic before it can trust that a guard field pointing at a constraint isn’t secretly part of a cycle back through the model itself. Corresponds to invalid-states-diagnostician’s “unconstrained optionality” and “ad-hoc state machine” signals, made structural rather than advisory.

Purpose

Runs after linter.graph_shape — it needs the reference graph already proven acyclic before it can trust that a guard field pointing at a constraint isn’t secretly part of a cycle back through the model itself. Corresponds to invalid-states-diagnostician’s “unconstrained optionality” and “ad-hoc state machine” signals, made structural rather than advisory.

Constraints

| id | kind | expr | traces_to | satisfies | |————————|———–|———————————————————————————————–|————————————————| | guard_present | invariant | ∀ transition row: guard field is non-empty | [[linter.model_shape]] | | | model_sections_paired | invariant | if [[model.state]] exists then [[model.transition]] exists, and vice versa | [[linter.model_shape]] | | | every_state_used | invariant | ∀ state: state appears as from or to in ≥ 1 transition | [[linter.model_shape]] | | | every_transition_valid | invariant | ∀ transition: from ∈ states and to ∈ states | [[linter.model_shape]] | | | no_bool_state_field | invariant | no state or transition row has a column of boolean type | [[linter.model_shape]]| | | pairing_failure | effect | linter.model_shape.pairing_failure(detail) | [[linter.model_shape]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | field_check_failure | effect | linter.model_shape.field_check_failure(detail) | [[linter.model_shape]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • ungrouped
  • pairing_checked
  • states_checked
  • passed
  • pairing_failed (emits: [[linter.model_shape.pairing_failure]])
  • field_check_failed (emits: [[linter.model_shape.field_check_failure]])

Transitions

idfromtoguard
check_pairingungroupedpairing_checkedfile passed linter.graph_shape
pairing_okpairing_checkedstates_checked[[linter.model_shape.model_sections_paired]] ∧ [[linter.model_shape.every_state_used]] ∧ [[linter.model_shape.every_transition_valid]]
pairing_failpairing_checkedpairing_failed¬([[linter.model_shape.model_sections_paired]] ∧ [[linter.model_shape.every_state_used]] ∧ [[linter.model_shape.every_transition_valid]])
acceptstates_checkedpassed[[linter.model_shape.guard_present]] ∧ [[linter.model_shape.no_bool_state_field]]
rejectstates_checkedfield_check_failed¬([[linter.model_shape.guard_present]] ∧ [[linter.model_shape.no_bool_state_field]])

Properties

idkindderives_fromgeneratorpredicate
missing_guard_rejectedunit[[linter.model_shape.guard_present]]spec_file_with(transition_missing_guard: true)check(file) == failed
unpaired_states_rejectedunit[[linter.model_shape.model_sections_paired]]spec_file_with(states_section_but_no_transitions: true)check(file) == failed
unreachable_state_rejectedunit[[linter.model_shape.every_state_used]]spec_file_with(declared_state_never_referenced: true)check(file) == failed
bad_edge_rejectedunit[[linter.model_shape.every_transition_valid]]spec_file_with(transition.to_not_in_states: true)check(file) == failed
bool_column_rejectedunit[[linter.model_shape.no_bool_state_field]]spec_file_with(state_row_having_bool_typed_column: true)check(file) == failed
well_formed_model_passesunit[[linter.model_shape.every_transition_valid]]arbitrary_well_formed_state_machine()check(file) == passed
pairing_failure_label_assertedunit[[linter.model_shape.pairing_failure]]pairing_failure_raised()error_label == "linter.model_shape.pairing_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
field_check_failure_label_assertedunit[[linter.model_shape.field_check_failure]]field_check_failure_raised()error_label == "linter.model_shape.field_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

Reference-typing reconciliation (2026-09-30, specodelic-cxq): the Constraints table’s traces_to cells previously pointed at the specodelic.md rows these checks re-own — a Constraint→Constraint target, which the Reference Typing table forbids (traces_to resolves to Intent only). Each now traces to this file’s own intent: specodelic.md keeps the corpus-wide statement of record, this file owns the checkable one (the “same claim, two altitudes” pattern the Notes below already use).

every_state_used and every_transition_valid are new relative to specodelic.md’s original list — guard_required only checked that a guard exists, not that the state machine around it is internally consistent (an unreferenced state, or a transition pointing at a state that was never declared). Both are structural prerequisites for the model_check transition in specodelic.md to mean anything: a TLA+ generator handed a dangling to field would either crash or silently model-check a different graph than the author wrote. Fourth candidate to fold back into specodelic.md’s constraint table.

no_bool_state_field restates specodelic.md’s no_boolean_columns scoped specifically to the model section, since that’s where a boolean column would actually manifest as an ad-hoc state machine (invalid-states-diagnostician’s central pathology) rather than merely a schema-hygiene issue elsewhere in the file.

Running tally of gaps found so far, all pending a pass back into specodelic.md: id_matches_file, ref_kind_compatible, single_root_reachable, every_state_used + every_transition_valid.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: missing_guard_rejected

  • WHEN spec_file_with(transition_missing_guard: true)
  • THEN check(file) == failed
  • VERIFIES [[linter.model_shape.missing_guard_rejected]]

Scenario: unpaired_states_rejected

  • WHEN spec_file_with(states_section_but_no_transitions: true)
  • THEN check(file) == failed
  • VERIFIES [[linter.model_shape.unpaired_states_rejected]]

Scenario: unreachable_state_rejected

  • WHEN spec_file_with(declared_state_never_referenced: true)
  • THEN check(file) == failed
  • VERIFIES [[linter.model_shape.unreachable_state_rejected]]

Scenario: bad_edge_rejected

  • WHEN spec_file_with(transition.to_not_in_states: true)
  • THEN check(file) == failed
  • VERIFIES [[linter.model_shape.bad_edge_rejected]]

Scenario: bool_column_rejected

  • WHEN spec_file_with(state_row_having_bool_typed_column: true)
  • THEN check(file) == failed
  • VERIFIES [[linter.model_shape.bool_column_rejected]]

Scenario: well_formed_model_passes

  • WHEN arbitrary_well_formed_state_machine()
  • THEN check(file) == passed
  • VERIFIES [[linter.model_shape.well_formed_model_passes]]

Scenario: pairing_failure_label_asserted

  • WHEN pairing_failure_raised()
  • THEN error_label == "linter.model_shape.pairing_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.model_shape.pairing_failure_label_asserted]]

Scenario: field_check_failure_label_asserted

  • WHEN field_check_failure_raised()
  • THEN error_label == "linter.model_shape.field_check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.model_shape.field_check_failure_label_asserted]]

linter.referential_integrity


Linter: Referential Integrity Check

Runs after linter.frontmatter passes for every file in the repo — it needs every file’s declared id to already be trustworthy before it can build the id→row index this check relies on.

Purpose

Runs after linter.frontmatter passes for every file in the repo — it needs every file’s declared id to already be trustworthy before it can build the id→row index this check relies on.

Resolution algorithm

qualify(ref) (the ref_resolves expr) and spk graph share one algorithm, pinned by unit tests and documented here because it lives nowhere user-facing otherwise (gh#1: “the resolution algorithm is undocumented”):

  1. Exact file id — the whole target names a file; file id wins over any split interpretation.
  2. Bare-local row — a dotless target naming one of the SOURCE file’s own rows resolves to that row. In practice this arm is masked by the metasyntactic skip (a dotless target naming no file id is format prose, not a reference) — it is the safety net that keeps a dotless spelling meaningful when a file id shadows it. Revision 18 note: the old “only self-contained id: spec deltas reach this arm” reading retired with id: spec itself; every file resolves corpus-wide and authors spell rows file-qualified.
  3. Every dot split, last to first — prefix must be a known file id and the remainder must be one of: a row of that file, the model.state/model.transition section anchor, or row.member where the row is the single segment right after the split and the member path may itself be dotted. Last-dot wins because dotted file ids (linter.frontmatter) are the common case; the first-dot fallback covers [[specodelic.model.state]] (file specodelic, anchor model.state) and multi-segment member paths ([[a.b.c.d]] = file a, row b, member c.d).

Row ids are single-segment: a dotted tail is always read as row.member, never as a dotted row id, so [[a.b.c.d]] does not resolve when file a declares only a row literally named b.c.

Invocation scope (2026-11-15, specodelic-f4sx): resolution is corpus-wide, so a CLI invocation that names a subset still resolves against the containing specs tree — findings stay scoped to the named files, files_linted counts the request, and the warning channel names the resolution corpus. Outside a specs tree the linted set is the resolution corpus: a cross-file reference then dangles, and the hint names the containing-tree invocation as the fix. A parse error anywhere in the resolution corpus fails the run rather than yielding a partial index — never a false dangling verdict.

Notes

Reference-typing reconciliation (2026-09-30, specodelic-cxq): the Constraints table’s traces_to cells previously pointed at the specodelic.md rows these checks re-own — a Constraint→Constraint target, which the Reference Typing table forbids (traces_to resolves to Intent only). Each now traces to this file’s own intent: specodelic.md keeps the corpus-wide statement of record, this file owns the checkable one (the “same claim, two altitudes” pattern the Notes below already use).

Decision of record (2026-09-30, specodelic-cxq): this file’s rename_naturality law previously carried only identity + associativity; its naturality case (the cross-artifact commutation that gives the law its name, lookup_all(rename(I)) == rename(lookup_all(I))) was implicit in the Notes prose. It is now an explicit case column entry — the law the Notes describe as “the layer that enforces it” states all three cases [[specodelic.law_requires_cases]] requires.

rename_naturality is restated here rather than only living in specodelic.md, because this is the check that would actually break if a naive rename tool patched an id field without updating every [[ref]] pointing at it — the property belongs at the layer that enforces it, with specodelic.md keeping the higher-level restatement as its own traceability anchor. This is the same “same claim, two altitudes” pattern as ah reading dont’s events: one tool states the law, another is where violating it actually fails.

The open question this file’s Notes used to raise — that ref_kind_compatible assumes a fixed “which kind may fill which field” table that wasn’t specified anywhere — was resolved in specodelic.md Revision 2, which added the Reference Typing table for exactly this reason. What was never fixed, until this pass (specodelic.md Revision 6), is that this file’s own expr still named the three original fields by hand (traces_to/derives_from/guard) instead of pointing at that table generically — so it silently fell behind twice, first when supersedes was added (Revision 5) and again when emits was (Revision 6), despite specodelic.md’s own Revision 5 notes claiming this check needed zero code changes for either addition. That claim was true of the implementation (which already reads allowed_targets(field) from the table) but not of this file’s wording, which had drifted out of sync with what the implementation actually does. Reworded above to describe the table-driven behavior directly, so the next Reference Typing addition requires no follow-up here either in code or in wording.

Constraints

idkindexprtraces_tosatisfies
unique_within_fileinvariant∀ file: no two rows in file share the same local id[[linter.referential_integrity]]
unique_across_repoinvariant∀ repo: no two files declare the same fully-qualified id[[linter.referential_integrity]]
ref_resolvesinvariant∀ [[ref]] in file: qualify(ref) ∈ index(repo)[[linter.referential_integrity]]
ref_kind_compatibleinvariant∀ [[ref]] in any reference field defined by specodelic.md's Reference Typing table: target row's kind ∈ allowed_targets(field) — read from that table, not hardcoded per field name, so a Revision adding a field (supersedes, emits, …) needs no change here[[linter.referential_integrity]]
index_failureeffectlinter.referential_integrity.index_failure(detail)[[linter.referential_integrity]][[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]]
resolution_failureeffectlinter.referential_integrity.resolution_failure(detail)[[linter.referential_integrity]][[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]]
schema_is_decisioninvariantthe allowed targets for a typed field are read from the canonical Schema via its typing check — no per-field match arm exists in the lint rule[[linter.referential_integrity]]
typed_columns_onlyinvariantthe rule walks only links whose column carries schema morphism rows — frontmatter, expr, predicate, and generator cells are format prose, never typed references[[linter.referential_integrity]]
dangling_is_total_refsinvarianta typed link that resolves to no row or file produces exactly the dangling finding — typing never double-reports an unresolved target[[linter.referential_integrity]]
severity_errorinvarianta kind-incompatible resolved target is an issues-channel finding (exit 1) — the invariant gates the checker's accept transition, never the warnings channel[[linter.referential_integrity]]
member_arm_types_rowinvarianta member-arm target (file.row.member) canonicalizes to file.row and is typed as the row's kind — the stricter of the graph and oracle derivations[[linter.referential_integrity]]
uses_types_frontmatterinvarianta file-id target under uses is typed as Intent with the file's frontmatter kind — a non-profile target fires, a profile pack id stays clean[[linter.referential_integrity]]
from_to_not_duplicatedinvariantfrom/to State typing stays the model-shape checker's beat — this rule adds no second finding for the same cell[[linter.referential_integrity]]
corpus_stays_greeninvariantthe rule firing over the repo's own corpus yields zero findings — dogfooding is the gate[[linter.referential_integrity]]

Model

States

  • unindexed
  • indexing
  • indexed
  • resolving
  • passed
  • index_failed (emits: [[linter.referential_integrity.index_failure]])
  • resolution_failed (emits: [[linter.referential_integrity.resolution_failure]])

Transitions

idfromtoguard
build_indexunindexedindexingall files in repo passed linter.frontmatter
index_okindexingindexed[[linter.referential_integrity.unique_within_file]] ∧ [[linter.referential_integrity.unique_across_repo]]
index_failindexingindex_failed¬([[linter.referential_integrity.unique_within_file]] ∧ [[linter.referential_integrity.unique_across_repo]])
resolve_refsindexedresolvingindex built successfully
acceptresolvingpassed[[linter.referential_integrity.ref_resolves]] ∧ [[linter.referential_integrity.ref_kind_compatible]]
rejectresolvingresolution_failed¬([[linter.referential_integrity.ref_resolves]] ∧ [[linter.referential_integrity.ref_kind_compatible]])

Properties

idkindderives_fromgeneratorpredicate
duplicate_id_rejectedunit[[linter.referential_integrity.unique_within_file]]spec_file_with(duplicate_row_id: true)check(file) == failed
cross_file_collisionunit[[linter.referential_integrity.unique_across_repo]]two_spec_files_sharing_id()check(repo) == failed
dangling_ref_rejectedunit[[linter.referential_integrity.ref_resolves]]spec_file_with(ref_to_nonexistent_id: true)check(file) == failed
wrong_target_kindunit[[linter.referential_integrity.ref_kind_compatible]]guard_field_pointing_at_a_property_row()check(file) == failed
rename_naturalitylaw[[specodelic.rename_naturality]]arbitrary_spec_repo(), arbitrary_id_rename()identity: resolve(rename(I,a,a)) == resolve(I) associativity: resolve(rename(rename(I,a,b),b,c)) == resolve(rename(I,a,c)) naturality: lookup_all(rename(I)) == rename(lookup_all(I)) — every [[ref]] pointing at a renamed id is updated with it, the naturality case this checker is the enforcement layer for
clean_repo_passesunit[[linter.referential_integrity.ref_resolves]]arbitrary_well_formed_repo()check(repo) == passed
index_failure_label_assertedunit[[linter.referential_integrity.index_failure]]index_failure_raised()error_label == "linter.referential_integrity.index_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
resolution_failure_label_assertedunit[[linter.referential_integrity.resolution_failure]]resolution_failure_raised()error_label == "linter.referential_integrity.resolution_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
p_schema_decisionunit[[linter.referential_integrity.schema_is_decision]]arbitrary_typed_link()the lint verdict matches the graph report on the same link
p_typed_onlyunit[[linter.referential_integrity.typed_columns_only]]links_in_untyped_cells()no finding names an untyped column
p_dangling_onceunit[[linter.referential_integrity.dangling_is_total_refs]]typed_cell_with_dangling_target()findings == [the dangling finding]
p_severityunit[[linter.referential_integrity.severity_error]]violating_corpus()exit code 1 ∧ finding on the issues channel
p_member_armunit[[linter.referential_integrity.member_arm_types_row]]member_arm_links()typed as the canonical row's kind
p_uses_profileunit[[linter.referential_integrity.uses_types_frontmatter]]uses_links()profile target passes ∧ intent target fires
p_from_to_onceunit[[linter.referential_integrity.from_to_not_duplicated]]transition_with_ghost_endpoint()exactly the model-shape finding fires
p_enforcement_cleanunit[[linter.referential_integrity.corpus_stays_green]]arbitrary_well_formed_corpus()exit 0 ∧ zero typing findings

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: duplicate_id_rejected

  • WHEN spec_file_with(duplicate_row_id: true)
  • THEN check(file) == failed
  • VERIFIES [[linter.referential_integrity.duplicate_id_rejected]]

Scenario: cross_file_collision

  • WHEN two_spec_files_sharing_id()
  • THEN check(repo) == failed
  • VERIFIES [[linter.referential_integrity.cross_file_collision]]

Scenario: dangling_ref_rejected

  • WHEN spec_file_with(ref_to_nonexistent_id: true)
  • THEN check(file) == failed
  • VERIFIES [[linter.referential_integrity.dangling_ref_rejected]]

Scenario: wrong_target_kind

  • WHEN guard_field_pointing_at_a_property_row()
  • THEN check(file) == failed
  • VERIFIES [[linter.referential_integrity.wrong_target_kind]]

Scenario: rename_naturality

  • WHEN arbitrary_spec_repo(), arbitrary_id_rename()
  • THEN identity: resolve(rename(I,a,a)) == resolve(I) associativity: resolve(rename(rename(I,a,b),b,c)) == resolve(rename(I,a,c)) naturality: lookup_all(rename(I)) == rename(lookup_all(I)) — every [[ref]] pointing at a renamed id is updated with it, the naturality case this checker is the enforcement layer for
  • VERIFIES [[linter.referential_integrity.rename_naturality]]

Scenario: clean_repo_passes

  • WHEN arbitrary_well_formed_repo()
  • THEN check(repo) == passed
  • VERIFIES [[linter.referential_integrity.clean_repo_passes]]

Scenario: index_failure_label_asserted

  • WHEN index_failure_raised()
  • THEN error_label == "linter.referential_integrity.index_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.referential_integrity.index_failure_label_asserted]]

Scenario: resolution_failure_label_asserted

  • WHEN resolution_failure_raised()
  • THEN error_label == "linter.referential_integrity.resolution_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.referential_integrity.resolution_failure_label_asserted]]

Requirement: Reference Typing enforcement

spk lint SHALL reject a corpus when any resolved [[link]] in a reference field defined by the format’s Reference Typing table targets a row whose kind the table forbids, reading the allowed targets from the Schema-as-data table (never hardcoded per field name), and each finding SHALL carry the linter.ref_kind_compatible rule id, the rule’s one-line semantics, and a remediation hint.

Scenario: Guard citing a non-invariant constraint fires

  • WHEN a transition’s guard cites an advisory or effect constraint
  • THEN lint exits 1 with a linter.ref_kind_compatible finding naming the guard target and the invariant-or-State requirement

Scenario: Emits targeting a non-effect constraint fires

  • WHEN a state’s emits cell cites a constraint whose kind is not effect
  • THEN lint exits 1 with a linter.ref_kind_compatible finding

Scenario: Constraint traces rejected

  • WHEN a constraint’s traces_to cell cites a row that is not an Intent
  • THEN lint exits 1 with a linter.ref_kind_compatible finding

Scenario: Derives-from at a non-constraint target fires

  • WHEN a unit property’s derives_from cell cites a row that is not a constraint (a law may derive from the law-Property it restates)
  • THEN lint exits 1 with a linter.ref_kind_compatible finding

Scenario: Supersedes across kinds rejected

  • WHEN a supersedes cell cites a row of a different kind than the row carrying it
  • THEN lint exits 1 with a linter.ref_kind_compatible finding

Scenario: Satisfies and observes at wrong-kind contracts fire

  • WHEN a satisfies cell cites a non-extension_point constraint, or an observes cell cites a non-effect constraint
  • THEN lint exits 1 with a linter.ref_kind_compatible finding naming the requirement

Scenario: Uses targeting a non-profile file fires

  • WHEN a uses cell cites a file whose frontmatter kind is not profile
  • THEN lint exits 1 with a linter.ref_kind_compatible finding

Scenario: Kind-compatible references lint clean

  • WHEN every typed cell cites a kind-compatible target (guard → invariant constraint or State, emits → effect constraint, derives_from → constraint or own-law restatement, satisfies → extension_point, observes → effect, uses → profile file, member-arm targets typed as their row)
  • THEN lint reports no ref_kind_compatible findings

Scenario: Dangling target is not double-reported

  • WHEN a typed cell cites an id that resolves to no row or file
  • THEN exactly the linter.total_refs finding fires — no duplicate typing finding for the same dangling target

Scenario: Corpus stays green under enforcement

  • WHEN the linter runs over its own corpus
  • THEN zero ref_kind_compatible findings fire (dogfooding gate)

linter.external_completeness


id: linter.external_completeness kind: intent checked_against_core: clear statement: “WHEN a spec repo declares an external checklist, THE linter SHALL reject it if any checklist item lacks an explicit mapping to a resolved constraint/property id or an explicit waiver with a stated rationale.”

Linter: External Completeness Check

STATUS.md §4’s long-standing unsolved problem: every gap folded into specodelic.md’s Revision 2 — id_matches_file, ref_kind_compatible, single_root_reachable, the model well-formedness pair — was found by a human comparing a new checker file against the existing constraint list by eye. linter.coverage mechanizes internal consistency (every present constraint has a deriving property) but says so explicitly in its own Notes: it can tell you a present constraint lacks a test, never that a constraint is missing entirely. This file is the structurally different thing STATUS.md called for — a checker that diffs against an external reference (a domain checklist, a list of known past incidents, a stakeholder sign-off list) instead of checking the repo against itself.

Unlike the eight gating checkers in the Checker Ownership table, this one is optional per repo: it only runs when a repo declares a checklist to check against. A repo with no checklist has nothing external to be incomplete relative to — that’s a repo this checker doesn’t apply to, not one it passes vacuously. No file’s linted state depends on this checker; see Notes for what it does gate instead.

Purpose

STATUS.md §4’s long-standing unsolved problem: every gap folded into specodelic.md’s Revision 2 — id_matches_file, ref_kind_compatible, single_root_reachable, the model well-formedness pair — was found by a human comparing a new checker file against the existing constraint list by eye. linter.coverage mechanizes internal consistency (every present constraint has a deriving property) but says so explicitly in its own Notes: it can tell you a present constraint lacks a test, never that a constraint is missing entirely. This file is the structurally different thing STATUS.md called for — a checker that diffs against an external reference (a domain checklist, a list of known past incidents, a stakeholder sign-off list) instead of checking the repo against itself. Unlike the eight gating checkers in the Checker Ownership table, this one is optional per repo: it only runs when a repo declares a checklist to check against. A repo with no checklist has nothing external to be incomplete relative to — that’s a repo this checker doesn’t apply to, not one it passes vacuously. No file’s linted state depends on this checker; see Notes for what it does gate instead.

Constraints

| id | kind | expr | traces_to | satisfies | |––––––––––––––|———–|——————————————————————————————————————————————|–––––––––––| | checklist_well_formed | invariant | a declared checklist is a flat list of items, each with a stable id and a plain-text description | [[linter.external_completeness]] | | | every_item_accounted | invariant | ∀ checklist item c: ∃ exactly one mapping row m with m.item == c.id and m.status ∈ {covered, waived} | [[linter.external_completeness]] | | | covered_maps_resolve | invariant | ∀ mapping row m where m.status == "covered": m.mapped_ids is non-empty, and every id in it resolves to a real constraint or property row | [[linter.external_completeness]] | | | waiver_has_rationale | invariant | ∀ mapping row m where m.status == "waived": m.rationale is non-empty prose | [[linter.external_completeness]] | | | no_duplicate_claim | invariant | ∀ checklist item c: no two mapping rows both target c.id | [[linter.external_completeness]] | | | manifest_failure | effect | linter.external_completeness.manifest_failure(detail) | [[linter.external_completeness]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | mapping_failure | effect | linter.external_completeness.mapping_failure(detail) | [[linter.external_completeness]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] | | resolution_failure | effect | linter.external_completeness.resolution_failure(detail) | [[linter.external_completeness]] | [[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]] |

Model

States

  • not_applicable
  • loaded
  • mapping_checked
  • passed
  • load_failed (emits: [[linter.external_completeness.manifest_failure]])
  • mapping_failed (emits: [[linter.external_completeness.mapping_failure]])
  • resolution_failed (emits: [[linter.external_completeness.resolution_failure]])

Transitions

idfromtoguard
loadnot_applicableloadedrepo declares a checklist ∧ [[linter.external_completeness.checklist_well_formed]]
load_failnot_applicableload_failedrepo declares a checklist ∧ ¬([[linter.external_completeness.checklist_well_formed]])
check_mappingloadedmapping_checked[[linter.external_completeness.every_item_accounted]] ∧ [[linter.external_completeness.no_duplicate_claim]]
check_failloadedmapping_failed¬([[linter.external_completeness.every_item_accounted]] ∧ [[linter.external_completeness.no_duplicate_claim]])
acceptmapping_checkedpassed[[linter.external_completeness.covered_maps_resolve]] ∧ [[linter.external_completeness.waiver_has_rationale]]
rejectmapping_checkedresolution_failed¬([[linter.external_completeness.covered_maps_resolve]] ∧ [[linter.external_completeness.waiver_has_rationale]])

Properties

idkindderives_fromgeneratorpredicate
unmapped_item_rejectedunit[[linter.external_completeness.every_item_accounted]]checklist_item_with_no_mapping_row()check(repo) == failed
dangling_mapped_id_rejectedunit[[linter.external_completeness.covered_maps_resolve]]mapping_row_with(status: "covered", mapped_ids: ["nonexistent.id"])check(repo) == failed
unrationalized_waiver_rejectedunit[[linter.external_completeness.waiver_has_rationale]]mapping_row_with(status: "waived", rationale: "")check(repo) == failed
duplicate_claim_rejectedunit[[linter.external_completeness.no_duplicate_claim]]two_mapping_rows_targeting_the_same_checklist_item()check(repo) == failed
fully_mapped_checklist_passesunit[[linter.external_completeness.every_item_accounted]]checklist_where_every_item_has_a_covered_or_waived_mapping()check(repo) == passed
no_checklist_not_applicableunit[[linter.external_completeness.every_item_accounted]]repo_with_no_declared_checklist()check(repo) == not_applicable — distinct from passed, see Notes
mapping_naturalitylaw[[specodelic.rename_naturality]]arbitrary_repo_with_checklist(), arbitrary_id_rename()identity: mapped(repo renamed to itself) == mapped(repo) — the rename identity case instantiated at the mapped-ids observation point associativity: mapped(rename(rename(I, a, b), b, c)) == mapped(rename(I, a, c)) — the rename associativity case at the same observation point naturality: mapped(rename(I)) == rename(mapped(I)) — renaming a constraint or property id updates every mapped_ids cell claiming it, the same as any other reference
malformed_checklist_rejectedunit[[linter.external_completeness.checklist_well_formed]]declared_checklist_with(a_nested_item, an_item_missing_its_id)check(repo) == failed
manifest_failure_label_assertedunit[[linter.external_completeness.manifest_failure]]manifest_failure_raised()error_label == "linter.external_completeness.manifest_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
mapping_failure_label_assertedunit[[linter.external_completeness.mapping_failure]]mapping_failure_raised()error_label == "linter.external_completeness.mapping_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
resolution_failure_label_assertedunit[[linter.external_completeness.resolution_failure]]resolution_failure_raised()error_label == "linter.external_completeness.resolution_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

What this checker can and can’t prove — read carefully, this is the whole point of the file. every_item_accounted, covered_maps_resolve, and waiver_has_rationale together prove that a human explicitly asserted, for every checklist item, either “constraint X covers this” (checked structurally: X exists) or “this doesn’t apply, because ___” (checked structurally: a rationale was written). What none of this proves is that the assertion is true — that constraint X actually, semantically, addresses the checklist item it’s mapped to, or that the waiver’s stated reason is a good one. That gap is irreducible from inside this framework: whether a mapping is semantically correct is a judgment call about meaning, the same category of thing STATUS.md §2 keeps out of scope for prose quality. What this checker mechanizes isn’t “the repo is complete” — it’s “someone was forced to look at every item and commit to a claim about it, on the record, instead of the checklist silently going unconsulted.” That is a real, checkable weakening of the original problem, not a full solution to it — the same honest half-measure linter.coverage makes about internal completeness, one level out.

Why this doesn’t gate linted, compiled, or anything else in specodelic.md’s lifecycle. The six Checker Ownership table checkers and linter.coverage all check something every spec file necessarily has (frontmatter, refs, a model, constraints). A checklist is an artifact nothing requires a repo to declare — bolting a mandatory gate onto an optional input would make every repo without a checklist unable to reach verified, which is wrong. Instead this stands as an independent, addressable gate: a repo may declare a checklist and run this against it, and CI or an orchestrator (STATUS.md §4’s remaining P1 item) can choose to require it for release the same way a real org’s ship gate might require a security sign-off — a policy decision layered on top of specodelic, not a fact specodelic.md itself asserts about every repo.

Decision of record (mp1 row 10, 2026-09-29): the checklist is a dedicated *.checklist.md artifact OUTSIDE 𝒦. A checklist manifest is not a spec file — no frontmatter, no four-layer shape, exempt like AGENTS.md/STATUS.md. Its format: a ## Items section holding a flat list of - **<id>**: <plain-text description> bullets (ids are stable row-id tokens: alphanumeric segments joined by ./_/-), plus a ## Mapping section holding exactly one table with the columns item/status/mapped_ids/rationale. Presence of the file IS the declaration — a repo with no *.checklist.md has nothing external to be incomplete relative to (not_applicable, not a vacuous pass). Mapping rows must reference declared items; statuses outside {covered, waived} leave the item unaccounted-for (every_item_accounted’s beat); a duplicated item claim is no_duplicate_claim’s beat, never double- reported as unaccounted. A manifest that declares zero items is itself a checklist_well_formed defect — a checklist nothing can be consulted against is not a checklist, and a silent pass would be a false green. The linter tolerates a UTF-8 BOM and ### -depth headers inside a section (prose, never section switches). The degenerate-spec-file option (empty Model/Constraints, frontmatter id: spec) was rejected: it would grow 𝒦 after all, drag the naming law and dual-format machinery onto an artifact that has no intent to state, for no benefit this checker needs.

mapping_naturality is enforced by the rename tool. The checklist sits outside 𝒦, so linter.referential_integrity itself never parses the manifest — but rename.md’s old_id_fully_replaced reaches into mapped_ids cells (bare and [[…]] spellings alike, children following their parent), and rename’s verify gate re-runs this checker’s resolution (covered_maps_resolve, plus manifest well-formedness) over the post-rename corpus. A rename that misses a cell is rejected before any byte is written, and a rename that would dangle a cell is equally refused.

checked_against_core: clear (see AGENTS.md’s convention). This file’s constraints are local to what an external-completeness check specifically needs, the same way compile.md/model_check.md/ verify.md/rename.md each carry lifecycle-step-specific invariants without requiring new top-level entries.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: unmapped_item_rejected

  • WHEN checklist_item_with_no_mapping_row()
  • THEN check(repo) == failed
  • VERIFIES [[linter.external_completeness.unmapped_item_rejected]]

Scenario: dangling_mapped_id_rejected

  • WHEN mapping_row_with(status: "covered", mapped_ids: ["nonexistent.id"])
  • THEN check(repo) == failed
  • VERIFIES [[linter.external_completeness.dangling_mapped_id_rejected]]

Scenario: unrationalized_waiver_rejected

  • WHEN mapping_row_with(status: "waived", rationale: "")
  • THEN check(repo) == failed
  • VERIFIES [[linter.external_completeness.unrationalized_waiver_rejected]]

Scenario: duplicate_claim_rejected

  • WHEN two_mapping_rows_targeting_the_same_checklist_item()
  • THEN check(repo) == failed
  • VERIFIES [[linter.external_completeness.duplicate_claim_rejected]]

Scenario: fully_mapped_checklist_passes

  • WHEN checklist_where_every_item_has_a_covered_or_waived_mapping()
  • THEN check(repo) == passed
  • VERIFIES [[linter.external_completeness.fully_mapped_checklist_passes]]

Scenario: no_checklist_not_applicable

  • WHEN repo_with_no_declared_checklist()
  • THEN check(repo) == not_applicable — distinct from passed, see Notes
  • VERIFIES [[linter.external_completeness.no_checklist_not_applicable]]

Scenario: mapping_naturality

  • WHEN arbitrary_repo_with_checklist(), arbitrary_id_rename()
  • THEN identity: mapped(repo renamed to itself) == mapped(repo) — the rename identity case instantiated at the mapped-ids observation point associativity: mapped(rename(rename(I, a, b), b, c)) == mapped(rename(I, a, c)) — the rename associativity case at the same observation point naturality: mapped(rename(I)) == rename(mapped(I)) — renaming a constraint or property id updates every mapped_ids cell claiming it, the same as any other reference
  • VERIFIES [[linter.external_completeness.mapping_naturality]]

Scenario: malformed_checklist_rejected

  • WHEN declared_checklist_with(a_nested_item, an_item_missing_its_id)
  • THEN check(repo) == failed
  • VERIFIES [[linter.external_completeness.malformed_checklist_rejected]]

Scenario: manifest_failure_label_asserted

  • WHEN manifest_failure_raised()
  • THEN error_label == "linter.external_completeness.manifest_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.external_completeness.manifest_failure_label_asserted]]

Scenario: mapping_failure_label_asserted

  • WHEN mapping_failure_raised()
  • THEN error_label == "linter.external_completeness.mapping_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.external_completeness.mapping_failure_label_asserted]]

Scenario: resolution_failure_label_asserted

  • WHEN resolution_failure_raised()
  • THEN error_label == "linter.external_completeness.resolution_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.external_completeness.resolution_failure_label_asserted]]

linter.failure_shape


id: linter.failure_shape kind: intent checked_against_core: clear statement: “WHEN a spec repo’s tool files are linted, THE failure-shape checker SHALL reject a tool file whose failure terminal states emit nothing, whose error labels collide within a file, or whose failure guards neither cite their negated transition’s citation set nor appear on the recorded carve-out list.”

Linter: Failure Shape Check

The checker half of the error contract (errors.md): it turns the contract’s tier-2 rules — mute failure terminals, label collisions, and typed-negation guard totals — from graph-observable facts into lint findings. Everything it checks is decidable from the reference graph the graph tool already derives; nothing here reads prose, so the checker cannot over-reject a file whose prose happens to argue for failure classes the graph already separates (the D2a decision: classes ⟺ distinct guard citation sets, never a prose judgment).

v1 scope is failure terminals only. model_check.md’s timed_out and exploration_only are real terminal outcomes but are a stated non-goal of this version: typing them raises the exit-code mapping question (does an exhausted bound map to 1?) that errors.md’s exit_code_mapping row defers to a later Revision — the gap is stated here so it is visible rather than forgotten.

This file shipped spec-only (design D6): no Checker Ownership row lands until the checker exists — the table’s invariant is that every listed checker exists. The checker is implemented in spk lint (specodelic-ct5): the three constraint rules below are enforced per file on every lint pass, so they are claims about today’s linter, not norms for a future one. Resolved of record (2026-10-01, specodelic-hhp, decision a): the checker has its Checker Ownership row and rides the orchestrator’s lint stage, dependent on linter.model_shape — the failure-shape walk reads the Model’s states, transitions and emits edges, so it runs only once the model is proven well-formed (dependency_respecting_skip). The earlier note about AGENTS.md’s stale specodelic-6pi citation belongs to governance, not to this file.

Purpose

The checker half of the error contract (errors.md): it turns the contract’s tier-2 rules — mute failure terminals, label collisions, and typed-negation guard totals — from graph-observable facts into lint findings. Everything it checks is decidable from the reference graph the graph tool already derives; nothing here reads prose, so the checker cannot over-reject a file whose prose happens to argue for failure classes the graph already separates (the D2a decision: classes ⟺ distinct guard citation sets, never a prose judgment). v1 scope is failure terminals only. model_check.md’s timed_out and exploration_only are real terminal outcomes but are a stated non-goal of this version: typing them raises the exit-code mapping question (does an exhausted bound map to 1?) that errors.md’s exit_code_mapping row defers to a later Revision — the gap is stated here so it is visible rather than forgotten. This file shipped spec-only (design D6): no Checker Ownership row lands until the checker exists — the table’s invariant is that every listed checker exists. The checker is implemented in spk lint (specodelic-ct5): the three constraint rules below are enforced per file on every lint pass, so they are claims about today’s linter, not norms for a future one. Resolved of record (2026-10-01, specodelic-hhp, decision a): the checker has its Checker Ownership row and rides the orchestrator’s lint stage, dependent on linter.model_shape — the failure-shape walk reads the Model’s states, transitions and emits edges, so it runs only once the model is proven well-formed (dependency_respecting_skip). The earlier note about AGENTS.md’s stale specodelic-6pi citation belongs to governance, not to this file.

Constraints

idkindexprtraces_tosatisfies
terminal_states_emitinvariantevery failure terminal state in a tool file's Model (a state with inbound transitions, no outbound transitions, carrying an emits edge obligation per errors.md's failure_state_emits) emits exactly one effect Constraint owned by that file — a mute failure terminal is a finding (v1 scope: failure terminals only; timed_out / exploration_only are the stated non-goal above)[[linter.failure_shape]]
error_labels_uniqueinvariantwithin one file, no two error Constraints carry the same variant head — cross-file collisions are structurally impossible by errors.md's error_expr_shape (the label is file-id-namespaced), so this check is per-file and trivially green corpus-wide today; it exists so a future format change cannot silently drop the namespacing law[[linter.failure_shape]]
guard_negation_totalinvariantevery failure transition either cites exactly the union of its success siblings' citation sets (the negated disjunction, errors.md's guard_negation_typed), or is on the recorded carve-out list — which is exactly orchestrate.md's stage-fail transitions (lint_fail, compile_fail, model_check_fail, verify_fail), per that file's own Notes' don't-restate discipline; a zero-citation failure guard off the list is a finding, never a silent pass[[linter.failure_shape]]
check_failureeffectlinter.failure_shape.check_failure(detail)[[linter.failure_shape]][[errors.envelope_error_kind]] ∧ [[errors.exit_code_mapping]] ∧ [[errors.remediation_hint_present]]

Model

States

  • unchecked
  • checking
  • passed
  • failed (emits: [[linter.failure_shape.check_failure]])

Transitions

idfromtoguard
beginuncheckedcheckingthe repo declares a specs corpus to check
acceptcheckingpassed[[linter.failure_shape.terminal_states_emit]] ∧ [[linter.failure_shape.error_labels_unique]] ∧ [[linter.failure_shape.guard_negation_total]]
rejectcheckingfailed¬([[linter.failure_shape.terminal_states_emit]] ∧ [[linter.failure_shape.error_labels_unique]] ∧ [[linter.failure_shape.guard_negation_total]])

Properties

idkindderives_fromgeneratorpredicate
mute_terminal_rejectedunit[[linter.failure_shape.terminal_states_emit]]tool_file_with_failure_terminal_and_no_emits_edge()check(file) == failed — the corpus’s pre-add-error-contract shape, kept as the negative fixture
label_collision_rejectedunit[[linter.failure_shape.error_labels_unique]]file_with_two_error_constraints_sharing_a_variant_head()check(file) == failed
zero_citation_flaggedunit[[linter.failure_shape.guard_negation_total]]failure_transition_citing_nothing_off_the_carveout_list()check(file) == failed — the carve-out is a checked list, not an escape hatch
carved_out_guard_passesunit[[linter.failure_shape.guard_negation_total]]orchestrate_stage_fail_transition()check(file) == passed — the carve-out is checked, not assumed
negation_set_mismatch_flaggedunit[[linter.failure_shape.guard_negation_total]]failure_transition_whose_citations_differ_from_its_siblings()check(file) == failed — citation-set inequality is graph-decidable
clean_repo_passesunit[[linter.failure_shape.terminal_states_emit]]the_repo_itself()check(repo) == passed — the corpus dogfoods this checker’s contract
check_failure_label_assertedunit[[linter.failure_shape.check_failure]]failure_shape_violation_found()error_label == "linter.failure_shape.check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)

Notes

The class rule is the graph-decidable form. errors.md’s failure_class_is_state owns the corpus-side rule (a state with ≥2 inbound failure transitions whose guard citation sets differ is malformed); this checker never re-derives classes from prose — “classes ⟺ distinct citation sets” is the only reading it implements, so a single-class file (one failure state, one inbound failure transition, however many prose paragraphs argue about it) cannot be over-rejected.

Carve-out list, restated. The only recorded carve-out is orchestrate.md‘s stage-fail transitions. That file’s Notes decline to restate upstream files’ logic as guard-citable rows; retyping their guards would reintroduce exactly the duplication it argues against. The list is data to this checker (checked membership), not an assumption — a new zero-citation failure guard anywhere else is a finding.

Ownership was deliberately absent, then granted. This file originally shipped no Checker Ownership row — its findings rode spk lint only after the checker was implemented (specodelic-ct5), and orchestrator wiring waited for an ownership decision. That decision landed (specodelic-hhp): the file now owns terminal_states_emit, error_labels_unique, and guard_negation_total as a gating row in specodelic.md’s Checker Ownership table (depending on linter-model_shape.md), and its findings gate spk lint. The AGENTS.md staleness it once flagged is governance’s to refresh.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: mute_terminal_rejected

  • WHEN tool_file_with_failure_terminal_and_no_emits_edge()
  • THEN check(file) == failed — the corpus’s pre-add-error-contract shape, kept as the negative fixture
  • VERIFIES [[linter.failure_shape.mute_terminal_rejected]]

Scenario: label_collision_rejected

  • WHEN file_with_two_error_constraints_sharing_a_variant_head()
  • THEN check(file) == failed
  • VERIFIES [[linter.failure_shape.label_collision_rejected]]

Scenario: zero_citation_flagged

  • WHEN failure_transition_citing_nothing_off_the_carveout_list()
  • THEN check(file) == failed — the carve-out is a checked list, not an escape hatch
  • VERIFIES [[linter.failure_shape.zero_citation_flagged]]

Scenario: carved_out_guard_passes

  • WHEN orchestrate_stage_fail_transition()
  • THEN check(file) == passed — the carve-out is checked, not assumed
  • VERIFIES [[linter.failure_shape.carved_out_guard_passes]]

Scenario: negation_set_mismatch_flagged

  • WHEN failure_transition_whose_citations_differ_from_its_siblings()
  • THEN check(file) == failed — citation-set inequality is graph-decidable
  • VERIFIES [[linter.failure_shape.negation_set_mismatch_flagged]]

Scenario: clean_repo_passes

  • WHEN the_repo_itself()
  • THEN check(repo) == passed — the corpus dogfoods this checker’s contract
  • VERIFIES [[linter.failure_shape.clean_repo_passes]]

Scenario: check_failure_label_asserted

  • WHEN failure_shape_violation_found()
  • THEN error_label == "linter.failure_shape.check_failure" — renaming the label touches the error Constraint, this property, and its note together (EDGE-002)
  • VERIFIES [[linter.failure_shape.check_failure_label_asserted]]

linter.observability


id: linter.observability kind: intent statement: “WHEN a spec declares an effect Constraint, THE linter SHALL warn — advisory, exit 0 — on every effect within the lint invocation’s file set that no observes reference targets, and SHALL never gate a lifecycle transition on this warning.”

Linter: Observability

specodelic.md Revision 9 added the observes typed reference: a Constraint row’s outbound pointer, per specodelic.md’s Reference Typing carve-out, to an effect Constraint in any file — the vocabulary for “this output must be observable”. Vocabulary alone does not make observability a checked fact: nothing distinguishes an effect that something watches from one nobody declared an interest in. This file specifies the check that closes that gap, shaped on the Revision 7 precedent (satisfies) for typing and on linter-external_completeness.md for cross-file check shape.

Purpose

specodelic.md Revision 9 added the observes typed reference (a Constraint row’s typed pointer to an effect Constraint, any file) — the vocabulary for “this output must be observable”. Vocabulary alone does not make observability a checked fact: nothing distinguishes an effect that something watches from one nobody declared an interest in. This file specifies the check that closes that gap, shaped on the Revision 7 precedent (satisfies) for typing and on linter-external_completeness.md for cross-file check shape.

Constraints

idkindexprtraces_to
observation_universeinvariantthe check's universe is the lint invocation's file set — corpus-wide lint (just lint-specs) is the canonical run; every effect Constraint in that set is either the target of ≥1 observes edge resolved within the same set, or is reported as an advisory warning naming the unobserved row[[linter.observability]]
advisory_severityinvariantthe unobserved-effect warning is emitted on the success envelope's warnings channel with exit 0 — never an Issue, never a nonzero exit; a warning is not a failure and never gates a lifecycle transition (whether it ever gates is a follow-up change, decided on dogfood friction evidence)[[linter.observability]]
self_observation_not_countedinvariantan effect row does not observe itself — an observation counts only when the observes edge is sourced at a different row (intra-file or cross-file); a row pointing observes at its own output is vacuous and is still warned[[linter.observability]]
dangling_observes_is_referentialinvariantan observes edge whose target does not resolve is a linter.total_refs finding, never an observability warning — the two checks compose without double-reporting the same row[[linter.observability]]
no_waivers_in_v1invariantno waiver machinery exists in this Revision — when the need is demonstrated, linter-external_completeness.md's covered/waived claim structure is the candidate, decided in a follow-up change[[linter.observability]]

Model

States

  • scanning
  • observed
  • unobserved_warned

Transitions

idfromtoguard
scan_effectsscanningobservedevery effect in the invocation's file set has ≥1 observer
warn_unobservedscanningunobserved_warned[[linter.observability.observation_universe]]

Properties

idkindderives_fromgeneratorpredicate
unobserved_effect_warnedunit[[linter.observability.observation_universe]]effect_with_zero_observes_edges()exit 0 ∧ a warning naming the row id and the rule id linter.observability
observed_effect_silentunit[[linter.observability.observation_universe]]effect_with_at_least_one_observes_edge()no observability warning
warning_never_gatesunit[[linter.observability.advisory_severity]]corpus_with_unobserved_effects()exit code 0 ∧ zero Issue findings attributable to this check
mutual_observation_passesunit[[linter.observability.observation_universe]]two_files_mutually_observing_each_others_effects()both effects counted as observed — no warning
self_observation_still_warnedunit[[linter.observability.self_observation_not_counted]]effect_row_pointing_observes_at_itself()warning fires — vacuous self-observation is not an observer
dangling_observes_not_doubledunit[[linter.observability.dangling_observes_is_referential]]observes_pointing_at_an_absent_row()exactly one total_refs finding; zero observability warnings
waiver_input_ignoredunit[[linter.observability.no_waivers_in_v1]]corpus_with_unobserved_effects()the warning fires regardless of any claimed-waiver text — no waiver channel exists

Notes

checked_against_core: clear (see AGENTS.md’s convention). The self-observation decision above resolves the question left open in the change design’s Open Questions: intra-file observation by a different row counts; a row observing itself does not. Whether this check ever becomes a gate (and joins orchestrate.md’s stage guards) is deliberately undecided — the advisory-vs-gating decision needs dogfood friction evidence first, per the Revision 9 text.

Requirements

Requirement: Property coverage mirror

Every property row SHALL be verified by exactly one dedicated scenario; ah sync SHALL derive one contract per VERIFIES link.

Scenario: unobserved_effect_warned

  • WHEN effect_with_zero_observes_edges()
  • THEN exit 0 ∧ a warning naming the row id and the rule id linter.observability
  • VERIFIES [[linter.observability.unobserved_effect_warned]]

Scenario: observed_effect_silent

  • WHEN effect_with_at_least_one_observes_edge()
  • THEN no observability warning
  • VERIFIES [[linter.observability.observed_effect_silent]]

Scenario: warning_never_gates

  • WHEN corpus_with_unobserved_effects()
  • THEN exit code 0 ∧ zero Issue findings attributable to this check
  • VERIFIES [[linter.observability.warning_never_gates]]

Scenario: mutual_observation_passes

  • WHEN two_files_mutually_observing_each_others_effects()
  • THEN both effects counted as observed — no warning
  • VERIFIES [[linter.observability.mutual_observation_passes]]

Scenario: self_observation_still_warned

  • WHEN effect_row_pointing_observes_at_itself()
  • THEN warning fires — vacuous self-observation is not an observer
  • VERIFIES [[linter.observability.self_observation_still_warned]]

Scenario: dangling_observes_not_doubled

  • WHEN observes_pointing_at_an_absent_row()
  • THEN exactly one total_refs finding; zero observability warnings
  • VERIFIES [[linter.observability.dangling_observes_not_doubled]]

Scenario: waiver_input_ignored

  • WHEN corpus_with_unobserved_effects()
  • THEN the warning fires regardless of any claimed-waiver text — no waiver channel exists
  • VERIFIES [[linter.observability.waiver_input_ignored]]

linter.content_advisories


id: linter.content_advisories kind: intent statement: “WHEN a spec corpus is linted, THE linter SHALL warn — advisory, exit 0 — on whole-cell placeholder or tautological content and on invariant constraint exprs or non-law Property predicates whose executable fragment cites no declared model element, and on invariants that forbid a state the Model never declares, and SHALL never gate on any of these findings or judge reachability.”

Linter: Content Advisories

The format’s structured cells are data, not prose: an Intent has a statement, a Constraint has an expr, a Property has a predicate. Lint never judges their meaning, but it can detect two shapes that carry no meaning at all — a cell that was never filled in, and a predicate that cannot fail. Both are emitted on the success envelope’s warnings channel (exit 0); neither ever joins the issues channel. This keeps the fail-closed gating contract intact while making the two most common AI-author filler shapes visible instead of silent.

Purpose

Close the “plausible filler” gap recorded in specodelic-xci: an untouched scaffold and a tautological predicate (true, x == x) currently lint with zero findings. Two generators produce that filler, and the signature must recognise both:

  • spk new — the stub statement THE system SHALL … and TODO — … cells;
  • spk migrate — a sidecar whose ids are scaffold_constraint, scaffold_transition, and scaffold_property with bare true cells, beside a prose statement that is not the stub. That file’s only scaffold evidence is a tautology, which is why a tautological content cell counts as the signature.

The advisory is deliberately non-gating: whether these shapes should ever block a lifecycle transition is a separate decision that needs dogfood-friction evidence, exactly as linter-observability.md’s advisory was kept out of the linted gate.

Constraints

idkindexprtraces_to
placeholder_classesinvarianta structured content cell is a placeholder when its trimmed text is TODO, TBD, or FIXME (optionally followed by a separator and a note), a row id begins with scaffold_ in a file that still carries the scaffold signature (its intent statement is a placeholder, or a constraint expr or property predicate is itself a placeholder or a tautology), or the intent statement is a placeholder (the spk new stub "THE system SHALL …" or a whole-cell placeholder word) — the real producers are the spk new stub/TODO cells and spk migrate's scaffold_constraint/scaffold_transition/scaffold_property sidecar rows whose cells are bare true; detection is whole-cell or scaffold-signature-gated row-id-prefix, never a substring search inside an executable fragment[[linter.content_advisories]]
tautology_classinvarianta property predicate or invariant constraint expr is tautological when, after stripping its surrounding code span and any **rust:** fragment marker, its trimmed text is exactly true or ⊤, or it is one identifier compared equal to itself (x == x) — an effect or advisory constraint expr is never judged (it is a label, not a claim that must be able to fail); no arithmetic, calls, or compound expressions are judged[[linter.content_advisories]]
advisory_severityinvariantevery content advisory is emitted on the success envelope's warnings channel with exit 0 — never an Issue, never a nonzero exit, and never a change to the hard-findings count of an otherwise clean corpus[[linter.content_advisories]]
fragment_interior_not_scannedinvariantthe checker never inspects the interior of a **rust:** fragment for placeholder words — a legitimate fragment such as todo_predicate! or a string containing TODO stays silent unless the whole cell is one of the placeholder forms above[[linter.content_advisories]]
fragment_citation_requiredinvariantan invariant Constraint expr or a non-law Property predicate that carries an executable **rust:** fragment must cite at least one declared model element — a Model state id, a transition id, or a Constraint/Property row id; the intent id is the file's own identity and is never a model element[[linter.content_advisories]]
citation_whole_tokeninvariantcitation is a whole-token match over [A-Za-z0-9_]+ runs, never substring — unlocked does not cite lock and beheld does not cite held — and a dot is a token boundary, so a dotted demo.spec.held reference cites held through its segments[[linter.content_advisories]]
declared_citation_sufficientinvariantone declared citation is sufficient: a declared state, transition, constraint, or property that is never exercised is never flagged, because the check compares the fragment's citation text against the declared id set and never judges reachability or coverage of declared ids[[linter.content_advisories]]
law_predicate_exemptinvarianta law-kind Property predicate is outside the fragment surface — its law-case labels are the law-case grammar, never fragment markers, so the vacuity check skips law rows entirely[[linter.content_advisories]]
forbidden_state_declaredinvariantan invariant fragment's state != "literal" comparison, or its mirror literal != state, must name a state declared under Model/States — an undeclared forbidden state cannot exist, so the invariant is structurally vacuous and is reported with the literal it forbids[[linter.content_advisories]]
declared_phase_state_silentinvarianta state declared under Model/States is silent even when no transition enters it — a declared phase its correct runs never reach is legitimate defensive design pressure, and the rule never judges reachability[[linter.content_advisories]]
narrow_state_equalityinvariantonly the bare state binder's string inequality is judged — other binders, ==, arithmetic, calls, and escaped or raw literals stay silent, and my_state, model.state, and state_extra are other names, never the binder[[linter.content_advisories]]
advisory_channel_onlyinvariantboth vacuity findings ride the success envelope's warnings channel with exit 0 — never an Issue, never a nonzero exit, and never a change to the failures count of an otherwise clean corpus[[linter.content_advisories]]
advisory_class_partitioninvarianteach vacuity rule carries its own id and remedy and never restates a placeholder or tautology finding: one finding per fragment for the citation rule, one per undeclared forbidden literal for the invariant rule, and the whole-cell rules never restate a vacuity finding[[linter.content_advisories]]

Model

States

  • scanning
  • clean
  • warned

Transitions

idfromtoguard
scan_cleanscanningcleanno structured cell is a whole-cell placeholder, no predicate or invariant expr is a tautology, and no vacuity rule fires
scan_warnedscanningwarned[[linter.content_advisories.placeholder_classes]] ∨ [[linter.content_advisories.tautology_class]] ∨ [[linter.content_advisories.fragment_citation_required]] ∨ [[linter.content_advisories.forbidden_state_declared]]

Properties

idkindderives_fromgeneratorpredicate
placeholder_warnedunit[[linter.content_advisories.placeholder_classes]]spec_with_todo_expr()exit 0 ∧ a warnings-channel entry names the row and rule linter.content_advisories.placeholder_content
tautology_warnedunit[[linter.content_advisories.tautology_class]]spec_with_true_predicate()exit 0 ∧ a warnings-channel entry names the row and rule linter.content_advisories.tautological_predicate
warning_never_gatesunit[[linter.content_advisories.advisory_severity]]corpus_with_placeholder_cells()exit code 0 ∧ zero Issue findings attributable to this checker
fragment_interior_silentunit[[linter.content_advisories.fragment_interior_not_scanned]]predicate_with_todo_predicate_macro()no warning — a legitimate executable fragment is never treated as a placeholder
vacuous_fragment_warnsunit[[linter.content_advisories.fragment_citation_required]]spec_with(invariant_expr: flag != 0)exit 0 ∧ a warnings entry names the row and rule linter.fragment_binds_nothing ∧ the issues channel carries no matching finding
whole_token_citationunit[[linter.content_advisories.citation_whole_token]]fragment_naming(unlocked) over a declared lockno citation and a warning, while a dotted demo.spec.held reference cites held and stays silent
declared_element_sufficiencyunit[[linter.content_advisories.declared_citation_sufficient]]fragment_citing(a_state_no_transition_enters)no fragment_binds_nothing warning
law_predicate_not_judgedunit[[linter.content_advisories.law_predicate_exempt]]law_property(predicate_with_case_labels_only)no fragment_binds_nothing warning for the law row
undeclared_forbidden_state_warnsunit[[linter.content_advisories.forbidden_state_declared]]invariant(fragment: state != "aborted", states: running, done)a warnings entry names the row and the literal aborted
phase_state_silentunit[[linter.content_advisories.declared_phase_state_silent]]invariant(fragment: state != "halted", states include halted)no vacuous_invariant warning
narrow_state_surfaceunit[[linter.content_advisories.narrow_state_equality]]invariant(fragment: state == "halted", or another binder)no vacuous_invariant warning
vacuity_never_gatesunit[[linter.content_advisories.advisory_channel_only]]corpus_with(vacuous_fragment, undeclared_forbidden_state)exit code 0 ∧ zero issue findings under either vacuity rule
family_partitionunit[[linter.content_advisories.advisory_class_partition]]cells_with(placeholder_expr, tautological_predicate, vacuous_fragment)each finding carries its owning rule id ∧ no subject receives two findings from the same rule

Requirements

Requirement: Placeholder and tautology cells are warned, never gated

Content advisories SHALL be emitted on the warnings channel with exit 0, covering whole-cell placeholders, scaffold-signature row ids, stub statements, and tautological property predicates or invariant constraint exprs — never effect/advisory exprs, statements, or fragment interiors. The scaffold signature SHALL recognise both real producers: spk new’s stub/TODO cells and spk migrate’s sidecar (scaffold_* ids with true cells).

Scenario: placeholder_warned

  • WHEN spec_with_todo_expr()
  • THEN exit 0 ∧ a warnings-channel entry names the row and rule linter.content_advisories.placeholder_content
  • VERIFIES [[linter.content_advisories.placeholder_warned]]

Scenario: tautology_warned

  • WHEN spec_with_true_predicate()
  • THEN exit 0 ∧ a warnings-channel entry names the row and rule linter.content_advisories.tautological_predicate
  • VERIFIES [[linter.content_advisories.tautology_warned]]

Scenario: warning_never_gates

  • WHEN corpus_with_placeholder_cells()
  • THEN exit code 0 ∧ zero Issue findings attributable to this checker
  • VERIFIES [[linter.content_advisories.warning_never_gates]]

Scenario: fragment_interior_silent

  • WHEN predicate_with_todo_predicate_macro()
  • THEN no warning — a legitimate executable fragment is never treated as a placeholder
  • VERIFIES [[linter.content_advisories.fragment_interior_silent]]

Requirement: Fragment citation advisory

A **rust:** fragment on an invariant Constraint’s expr or a non-law Property’s predicate SHALL cite at least one declared model element — a Model state id, a transition id, or a Constraint/Property row id, never the intent id — matched whole-token with . as a token boundary, and a fragment citing none SHALL be reported as linter.fragment_binds_nothing on the warnings channel at exit 0, naming the row and the file; one declared citation SHALL be sufficient.

Scenario: vacuous_fragment_warns

  • WHEN an invariant Constraint’s expr is **rust:** flag != 0 and the file declares a state, a transition, that constraint, and a unit property
  • THEN lint reports linter.fragment_binds_nothing for that row on the warnings channel, and the issues channel carries no finding under that rule (exit 0)
  • VERIFIES [[linter.content_advisories.vacuous_fragment_warns]]

Scenario: whole_token_citation

  • WHEN a fragment reads **rust:** unlocked == false and the file declares a lock state
  • THEN the fragment does not cite lock and warns, while a fragment naming demo.spec.held cites a declared held and stays silent
  • VERIFIES [[linter.content_advisories.whole_token_citation]]

Scenario: declared_element_sufficiency

  • WHEN a fragment cites a declared state that no transition ever enters
  • THEN no linter.fragment_binds_nothing finding is emitted for that row — citing one declared element is sufficient, and reachability is never judged
  • VERIFIES [[linter.content_advisories.declared_element_sufficiency]]

Scenario: law_predicate_not_judged

  • WHEN a law-kind Property’s predicate carries **identity:** and **associativity:** case labels and no **rust:** fragment
  • THEN no linter.fragment_binds_nothing finding is emitted for that row
  • VERIFIES [[linter.content_advisories.law_predicate_not_judged]]

Requirement: Forbidden-state declaration advisory

An invariant Constraint’s **rust:** fragment comparing the bare state binder for string inequality SHALL name a state declared under Model/States, and each undeclared literal SHALL be reported as linter.vacuous_invariant on the warnings channel, naming the constrained row and the literal, with the run still exiting 0; a declared state SHALL be silent regardless of reachability, and other binders, ==, arithmetic, calls, and escaped or raw literals SHALL be outside the surface.

Scenario: undeclared_forbidden_state_warns

  • WHEN an invariant expr is **rust:** state != "aborted" and Model/States declares only running and done
  • THEN lint reports linter.vacuous_invariant naming the row and aborted, on the warnings channel (exit 0)
  • VERIFIES [[linter.content_advisories.undeclared_forbidden_state_warns]]

Scenario: phase_state_silent

  • WHEN an invariant expr is **rust:** state != "halted" and Model/States declares halted even though the correct runs never enter it
  • THEN no linter.vacuous_invariant finding is emitted — the check is citation versus declaration, never reachability
  • VERIFIES [[linter.content_advisories.phase_state_silent]]

Scenario: narrow_state_surface

  • WHEN an invariant expr uses state == "halted", a different binder (my_state or model.state), or a raw/escaped literal
  • THEN no linter.vacuous_invariant finding is emitted — only the bare state binder’s != string comparison is judged
  • VERIFIES [[linter.content_advisories.narrow_state_surface]]

Requirement: Vacuity advisory severity and family partition

Both vacuity rules SHALL ride the lint success envelope’s warnings channel with exit 0, SHALL never push a finding to the issues channel, SHALL emit at most one finding per subject under their own rule id and remedy, and SHALL NOT restate a linter.placeholder_content or linter.tautological_predicate finding; the whole-cell rules SHALL NOT restate a vacuity finding.

Scenario: vacuity_never_gates

  • WHEN a corpus contains a fragment citing no declared element and an invariant forbidding an undeclared state
  • THEN the run exits 0, both findings appear on the warnings channel, and the issues channel carries neither rule id
  • VERIFIES [[linter.content_advisories.vacuity_never_gates]]

Scenario: family_partition

  • WHEN one corpus carries a whole-cell placeholder, a tautological predicate, and a vacuous fragment
  • THEN each finding carries its owning rule id, no rule emits twice for one subject, and no finding is re-issued under another rule’s id
  • VERIFIES [[linter.content_advisories.family_partition]]

linter.scenario_bindings


id: linter.scenario_bindings kind: intent statement: “WHEN a spec file is linted, THE linter SHALL fire scenario_binding_targets_declared_scenario on every binding row whose id slugifies to no — or to more than one — #### Scenario: heading of the same file under the one pinned canonicalization, SHALL fire scenario_binding_refs_own_file on every binding-cell reference that resolves only outside the row’s own file, SHALL warn scenario_binding_covers_constraint on every binding row whose verifies cell cites no Constraint row of its own file, SHALL warn scenario_binding_unbound_scenario once per declared scenario with no binding row in table-carrying files and scenario_binding_table_absent exactly once on a table-less file, SHALL warn scenario_binding_uninformative on a binding whose verifies cites more than 40% of the file’s Constraint rows (distinct_cited * 5 > total * 2) or whose on cell cites every declared Transition, SHALL fire scenario_binding_status_closed on every binding row whose optional status cell carries a value outside the closed vocabulary draft/confirmed — the absent cell is draft, SHALL compose with total_refs and ref_kind_compatible without double-reporting, SHALL walk binding rows in no file that carries no such table, and SHALL keep every scenario-binding finding and hint on the warnings channel with exit 0 — never on the issues channel.”

linter-scenario_bindings Specification

Purpose

The scenario-bindings checker: the scenario→model claim layer’s enforcement half. Every ### Scenario bindings row keys one #### Scenario: heading by its slug and cites own-file rows (given→State, on→Transition, asserts→State, verifies→Constraint), so a scenario’s compliance claim is data the linter can check: the slug join key must resolve to exactly one heading, every cited row must live in the binding’s own file (the scenario view projects one file’s machine), resolution and target-kind stay total_refs/ref_kind_compatible’s beat, and files without a table are walked not at all (per-file adoption). The coverage, unbound-hint, saturation, and reconciliation advisories of tickets pxjn/vkxv extend this capability’s family.

Constraints

idkindexprtraces_to
slug_join_keyinvariantevery binding row's id is the slug of exactly one #### Scenario: heading in the binding row's own file, under the one pinned canonicalization — a slug matching zero headings is a labeled finding (a silent no-op binding is a lie), and a slug matching more than one is a labeled finding naming every candidate heading (a silent double-bind is a worse lie)[[linter.scenario_bindings]]
own_file_scopeinvariantevery [[link]] in a binding row's given/on/asserts/verifies cell resolves in the binding row's own file — the scenario view projects one file's machine, a foreign frame has no lifeline, and cross-file bindings stay a named future (Revision 23 pins the restriction; lifting it is its own revision)[[linter.scenario_bindings]]
lazy_resolutioninvariantbinding rows are walked only in files carrying a ### Scenario bindings table — a table-less file parses zero binding rows and reports zero scenario-binding findings; adoption is per file[[linter.scenario_bindings]]
coverage_own_fileinvariantevery binding row's verifies cell cites at least one Constraint row of the binding row's own file (bare id, file-qualified <intent-id>.<id>, or a member of either) — an empty verifies cell or a states-only binding leaves the compliance claim unchecked; FILE-SCOPED v1 is pinned: citing an unrelated own constraint passes by construction, and requirement-scoped matching is ticket specodelic-dsyk[[linter.scenario_bindings]]
status_vocabularyinvariantevery binding row's optional status cell carries a value in the closed vocabulary {draft, confirmed} — the absent cell is draft, so only an explicit misspelling can leave a binding's confirmation provenance unread; the cell sits between id` and the four typed reference columns (Revision 24 pins the column order)[[linter.scenario_bindings]]
rollout_meterinvarianta file with no ### Scenario bindings table gets exactly ONE scenario_binding_table_absent hint; a table-carrying file gets exactly one scenario_binding_unbound_scenario hint per declared scenario slug with no binding row — never both channels of the meter for one file[[linter.scenario_bindings]]
saturation_pinnedinvarianta binding is uninformative when distinct own Constraint rows cited * 5 > total Constraint rows * 2 (strictly more than 40%, integer arithmetic, never floats — 1-2 constraint rows make any citation saturating, 3 rows make one citation clean), or its on cell cites EVERY declared Transition of a non-empty Model; both arms together fire ONE advisory naming the scenario[[linter.scenario_bindings]]
advisory_channelinvariantall four coverage-gate rules render on the warnings channel with exit 0 and are never counted by Report::failures — the issues channel, the strict lint baseline gate (issues only), and every checker verdict stay untouched[[linter.scenario_bindings]]
composition_not_duplicationinvariantresolution and target-kind of binding-cell references stay total_refs / ref_kind_compatible's beat — neither the slug and own-file rules nor the coverage-gate family ever re-reports a dangling or wrong-kind target[[linter.scenario_bindings]]
finding_reportedeffectlinter.scenario_bindings.finding_reported(rule, subject) — every scenario-binding violation renders as one labeled Issue naming the rule id, the file, and the offending row or scenario, and every coverage-gate advisory renders as one labeled warning, each on its pinned channel with exit 0[[linter.scenario_bindings]]

Model

States

  • unwalked
  • walked_clean
  • violations_reported (emits: [[linter.scenario_bindings.finding_reported]])

Transitions

idfromtoguard
walk_tableunwalkedwalked_cleanthe file carries a ### Scenario bindingstable ∧ every binding row's id slug-matches exactly one own#### Scenario: heading ([[linter.scenario_bindings.slug_join_key]]) ∧ every binding-cell link resolves own-file ([[linter.scenario_bindings.own_file_scope]]) ∧ every binding row's status stays in the closed vocabulary ([[linter.scenario_bindings.status_vocabulary]]) ∧ every binding row's verifies cites an own-file Constraint ([[linter.scenario_bindings.coverage_own_file]]) ∧ every declared scenario has a binding row and no binding saturates ([[linter.scenario_bindings.saturation_pinned]])
report_violationsunwalkedviolations_reportedthe file carries a ### Scenario bindingstable ∧ ¬(every binding row's id slug-matches exactly one own#### Scenario: heading ∧ every binding-cell link resolves own-file ∧ every binding row's status stays in the closed vocabulary ∧ every binding row's verifies cites an own-file Constraint ∧ every declared scenario has a binding row and no binding saturates)

Properties

idkindderives_fromgeneratorpredicate
slug_without_heading_firesunit[[linter.scenario_bindings.slug_join_key]]binding_row_with_typo_slug()rule_fired(spec, "scenario_binding_targets_declared_scenario")
ambiguous_slug_fires_onceunit[[linter.scenario_bindings.slug_join_key]]two_headings_sharing_one_slug()exactly one finding naming the row and both headings
slug_match_passesunit[[linter.scenario_bindings.slug_join_key]]binding_row_matching_one_heading()lint_clean(spec)
foreign_ref_firesunit[[linter.scenario_bindings.own_file_scope]]binding_cell_citing_foreign_row()rule_fired(spec, "scenario_binding_refs_own_file")
own_ref_passesunit[[linter.scenario_bindings.own_file_scope]]binding_cell_citing_own_row()lint_clean(spec)
table_less_files_silentunit[[linter.scenario_bindings.lazy_resolution]]corpus_of_table_less_files()zero scenario-binding findings, exit 0
table_carrying_file_fully_walkedunit[[linter.scenario_bindings.lazy_resolution]]one_table_with_two_violations_among_51_clean_files()exactly two findings, both in the carrying file
dangling_ref_not_doubledunit[[linter.scenario_bindings.composition_not_duplication]]binding_cell_citing_absent_row()exactly one total_refs finding; zero own-file findings
wrong_kind_not_doubledunit[[linter.scenario_bindings.composition_not_duplication]]binding_cell_citing_wrong_kind_row()exactly one ref_kind_compatible finding; zero own-file findings
violation_labeledunit[[linter.scenario_bindings.finding_reported]]corpus_with_binding_violations()every finding names rule id, file, and binding row id
states_only_binding_warnsunit[[linter.scenario_bindings.coverage_own_file]]states_only_binding_with_own_constraints()rule_fired(spec, "scenario_binding_covers_constraint") naming the scenario
real_verifies_passesunit[[linter.scenario_bindings.coverage_own_file]]binding_row_citing_own_constraint()zero coverage warnings for that row
unbound_scenario_hints_onceunit[[linter.scenario_bindings.rollout_meter]]one_binding_row_two_headings()exactly one unbound_scenario hint, zero table_absent hints
table_less_file_hints_onceunit[[linter.scenario_bindings.rollout_meter]]corpus_of_table_less_files()exactly one table_absent hint per file, exit 0
saturated_verifies_warnsunit[[linter.scenario_bindings.saturation_pinned]]single_constraint_file_with_cited_binding()exactly one uninformative warning naming the scenario
every_transition_cited_warnsunit[[linter.scenario_bindings.saturation_pinned]]on_cell_citing_all_transitions()exactly one uninformative warning naming the scenario
proportionate_binding_passesunit[[linter.scenario_bindings.saturation_pinned]]three_constraints_one_cited_partial_on()zero saturation warnings
advisories_never_gateunit[[linter.scenario_bindings.advisory_channel]]corpus_firing_every_coverage_rule()issues empty, failures() == 0, all rules on warnings, exit 0
refs_not_doubledunit[[linter.scenario_bindings.composition_not_duplication]]binding_cell_citing_absent_or_wrong_kind_row()exactly the generic rule fires, never a coverage-gate duplicate
status_outside_vocabulary_firesunit[[linter.scenario_bindings.status_vocabulary]]binding_row_with_typo_status()rule_fired(spec, "scenario_binding_status_closed")
closed_or_absent_status_passesunit[[linter.scenario_bindings.status_vocabulary]]binding_rows_with_draft_confirmed_or_absent_status()zero scenario_binding_status_closed findings

Requirements

Requirement: Binding slugs name declared scenarios

The linter SHALL fire scenario_binding_targets_declared_scenario on every binding row whose id is not the slug — under the one pinned canonicalization (lowercase alphanumerics; every non-alphanumeric run → one hyphen; edge hyphens trimmed) — of exactly one #### Scenario: heading in the binding row’s own file, and SHALL pass a row whose id matches exactly one such heading.

Scenario: Slug without a heading fires

  • WHEN a spec file declares #### Scenario: renders folded machines and a binding row whose id is renders-folded-machines-typo
  • THEN the lint reports one scenario_binding_targets_declared_scenario finding naming the file and the binding row id, and exits nonzero

Scenario: Exactly one match passes

  • WHEN the file declares #### Scenario: renders folded machines and a binding row whose id is renders-folded-machines
  • THEN the lint reports zero scenario-binding findings for that row

Scenario: Ambiguous slug fires once

  • WHEN the file declares two #### Scenario: headings that slugify to the same slug, and a binding row whose id is that slug
  • THEN the lint reports exactly one scenario_binding_targets_declared_scenario finding naming the binding row and both headings — never a silent double-bind

Requirement: Binding references stay in the owning file

The linter SHALL fire scenario_binding_refs_own_file on every [[link]] in a binding row’s given/on/asserts/verifies cell that resolves only in a file other than the binding row’s own file, and SHALL pass a cell whose targets all resolve in the owning file.

Scenario: Foreign frame fires

  • WHEN a binding row’s on cell cites [[other.capability.row]] and no row with that id exists in the binding row’s own file
  • THEN the lint reports one scenario_binding_refs_own_file finding naming the binding row, the column, and the foreign target

Scenario: Own-file citation passes

  • WHEN a binding row’s verifies cell cites [[own.capability.constraint_row]] and that row is declared in the same file
  • THEN the lint reports zero own-file findings for that cell

Requirement: Binding rows are walked only where the table lives

The linter SHALL walk binding rows only in files that carry a ### Scenario bindings table: a file without the table parses zero binding rows and SHALL produce zero scenario-binding findings — a table-less file has opted out, and adoption is per file.

Scenario: Table-less corpus stays silent

  • WHEN the linter runs over the corpus’s 52 spec files, none of which carries a ### Scenario bindings table
  • THEN zero scenario_binding_targets_declared_scenario and zero scenario_binding_refs_own_file findings are reported, exit 0

Scenario: Table-carrying file is fully walked

  • WHEN one file carries the table with one slug violation and one foreign reference
  • THEN exactly those two findings are reported for that file, and the other 51 files stay silent

Requirement: Every binding verifies a constraint of its own file

The linter SHALL warn scenario_binding_covers_constraint on every binding row whose verifies cell cites no Constraint row of the binding row’s own file, and SHALL pass a row whose verifies cell cites at least one such row. The scope is FILE-level (v1, pinned): citing an unrelated own constraint passes the check by construction; the linter SHALL NOT attempt requirement-scoped matching (ticket specodelic-dsyk). The finding is advisory: the warnings channel, exit 0, never an Issue.

Scenario: States-only binding warns

  • WHEN a spec file declares Constraint rows and a binding row whose only populated cells are given/asserts
  • THEN the lint reports exactly one scenario_binding_covers_constraint warning naming the scenario slug, and exits 0

Scenario: A real verifies citation passes

  • WHEN a binding row’s verifies cell cites one Constraint row of its own file
  • THEN the lint reports zero coverage warnings for that row

Requirement: Unbound scenarios are metered as advisory hints

The linter SHALL warn scenario_binding_unbound_scenario once for every #### Scenario: heading of a table-carrying file whose slug has no binding row, and SHALL warn scenario_binding_table_absent exactly once on any file that declares no ### Scenario bindings table. A file WITH the table SHALL NOT receive the file-level hint, and a file WITHOUT the table SHALL NOT receive per-scenario hints. Both are advisory: the warnings channel, exit 0, never an Issue.

Scenario: One bound row for two headings hints once

  • WHEN a file carries the table with one binding row and declares two #### Scenario: headings
  • THEN the lint reports exactly one scenario_binding_unbound_scenario hint naming the unbound slug and zero file-level hints

Scenario: A table-less file hints once

  • WHEN the linter runs over a corpus of table-less spec files
  • THEN each file gets exactly one scenario_binding_table_absent warning and zero per-scenario hints, and the lint exits 0

Requirement: A binding that claims everything is uninformative

The linter SHALL warn scenario_binding_uninformative on a binding row whose verifies cell cites MORE than 40% of the file’s Constraint rows — the pinned comparison is distinct_cited * 5 > total * 2, in integer arithmetic — or whose on cell cites EVERY declared Transition of a non-empty Model; an empty on cell never fires. Both arms together SHALL fire ONE warning naming the scenario. The finding is advisory: the warnings channel, exit 0, never an Issue.

Scenario: Saturated verifies warns

  • WHEN a file declares one Constraint row and a binding row’s verifies cell cites it
  • THEN the lint reports exactly one scenario_binding_uninformative warning naming the scenario

Scenario: Every transition cited warns

  • WHEN a file declares two Transitions and a binding row’s on cell cites both, while verifies stays proportionate
  • THEN the lint reports exactly one scenario_binding_uninformative warning naming the scenario

Scenario: A proportionate binding passes

  • WHEN a file declares three Constraints and two Transitions, and a binding row cites one Constraint in verifies and one Transition in on
  • THEN the lint reports zero saturation warnings

Requirement: Coverage findings never gate

None of scenario_binding_covers_constraint, scenario_binding_unbound_scenario, scenario_binding_table_absent, or scenario_binding_uninformative SHALL ever appear on the issues channel, SHALL never be counted by Report::failures, and SHALL never trip the strict lint baseline gate or a checker verdict.

Scenario: The advisories stay on the warnings channel

  • WHEN the lint runs a corpus that fires every coverage-gate rule
  • THEN issues carries no scenario-binding finding, failures() is 0, and every fired rule appears on the warnings channel with exit 0

Requirement: Binding status stays in the closed vocabulary

The linter SHALL fire scenario_binding_status_closed on every binding row whose optional status cell carries a value outside the closed vocabulary {draft, confirmed} — the absent cell is draft — and SHALL pass every row whose status is draft, confirmed, or absent. The finding names the file, the binding row, and the offending value; like the other closed vocabularies it is an Issue on the failure channel, not an advisory.

Scenario: A status outside the vocabulary fires

  • WHEN a binding row carries status = confrimed
  • THEN the lint reports one scenario_binding_status_closed finding naming the file, the binding row id, and the value, and exits nonzero

Scenario: The closed statuses pass

  • WHEN one binding row carries status = draft and another carries status = confirmed, in a table whose declared columns include status
  • THEN the lint reports zero scenario_binding_status_closed findings and zero row-shape findings for both rows

Scenario: An absent status passes as draft

  • WHEN a binding row carries no status cell at all
  • THEN the lint reports zero scenario_binding_status_closed findings for that row

Scenario bindings

idstatusgivenonassertsverifies
slug-without-a-heading-fires[[slug_join_key]]
exactly-one-match-passes[[slug_join_key]]
ambiguous-slug-fires-once[[slug_join_key]]
foreign-frame-fires[[own_file_scope]]
own-file-citation-passes[[own_file_scope]]
a-status-outside-the-vocabulary-fires[[status_vocabulary]]
the-closed-statuses-pass[[status_vocabulary]]
an-absent-status-passes-as-draft[[status_vocabulary]]
table-less-corpus-stays-silent[[lazy_resolution]]
table-carrying-file-is-fully-walked[[lazy_resolution]]
states-only-binding-warns[[coverage_own_file]]
a-real-verifies-citation-passes[[coverage_own_file]]
one-bound-row-for-two-headings-hints-once[[rollout_meter]]
a-table-less-file-hints-once[[rollout_meter]]
saturated-verifies-warns[[saturation_pinned]]
every-transition-cited-warns[[saturation_pinned]]
a-proportionate-binding-passes[[saturation_pinned]]
the-advisories-stay-on-the-warnings-channel[[advisory_channel]]

linter.scenario_reconciliation


id: linter.scenario_reconciliation kind: intent statement: “WHEN a lint run carries conform records (–conform-records), THE linter SHALL fire scenario_reconciliation_orphan_record on every record whose id equals no declared #### Scenario: slug under exact string equality, SHALL fire scenario_reconciliation_missing_binding on every declared slug that records exercise while its owning file carries no binding row, SHALL fire scenario_reconciliation_divergence on every record whose exercised transitions are not a subset of its binding row’s on set, SHALL run no reconciliation check over a run that carries no records, and SHALL report every reconciliation finding on the warnings channel with exit 0.”

linter-scenario_reconciliation Specification

Purpose

The conform-reconciliation checker: the evidence half of the scenario-bindings claim layer. Conform oracle records ({scenario_id, trace} JSONL) are joined to declared scenario slugs by exact string equality and compared against each binding row’s on cell — evidence that outruns the claim, claims that lack evidence, and records that name no declared slug are each labeled warnings-channel advisories, so the two ledgers can never silently diverge (tickets specodelic-vkxv + specodelic-a950’s attested tier).

Constraints

idkindexprtraces_to
exact_joininvarianta record reconciles only when its id equals — by exact string equality, never a prefix, suffix, or case-insensitive match — a #### Scenario: slug declared somewhere in the linted corpus (join-by-convention is pinned, spec-audit GAP-1); a record joining nothing is itself the orphan advisory naming the id, never a silent no-op[[linter.scenario_reconciliation]]
ledger_comparisoninvariantdivergence is SET arithmetic over the two ledgers only — the record's distinct trimmed trace actions versus the binding row's on cell resolved to own-file Transition ids — and never a re-report of conform's own verdicts (a trace touching an undeclared transition is conform's indictment already); a slug with records but no binding row is its own advisory naming both ledgers (evidence exists, claim missing)[[linter.scenario_reconciliation]]
skip_without_recordsinvarianta lint run carrying no conform records runs no reconciliation check and reports zero reconciliation findings — absence of records is absence of evidence, never evidence of cleanliness (the checker is skipped, never fabricated)[[linter.scenario_reconciliation]]
advisory_channelinvariantevery reconciliation finding rides the warnings channel with exit 0 and never lands on the issues channel — the lint baseline gate reads issues only, so a divergent ledger can never fail a stage[[linter.scenario_reconciliation]]
finding_reportedeffectlinter.scenario_reconciliation.finding_reported(rule, record) — every reconciliation violation renders as one labeled advisory naming the rule id, the owning file (or the records ledger for orphans), and the record id[[linter.scenario_reconciliation]]

Model

States

  • unreconciled
  • reconciled
  • divergences_reported (emits: [[linter.scenario_reconciliation.finding_reported]])

Transitions

idfromtoguard
reconcileunreconciledreconciledthe lint run carries conform records ∧ every record's id exactly matches a declared scenario slug ([[linter.scenario_reconciliation.exact_join]]) ∧ every exercised transition set is a subset of its binding row's on set ([[linter.scenario_reconciliation.ledger_comparison]])
report_divergencesunreconcileddivergences_reportedthe lint run carries conform records ∧ ¬(every record's id exactly matches a declared scenario slug ∧ every exercised transition set is a subset of its binding row's on set)

Properties

idkindderives_fromgeneratorpredicate
orphan_record_firesunit[[linter.scenario_reconciliation.exact_join]]record_with_unknown_slug()rule_fired(spec, "scenario_reconciliation_orphan_record")
near_miss_never_matchesunit[[linter.scenario_reconciliation.exact_join]]prefix_suffix_and_case_near_miss_slugs()three orphan advisories; zero joins
covered_trace_cleanunit[[linter.scenario_reconciliation.exact_join]]record_matching_one_declared_slug()zero reconciliation findings
divergence_firesunit[[linter.scenario_reconciliation.ledger_comparison]]record_off_the_on_set()one divergence advisory naming scenario, binding row, and record
missing_binding_firesunit[[linter.scenario_reconciliation.ledger_comparison]]record_exercising_an_unbound_slug()one missing-binding advisory naming both ledgers
undeclared_transition_not_doubledunit[[linter.scenario_reconciliation.ledger_comparison]]record_touching_an_undeclared_transition()conform reports the verdict; the reconciliation speaks only about the on-set gap
no_records_no_findingsunit[[linter.scenario_reconciliation.skip_without_records]]lint_run_without_records()zero reconciliation findings, checker skipped
findings_warn_never_failunit[[linter.scenario_reconciliation.advisory_channel]]corpus_with_reconciliation_findings()every finding on the warnings channel; exit 0; zero issues
violation_labeledunit[[linter.scenario_reconciliation.finding_reported]]corpus_with_reconciliation_findings()every advisory names rule id, file, and record

Requirements

Requirement: Records join declared scenarios by exact identity

The linter SHALL fire scenario_reconciliation_orphan_record on every conform record whose id is equal — by exact string equality only, never a prefix, suffix, or case-insensitive match — to no #### Scenario: slug declared anywhere in the linted corpus, and SHALL pass a record whose id equals exactly one such slug.

Scenario: Orphan record fires

  • WHEN a spec file declares #### Scenario: renders folded machines and a conform record whose id is renders-folded-machines-typo
  • THEN the lint reports one scenario_reconciliation_orphan_record advisory naming the record id, on the warnings channel at exit 0

Scenario: Exact match passes

  • WHEN the file declares #### Scenario: renders folded machines and a conform record whose id is renders-folded-machines
  • THEN the lint reports zero orphan findings for that record

Scenario: Near-miss is an orphan, never a match

  • WHEN the declared slug is renders-folded-machines and conform records carry the ids renders-folded, renders-folded-machines-x, and Renders-Folded-Machines
  • THEN the lint reports three orphan advisories — the join is exact string equality, never fuzzy

Requirement: Evidence diverging from the on-set is reported

The linter SHALL fire scenario_reconciliation_divergence on every record whose exercised transitions are not a subset of its binding row’s on cell, and SHALL name the scenario, the binding row id, AND the conform record in the finding.

Scenario: Trace off the on-set fires

  • WHEN a binding row’s on cell cites [[own.capability.t1]] and a conform record for the same scenario exercises t1 and t2
  • THEN the lint reports one scenario_reconciliation_divergence advisory naming the scenario, the binding row, the record, and t2

Scenario: Covered trace passes

  • WHEN a conform record exercises only transitions its binding row’s on cell cites
  • THEN the lint reports zero divergence findings for that record

Requirement: Evidence without a claim is reported

The linter SHALL fire scenario_reconciliation_missing_binding on every declared #### Scenario: slug that a conform record exercises while the slug’s owning file carries no binding row for it, and SHALL name both ledgers — the record and the file’s ### Scenario bindings table.

Scenario: Exercised but unbound slug fires

  • WHEN a spec file declares #### Scenario: refunds are bounded with no binding row, and a conform record exercises that scenario
  • THEN the lint reports one scenario_reconciliation_missing_binding advisory attributed to the owning file, naming the record and the table

Scenario: The claims hint alone never fires it

  • WHEN a slug has no binding row AND no conform record exercises it
  • THEN only the scenario-bindings family’s unbound hint may speak; zero scenario_reconciliation_missing_binding findings

Requirement: The checker runs only when records are supplied

The linter SHALL skip the reconciliation pass entirely when the lint run carries no conform records: no records ⇒ no reconciliation findings, never fabricated.

Scenario: Flag absent stays silent

  • WHEN spk lint runs without --conform-records over a corpus whose scenario bindings cover nothing any record could exercise
  • THEN zero scenario_reconciliation_* findings are reported — the checker was skipped, not clean-by-luck

Scenario: Malformed records refuse before linting

  • WHEN spk lint --conform-records names a file that fails conform’s parse_corpus (malformed line, unknown field, duplicate id, or a path that cannot be read)
  • THEN the CLI reports a labeled refusal naming the records file and exits 2 before any spec is linted

Requirement: Reconciliation findings are advisory

The linter SHALL report every reconciliation finding on the warnings channel with exit 0, SHALL never count one as a failure, and SHALL never place one on the issues channel.

Scenario: Divergence never fails the gate

  • WHEN the corpus carries reconcilable scenarios and the records diverge from every binding’s on-set
  • THEN the lint exits 0 with the findings on the warnings channel; the issues channel carries none

scenario.rollout


id: scenario.rollout kind: intent statement: “WHEN the scenario-rollout wiring runs, THE wiring SHALL provide the scenario-view recipe rendering one slug’s card through the real binary, SHALL gate it on a fixture card rendering byte-identically twice in every format with the fixture slug never rendering no_projection, and SHALL meter the binding-on-touch adoption by grouping the rollout-meter hints per capability directory into unstarted / partial / totals lines that exit 0 always — a meter never a gate.”

scenario-rollout Specification

Purpose

The scenario-rollout wiring: the adoption engine for the bindings layer, made runnable and checkable. just scenario-view <slug> renders one slug’s scenario card through the real binary; scripts/scenario_view_gate.py is the RED gate — a fixture card must render byte-identically twice in every format, re-rendered from the binary, never a captured expectation; scripts/scenario_wave_status.py is the binding-on-touch meter — the rollout-meter hints grouped per capability, whose totals line shrinks as annotation rows land. Ticket specodelic-wlkt.2; the policy this wiring serves lives in the repo AGENTS.md (binding-on-touch: a Model-touching change annotates the scenarios it touches in the same change).

Constraints

idkindexprtraces_to
recipe_byte_stableinvariantthe scenario-view render of an unchanged corpus is byte-identical across runs in every format, proven by the gate re-rendering a fixture card twice through the real binary and failing on any drift, on a nonzero render exit, or on a no_projection render of the fixture slug (the fixture binding must resolve)[[scenario.rollout]]
meter_visible_not_gatinginvariantthe wave meter groups the scenario_binding_table_absent and scenario_binding_unbound_scenario hints per capability directory into unstarted / partial / totals lines and exits 0 always — a meter never a gate; every annotation row that lands shrinks the totals line[[scenario.rollout]]
gate_reportedeffectscenario.rollout.gate_reported(format, verdict) — the byte-stable gate prints one byte-identical verdict line per format and a final stable verdict, exiting nonzero with the drifting format named when any render pair differs[[scenario.rollout]]

Model

States

  • unrendered
  • rendered_stable
  • drift_reported (emits: [[scenario.rollout.gate_reported]])

Transitions

idfromtoguard
render_twiceunrenderedrendered_stableboth renders of the fixture card are byte-identical in every format ([[scenario.rollout.recipe_byte_stable]])
report_driftunrendereddrift_reported¬(both renders of the fixture card are byte-identical in every format)

Properties

idkindderives_fromgeneratorpredicate
gate_passes_byte_identicalunit[[scenario.rollout.recipe_byte_stable]]scenario_view_gate_renders_a_fixture_card_byte_identically_twice()exit 0 with a byte-identical verdict per format
meter_counts_unboundunit[[scenario.rollout.meter_visible_not_gating]]scenario_wave_meter_prints_per_capability_counts()per-capability lines + totals line, exit 0
drift_namedunit[[scenario.rollout.gate_reported]]render_pair_differing()nonzero exit naming the drifting format

Requirements

Requirement: The scenario-view recipe renders byte-stable

The wiring SHALL provide just scenario-view <slug> rendering the scenario card through the real binary, and a gate (scripts/scenario_view_gate.py) that renders a fixture card twice and passes only when both renders are byte-identical in every format and the fixture slug renders the real card, never the no_projection element.

Scenario: The gate catches drift

  • WHEN the fixture card renders twice through the real binary in each format and the two renders differ
  • THEN just scenario-view-gate exits nonzero naming the drifting format

Scenario: The gate passes byte-identical

  • WHEN the fixture card renders twice unchanged
  • THEN just scenario-view-gate exits 0 with a byte-identical verdict per format

Requirement: The binding-on-touch meter shows the waves

The wiring SHALL provide a meter (scripts/scenario_wave_status.py) that groups the scenario-bindings rollout-meter hints per capability directory and prints unstarted / partial / totals lines — exit 0 always, a meter never a gate — so the second wave (linter-*) is tracked by the hints the corpus itself emits.

Scenario: The meter counts the unbound

  • WHEN the corpus carries capability files with unbound scenarios
  • THEN the meter prints one line per capability with its unbound count and a totals line that shrinks as rows land

Architecture — the four layers and the lint pipeline

Every static diagram on this page is hand-authored: it exists to explain the format and the linter’s pass structure — it is not a projection of a live corpus. Where a diagram and the format disagree, the format wins: spk explain format, spk explain references, and spk explain lint-rules are the machine-generated truth these diagrams compress. The linter emits self-describing findings and the rule catalog is generated from the same table the binary uses, so a stale catalog here will out-argue this page.

For diagrams derived from a live corpus at build time — wiring, per-file state machines, traceability, the revision-labeled typing table — see Graph views. Never restate those by hand: the corpus changes, and a hand-drawn view of it becomes an unconsulted claim.

Four-layer relationship — one file, one spec

A spec file is one markdown document carrying four layers. The Intent (YAML frontmatter) is the machine-linted top claim; Constraints are machine-checkable claims that trace to it; the Model reads a lifecycle whose guards cite those claims; Properties derive from Constraints and give them their verifying behavior. The wiki-links in the table cells are typed foreign keys — the rows link across layers with these references:

flowchart TB
    FM["<b>Intent</b><br>frontmatter: id · kind · statement<br><i>EARS-patterned SHALL claim</i>"]
    subgraph CONS ["<b>Constraints</b> — machine-checkable claims"]
        CI["invariant<br><i>lifecycle claim</i>"]
        CE["effect<br><i>file-owned observable</i>"]
        CX["extension_point<br><i>published contract</i>"]
    end
    subgraph MODEL ["<b>Model</b> — States + Transitions table"]
        ST["<b>State</b> s"]
        TI["<b>Transition</b> t1<br><i>success path</i>"]
        TF["<b>Transition</b> t2<br><i>failure path</i>"]
    end
    subgraph PROPS ["<b>Properties</b> — verifying behavior"]
        PU["<b>unit property</b>"]
        PL["<b>law property</b><br><i>enumerated cases</i>"]
    end

    CI -- "traces_to" --> FM
    CE -- "traces_to" --> FM
    CX -- "traces_to<br><i>(satisfies is an outbound leaf, not an edge)</i>" --> FM
    TI -- "guard cites invariant" --> CI
    TI -- "from/to" --> ST
    TF -- "guard cites the siblings' union<br><i>(guard_negation_total)</i>" --> CI
    ST -- "emits effect" --> CE
    CE -- "observes<br><i>(consuming row at the declared observable)</i>" --> CX
    PU -- "derives_from" --> CI
    PL -- "derives_from" --> CI

    style FM fill:#e8eaf6,stroke:#3f51b5
    style MODEL fill:#e8f5e9,stroke:#2e7d32
    style CONS fill:#fff8e1,stroke:#f9a825
    style PROPS fill:#fce4ec,stroke:#c2185b

Reading the diagram: traces_to anchors every Constraint in the intent (coverage-style guarantees run the other way through derives_from); a guard cites an invariant Constraint or a State (the “has reached state X” pattern); a state’s emits cites only effect Constraints; observes points from a consuming row at an effect Constraint — a declared observable. The full typing table (which field may appear on which row kind, and what it must resolve to) is served by spk explain references, and the resolution rules for file-qualified [[<file-id>.<row-id>]] links (file-id-namespaced) live there too. The coverage guarantee is mandatory: every Constraint needs a deriving Property (linter.coverage), and every Property must derive from at least one Constraint (linter.no_orphan_property) — that bidirectional floor is what keeps the four layers one spec, not four documents.

For the same four layers rendered from a live corpus, see the state-machine view in Graph views — never restate it here.

Lint checker pipeline — families and the advisory/gating split

The linter’s pass structure is a join point, not a dependency DAG: each checker family reads the structured layers (frontmatter, table rows, the model, the corpus graph) independently, and findings accumulate until lint emits. There is no machine-readable family-dependency order served by spk explain lint-rules, so the diagram below is deliberately a layered pipeline, not an invented dependency DAG — checker families are grouped by what they read, and the advisory/gating distinction is marked on the rules that carry it. The rule catalog is generated from the same table the binary uses; the 34 rule ids served by spk explain lint-rules are the authoritative enumeration. One stated dependency exists: the failure-shape checker rides the orchestrator’s lint stage “dependent on linter.model_shape” — its walk reads the Model’s states, transitions and emits edges, so it runs only once the model is proven well-formed (dependency_respecting_skip, openspec/specs/linter-failure_shape/spec.md).

Three rules are advisory: linter.observability and linter.skew_advisory warn on the warnings channel with exit 0, and linter.single_root_reachable is tiered — its cross-file-only half warns (rows with no path to ANY intent still hard-fail). Every other rule in the catalog gates: exit 1, and the lint pass fails.

flowchart TB
    TARGET["<b>Corpus</b><br>one spec file is one spec — structured fields only"]

    subgraph FMF ["<b>frontmatter family</b> — reads the intent layer"]
        R1["linter.frontmatter_valid<br>linter.id_matches_file<br>linter.unique_id<br>linter.no_conjoined_id<br>linter.no_universal_in_id<br>linter.ears_syntax"]
    end
    subgraph SHAPE ["<b>shape families</b> — read the rows"]
        R2["<b>schema_shape</b><br>linter.model_present<br>linter.constraint_kind_closed<br>linter.property_kind_closed<br>linter.schema_matches_typing_table"]
        R3["<b>graph_shape</b> — reads the model's edges<br>linter.guard_required<br>linter.no_self_ref<br>linter.acyclic"]
    end
    subgraph MODEL ["<b>model family</b> — reads the Model section"]
        R4["linter.every_state_used<br>linter.every_transition_valid"]
    end
    subgraph REACH ["<b>reachability family</b> — reads the linkage graph"]
        R5["linter.single_root_reachable<br><i>tiered: cross-file-only rows</i><br><i>warn (exit 0); no path to ANY intent</i><br><i>hard-fails</i>"]
    end
    subgraph INT ["<b>integrity family</b> — reads the corpus graph"]
        R6["linter.total_refs<br>linter.coverage<br>linter.no_orphan_property<br>linter.law_cases"]
    end
    subgraph DUAL ["<b>dual-format family</b> — reads the openspec mirror"]
        R7["linter.requirement_drift<br>linter.dual_format_valid"]
    end
    subgraph FAIL ["<b>failure-shape family</b>"]
        R8["linter.terminal_states_emit<br>linter.error_labels_unique<br>linter.guard_negation_total"]
    end
    subgraph CHECK ["<b>external-completeness family</b> — reads the checklist"]
        R9["linter.checklist_well_formed<br>linter.every_item_accounted<br>linter.covered_maps_resolve<br>linter.waiver_has_rationale<br>linter.no_duplicate_claim"]
    end
    subgraph PACK ["<b>pack family</b> — reads kind: profile files"]
        R10["linter.pack_shape<br>linter.orphan_vocabulary"]
    end

    ADV1["<b>linter.observability</b><br><i>advisory — warnings channel, exit 0</i>"]
    ADV2["<b>linter.skew_advisory</b><br><i>advisory — warnings channel, exit 0</i>"]

    TARGET --> FMF
    TARGET --> SHAPE
    TARGET --> MODEL
    TARGET --> REACH
    TARGET --> INT
    TARGET --> DUAL
    TARGET --> FAIL
    TARGET --> CHECK
    TARGET --> PACK

    MODEL -. "stated dependency:<br>failure_shape runs only once<br>the model is well-formed" .-> FAIL

    R1 & R2 & R3 & R4 & REACH & R6 & R7 & R8 & R9 & R10 --> JOIN{{"<b>lint</b> — the join point<br><i>all gating rules pass, or exit 1</i>"}}
    R5 -- "warn-half<br><i>(exit 0)</i>" --> JOIN
    ADV1 --> JOIN
    ADV2 --> JOIN

    style JOIN fill:#e3f2fd,stroke:#1565c0
    style R5 fill:#fff3e0,stroke:#ef6c00
    style ADV1 fill:#fff3e0,stroke:#ef6c00
    style ADV2 fill:#fff3e0,stroke:#ef6c00

Reading the diagram: the families are join-point checkers, not a dependency DAG — the linter’s actual pass structure accumulates findings per family and emits at the join point, so no invented edges between families — the one dashed edge below is the dependency the failure-shape spec itself declares. Only the orange boxes are advisory; every other rule in the catalog gates (exit 1). The per-rule semantics (one line each, generated from the same table the binary uses) are served by spk explain lint-rules, and the per-family spec files live under the Lint Rules section. Dogfood: just lint-specs runs this linter over the corpus itself.

Verify workflow — the canonical lifecycle

The artifact lifecycle is the pipeline’s own Model, declared and machine-linted like any other spec’s. Stage gates are enforced by the guards the lifecycle spec itself declares:

flowchart LR
    DR["draft"] --> PA["parsed"]
    PA -- "frontmatter_valid ·<br>id_matches_file" --> LI["linted"]
    LI -- "every owned checker<br>passes (the join point)" --> CO["compiled"]
    CO -- "coverage ·<br>law_cases" --> MC["model_checked"]
    MC -- "model_present" --> VE["verified"]
    VE -- "no_counterexample ·<br>properties_pass ·<br>opted-in invariants<br>verified" --> DONE(["complete"])
    style DONE fill:#e8f5e9,stroke:#2e7d32

Reading the diagram: verify is bounded model checking of the claims the spec opts into — prose-only invariants stay explicitly unchecked and are never counted as verified. Verification is not a substitute for the application’s own test suite. The lifecycle’s guards carry rule ids served by spk explain lifecycle; the stage gates are enforced by the linter’s guard rules, and the guard_required rule makes every transition’s guard non-null. The same lifecycle is what the linter’s own Model section declares — the pipeline self-hosts. Full recipes for running the pipeline by hand are in Command Reference.

Binary size — where the megabytes go

The release binary’s size history (linux_amd64, from the published release archives; v0.1.0 built locally — it shipped no binaries):

ReleaseBinaryNote
v0.1.05.5 MBfirst tagged release, full CLI/serde/model-checking stack from day one
v0.2.06.8 MBfirst published binaries
v0.3.09.7 MB+2.9 MB: genesis-vibes update-check → ureq + rustls + ring (a full TLS stack) + url/idna/icu unicode tables
v0.8.011.0 MBfirst-party format-revision growth
v0.12.111.2 MB
v0.14.012.0 MBaudit/lint machinery (~+0.8 MB since v0.12.1, ~70 B/line)

Reading the table: no release was ever small — the dependency stack (clap-derive, serde+json+yaml+toml, proptest, miette(fancy), regex, stateright, sha2) was adopted at scaffold, so day one was 5.5 MB. Two levers govern the size. First, the v0.3.0 jump is one config line: the update-check feature of genesis-vibes (consumed by src/update_notice.rs) links an entire TLS stack for update pings — roughly a quarter of the binary (~2.9 MB). Second, releases before v0.15.0 shipped unstripped: the default release profile keeps symbol metadata, worth 2.7 MB (12.0 → 9.3 MB under strip). v0.15.0 applies strip = "symbols"; retiring update-check (−2.9 MB more, needs an upstream genesis-vibes change or a feature gate around src/update_notice.rs) is tracked separately in beads.

Verification boundaries — what a green check actually buys you

Every specodelic command can exit 0. An exit 0 from spk lint and an exit 0 from spk verify are not the same guarantee, and the toolchain never collapses them into one PASS label: each stage attests something different, and each stage’s verdict is honest about what it did not check. This page names the ladder rung by rung, then states the known limitations up front — each one backed by a command you can run right now. spk audit turns the ladder into machine-readable output — the per-file rung aggregate and the closed class vocabulary for evidence the toolchain touches but never re-validates — on the graded evidence page.

The canonical one-line statement of the widest boundary — verification is not application testing — lives in the repo README (not linked — the book’s deployed copy has no README page); this page applies that discipline stage by stage and does not restate it.

The guarantee ladder

Read the ladder from the bottom up. Each rung presupposes every rung below it — a file cannot be matches-oracle without first being checked-within-bounds, and so on. A file’s honest status is the highest rung it has evidence for, never a single undifferentiated PASS.

#RungGateWhat passing assures
1Lint-cleanspk lint specsThe file is format-valid: all eight gating checkers pass
2Well-modeledlint’s model checkers + a non-empty Model sectionThe behavior is stated as a state machine that is present and internally coherent
3Checked-within-boundsspk compile, then spk model-checkBounded exploration of the compiled model found no violation within the stated bound — or honestly reported it could not finish
4Matches-oraclespk verifyThe compiled property blocks executed and passed, and every invariant claim the spec opted into is verified
5Better-designa counterexample_found from spk model-checkThe checker refuted a claim — and the counterexample is often the design lesson, not a tool failure

Rung 1 — lint-clean

spk lint specs exits 0: the file passes the join of the eight gating checkers — frontmatter, EARS syntax, schema shape, coverage wiring, graph shape, model shape, referential integrity, external completeness (each has its own page under Lint Rules). spk explain lifecycle defines this rung: “lint is the join point of the linter checkers — it requires every owned checker to pass.”

Does not assure: that the constraints are true, or that the constraint list is complete. See the coverage blind spot below — this is the rung where a MISSING constraint hides most comfortably.

Rung 2 — well-modeled

The file carries a Model section that is present and coherent: a States list and a Transitions table (linter.model_present — “the Model section must contain both a States list and a Transitions table”), every transition guarded (guard_present), every state used, every endpoint declared (linter.model_shape). This is the precondition spk model-check imposes — “model_check requires a complete Model section (model_present)” (spk explain lifecycle).

Does not assure: that the model says anything — the check is presence only: a token one-state model passes, and an empty-but-present Model section fails with the identical model_present finding as an absent one. And a coherent model can still be the wrong model; only rung 3 puts it under exploration.

Rung 3 — checked-within-bounds

spk compile (which “only runs on a file that has passed both lint and coverage” — openspec/specs/compile/spec.md, precondition_satisfied) emits the TOML, TLA+, and proptest artifacts; spk model-check explores the compiled model’s reachable state space within a stated depth bound. A clean verdict means no counterexample exists within the bound; spk model-check --help is explicit that exhaustive runs report exploration_only, never no_counterexample — a completed exploration is evidence the space ends within the bound, never that the model holds (openspec/specs/model_check/spec.md).

Does not assure: anything beyond the stated bound, and — because the program-counter model carries no data binding — nothing about values, only about state names and transitions.

Rung 4 — matches-oracle

spk verify executes the compiled proptest blocks and gates on the model-check outcome. spk explain lifecycle states the full gate: “verify requires no_counterexample, properties_pass, and every opted-in invariant claim verified — prose-only invariants stay explicitly unchecked and are never counted as verified.” A verified verdict is the top of what the toolchain can attest about a spec.

Does not assure: application correctness. The claims verified are exactly the ones the spec opted into; prose invariants are not checked at all. See the README’s Verification is not application testing — a verified spec is an audited specification, not a tested system.

spk check reaches this rung in one invocation: it runs verify’s gates and feeds the live verdict into the report’s rung derivation, so a fully green run reports matches-oracle. Through spk audit alone the rung stays 3, because a live verify verdict is not persisted evidence for audit to read.

Rung 5 — better-design

When spk model-check returns counterexample_found, the ladder’s highest-value rung may not be “fix the model” but “fix the claim”. The worked example shows the precedent: the author’s executable invariant swore a rejection state was unreachable, and the checker found a two-step trace reaching it — the rejection was reachable by design, so the over-claiming row was the bug. As that example puts it: “The checker was the design critic; the counterexample was the design lesson.”

Does not assure: that every counterexample is a design lesson — but a refuted claim always names the violated invariant, so the diagnosis starts from the named row, not from a diff.

Known limitations

Each limitation below cites a runnable command; run it yourself — the outputs shown were captured at v0.8.0.

Coverage cannot detect a missing constraint

spk explain lint-rules prints the checker’s one-directional semantics:

| `linter.coverage` | every constraint must have a deriving property (`∃ property.derives_from == <constraint>`) |

Every constraint present must have a property — but nothing can tell you a constraint should exist and doesn’t. openspec/specs/linter-coverage/spec.md says this in so many words: “a coverage check can only tell you every constraint present has a property; it cannot tell you a constraint is missing, which is exactly the class of gap the first four checkers caught by inspection rather than by any mechanism this framework has yet.” Coverage is a completeness check over what you wrote, not over what the domain needs.

**py:** and **ts:** fragments are not executable

The format grammar accepts both tags (openspec/specs/compile/spec.md, fragment_language_closed — the closed set is {rust, py, ts}), and a **py:** fragment in a predicate cell lints clean. But no emitter has shipped: at HEAD, **rust:** is the only executable tag. Save this minimal spec (the whole file — same shape as the worked example):

---
id: demo.py_spec
kind: intent
statement: "THE demo spec SHALL compile under py emission"
---

## Constraints

| id | kind | expr | traces_to |
|---|---|---|---|
| demo_py_c1 | invariant | `the demo spec compiles under py emission` | [[demo.py_spec]] |

## Model

### States
- `Idle`
- `Done`

### Transitions

| id | from | to | guard |
|---|---|---|---|
| t1 | Idle | Done | [[demo.py_spec.demo_py_c1]] |

## Properties

| id | kind | derives_from | generator | predicate |
|---|---|---|---|---|
| demo_py_p1 | unit | [[demo.py_spec.demo_py_c1]] | `proptest::collection::vec(any::<u8>(), 0..8)` | **py:** len(xs) <= 8 |

spk lint demo.py_spec.md passes clean — and then spk compile demo.py_spec.md fails labeled, never a silent fall-through to Rust emission:

{"ok":false,"envelope_kind":"error","data":{"failed":[{"file":"demo.py_spec.md",
"message":"row `demo_py_p1`: no emitter for **py:** fragments — executable
emission for py is deferred of record (follow-up change:
add-py-fragment-emission); **rust:** is the only executable tag at this
Revision (no_emitter_labeled_failure, specodelic.md Revision 16)",
"stage":"compile.emission_failure"}]}}

The tag set is closed on purpose — an accepted tag without an emitter would silently fall through to Rust, the vacuous outcome the closed set exists to prevent (openspec/specs/compile/spec.md, no_emitter_labeled_failure).

Pipeline verbs vary in implementation maturity

Every specced command ships (spk --help — the README keeps the count honest), but “ships” is not “uniform”. What the binary actually does at HEAD:

  • spk refactor advises — it never edits. spk refactor --help opens: “Advise on tidy-first splits for high unrelated fan-in nodes.” It flags split candidates via graph queries (openspec/specs/refactor/spec.md); the split itself is yours.
  • spk model-check is bounded, and honest about it. Exhaustive runs report exploration_only, never a fabricated clean (spk model-check --help, backend description); a backend that cannot execute Rust fragments reports exploration_only, never a fabricated pass (openspec/specs/model_check/spec.md, executable_invariants_execute). TLC cannot execute Rust fragments at all and never claims clean.
  • spk verify never re-compiles. It consumes the artifacts a prior spk compile wrote to the same out-dir (spk verify --help); a stale compile is a rerun, never an acceptance.
  • spk compile gates on lint. A file with lint findings fails at precondition_satisfied with the fired rule ids named (spk compile on any unlinted file; lint is corpus-wide, so a file referencing other specs only compiles in whole-corpus context).
  • spk lint, spk graph, spk rename, spk merge, spk orchestrate run as specced: lint is the corpus-wide join over the eight gating checkers, rename is atomic and verified against the linters (spk rename --help), merge is a pre-merge detector, orchestrate gates each pipeline stage in Checker Ownership order (spk orchestrate --help).

When in doubt about a verb’s exact contract, the corpus file of the same name under openspec/specs/ — also served in this book under Pipeline — is the source of truth, and spk explain works offline.

Graded evidence — the audit verb

The pipeline’s own verbs grade a spec against itself: lint checks shape, model-check explores the declared model, verify runs the opted-in claims. But the toolchain also touches evidence it never re-validates: recorded example corpora checked once by conform, pack-checker results over possibly-empty checked sets, fragments and claims that may cite no declared model element at all, and the audit reports of previous runs. spk audit is the one verb that computes the graded-evidence discipline uniformly over all of it. The failure modes it exists for are all one shape — evidence whose scope silently widened: stale examples read as green, an empty checked-set read as a pass, a vacuous fragment read as verified.

audit is read-only like conform: it never compiles, never writes artifacts, never advances a lifecycle transition. It consumes, classifies, and reports — and refuses ungated inputs with a remediation hint.

Usage

$ spk audit <spec-file> --oracle <corpus.jsonl> [--before <report.json>]
            [--declare-expectation] [--closed-world] [--out-dir <dir>]

The oracle corpus is JSONL — one recorded example per line, the same shape conform consumes: {id, setup?, trace: [{action, observations?}]}. Unknown fields, malformed lines, and duplicate ids are refused with a remediation hint, never ignored. The gate is conform’s, unchanged: the file must be lint-clean with current compiled artifacts in --out-dir (audit never re-compiles).

The judge verb — spk check

spk check <file> is the one verb that answers “what do we know about this spec?” in a single invocation. It composes the producers above rather than adding a fourth: conform’s artifact gate, verify’s both-gates evaluation (the compiled proptest blocks through verify’s bounded runner, the model gate read from the current <stem>.check.json), conform’s trace walk when --oracle is supplied, and audit’s classification, prior diff and ladder rung. It compiles nothing, writes no artifact, and executes nothing but the spec’s own compiled properties.

The report is an audit report — same schema version, same row layer, same scope_sha256 discipline — so the two verbs’ reports are each other’s --before priors. Verify-stage rows are keyed verify:prop:<block-id> and verify:model[:<claim-id>]; oracle, pack and binding rows keep their keys.

One vocabulary, no fourth entrant. Every row carries a conform verdict and an audit class:

Producer outcomeVerdictAudit classExit
property block passedpermittedcurrent0
property block failedforbiddencontradicted1
model report clean, required claims verifiedpermittedcurrent0
model report counterexample_found, refuted claimforbiddencontradicted1
required claim unknownunknownunchecked0
model report exploration_only / timed_outunknownunchecked0
oracle / pack / binding / prior overlaysunchangedAuditClass::of (or binds_nothing/stale/new)per the audit contract

Outcomes that are not judgements produce no row: a refused gate, a stale/missing/uncompilable properties artifact, a run killed at its bound, a missing or scope-mismatched model report, a corpus or digest refusal, or zero evidence rows. Exit codes: 0 judgement emitted, nothing contradicted; 1 a contradicted row exists, or a declared-expectation stale row; 2 no judgement was emitted — never a pass, never a contradiction. check decides its exit code on the contradicted set classified before the prior-report overlay, and the overlay itself never retires a contradiction (diff_with_prior preserves contradicted for both the held and the unseen row), so a --before run with a sustained contradiction exits 1 in either verb.

inconclusive stays reserved and is never spelled: a terminated property run is a recording class (X.290 6.5.1.4–6.5.1.6), not a verdict.

The claim of record

What check makes visible is drift between spec revisions: given a --before report, a row whose evidence dropped or worsened is classified stale and a row the prior report never saw is classified new, so dropped evidence is never read as green. A stale row is informational unless the baseline was recorded with --declare-expectation, in which case it fails the run; a contradicted row always fails, whatever the prior report said about it.

The report is one run’s account of what this revision’s evidence established, never a second authoritative copy of anything. Agent-authored evidence is not independent evidence: no run claims behavioral equality — every report says so in its evidence_scope line — and a run without --oracle narrows the claim to the spec’s own compiled evidence, disclaiming external-corpus agreement outright.

The closed class vocabulary

Every evidence row receives exactly one audit class from a closed set. The set is audit-local and closed: a row’s class is data you can count, never prose you must interpret.

ClassMeaning
currentthe row’s evidence agrees with the current model at least as strongly as in the prior report (or there was no prior report and the walk classified it)
stalethe row’s class dropped or worsened since the prior report — the prior good verdict no longer holds against this revision
uncheckedthe row was never truly checkable (underspecified, prose-only, unsupported evaluator, or agree) — absence of a passing verdict, never a pass
contradictedthe current model positively contradicts the recorded example
binds_nothingthe row’s evidence unit (a fragment or claim) cites no declared model element — green yet vacuous
newthe current run graded a row the prior report never saw

The both-layer record. Every record carries both layers: the audit class and the underlying conform verdict with its reason. audit rides conform’s verdict taxonomy — the six values in the evidence-record axes table below — it never re-derives or reinterprets it; the audit class is the evidence-lifecycle layer on top. In the report a row looks like this (from a real run):

reserve-holds: current (permitted) — permitted: trace through `confirm`
  explainable by the declared Model's transition relation
overbook-refused: current (underspecified) — uncovered_trace_never_forbidden:
  step 1 observation `overbooked` names no declared Model state or effect
wrong-obs: contradicted (forbidden) — contradiction_forbidden_any_mode:
  step 1 observed state `open` but transition `confirm` declares target `held`

The evidence-record axes

One record, five closed axes, three annotation fields. Each value appears exactly once, names the code that produces it, and is either implemented (the code declares it today) or reserved with the named trigger that will give it a producer — no placeholders, no dead capability. This table is normative and machine-checked: scripts/check_evidence_axes.py (wired into just ci) fails when it drifts from the code in either direction.

ValueAxisCode sourceStatusof() mappingTrigger
permittedrun statussrc/conform.rsimplemented→ current—
forbiddenrun statussrc/conform.rsimplemented→ contradicted—
agreerun statussrc/conform.rsimplemented→ unchecked—
inconclusiverun statusITU-T X.290 3.3.124, 6.5.1.3 (borrowed)reserved—the first contract-suite runner — a completed run that executes and cannot decide; check does not produce it (a killed runner is a recording class, not a verdict)
underspecifiedspec defectsrc/conform.rsimplemented→ unchecked—
contradictedspec defectsrc/audit.rsimplemented——
binds_nothingspec defectsrc/audit.rsimplemented——
currentcurrencysrc/audit.rsimplemented——
stalecurrencysrc/audit.rsimplemented——
newcurrencysrc/audit.rsimplemented——
unknownknowledge absencesrc/conform.rsimplemented→ unchecked—
uncheckedknowledge absencesrc/audit.rsimplemented——
unsupportedscope exclusionsrc/conform.rsimplemented→ unchecked—
originannotation fielddesign only (Nov 11 decision)reserved—the annotation-syntax change — lands with the change that first needs it
binding_kindannotation fielddesign onlyreserved—the change that makes check consume sidecar bindings (D-10/D-12)
boundannotation fieldsrc/model_check.rsimplemented——

The mapping is verdict-by-verdict. AuditClass::of (src/audit.rs) is the only derivation: permitted → current, forbidden → contradicted, and underspecified, unknown, unsupported, agree all → unchecked. agree is deliberately unchecked, not current: it is a pass on the transition relation, and its covering guard’s expr is prose that was never interpreted — audit grades evidence for a claim, so an agree row records the absence of a passing verdict on the claim, never a pass. Reclassifying it would claim more than happened; the memo’s “bounded pass” observation is what the bound field expresses, not a class change. binds_nothing is deliberately not derivable from a verdict: it is evidence-level vacuity from citation analysis (a fragment or claim citing no declared model element), not a verdict layer.

Currency is computed, never stored. stale/new are diff overlays produced only by audit --before over two reports with equal scope_sha256 — a fresh run cannot produce them, and a corpus change between runs is refused outright rather than silently diffed. The change-trigger relation is not novel: MoD 00-55 §4.7.1 status accounting via Kelly & McDermid (2001) and IEEE 828-2012 §10 both describe it; what this project adds is the mechanization over spec revisions.

inconclusive keeps its borrowed name. ISO/IEC 9646-1 (ITU-T X.290) 3.3.124 defines it: “neither a pass nor a fail verdict can be given” (6.5.1.3). It enters Verdict only when a producer exists — a runner that executes a contract and cannot decide it. Adding it now would create an arm no code path can reach: a dead value that reads as capability. The standard’s absence face — test-case error and abnormal termination (6.5.1.4–6.5.1.6) — is likewise a recording class, never a fourth verdict; undefined and unknown are not substitutes for either (an undecided run is not an absence).

Reserved fields stay out until their consumers exist. origin (annotation of authoring lineage) and binding_kind (generated/manifest/mapping/attested) have no corpus record carrying them and no consumer distinguishing them; bound already exists as model_check::Bound in run reports, so the table points at that field rather than duplicating it — audit/conform records gain a bound only when a change reads one alongside a verdict. No always-null or constant field is added “to be useful later”: noise that consumers learn to ignore is worse than absence.

Honesty channels — countable, never a pass, never a failure

unchecked and binds_nothing ride the warnings channel. They are countable in the summary, they never count as a pass, and they never affect the exit code:

  • Empty checked-set is unchecked. A pack checker that activates vocabulary but produces an empty checked-set yields unchecked rows — countable in the summary, never a silent pass.
  • Unbound evidence is flagged; sparsity is respected. A fragment or claim citing no declared model element yields binds_nothing — but a legitimately sparse phase-model whose declared elements are simply not exercised stays unflagged. The check is citation-vs-declared-ids, never coverage-of-declared-ids.
  • Unchecked never fails the run. A report where every row is unchecked or binds_nothing still exits 0, with counts surfaced in both output views.

The summary and one flagged row from a real run (five records total — the other three are the oracle rows shown in the previous section):

audit: 5 record(s) — binds_nothing 2, current 1, unchecked 2
  evidence_scope: agreement on the supplied corpus; not a proof of behavioral equality
  ladder_rung: 2 — well-modeled: the Model section is present (states + transitions declared); no current model-check run
  bind:locked: binds_nothing (agree) — fragment `locked` cites no declared model element —
    a vacuous binding (green yet vacuous): nothing was checked; warnings-channel advisory,
    never a failure, and a model whose declared elements are simply not exercised is never flagged

The fixed evidence_scope statement rides every report in both views — it is data, not documentation, so no reformatting can strip it.

Evidence diff across reports

spk audit --before <report.json> compares per-row verdict classes with a prior report: same class ⇒ current, dropped or worsened ⇒ stale, unseen by the prior ⇒ new. This makes revision preservation a by-product — re-running the audit after a spec edit classifies exactly which evidence went stale. The overlay never retires a contradiction: a contradicted row stays contradicted whatever the prior report said about it — held, graded differently, or unseen (a currency label never replaces live contradictory evidence), so a --before run still exits 1.

Both reports carry a scope_sha256 digest of the oracle corpus. A mismatch is a labeled refusal with zero classification emitted — audit never silently diffs evidence across corpus versions:

before_diff: scope_sha256 mismatch between the reports (prior 60071a…, current 929123…)
  — the oracle corpus changed between the runs and per-row comparison would silently
  diff different evidence; never silently diff across corpus versions
  (re-run the baseline against the same corpus: spk audit <file> --oracle <corpus.jsonl> --declare-expectation)

--declare-expectation records a report as a declared expectation baseline: when it is later used with --before, stale rows fail the run — otherwise staleness is informational.

The ladder-rung aggregate

The summary reports, per file, the highest verification-ladder rung for which current evidence exists — derived at report time from evidence actually present, never stored, never exceeding the evidence. The rung is stated with its basis, so the number is never an undifferentiated PASS:

  • A file lint-clean but only model-checked, with no verify pass ⇒ rung 3, never 4 or 5.
  • No audit, conform, or verify evidence at all ⇒ rung 1 (lint-clean at most), stated as such — the derivation’s floor; through the CLI this state is unreachable (see the second limitation below).
  • unchecked and binds_nothing rows are countable, never verified — they cannot lift the rung, by construction.
  • A current counterexample_found model-check run is the ladder’s better-design rung ⇒ rung 5 — the refuted claim names the design lesson.

For the rung-by-rung exposition — what each rung’s gate assures and what it does not — see verification boundaries; this page treats the ladder as the audit’s output vocabulary, not as a tutorial.

Exit codes

CodeMeaning
0no contradicted row (and no stale row under a declared expectation) — including runs that are entirely unchecked/binds_nothing
1any contradicted row; or any stale row when the --before baseline was recorded with --declare-expectation
2invocation error or gate refusal (lint-dirty file, stale artifacts, digest mismatch, zero records — an audit over no evidence is never a pass)

The claim-coverage section — what check judged, and what it did not

spk check’s envelope carries one section spk audit’s does not: the claim-coverage section, materialized beside the report (the report’s schema version and field set are untouched — a check envelope still parses as an audit --before prior).

The section lists every declared invariant claim of the judged file by its file-qualified claim id — <file id>.<claim id>, the form the corpus guarantees unique corpus-wide — each carrying exactly one class from audit’s closed set:

  • An evidence row places a claim when it names the claim directly (a model row’s verify:model:<claim> key, an oracle row’s evaluated claims, a binding row’s owner) or names a property whose derives_from names the claim — the corpus’s declared edge, one hop. Nothing is matched by name, slug, filename or similarity: a resemblance produces no placement, ever.
  • A claim placed by several rows carries the strongest class among them, ordered contradicted > stale > current > new > binds_nothing > unchecked. A claim placed by no row carries unchecked.
  • A row that places no claim (for example the bare model-level row) is accounted for in the section’s residual bucket — never dropped, never attached to a claim.

The section’s classes describe this run’s evidence only: the scope field (scope.id: "this_run_producers") is machine-readable, and the statement beside it says the same thing for readers — unchecked means “no evidence from this run”, never “no evidence exists”. The counts ride the verdict line of the human view and sit beside the evidence counts in JSON, and the section never gates: the exit code is what the evidence rows alone determine.

Two properties worth knowing when extending the producers: the key-shape table above is closed (verify:prop:*, verify:model*, bind:*, plus oracle rows’ evaluated_claim_ids) — a future producer whose row key matches none of them lands in the residual bucket, which is safe-by-default (an unplaced row is visible, never misattributed); and only invariant claims are listed, because effect/advisory/extension_point constraints assert emissions and judgements that no evidence row can contradict.

Known limitations

Each limitation below cites a runnable command; run it yourself — the outputs shown were captured at this HEAD. The commands use the demo spec and oracle corpus from the example at the end of this page.

Rung 4 is unreachable through spk audit in v1

spk check does reach rung 4: it runs verify’s gates in the same invocation and feeds the live verdict into the derivation, so a fully green run reports matches-oracle. The limitation below is spk audit’s alone — it can read only persisted evidence.

spk verify persists no report — its verdict is re-evaluated live every run (“verified is not cached” is verify’s own hint), so the properties blocks’ pass results exist nowhere on disk for the audit to read. The run’s evidence collector never sets the verify input; a rung without its backing evidence is impossible, so the aggregate never claims rung 4. Run the sequence yourself:

$ spk compile demo.audit.md --out-dir out
$ spk model-check demo.audit.md --out-dir out --json
$ spk verify demo.audit.md --out-dir out        # reports status: verified
$ spk audit demo.audit.md --oracle oracle.jsonl --out-dir out --human

verify says verified; the audit summary immediately after still says:

  ladder_rung: 3 — checked-within-bounds: current model-check run reported no_counterexample

and ls out/ shows no verify report — only the compile, model-check, and proptest artifacts. A future persisted verify report is one collector branch away, not a redesign; until then rung 3 is the honest ceiling through this verb.

The rung-1 floor is CLI-unreachable

Rung 1 (lint-clean at most) exists in the derivation core, but no CLI run can land on it: the audit gate is conform’s, and its lint-clean requirement implies the Model section is present (linter.model_present is one of the gating checkers), which is rung 2’s own evidence. Try to audit a model-less file and the gate refuses before any rung is derived:

$ spk lint demo.nomodel.md        # fires linter.model_present: "Model section incomplete"
$ spk audit demo.nomodel.md --oracle oracle.jsonl --out-dir out
{"ok":false,"envelope_kind":"error", ... "artifact_gate: the file has lint findings —
 conform requires a lint-clean spec, verdicts are never derived from invalid artifacts ..."}

So through the CLI the floor is rung 2; rung 1 is pinned where it is honest — at the pure derivation core over an empty evidence mix, stated as “at most”, never a claim.

A runnable example, end to end

The demo spec (a two-state reservation model with one executable invariant), its oracle corpus, and every command, in order:

---
id: demo.audit
kind: intent
statement: "WHEN a reservation is requested THE demo spec SHALL hold it
only while confirmed"
---

## Constraints

| id | kind | expr | traces_to |
|---|---|---|---|
| locked | invariant | `**rust:** state != "overbooked"` | [[demo.audit]] |

## Model

### States
- `open`
- `held`

### Transitions

| id | from | to | guard |
|---|---|---|---|
| confirm | open | held | [[demo.audit.locked]] |

## Properties

| id | kind | derives_from | generator | predicate |
|---|---|---|---|---|
| p | unit | [[demo.audit.locked]] | `g()` | `**rust:** true` |
{"id":"reserve-holds","setup":{"state":"open"},"trace":[{"action":"confirm","observations":{"state":"held"}}]}
{"id":"overbook-refused","setup":{"state":"open"},"trace":[{"action":"confirm","observations":{"state":"overbooked"}}]}
{"id":"undeclared-action","setup":{"state":"held"},"trace":[{"action":"reopen"}]}
$ spk compile demo.audit.md --out-dir out          # the gate needs current artifacts
$ spk audit demo.audit.md --oracle oracle.jsonl --out-dir out --json > before.json
$ spk audit demo.audit.md --oracle oracle.jsonl --out-dir out --before before.json --human

The first run classifies: the happy trace current (permitted), the uncovered observation and undeclared action unchecked (underspecified — spec gaps, not refutations), the two vacuous fragments binds_nothing on the warnings channel — exit 0. The second run diffs against the baseline: every class held, so every row stays current — and if you now edit the model so an old example no longer holds, re-running flags exactly that row stale.

conform’s verdict taxonomy, the walk machinery audit reuses, and the lifecycle audit deliberately stays outside of are on the conform page; what each ladder rung assures is on verification boundaries; the class names and jargon are in the glossary.

Tool relationships — specodelic, OpenSpec, and the ah companion

specodelic does not replace the tools a repo already uses for change management — it plugs into them. Two relationships matter, and this page names both honestly: the dual-format protocol that binds specodelic files to the OpenSpec change workflow, and the ah companion CLI (espectacular) that checks spec↔test correspondence around those files without ever editing them.

ToolWhat it doesWho owns what
OpenSpecproposal → tasks → archive change workflowowns the openspec/ directory structure
specodelic (spk)the format + linter; every change delta is also a lint-clean specodelic fileowns the content of the dual-format layer
espectacular (ah)spec↔test correspondence checkingread-only over openspec/ — never edits a spec file

The OpenSpec dual-format relationship

This repo manages its engineering changes in openspec: a change lives in openspec/changes/<id>/ as a proposal plus task list, and when it ships, openspec archive moves its deltas into the capability specs under openspec/specs/. The dual-format protocol makes every one of those files a specodelic file at the same time: one markdown file, two parsers, requirement text authored once.

A dual-format file carries both grammars:

  • the specodelic half — YAML frontmatter (a real id from the naming law, kind: intent, one EARS statement) plus the ## Constraints, ## Model, and ## Properties tables;
  • the openspec half — ## Purpose, a delta section such as ## ADDED Requirements, and a sibling ## Requirements section with identical text.

Two rules keep the halves honest:

  • Naming law: openspec hard-requires the filename spec.md, so the id law derives a spec.md file’s id from its parent directory name — openspec/specs/ge-cli/spec.md declares id: ge.cli.
  • No drift: linter.requirement_drift fails when the delta requirements and the mirrored ## Requirements section drift apart, and linter.dual_format_valid requires a capability spec under openspec/specs/ to be dual-format at all.

The full protocol — the migration recipe, the delta-mirror rules, and the exact gate commands — is served from inside the binary:

spk explain dual-format

That topic is the single source of truth for the protocol; this page only orients you. When the protocol text and spk explain dual-format disagree, trust the command — it ships with the linter that enforces it.

Why not plain openspec archive? The stock archive command regenerates spec files and destroys the specodelic layer (frontmatter and the three tables). specodelic ships spk archive-companion — it runs openspec archive with default spec application (plain deltas are openspec’s native merge), then re-attaches the dual-format layer from the change’s archived layer.md sidecar; a change whose deltas lack restorable sidecars is refused before the destructive archive. spk hooks install wires the dual-format gate (spk lint openspec) into the repo’s pre-commit chain, so an unwrapped delta is caught before commit, not after archive.

The ah companion (espectacular)

espectacular is a sibling tool in the charly-vibes ecosystem — a separate crate whose binary is ah (see its upstream README for install and the full command table). It solves a problem specodelic deliberately does not: spec↔test correspondence. A spec scenario is only as good as the test that actually runs it, and ah keeps those two honestly wired together.

How it works, in this repo:

  • Each deployed scenario in openspec/specs/<capability>/spec.md is backed by a contract TOML at .espectacular/<capability>/<scenario-id>.toml, which declares the tests that verify that scenario.
  • ah check validates every deployed scenario against its contract — and with --run-tests executes the declared tests.
  • ah doctor diagnoses the setup; ah explain <topic> serves playbook guidance for a finding or workflow question.

The boundary is one sentence and it is a hard constraint, recorded in this repo’s AGENTS.md sibling-tool rules:

espectacular is read-only over openspec/specs/ and openspec/changes/: it reads the #### Scenario: blocks, checks correspondence, and reports — it never edits, regenerates, or archives spec files.

That is why the companion archive recipe above exists as the only sanctioned write path for capability specs: the two tools split the work cleanly, with specodelic owning content and espectacular owning the correspondence check. Nothing in ah’s enforcement is specodelic-owned, and no specodelic command changes ah’s behavior — if a docs page or tool output ever claims otherwise, it is wrong; the guards in this repo’s CI (scripts/guards/sibling-blockers.sh) treat boundary violations as bugs, not preferences.

Reading order for an OpenSpec user

  1. Run spk explain dual-format — the protocol, from the binary that enforces it.
  2. Skim the core format — the four specodelic layers the dual-format layer adds to an openspec delta.
  3. Read verification boundaries — what a lint-clean or verified file does not assure; the same honesty discipline ah check applies to spec↔test claims.

Worked example — a reservation/order spec, failures included

This page builds one small spec from nothing: a reservation service for a web shop. You will see the whole four-layer journey — Intent → Constraints → Model → Properties — and then the part most tutorials skip: the mistakes. Every lint finding below is real output from specodelic 0.15.0 on the file as it stands now; the fixes are the fixes that were actually made. The finished spec lives at examples/reservation-order.md and lints clean — you can check that yourself with spk lint docs/src/examples/reservation-order.md from the repo root.

The machine truth behind every rule quoted here is the tool itself: spk explain format, spk explain ears, spk explain lint-rules serve the distilled format guide from inside the binary. This page teaches the format through one example; the commands appear only where they earn their place.

On a TTY spk prints human-readable text (shown throughout); piped, it emits a JSON envelope instead.

The story

A customer submits an order for several items. The service holds stock for every line item and accepts the order — or rejects it outright, holding nothing, charging nothing. Accepted orders are charged exactly once, fulfilled, or released by cancellation or expiry. Deliberately out of scope: pricing, the payment gateway itself, and multi-order races for the last unit (see What the spec does not decide).

One capability, one file. The file is named reservation-order.md; the format’s naming law says - maps to the namespace dot, so the frontmatter id is reservation.order (_ would be literal).

Layer 1 — Intent

The frontmatter carries the whole intent as one EARS sentence; the opening prose is free-form and is never read by the linter.

---
id: reservation.order
kind: intent
statement: "WHEN a customer submits an order THE reservation service SHALL hold stock for every line item and accept the order, or reject it with nothing held and nothing charged."
---

# Reservation & Order

A small order pipeline: submitting an order holds stock for every line
item or rejects the order outright; accepted orders are charged exactly
once, fulfilled, or released by cancellation or expiry.

The statement is Event-Driven (WHEN <trigger> THE <system> SHALL <response>) — one of the five EARS patterns; a statement with no SHALL or no pattern match fails linter.ears_syntax. spk explain ears has the full list.

Now lint the file as it stands:

spk lint reservation-order.md
lint: 1 file(s) linted, 1 finding(s), 1 advisory warning(s)
  reservation-order.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
  advisory reservation-order.md [linter.scenario_binding_table_absent] file declares no `Scenario bindings` table (h3 under `## Requirements` or a trailing h2 — Revision 24 accepts both) — its scenarios are unbound prose; declare the table and bind each `#### Scenario:` heading to the model rows it exercises (advisory rollout hint — the scenario coverage gate, ticket specodelic-pxjn)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.model_present fires because the Model section does not exist yet — a spec with an intent but no model is incomplete by construction, and the checker says so from the first pass. Keep the finding in mind; the next two layers exist to resolve it.

Layer 2 — Constraints

The Constraints table holds the invariants the design actually rests on. Each row is id | kind | expr | traces_to; traces_to is a typed wiki-link pointing at this file’s own intent row — bare text does not resolve. Here is the first draft, warts included: the author wrote the last constraint’s traces_to against a misremembered id (reservation.orders, plural).

| id                             | kind      | expr                                                                                                                | traces_to           |
|--------------------------------|-----------|----------------------------------------------------------------------------------------------------------------------|---------------------|
| all_or_nothing                 | invariant | `the order is accepted only if every line item's requested quantity is available; otherwise no unit is held and nothing is charged` | [[reservation.orders]] |
| held_or_converted              | invariant | `every unit held for an accepted order is either converted to a fulfillment or released; no held unit outlives both` | [[reservation.order]] |
| release_is_total               | invariant | `when a hold is released, no unit remains held for that order; releasing an already-released hold changes nothing`   | [[reservation.order]] |
| charge_iff_fulfilled           | invariant | `the customer is charged if and only if the order reaches fulfilled`                                                  | [[reservation.order]] |
| cancel_refunds_exactly_charged | invariant | `IF a charged order is cancelled, THEN the refund equals exactly the amount charged — never more, never less`         | [[reservation.order]] |
| expiry_releases_holds          | invariant | `an unfulfilled reservation expires after its TTL; expiry releases the hold without charging the customer`            | [[reservation.order]] |
spk lint reservation-order.md
lint: 1 file(s) linted, 9 finding(s), 1 advisory warning(s)
  reservation-order.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
  reservation-order.md [linter.total_refs] dangling reference `[[reservation.orders]]` from constraints.traces_to — target not defined in any spec file
  reservation.order [linter.coverage] constraint `all_or_nothing` has no deriving property — ∃ property.derives_from == `reservation.order.all_or_nothing` is required — write `[[reservation.order.all_or_nothing]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `cancel_refunds_exactly_charged` has no deriving property — ∃ property.derives_from == `reservation.order.cancel_refunds_exactly_charged` is required — write `[[reservation.order.cancel_refunds_exactly_charged]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `charge_iff_fulfilled` has no deriving property — ∃ property.derives_from == `reservation.order.charge_iff_fulfilled` is required — write `[[reservation.order.charge_iff_fulfilled]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `expiry_releases_holds` has no deriving property — ∃ property.derives_from == `reservation.order.expiry_releases_holds` is required — write `[[reservation.order.expiry_releases_holds]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `held_or_converted` has no deriving property — ∃ property.derives_from == `reservation.order.held_or_converted` is required — write `[[reservation.order.held_or_converted]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `release_is_total` has no deriving property — ∃ property.derives_from == `reservation.order.release_is_total` is required — write `[[reservation.order.release_is_total]]` in the property's derives_from cell
  reservation.order [linter.single_root_reachable] 1 row(s) unreachable from any intent row — an orphaned island (traces_to/derives_from/guard/from-to/emits): reservation.order.all_or_nothing
  advisory reservation-order.md [linter.scenario_binding_table_absent] file declares no `Scenario bindings` table (h3 under `## Requirements` or a trailing h2 — Revision 24 accepts both) — its scenarios are unbound prose; declare the table and bind each `#### Scenario:` heading to the model rows it exercises (advisory rollout hint — the scenario coverage gate, ticket specodelic-pxjn)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules; `total_refs` resolves against the linted set only, so lint the containing corpus tree (e.g. specodelic lint openspec/specs) to resolve cross-file references

Stop and read what one typo bought. Three different rules fired on one wrong cell, and they say different things:

  1. linter.total_refs — the reference dangles: nothing defines reservation.orders. The target id is reservation.order.
  2. linter.coverage — every constraint must have a deriving property (the fourth layer’s job; six of these findings stay until then).
  3. linter.single_root_reachable — all_or_nothing is now an orphaned island: with its only link broken, it cannot reach the file’s own intent row, and neither can anything hanging off it.

That last one is the format’s structural conscience. Fix the typo:

| all_or_nothing                 | invariant | `the order is accepted only if every line item's requested quantity is available; otherwise no unit is held and nothing is charged` | [[reservation.order]] |

and the dangling-reference and orphaned-island findings clear — one cell, two findings. (The coverage finding for all_or_nothing itself stays: it fires because nothing derives from the constraint yet, not because of the typo — all six coverage rows stand until the next layer.) What remains is linter.model_present plus the six coverage rows; those are next — the count dropped from 9 to 7, all of it the typo’s:

lint: 1 file(s) linted, 7 finding(s), 1 advisory warning(s)
  reservation-order.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
  reservation.order [linter.coverage] constraint `all_or_nothing` has no deriving property — ∃ property.derives_from == `reservation.order.all_or_nothing` is required — write `[[reservation.order.all_or_nothing]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `cancel_refunds_exactly_charged` has no deriving property — ∃ property.derives_from == `reservation.order.cancel_refunds_exactly_charged` is required — write `[[reservation.order.cancel_refunds_exactly_charged]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `charge_iff_fulfilled` has no deriving property — ∃ property.derives_from == `reservation.order.charge_iff_fulfilled` is required — write `[[reservation.order.charge_iff_fulfilled]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `expiry_releases_holds` has no deriving property — ∃ property.derives_from == `reservation.order.expiry_releases_holds` is required — write `[[reservation.order.expiry_releases_holds]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `held_or_converted` has no deriving property — ∃ property.derives_from == `reservation.order.held_or_converted` is required — write `[[reservation.order.held_or_converted]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `release_is_total` has no deriving property — ∃ property.derives_from == `reservation.order.release_is_total` is required — write `[[reservation.order.release_is_total]]` in the property's derives_from cell
  advisory reservation-order.md [linter.scenario_binding_table_absent] file declares no `Scenario bindings` table (h3 under `## Requirements` or a trailing h2 — Revision 24 accepts both) — its scenarios are unbound prose; declare the table and bind each `#### Scenario:` heading to the model rows it exercises (advisory rollout hint — the scenario coverage gate, ticket specodelic-pxjn)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

Layer 3 — Model

The Model section is a finite state machine: a ### States list and a ### Transitions table (id | from | to | guard). The first draft most people write is wrong in instructive ways. This draft has a missing guard, a misspelled state name, a state declared but never used — and it draws the happy path while leaving the failure path mute:

### States

- `submitted`
- `reserved`
- `charged`
- `fulfilled`
- `cancelled`
- `released`
- `expired`
- `reserve_failed`

### Transitions

| id            | from      | to             | guard                                                                                              |
|---------------|-----------|----------------|-----------------------------------------------------------------------------------------------------|
| accept        | submitted | reserved       | [[reservation.order.all_or_nothing]]                                                                 |
| reject_order  | submitted | reserve_failed | stock unavailable at acceptance time                                                                 |
| charge        | reserved  | charged        |                                                                                                      |
| fulfill       | charged   | shipped        | payment settled                                                                                      |
| cancel_paid   | charged   | cancelled      | `customer cancelled ∧ ¬payment settled ∧ [[reservation.order.cancel_refunds_exactly_charged]]`        |
| cancel_unpaid | reserved  | cancelled      | `customer cancelled ∧ [[reservation.order.held_or_converted]]`                                       |
| expire        | reserved  | released       | `reservation TTL elapsed ∧ [[reservation.order.expiry_releases_holds]]`                              |
spk lint reservation-order.md
lint: 1 file(s) linted, 13 finding(s), 1 advisory warning(s)
  reservation-order.md [linter.guard_required] transition `charge` has an empty guard — every guard must be non-null
  reservation-order.md [linter.every_state_used] state `fulfilled` is declared but no transition enters or leaves it — every state must appear as from or to in at least one transition
  reservation-order.md [linter.every_state_used] state `expired` is declared but no transition enters or leaves it — every state must appear as from or to in at least one transition
  reservation-order.md [linter.every_transition_valid] transition `fulfill` has to `shipped` — not a declared state (states: ["cancelled", "charged", "expired", "fulfilled", "released", "reserve_failed", "reserved", "submitted"])
  reservation-order.md [linter.terminal_states_emit] failure terminal `reserve_failed` emits nothing — a mute failure terminal is a finding; add an emits edge to a file-owned effect Constraint: `- reserve_failed (emits: [[reservation.order.<label>]])`
  reservation-order.md [linter.guard_negation_total] failure transition `reject_order` cites nothing and is not on the carve-out list (orchestrate's stage-fails) — cite the union of its success siblings' citation sets, or record a carve-out in linter-failure_shape.md
  reservation.order [linter.coverage] constraint `all_or_nothing` has no deriving property — ∃ property.derives_from == `reservation.order.all_or_nothing` is required — write `[[reservation.order.all_or_nothing]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `cancel_refunds_exactly_charged` has no deriving property — ∃ property.derives_from == `reservation.order.cancel_refunds_exactly_charged` is required — write `[[reservation.order.cancel_refunds_exactly_charged]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `charge_iff_fulfilled` has no deriving property — ∃ property.derives_from == `reservation.order.charge_iff_fulfilled` is required — write `[[reservation.order.charge_iff_fulfilled]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `expiry_releases_holds` has no deriving property — ∃ property.derives_from == `reservation.order.expiry_releases_holds` is required — write `[[reservation.order.expiry_releases_holds]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `held_or_converted` has no deriving property — ∃ property.derives_from == `reservation.order.held_or_converted` is required — write `[[reservation.order.held_or_converted]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `release_is_total` has no deriving property — ∃ property.derives_from == `reservation.order.release_is_total` is required — write `[[reservation.order.release_is_total]]` in the property's derives_from cell
  reservation.order [linter.single_root_reachable] 2 row(s) unreachable from any intent row — an orphaned island (traces_to/derives_from/guard/from-to/emits): reservation.order.expired, reservation.order.fulfilled
  advisory reservation-order.md [linter.scenario_binding_table_absent] file declares no `Scenario bindings` table (h3 under `## Requirements` or a trailing h2 — Revision 24 accepts both) — its scenarios are unbound prose; declare the table and bind each `#### Scenario:` heading to the model rows it exercises (advisory rollout hint — the scenario coverage gate, ticket specodelic-pxjn)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

Thirteen findings, four distinct lessons:

Shape mistakes. charge has an empty guard (linter.guard_required — a transition without a guard is not a decision, it is an accident). fulfill points at shipped, which is not declared (linter.every_transition_valid). And expired was declared but never wired into any transition (linter.every_state_used).

A typo cascades. Notice that fulfilled — a state the author fully intended to reach — is also reported unused. That is the shipped typo’s doing: with fulfill pointing elsewhere, nothing enters fulfilled, so the state became an unreachable island, dragging itself and expired into one linter.single_root_reachable finding. Fixing the typo clears both.

The failure path is not optional. The two most interesting findings name the failure path:

  • linter.terminal_states_emit: reserve_failed is a terminal state with inbound transitions and nothing to say — a mute failure terminal. In this format a failure may not be silent: it must emit exactly one labeled effect Constraint owned by this file.
  • linter.guard_negation_total: reject_order’s guard cites nothing. Its success sibling (accept) cites [[reservation.order.all_or_nothing]], so the failure transition must cite exactly the negated disjunction of that citation set. The rule makes “rejection happens for the same reason acceptance does not” a machine-checked shape, not a hope.

Fixing all of this touches four places: delete the redundant expired state (TTL expiry releases the hold — released is that state), give charge a guard, point fulfill at fulfilled, and give the failure terminal something to emit. Emitting needs a new effect row — the fourth constraint kind the file meets for the first time:

| stock_exhausted                | effect    | `reservation.order.stock_exhausted(detail)`                                                                           | [[reservation.order]] |

and the states list gains the emit edge:

- `reserve_failed` (emits: `[[reservation.order.stock_exhausted]]`)

while the transitions become:

| id            | from      | to             | guard                                                                                              |
|---------------|-----------|----------------|-----------------------------------------------------------------------------------------------------|
| accept        | submitted | reserved       | [[reservation.order.all_or_nothing]]                                                                 |
| reject_order  | submitted | reserve_failed | `¬[[reservation.order.all_or_nothing]]`                                                              |
| charge        | reserved  | charged        | `payment authorized ∧ [[reservation.order.charge_iff_fulfilled]]`                                    |
| fulfill       | charged   | fulfilled      | `payment settled ∧ [[reservation.order.charge_iff_fulfilled]]`                                       |
| cancel_paid   | charged   | cancelled      | `customer cancelled ∧ ¬payment settled ∧ [[reservation.order.cancel_refunds_exactly_charged]]`        |
| cancel_unpaid | reserved  | cancelled      | `customer cancelled ∧ [[reservation.order.held_or_converted]]`                                       |
| expire        | reserved  | released       | `reservation TTL elapsed ∧ [[reservation.order.expiry_releases_holds]]`                              |
spk lint reservation-order.md
lint: 1 file(s) linted, 7 finding(s), 2 advisory warning(s)
  reservation.order [linter.coverage] constraint `all_or_nothing` has no deriving property — ∃ property.derives_from == `reservation.order.all_or_nothing` is required — write `[[reservation.order.all_or_nothing]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `cancel_refunds_exactly_charged` has no deriving property — ∃ property.derives_from == `reservation.order.cancel_refunds_exactly_charged` is required — write `[[reservation.order.cancel_refunds_exactly_charged]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `charge_iff_fulfilled` has no deriving property — ∃ property.derives_from == `reservation.order.charge_iff_fulfilled` is required — write `[[reservation.order.charge_iff_fulfilled]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `expiry_releases_holds` has no deriving property — ∃ property.derives_from == `reservation.order.expiry_releases_holds` is required — write `[[reservation.order.expiry_releases_holds]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `held_or_converted` has no deriving property — ∃ property.derives_from == `reservation.order.held_or_converted` is required — write `[[reservation.order.held_or_converted]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `release_is_total` has no deriving property — ∃ property.derives_from == `reservation.order.release_is_total` is required — write `[[reservation.order.release_is_total]]` in the property's derives_from cell
  reservation.order [linter.coverage] constraint `stock_exhausted` has no deriving property — ∃ property.derives_from == `reservation.order.stock_exhausted` is required — write `[[reservation.order.stock_exhausted]]` in the property's derives_from cell
  advisory reservation-order.md [linter.scenario_binding_table_absent] file declares no `Scenario bindings` table (h3 under `## Requirements` or a trailing h2 — Revision 24 accepts both) — its scenarios are unbound prose; declare the table and bind each `#### Scenario:` heading to the model rows it exercises (advisory rollout hint — the scenario coverage gate, ticket specodelic-pxjn)
  advisory reservation.order [linter.observability] effect `reservation.order.stock_exhausted` has no `observes` reference targeting it — a declared output nobody observes (advisory, exit 0) [hint: add an `observes` column on the row that consumes this output, or remove the effect if it is unintentional]
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

The model shape is clean now; what remains is coverage (next layer) — plus one advisory warning: the new effect is a firehose nobody attached a hose to. The warning asks, in the linter’s own words, “who is this output for?” It never gates (exit 0) — but a rejection reason that is part of the contract deserves an observer, so the finished spec adds one. An observer is a second column on the row that consumes the output:

| reject_reason_surfaced         | invariant | `every rejection reaches the caller with the exhausted line items named`                                              | [[reservation.order]] | [[reservation.order.stock_exhausted]] |

Layer 4 — Properties

Every constraint — including the effect row — needs a deriving property. The Properties table is the evidence plan: unit rows pair a generator with a predicate; law rows would additionally require **identity:** and **associativity:** case labels (linter.law_cases) — none of this file’s claims are algebraic, so it needs none.

## Properties

| id                        | kind | derives_from                                    | generator                                        | predicate                                                        |
|---------------------------|------|--------------------------------------------------|---------------------------------------------------|--------------------------------------------------------------------|
| no_charge_on_rejection    | unit | [[reservation.order.all_or_nothing]]             | `orders_with_mixed_availability()`                | `nothing is charged for any rejected order`                        |
| holds_all_converted       | unit | [[reservation.order.held_or_converted]]          | `arbitrary_closed_orders()`                       | `every held unit is converted or released when the order closes`   |
| double_release_noop       | unit | [[reservation.order.release_is_total]]           | `order_released_twice()`                          | `the second release changes nothing`                               |
| fulfilled_implies_charged | unit | [[reservation.order.charge_iff_fulfilled]]       | `arbitrary_accepted_orders()`                     | `charged(order) == (outcome(order) == fulfilled)`                  |
| refund_bounded            | unit | [[reservation.order.cancel_refunds_exactly_charged]] | `charged_orders_cancelled_before_settlement()` | `refund(order) == amount_charged(order)`                           |
| expiry_free               | unit | [[reservation.order.expiry_releases_holds]]      | `orders_past_ttl()`                               | `nothing is charged and no unit remains held after expiry`         |
| rejection_labels_emitted  | unit | [[reservation.order.reject_reason_surfaced]]     | `orders_with_exhausted_items()`                   | `the rejection message names exactly the exhausted line items`     |
| stock_exhausted_emitted   | unit | [[reservation.order.stock_exhausted]]            | `rejections_over_sold_out_items()`                | `the rejection carries the stock_exhausted label with the item detail` |

With the observer row and the property table in place:

spk lint reservation-order.md
lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory reservation-order.md [linter.scenario_binding_table_absent] file declares no `Scenario bindings` table (h3 under `## Requirements` or a trailing h2 — Revision 24 accepts both) — its scenarios are unbound prose; declare the table and bind each `#### Scenario:` heading to the model rows it exercises (advisory rollout hint — the scenario coverage gate, ticket specodelic-pxjn)
→ Run: specodelic graph

Zero findings, zero warnings. The spec is structurally complete. Now walk the rest of the pipeline (the exact commands and their shape are in Installation & Quick Start); the essentials:

spk graph reservation-order.md
graph: 1 file(s), 31 node(s), 39 edge(s), 0 dangling, 0 typing violation(s), 0 supersedes cycle(s), 0 external boundary(ies)
→ Run: specodelic lint
spk compile reservation-order.md --out-dir specodelic/
compile: 1 compiled, 0 failed
  reservation-order.md [reservation.order] → specodelic/reservation-order.toml, specodelic/reservation-order_props.rs, specodelic/reservation-order.tla
→ Run: specodelic verify (consumes the *_props.rs artifacts)

Compile emits three artifacts byte-stably: the constraints as TOML, the properties as proptest scaffolding, the model as a TLA+ module.

spk model-check reservation-order.md
model-check: 1 checked, 0 failed
  reservation-order.md [reservation.order]: exploration_only (7 states explored) → specodelic/reservation-order.check.json
    claims: 0 evaluated, 7 unchecked, 0 blocking
      unchecked: all_or_nothing, cancel_refunds_exactly_charged, charge_iff_fulfilled, expiry_releases_holds, held_or_converted, reject_reason_surfaced, release_is_total
    trust base: 7 unverified claim(s), 7 assumed — prose_only_invariant: 7, prose_only_guard: 7
      prose_only_invariant: all_or_nothing (reservation.order)
      prose_only_invariant: cancel_refunds_exactly_charged (reservation.order)
      prose_only_invariant: charge_iff_fulfilled (reservation.order)
      prose_only_invariant: expiry_releases_holds (reservation.order)
      prose_only_invariant: held_or_converted (reservation.order)
      prose_only_invariant: reject_reason_surfaced (reservation.order)
      prose_only_invariant: release_is_total (reservation.order)
      prose_only_guard: accept (reservation.order)
      prose_only_guard: cancel_paid (reservation.order)
      prose_only_guard: cancel_unpaid (reservation.order)
      … 4 more member(s) truncated — the JSON and the persisted report keep every member
→ Run: specodelic verify (consumes the *.check.json reports)

Read that verdict carefully: exploration_only is not a clean bill of health. All seven states were explored and no executable invariant was violated — but none of the seven claims was evaluated, because prose-predicate claims cannot be executed. The tool refuses to dress an unexplored claim as a verified one.

A counterexample — the checker catches the author

That honesty has a payoff. Suppose the author, wanting a stronger verdict, hardens one claim into an executable invariant — and while at it, over-claims. Working on a scratch copy of the finished file, they add:

| reserve_never_fails            | invariant | `**rust:** state != "reserve_failed"` — surely the reject path never fires once the flow is written down | [[reservation.order]] |                                       |

plus its coverage property:

| reserve_never_fails_holds | unit | [[reservation.order.reserve_never_fails]]        | `arbitrary_orders()`                              | `no order ever reaches reserve_failed`                             |

The **rust:** marker makes the invariant executable: the model-check backend evaluates it as a Rust boolean over the program counter, the machine’s current state name. Lint is happy — coverage holds, shape holds:

cp reservation-order.md /tmp/reservation/
cd /tmp/reservation
spk lint reservation-order.md
lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory reservation-order.md [linter.scenario_binding_table_absent] file declares no `Scenario bindings` table (h3 under `## Requirements` or a trailing h2 — Revision 24 accepts both) — its scenarios are unbound prose; declare the table and bind each `#### Scenario:` heading to the model rows it exercises (advisory rollout hint — the scenario coverage gate, ticket specodelic-pxjn)
→ Run: specodelic graph

Lint cannot catch this mistake — it is structural, and this file is structurally impeccable. The claim itself is simply false, and the next stage proves it:

spk compile reservation-order.md --out-dir specodelic/
spk model-check reservation-order.md
compile: 1 compiled, 0 failed
  reservation-order.md [reservation.order] → specodelic/reservation-order.toml, specodelic/reservation-order_props.rs, specodelic/reservation-order.tla
→ Run: specodelic verify (consumes the *_props.rs artifacts)
model-check: 1 checked, 0 failed
  reservation-order.md [reservation.order]: counterexample_found (3 states explored) → specodelic/reservation-order.check.json
    claims: 1 evaluated, 7 unchecked, 1 blocking
      blocking: reserve_never_fails (rust, counterexample)
      unchecked: all_or_nothing, cancel_refunds_exactly_charged, charge_iff_fulfilled, expiry_releases_holds, held_or_converted, reject_reason_surfaced, release_is_total
    trust base: 7 unverified claim(s), 7 assumed — prose_only_invariant: 7, prose_only_guard: 7
      prose_only_invariant: all_or_nothing (reservation.order)
      prose_only_invariant: cancel_refunds_exactly_charged (reservation.order)
      prose_only_invariant: charge_iff_fulfilled (reservation.order)
      prose_only_invariant: expiry_releases_holds (reservation.order)
      prose_only_invariant: held_or_converted (reservation.order)
      prose_only_invariant: reject_reason_surfaced (reservation.order)
      prose_only_invariant: release_is_total (reservation.order)
      prose_only_guard: accept (reservation.order)
      prose_only_guard: cancel_paid (reservation.order)
      prose_only_guard: cancel_unpaid (reservation.order)
      … 4 more member(s) truncated — the JSON and the persisted report keep every member
model-check findings: the claim aggregate is not clean (see .data.checked)
→ Run: fix the refuted claim(s) named in .data.checked — verify's model gate accepts only a no_counterexample aggregate

counterexample_found — and the report names the violated invariant and the shortest trace that refutes it (from the emitted reservation-order.check.json):

{
  "outcome": "counterexample_found",
  "violated_invariant_id": "reserve_never_fails",
  "trace": ["submitted", "reserve_failed"],
  "states_explored": 3,
  "invariants_checked": ["reserve_never_fails"]
}

The model checker explored the reachable states — states_explored: 3, the two successors of submitted and the root — and reported the two-step trace ending in the very state the author swore was unreachable. Rejection is reachable by design — all_or_nothing can fail; that is what the failure terminal is for. The executable invariant claimed otherwise, so the invariant was the bug.

The fix is to delete the over-claiming row and its property (the true claim — why rejection happens — is already carried by the transition’s guard). Re-running spk model-check on the restored file returns exactly the exploration_only verdict shown above. The checker was the design critic; the counterexample was the design lesson.

This is also where the format’s honesty boundary shows: the program counter model carries no data binding — an executable invariant sees only the machine’s current state name, never the order’s contents or its history. Claims like “no charge without fulfillment” live in the Constraints table as prose invariants and their Properties plans; they get executed only when someone writes a real **rust:** fragment in a backend that can evaluate them.

What verify refuses to pretend

The last stage executes the property scaffolding:

spk verify reservation-order.md
verify: 0 verified, 1 blocked
  reservation-order.md [reservation.order]: properties_failed — 8 of 8 compiled blocks failed — a partial pass is a failure of the property
      unchecked: all_or_nothing, cancel_refunds_exactly_charged, charge_iff_fulfilled, expiry_releases_holds, held_or_converted, reject_reason_surfaced, release_is_total
    trust base: 7 unverified claim(s), 7 assumed — prose_only_invariant: 7, prose_only_guard: 7
      prose_only_invariant: all_or_nothing (reservation.order)
      prose_only_invariant: cancel_refunds_exactly_charged (reservation.order)
      prose_only_invariant: charge_iff_fulfilled (reservation.order)
      prose_only_invariant: expiry_releases_holds (reservation.order)
      prose_only_invariant: held_or_converted (reservation.order)
      prose_only_invariant: reject_reason_surfaced (reservation.order)
      prose_only_invariant: release_is_total (reservation.order)
      prose_only_guard: accept (reservation.order)
      prose_only_guard: cancel_paid (reservation.order)
      prose_only_guard: cancel_unpaid (reservation.order)
      … 4 more member(s) truncated — the JSON and the persisted report keep every member
verify blocked — the blocking gate, message and hint ride .data.blocked
→ Run: fix the failing predicates (see each block's detail for the shrunk failing input)

Eight of eight blocks fail — because every predicate in this file is still prose. Compile emitted them as todo_predicate! placeholders that compile fine and fail the moment verify executes them. That is the format refusing to pretend: a claim that was never executed is never reported as passing, and a partial pass is a failure. The next rung on the progressive-formalization ladder is opting individual predicates into **rust:** fragments — one property at a time, only where a real assertion can be written.

Unresolved behaviors

A finished spec is not a finished design. This file deliberately leaves open:

  • Payment semantics. payment authorized and payment settled are prose guards; the compiled TLA+ module carries them as comments and stutters at terminals rather than inventing semantics. The spec does not model the gateway.
  • The value of the TTL. expire fires “after its TTL” — no duration is decided, and the schema has no column that could carry one.
  • Refund timing. cancel_refunds_exactly_charged bounds the amount; when the refund lands is not decided.
  • Concurrent orders. The model is one order’s program counter. Two orders racing for the last unit is a different capability — its own file, its own intent — not a row bolted onto this one.
  • Partial fulfillment. all_or_nothing was a design decision, not an accident of scope: no partial accept is modeled, deliberately.
  • Unexecuted predicates. All eight predicates are prose. The claims are as strong as their evidence plan, and the evidence has not been written yet — see spk verify above.

Each of these would land in a named place if decided: a constraint row, a property row, a transition guard, or a new file — the format refuses to let them remain ambient.

The finished file

The result of every fix above is examples/reservation-order.md — the standalone spec exactly as it lints at 0 findings, 0 warnings. For a second worked example that goes deeper on one mechanism (how the accumulator’s algebra licenses parallel architectures), see batch-resume — derived parallelism, worked end to end.

Worked example — the data.lineage pack, failures included

The generic worked example builds a spec with the core format alone. This page does the same job for a domain pack: data.lineage, the pack that adds a typed ## Data section, dataset/artifact/environment kinds, and lineage reference fields — without a format revision and without growing any base closed set. You will see a small spec use the pack’s vocabulary end to end, the pack-activation advisory that proves the pack actually engaged, two genuinely failing variants with their real labeled findings, and — just as important — the failures the linter does not catch yet, shown honestly.

How packs are enabled and what a pack adds mechanically is the job of using packs — the practical guide; read that for the mechanism, this page for the hands-on loop. Every lint and graph block below is real output from specodelic 0.10.0 on the file as it stood at that moment. On a TTY spk prints the human-readable text shown here; piped, it emits a JSON envelope instead.

The story

A sequencing lab runs an ETL pipeline: raw reads land in object storage, a count table and a QC report are derived from them, and every dataset names the environment (instrument, manifest) it was produced in. The spec’s job is to record that lineage — one capability, one file, named lab-etl.md; the format’s naming law maps - to the namespace dot, so the frontmatter id is lab.etl.

Deliberately out of scope: where the data physically lives and which external standard governs each artifact. That is the binding column’s job, and it stays opaque — the pack bridges external data standards (OME/NGFF, Parquet, …), it never absorbs them.

The setup

Packs are discovered by scanning the workspace, not by any config file: every kind: profile file in the git repository toplevel of the linted spec is a candidate pack. So the demo workspace needs two files — the pack definition (copied from this repo’s packs/ directory) and the spec under test:

mkdir demo && cd demo && git init
cp /path/to/specodelic/packs/data-lineage.md .

That is the whole enablement story. The discovery and activation rules (corpus-scan anchors, word-boundary vocabulary matching, the byte-identical guarantee) are in the guide; this page just runs the loop.

Layer 1 — Intent

---
id: lab.etl
kind: intent
statement: "WHEN the lab's ETL pipeline runs THE system SHALL record every dataset, artifact, and environment it touches together with the lineage edges between them."
---

# Lab ETL lineage

A small data-lineage record for one sequencing ETL run: the pipeline
reads raw reads, produces a count table and a QC report, and every
dataset names the environment it ran in.

Lint it as it stands:

spk lint lab-etl.md
lint: 1 file(s) linted, 1 finding(s), 0 advisory warning(s)
  lab-etl.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.model_present — a spec with an intent but no Model section is incomplete by construction, same as in the generic worked example. Note what is missing from this output: no pack advisory. The file uses none of the pack’s vocabulary yet, so the byte-identical guarantee holds — the pack machinery is invisible. That changes with the next section.

Layer 2 — the ## Data section

This is the pack’s namespaced section, declared in the pack’s ## Sections manifest with the fixed row shape | name | kind | dtype | units | binding |:

## Data

| name      | kind             | dtype    | units  | binding              |
|-----------|------------------|----------|--------|----------------------|
| raw_reads | data.dataset     | fastq    | reads  | s3://lab/raw-reads   |
| counts    | data.artifact    | tsv      | count  | parquet://lab/counts |
| qc_report | data.artifact    | html     | report | file://lab/qc.html   |
| sequencer | data.environment | manifest | run    | equipment://seq/7    |

Each column, defined for a cold read:

  • name — the row’s id inside this file; lineage edges point at it.
  • kind — the pack’s own closed set: data.dataset (a bounded collection of measurements), data.artifact (a derived object a pipeline produces or consumes), data.environment (the execution or measurement context of a dataset or artifact). These are fiber kinds — pack-declared vocabulary, never a growth of the base closed sets.
  • dtype / units — free-form descriptors of the data’s shape and unit of measure. The pack does not constrain their values.
  • binding — the opaque pointer to the external system of record (s3://…, parquet://…). The pack declares no syntax for it and the linter never interprets it: external data standards stay authoritative.

Lineage edges are the pack’s reference fields, declared in its ## References manifest — produced_by and consumed_by, each resolving to a ## Data row of the same file. They ride as columns on a second table under the same section:

| row       | produced_by | consumed_by |
|-----------|-------------|-------------|
| raw_reads |             | counts      |
| counts    | raw_reads   | qc_report   |

Read the edges aloud: raw_reads is consumed by counts; counts is produced by raw_reads and consumed by qc_report. The pack also declares a checker — data.lineage.closure, every lineage reference name resolves to a ## Data row declared in the same file — and a case-label floor: law-kind properties about data.artifact rows must carry a provenance: case. (This spec’s properties are all unit kind, so the floor does not bite; see the guide for what floors demand.)

Layer 3 — Constraints, Model, Properties

The rest of the file is the ordinary four-layer shape — the pack adds vocabulary, it does not change the layers. Two invariants state the lineage claims, an effect constraint labels the failure output, an observes edge ties the observer to the effect, and the model is a five-state run lifecycle whose failure terminal emits:

## Constraints

| id             | kind      | expr                                                                             | traces_to   | observes               |
|----------------|-----------|-----------------------------------------------------------------------------------|-------------|------------------------|
| lineage_closed | invariant | `every produced_by or consumed_by edge names a ## Data row declared in this file` | [[lab.etl]] |                        |
| env_binds_run  | invariant | `every dataset names exactly one environment as its execution context`            | [[lab.etl]] |                        |
| lineage_gap    | effect    | `lab.etl.lineage_gap(detail)`                                                     | [[lab.etl]] |                        |
| gap_surfaced   | invariant | `every lineage gap reaches the operator with the offending edge named`            | [[lab.etl]] | [[lab.etl.lineage_gap]] |

## Model

### States

- `started`
- `ingested`
- `counted`
- `reported`
- `failed` (emits: `[[lab.etl.lineage_gap]]`)

### Transitions

| id     | from     | to       | guard                                                    |
|--------|----------|----------|-----------------------------------------------------------|
| begin  | started  | ingested | `sequencer manifest present ∧ [[lab.etl.env_binds_run]]`  |
| count  | ingested | counted  | `[[lab.etl.lineage_closed]]`                              |
| report | counted  | reported | `qc_report binding written`                               |
| fail   | started  | failed   | `¬[[lab.etl.env_binds_run]]`                              |

## Properties

| id            | kind | derives_from               | generator                    | predicate                                               |
|---------------|------|-----------------------------|------------------------------|---------------------------------------------------------|
| edges_resolve | unit | [[lab.etl.lineage_closed]] | `runs_with_lineage_edges()`  | `every lineage edge resolves to a declared ## Data row`  |
| env_recorded  | unit | [[lab.etl.env_binds_run]]  | `runs_with_datasets()`       | `every dataset carries its environment binding`          |
| gap_emitted   | unit | [[lab.etl.lineage_gap]]    | `runs_with_undefined_rows()` | `the failure carries the lineage_gap label with detail`  |
| gap_named     | unit | [[lab.etl.gap_surfaced]]   | `runs_with_undefined_rows()` | `the operator message names the offending lineage edge`  |

Nothing pack-specific here — traces_to, guards, emits, coverage: all core-format machinery, taught properly in the generic worked example.

First full lint — a dangling reference, then the fix

The author’s first full draft carries one typo: the lineage_closed constraint traces to [[lab.ets]] — plural, misremembered, the same classic as the reservation example. Lint the file:

spk lint lab-etl.md
lint: 1 file(s) linted, 1 finding(s), 1 advisory warning(s)
  lab-etl.md [linter.total_refs] dangling reference `[[lab.ets]]` from constraints.traces_to — target not defined in any spec file
  advisory lab.etl [linter.observability] pack `data.lineage` activated for `lab.etl` (vocabulary match: data.dataset, data.artifact, data.environment, Data, produced_by, consumed_by) — empty checked-set (no violations to report)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

Exit 1 — a finding, never a silent pass. Two things to read here:

  1. The finding and the advisory ride different channels. The pack activated (its vocabulary is all over the file — note the match list names every token that triggered it), but activation lives on the warnings channel and never gates. The dangling reference lives on the findings channel and does.
  2. empty checked-set (no violations to report) — the pack’s declared data.lineage.closure checker ran and honestly reports an empty violation set. More on what that does and does not mean below.

Fix the typo — [[lab.ets]] → [[lab.etl]] — and lint again:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory lab.etl [linter.observability] pack `data.lineage` activated for `lab.etl` (vocabulary match: data.dataset, data.artifact, data.environment, Data, produced_by, consumed_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

Zero findings, exit 0 — and now the advisory is the whole output. Read it as the meter it is: an exit-0 lint alone proves nothing (a spec using none of the pack vocabulary also exits 0, silently); the activation line naming data.lineage is the observable that the pack was discovered, matched, and engaged. The pipeline’s next stage runs pack-aware too:

spk graph lab-etl.md
graph: 1 file(s), 18 node(s), 21 edge(s), 0 dangling, 0 typing violation(s), 0 supersedes cycle(s), 0 external boundary(ies)
→ Run: specodelic lint

What a missing pack looks like

The demo depends on the pack file being discovered. Delete the setup step — lint the same finished spec in a directory with no kind: profile file in it — and the machinery goes inert:

lint: 1 file(s) linted, 0 finding(s), 0 advisory warning(s)
→ Run: specodelic graph

No advisory, no findings — the byte-identical guarantee in action. The ## Data table is now just markdown the linter does not interpret, and that is by design: a pack can never gate a file that did not opt in. But inert cuts both ways, and the linter tells you when vocabulary expects a pack. Say the author, pack-enthused, writes a base-table kind cell as data.dataset instead of invariant, in that same pack-less directory:

lint: 1 file(s) linted, 2 finding(s), 0 advisory warning(s)
  lab.etl [linter.constraint_kind_closed] constraint `lineage_closed` has kind `data.dataset` — outside the closed set {invariant, advisory, effect, extension_point} (kinds.md constraint_row_shape)
  lab.etl [linter.orphan_vocabulary] orphan vocabulary: pack-qualified token(s) `data.dataset` used by `lab.etl`, but no `kind: profile` pack in namespace `data` is discovered — candidate pack `data.*` (prefix-derived: only the namespace is known); remediations: add/enable a `kind: profile` pack file declaring the vocabulary, or fix the vocabulary (un-qualify or retype the token)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.orphan_vocabulary — the finding always names the candidate (namespace-derived, data.* here) and states both remediations: enable a pack declaring the vocabulary, or fix the token. Copy the pack file back into the workspace and the orphan finding clears — with the pack active, the walkers accept a fiber kind in a kind column (base ∪ active-pack-fiber), so that particular mis-typing only surfaces when the pack is missing. The reliable diagnostic is the one this section started with: a spec you meant to be pack-enabled but lint with no activation advisory is a spec whose pack was not discovered.

What the linter does not catch (yet)

Honesty check — the failure this page has not shown is the one you might expect first: a lineage edge that dangles. Change qc_report to ghost_row in the consumed_by column and lint:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory lab.etl [linter.observability] pack `data.lineage` activated for `lab.etl` (vocabulary match: data.dataset, data.artifact, data.environment, Data, produced_by, consumed_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

Byte-for-byte the clean output — exit 0, activation advisory, nothing else. That is not the linter missing the dangle by accident: data.lineage.closure ships as a declaration. In v1, pack checkers are honest-empty — activation and the empty checked-set are reported truthfully, violation evaluation is not implemented yet (the guide documents this, and verification boundaries places it on the guarantee ladder). The format’s answer to the gap is the one this spec already embodies: the dangling-edge claim lives where the evidence plan lives — the lineage_closed invariant, its edges_resolve property, and eventually a real executable predicate. When the checker gains evaluation, the declaration is already in place; the spec does not change.

The finished spec

Every block above assembles into this one file, lab-etl.md — exactly as it lints at 0 findings, 1 activation advisory:

---
id: lab.etl
kind: intent
statement: "WHEN the lab's ETL pipeline runs THE system SHALL record every dataset, artifact, and environment it touches together with the lineage edges between them."
---

# Lab ETL lineage

A small data-lineage record for one sequencing ETL run: the pipeline
reads raw reads, produces a count table and a QC report, and every
dataset names the environment it ran in.

## Constraints

| id             | kind      | expr                                                                             | traces_to   | observes               |
|----------------|-----------|-----------------------------------------------------------------------------------|-------------|------------------------|
| lineage_closed | invariant | `every produced_by or consumed_by edge names a ## Data row declared in this file` | [[lab.etl]] |                        |
| env_binds_run  | invariant | `every dataset names exactly one environment as its execution context`            | [[lab.etl]] |                        |
| lineage_gap    | effect    | `lab.etl.lineage_gap(detail)`                                                     | [[lab.etl]] |                        |
| gap_surfaced   | invariant | `every lineage gap reaches the operator with the offending edge named`            | [[lab.etl]] | [[lab.etl.lineage_gap]] |

## Data

| name      | kind             | dtype    | units  | binding              |
|-----------|------------------|----------|--------|----------------------|
| raw_reads | data.dataset     | fastq    | reads  | s3://lab/raw-reads   |
| counts    | data.artifact    | tsv      | count  | parquet://lab/counts |
| qc_report | data.artifact    | html     | report | file://lab/qc.html   |
| sequencer | data.environment | manifest | run    | equipment://seq/7    |

| row       | produced_by | consumed_by |
|-----------|-------------|-------------|
| raw_reads |             | counts      |
| counts    | raw_reads   | qc_report   |

## Model

### States

- `started`
- `ingested`
- `counted`
- `reported`
- `failed` (emits: `[[lab.etl.lineage_gap]]`)

### Transitions

| id     | from     | to       | guard                                                    |
|--------|----------|----------|-----------------------------------------------------------|
| begin  | started  | ingested | `sequencer manifest present ∧ [[lab.etl.env_binds_run]]`  |
| count  | ingested | counted  | `[[lab.etl.lineage_closed]]`                              |
| report | counted  | reported | `qc_report binding written`                               |
| fail   | started  | failed   | `¬[[lab.etl.env_binds_run]]`                              |

## Properties

| id            | kind | derives_from               | generator                    | predicate                                               |
|---------------|------|-----------------------------|------------------------------|---------------------------------------------------------|
| edges_resolve | unit | [[lab.etl.lineage_closed]] | `runs_with_lineage_edges()`  | `every lineage edge resolves to a declared ## Data row`  |
| env_recorded  | unit | [[lab.etl.env_binds_run]]  | `runs_with_datasets()`       | `every dataset carries its environment binding`          |
| gap_emitted   | unit | [[lab.etl.lineage_gap]]    | `runs_with_undefined_rows()` | `the failure carries the lineage_gap label with detail`  |
| gap_named     | unit | [[lab.etl.gap_surfaced]]   | `runs_with_undefined_rows()` | `the operator message names the offending lineage edge`  |

To reproduce every block on this page: copy packs/data-lineage.md from the repo into a fresh git workspace, save the file above as lab-etl.md, and run spk lint lab-etl.md.

Where to go next

Worked example — the numeric.predicates pack, failures included

The generic worked example builds a spec with the core format alone, and the data.lineage page does the same for the first domain pack. This page runs the identical journey for numeric.predicates — the pack that adds a typed ## Quantities section, the numeric.quantity / numeric.bound / numeric.tolerance kinds, a measured_by reference field, and a case-label floor for tolerance laws — without a format revision and without growing any base closed set. You will see a small spec use the pack’s vocabulary end to end, the pack-activation advisory that proves the pack actually engaged, two genuinely failing variants with their real labeled findings, and — just as important — the failures the linter does not catch yet, shown honestly.

How packs are enabled and what a pack adds mechanically is the job of using packs — the practical guide; read that for the mechanism, this page for the hands-on loop. Every lint and graph block below is real output from specodelic 0.10.0 on the file as it stood at that moment. On a TTY spk prints the human-readable text shown here; piped, it emits a JSON envelope instead.

The story

A brewery runs a fermentation line: every batch measures mash temperature and pH, derives an ABV yield from a gas-chromatography assay, and must respect a regulatory ethanol cap and a pH window. The spec’s job is to record those quantities and the limits that govern them — one capability, one file, named batch-yield.md; the format’s naming law maps - to the namespace dot, so the frontmatter id is batch.yield.

Deliberately out of scope: which unit system the numbers are written in and where each domain of validity is defined. Those are the unit and domain columns’ job, and they stay opaque — the pack bridges external unit systems (UCUM, ISO 4217, microscopy units, …), it never absorbs them. Lint behavior is byte-identical no matter what prose the columns carry.

The setup

Packs are discovered by scanning the workspace, not by any config file: every kind: profile file in the git repository toplevel of the linted spec is a candidate pack. So the demo workspace needs two files — the pack definition (copied from this repo’s packs/ directory) and the spec under test:

mkdir demo && cd demo && git init
cp /path/to/specodelic/packs/numeric-predicates.md .

That is the whole enablement story. The discovery and activation rules (corpus-scan anchors, word-boundary vocabulary matching, the byte-identical guarantee) are in the guide; this page just runs the loop.

Layer 1 — Intent

---
id: batch.yield
kind: intent
statement: "WHEN a fermentation batch is processed THE system SHALL record every quantity it measures or derives together with the bounds and tolerances that govern them."
---

# Batch yield quantities

A small numeric record for one fermentation line: the process measures
mash temperature and pH, derives an ABV yield from a gas-chromatography
assay, and every stated limit is a bound or a tolerance with a unit and
a domain of validity.

Lint it as it stands:

spk lint batch-yield.md
lint: 1 file(s) linted, 1 finding(s), 0 advisory warning(s)
  batch-yield.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.model_present — a spec with an intent but no Model section is incomplete by construction, same as in the generic worked example. Note what is missing from this output: no pack advisory. The file uses none of the pack’s vocabulary yet, so the byte-identical guarantee holds — the pack machinery is invisible. That changes with the next section.

Layer 2 — the ## Quantities section

This is the pack’s namespaced section, declared in the pack’s ## Sections manifest with the fixed row shape | name | kind | unit | domain |:

## Quantities

| name          | kind              | unit                     | domain     |
|---------------|-------------------|--------------------------|------------|
| mash_temp     | numeric.quantity  | degC (UCUM Cel)          | process    |
| ph            | numeric.quantity  | pH (dimensionless)       | process    |
| ethanol_assay | numeric.quantity  | percent v/v (UCUM [pct]V)| product    |
| abv_yield     | numeric.quantity  | percent v/v (UCUM [pct]V)| product    |
| ethanol_cap   | numeric.bound     | percent v/v (UCUM [pct]V)| regulatory |
| ph_window     | numeric.tolerance | pH                       | process    |

Each column, defined for a cold read:

  • name — the row’s id inside this file; measured_by edges point at it.
  • kind — the pack’s own closed set: numeric.quantity (a measured or derived real-valued quantity), numeric.bound (a stated real-valued limit on a quantity), numeric.tolerance (an empirically held tolerance on a quantity). These are fiber kinds — pack-declared vocabulary, never a growth of the base closed sets.
  • unit / domain — typed prose pointers to the unit system and the domain of validity. The pack declares no syntax for either and the linter never interprets them: external unit systems stay authoritative, and lint behavior is identical regardless of what the columns say.

Edges come from the pack’s single reference field, declared in its ## References manifest — measured_by, resolving to a ## Quantities row of the same file. It rides as a column on a second table under the same section:

| row       | measured_by  |
|-----------|--------------|
| abv_yield | ethanol_assay|

Read the edge aloud: the derived abv_yield is measured by the ethanol_assay quantity — the assay is the quantity’s source of evidence, and it is itself a declared row.

The pack also declares two checkers — numeric.quantity_closed, every measured_by name resolves to a ## Quantities row declared in the same file, and numeric.tolerance_labels, numeric.tolerance laws enumerate their bound and against case labels per the pack’s floor — and one floor: law-kind properties about numeric.tolerance rows must carry bound: and against: case labels. The Properties layer below pays that floor in full.

Layer 3 — Constraints, Model, Properties

The rest of the file is the ordinary four-layer shape — the pack adds vocabulary, it does not change the layers. Two invariants state the quantity claims, an effect constraint labels the failure output, an observes edge ties the observer to the effect, and the model is a five-state batch lifecycle whose failure terminal emits. The Properties table includes one law row, window_cases, which enumerates four case labels: the base format’s mandatory identity: and associativity: floor (linter.law_cases demands those of every law) plus the pack floor’s bound: and against::

## Constraints

| id                | kind      | expr                                                                                      | traces_to        | observes                    |
|-------------------|-----------|-------------------------------------------------------------------------------------------|------------------|-----------------------------|
| rows_declared     | invariant | `every quantity row is declared in the ## Quantities table of this file`                   | [[batch.yield]]  |                             |
| yield_measured    | invariant | `every derived quantity names exactly one assay quantity as its measured_by source`        | [[batch.yield]]  |                             |
| cap_breach        | effect    | `batch.yield.cap_breach(detail)`                                                          | [[batch.yield]]  |                             |
| breach_surfaced   | invariant | `every bound breach reaches the operator with the quantity and the offending bound named`  | [[batch.yield]]  | [[batch.yield.cap_breach]]  |

## Model

### States

- `mashed`
- `fermented`
- `assayed`
- `released`
- `failed` (emits: `[[batch.yield.cap_breach]]`)

### Transitions

| id      | from      | to        | guard                                                    |
|---------|-----------|-----------|-----------------------------------------------------------|
| ferment | mashed    | fermented | `[[batch.yield.rows_declared]]`                           |
| assay   | fermented | assayed   | `[[batch.yield.yield_measured]]`                          |
| release | assayed   | released  | `abv_yield within ethanol_cap`                            |
| fail    | mashed    | failed    | `¬[[batch.yield.rows_declared]]`                          |

## Properties

| id               | kind | derives_from                     | generator                      | predicate                                                       |
|------------------|------|-----------------------------------|--------------------------------|-----------------------------------------------------------------|
| rows_resolvable  | unit | [[batch.yield.rows_declared]]     | `batches_with_quantity_rows()` | `every measured_by name resolves to a declared ## Quantities row`|
| assay_recorded   | unit | [[batch.yield.yield_measured]]    | `batches_with_derived_quantities()` | `every derived quantity carries its assay source`            |
| breach_emitted   | unit | [[batch.yield.cap_breach]]        | `batches_with_bound_breaches()`| `the failure carries the cap_breach label with detail`           |
| breach_named     | unit | [[batch.yield.breach_surfaced]]   | `batches_with_bound_breaches()`| `the operator message names the quantity and the bound`          |
| window_cases     | law  | [[batch.yield.rows_declared]]     | `batches_with_tolerance_rows()` | `the tolerance holds in every declared case — **identity:** a quantity measured against itself is within any window; **associativity:** composing assays is order-independent; **bound:** the lower and upper pH bounds hold; **against:** readings outside the window fail against the stated tolerance` |

Nothing pack-specific in the layers themselves — traces_to, guards, emits, coverage: all core-format machinery, taught properly in the generic worked example. Omit either pair of case labels from window_cases and linter.law_cases names the missing floor cases exactly.

First full lint — a dangling reference, then the fix

The author’s first full draft carries one typo: the rows_declared constraint traces to [[batch.yiled]] — plural, misremembered, the same classic as the reservation example. Lint the file:

spk lint batch-yield.md
lint: 1 file(s) linted, 1 finding(s), 1 advisory warning(s)
  batch-yield.md [linter.total_refs] dangling reference `[[batch.yiled]]` from constraints.traces_to — target not defined in any spec file
  advisory batch.yield [linter.observability] pack `numeric.predicates` activated for `batch.yield` (vocabulary match: numeric.quantity, numeric.bound, numeric.tolerance, Quantities, measured_by) — empty checked-set (no violations to report)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

Exit 1 — a finding, never a silent pass. Two things to read here:

  1. The finding and the advisory ride different channels. The pack activated (its vocabulary is all over the file — note the match list names every token that triggered it), but activation lives on the warnings channel and never gates. The dangling reference lives on the findings channel and does.
  2. empty checked-set (no violations to report) — the pack’s declared checkers ran and honestly report an empty violation set. More on what that does and does not mean below.

Fix the typo — [[batch.yiled]] → [[batch.yield]] — and lint again:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory batch.yield [linter.observability] pack `numeric.predicates` activated for `batch.yield` (vocabulary match: numeric.quantity, numeric.bound, numeric.tolerance, Quantities, measured_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

Zero findings, exit 0 — and now the advisory is the whole output. Read it as the meter it is: an exit-0 lint alone proves nothing (a spec using none of the pack vocabulary also exits 0, silently); the activation line naming numeric.predicates is the observable that the pack was discovered, matched, and engaged. The pipeline’s next stage runs pack-aware too:

spk graph batch-yield.md
graph: 1 file(s), 18 node(s), 21 edge(s), 0 dangling, 0 typing violation(s), 0 supersedes cycle(s), 0 external boundary(ies)
→ Run: specodelic lint

What a missing pack looks like

The demo depends on the pack file being discovered. Copy the finished spec into a directory with no kind: profile file in it — the machinery goes inert:

lint: 1 file(s) linted, 0 finding(s), 0 advisory warning(s)
→ Run: specodelic graph

No advisory, no findings — the byte-identical guarantee in action. The ## Quantities table is now just markdown the linter does not interpret, and that is by design: a pack can never gate a file that did not opt in. But inert cuts both ways, and the linter tells you when vocabulary expects a pack. Say the author, pack-enthused, writes a base-table kind cell as numeric.quantity instead of invariant, in that same pack-less directory:

lint: 1 file(s) linted, 2 finding(s), 0 advisory warning(s)
  batch.yield [linter.constraint_kind_closed] constraint `rows_declared` has kind `numeric.quantity` — outside the closed set {invariant, advisory, effect, extension_point} (kinds.md constraint_row_shape)
  batch.yield [linter.orphan_vocabulary] orphan vocabulary: pack-qualified token(s) `numeric.quantity` used by `batch.yield`, but no `kind: profile` pack in namespace `numeric` is discovered — candidate pack `numeric.*` (prefix-derived: only the namespace is known); remediations: add/enable a `kind: profile` pack file declaring the vocabulary, or fix the vocabulary (un-qualify or retype the token)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.orphan_vocabulary — the finding always names the candidate (namespace-derived, numeric.* here) and states both remediations: enable a pack declaring the vocabulary, or fix the token. Copy the pack file back into the workspace and the orphan finding clears — with the pack active, the walkers accept a fiber kind in a kind column (base ∪ active-pack-fiber), so that particular mis-typing only surfaces when the pack is missing. The reliable diagnostic is the one this section started with: a spec you meant to be pack-enabled but lint with no activation advisory is a spec whose pack was not discovered.

What the linter does not catch (yet)

Honesty check — the failure this page has not shown is the one you might expect first: a measured_by edge that dangles. Change ethanol_assay to ghost_assay in the measured_by column and lint:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory batch.yield [linter.observability] pack `numeric.predicates` activated for `batch.yield` (vocabulary match: numeric.quantity, numeric.bound, numeric.tolerance, Quantities, measured_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

Byte-for-byte the clean output — exit 0, activation advisory, nothing else. That is not the linter missing the dangle by accident: numeric.quantity_closed ships as a declaration. In v1, pack checkers are honest-empty — activation and the empty checked-set are reported truthfully, violation evaluation is not implemented yet (the guide documents this, and verification boundaries places it on the guarantee ladder). The format’s answer to the gap is the one this spec already embodies: the dangling-edge claim lives where the evidence plan lives — the rows_declared invariant, its rows_resolvable property, and eventually a real executable predicate. When the checker gains evaluation, the declaration is already in place; the spec does not change.

The finished spec

Every block above assembles into this one file, batch-yield.md — exactly as it lints at 0 findings, 1 activation advisory:

---
id: batch.yield
kind: intent
statement: "WHEN a fermentation batch is processed THE system SHALL record every quantity it measures or derives together with the bounds and tolerances that govern them."
---

# Batch yield quantities

A small numeric record for one fermentation line: the process measures
mash temperature and pH, derives an ABV yield from a gas-chromatography
assay, and every stated limit is a bound or a tolerance with a unit and
a domain of validity.

## Quantities

| name          | kind              | unit                     | domain     |
|---------------|-------------------|--------------------------|------------|
| mash_temp     | numeric.quantity  | degC (UCUM Cel)          | process    |
| ph            | numeric.quantity  | pH (dimensionless)       | process    |
| ethanol_assay | numeric.quantity  | percent v/v (UCUM [pct]V)| product    |
| abv_yield     | numeric.quantity  | percent v/v (UCUM [pct]V)| product    |
| ethanol_cap   | numeric.bound     | percent v/v (UCUM [pct]V)| regulatory |
| ph_window     | numeric.tolerance | pH                       | process    |

| row       | measured_by  |
|-----------|--------------|
| abv_yield | ethanol_assay|

## Constraints

| id                | kind      | expr                                                                                      | traces_to        | observes                    |
|-------------------|-----------|-------------------------------------------------------------------------------------------|------------------|-----------------------------|
| rows_declared     | invariant | `every quantity row is declared in the ## Quantities table of this file`                   | [[batch.yield]]  |                             |
| yield_measured    | invariant | `every derived quantity names exactly one assay quantity as its measured_by source`        | [[batch.yield]]  |                             |
| cap_breach        | effect    | `batch.yield.cap_breach(detail)`                                                          | [[batch.yield]]  |                             |
| breach_surfaced   | invariant | `every bound breach reaches the operator with the quantity and the offending bound named`  | [[batch.yield]]  | [[batch.yield.cap_breach]]  |

## Model

### States

- `mashed`
- `fermented`
- `assayed`
- `released`
- `failed` (emits: `[[batch.yield.cap_breach]]`)

### Transitions

| id      | from      | to        | guard                                                    |
|---------|-----------|-----------|-----------------------------------------------------------|
| ferment | mashed    | fermented | `[[batch.yield.rows_declared]]`                           |
| assay   | fermented | assayed   | `[[batch.yield.yield_measured]]`                          |
| release | assayed   | released  | `abv_yield within ethanol_cap`                            |
| fail    | mashed    | failed    | `¬[[batch.yield.rows_declared]]`                          |

## Properties

| id               | kind | derives_from                     | generator                      | predicate                                                       |
|------------------|------|-----------------------------------|--------------------------------|-----------------------------------------------------------------|
| rows_resolvable  | unit | [[batch.yield.rows_declared]]     | `batches_with_quantity_rows()` | `every measured_by name resolves to a declared ## Quantities row`|
| assay_recorded   | unit | [[batch.yield.yield_measured]]    | `batches_with_derived_quantities()` | `every derived quantity carries its assay source`            |
| breach_emitted   | unit | [[batch.yield.cap_breach]]        | `batches_with_bound_breaches()`| `the failure carries the cap_breach label with detail`           |
| breach_named     | unit | [[batch.yield.breach_surfaced]]   | `batches_with_bound_breaches()`| `the operator message names the quantity and the bound`          |
| window_cases     | law  | [[batch.yield.rows_declared]]     | `batches_with_tolerance_rows()` | `the tolerance holds in every declared case — **identity:** a quantity measured against itself is within any window; **associativity:** composing assays is order-independent; **bound:** the lower and upper pH bounds hold; **against:** readings outside the window fail against the stated tolerance` |

To reproduce every block on this page: copy packs/numeric-predicates.md from the repo into a fresh git workspace, save the file above as batch-yield.md, and run spk lint batch-yield.md.

Where to go next

Worked example — the empirical.registry pack, failures included

The generic worked example builds a spec with the core format alone, and the data.lineage and numeric.predicates pages run the same journey for the first domain packs. This page does it for empirical.registry — the pack that adds a typed ## StatTests registry, the empirical.statistic fiber property kind, a tested_by reference field, and a per-kind case-label floor enumerating alpha: and window: on statistic properties — without a format revision and without growing any base closed set. It is also another Floors consumer: the floor here is driven by statistical practice (significance level plus observation window), not algebra — unlike the sibling packs’ floors, whose case labels are shape-flavored (provenance, bound/against, added/removed). You will see a small spec use the pack’s vocabulary end to end, the pack-activation advisory that proves the pack actually engaged, genuinely failing variants with their real labeled findings, and — just as important — the failures the linter does not catch yet, shown honestly.

How packs are enabled and what a pack adds mechanically is the job of using packs — the practical guide; read that for the mechanism, this page for the hands-on loop. Every lint and graph block below is real output from specodelic 0.10.0 on the file as it stood at that moment. On a TTY spk prints the human-readable text shown here; piped, it emits a JSON envelope instead.

The story

A growth team runs A/B experiments: each experiment measures click-through rate and conversion, and when one concludes, the team records a lift claim — an empirically held statement that variant B beat variant A, supported by a registered significance test evaluated at a declared alpha over a declared observation window. The spec’s job is to record those claims and the tests that back them — one capability, one file, named claim-lift.md; the format’s naming law maps - to the namespace dot, so the frontmatter id is claim.lift.

Deliberately out of scope: how each test computes significance and what the observation window means in wall-clock time. Those are the alpha and window columns’ job, and they stay opaque prose — the pack declares the registry, statistical methodology stays authoritative outside the format. Lint behavior is byte-identical no matter what the columns carry.

The setup

Packs are discovered by scanning the workspace, not by any config file: every kind: profile file in the git repository toplevel of the linted spec is a candidate pack. So the demo workspace needs two files — the pack definition (copied from this repo’s packs/ directory) and the spec under test:

mkdir demo && cd demo && git init
cp /path/to/specodelic/packs/empirical-registry.md .

That is the whole enablement story. The discovery and activation rules (corpus-scan anchors, word-boundary vocabulary matching, the byte-identical guarantee) are in the guide; this page just runs the loop.

Layer 1 — Intent

---
id: claim.lift
kind: intent
statement: "WHEN an experiment concludes THE system SHALL record every lift claim it holds together with the stat test and evidence window that supports it."
---

# Experiment lift claims

A small empirical registry for one growth team: each experiment measures
click-through and conversion, and every stated lift claim is an
empirically held statistic backed by a registered significance test over
a declared observation window.

Lint it as it stands:

spk lint claim-lift.md
lint: 1 file(s) linted, 1 finding(s), 0 advisory warning(s)
  claim-lift.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.model_present — a spec with an intent but no Model section is incomplete by construction, same as in the generic worked example. Note what is missing from this output: no pack advisory. The file uses none of the pack’s vocabulary yet, so the byte-identical guarantee holds — the pack machinery is invisible. That changes with the next section.

Layer 2 — the ## StatTests registry

This is the pack’s namespaced section, declared in the pack’s ## Sections manifest with the fixed row shape | name | metric | alpha | window |:

## StatTests

| name   | metric     | alpha | window |
|--------|------------|-------|--------|
| ctr_t  | ctr        | 0.05  | 14d    |
| conv_t | conversion | 0.01  | 30d    |

Each column, defined for a cold read:

  • name — the row’s id inside this file; tested_by edges point at it.
  • metric — free-form prose naming what the test measures (ctr, conversion). The pack does not constrain its values.
  • alpha — opaque prose recording the test’s significance level. The format never parses it.
  • window — opaque prose recording the observation window the claim holds over. Same story: never interpreted.

The registry is deliberately thin: the pack adds structure (a place tests live, names claims can point at), not statistics.

The pack’s other two vocabulary pieces ride on the ordinary Properties table. First, the fiber kind — type one property row’s kind cell as empirical.statistic (an empirically held statistical claim, stated with a declared stat test, per the pack’s ## Kinds manifest). Base kind columns accept pack-qualified fiber kinds when the declaring pack is active; the same cell without the pack is a labeled finding, shown below. Second, the reference field — tested_by, declared in the pack’s ## References manifest, resolving to a ## StatTests row of the same file. It rides as a column on the Properties table, because a claim is exactly the thing a stat test tests:

| id              | kind | derives_from                     | generator                    | tested_by | predicate                                                       |
|-----------------|------|-----------------------------------|------------------------------|-----------|-----------------------------------------------------------------|
| claims_resolvable | unit | [[claim.lift.tests_registered]] | `experiments_with_registered_tests()` | ctr_t  | `every tested_by name resolves to a declared ## StatTests row`   |
| ctr_claim        | empirical.statistic | [[claim.lift.lift_tested]]       | `experiments_with_lift_claims()` | ctr_t     | `the CTR lift claim stands at the registered significance — **alpha:** the claim is evaluated at the test's declared alpha; **window:** the claim holds over the declared observation window` |

Read the rows aloud: every tested_by name points at a ## StatTests row declared above; the ctr_claim row is the empirically held lift claim, typed with the pack’s fiber kind and paying the pack’s floor — its predicate enumerates the two pack-required case labels, alpha: and window:, on top of nothing else (it is not a law, so the base algebra floor does not bite it).

The pack also declares two checkers — empirical.stat_test_closed, every tested_by name resolves to a ## StatTests row declared in the same file, and empirical.statistic_labels, statistic properties enumerate their alpha: and window: case labels per the floor declaration — and one floor, in its ## Floors manifest: empirical.statistic properties owe alpha: and window: case labels. What “declaring” buys you today is the next section’s honesty check, not enforcement — keep reading.

Layer 3 — Constraints, Model, Properties

The rest of the file is the ordinary four-layer shape — the pack adds vocabulary, it does not change the layers. Two invariants state the registry claims, an effect constraint labels the failure output, an observes edge ties the observer to the effect, and the model is a five-state experiment lifecycle whose failure terminal emits. One Properties row is a law, significance_cases, which enumerates four case labels: the base format’s mandatory identity: and associativity: floor (linter.law_cases demands those of every law) plus the pack floor’s alpha: and window::

## Constraints

| id              | kind      | expr                                                                                      | traces_to      | observes                    |
|-----------------|-----------|-------------------------------------------------------------------------------------------|----------------|-----------------------------|
| tests_registered| invariant | `every stat test named by a claim is declared in the ## StatTests table of this file`      | [[claim.lift]] |                             |
| lift_tested     | invariant | `every empirically held lift claim names exactly one registered test as its tested_by source` | [[claim.lift]] |                          |
| lift_retracted  | effect    | `claim.lift.lift_retracted(detail)`                                                       | [[claim.lift]] |                             |
| retraction_surfaced | invariant | `every retracted claim reaches the operator with the offending test and window named` | [[claim.lift]] | [[claim.lift.lift_retracted]] |

## Model

### States

- `ramped`
- `measured`
- `tested`
- `recorded`
- `failed` (emits: `[[claim.lift.lift_retracted]]`)

### Transitions

| id       | from     | to       | guard                                       |
|----------|----------|----------|---------------------------------------------|
| measure  | ramped   | measured | `[[claim.lift.tests_registered]]`           |
| test     | measured | tested   | `[[claim.lift.lift_tested]]`                |
| record   | tested   | recorded | `window elapsed without retraction`         |
| fail     | ramped   | failed   | `¬[[claim.lift.tests_registered]]`          |

## Properties

| id              | kind | derives_from                     | generator                    | tested_by | predicate                                                       |
|-----------------|------|-----------------------------------|------------------------------|-----------|-----------------------------------------------------------------|
| claims_resolvable | unit | [[claim.lift.tests_registered]] | `experiments_with_registered_tests()` | ctr_t  | `every tested_by name resolves to a declared ## StatTests row`   |
| ctr_claim        | empirical.statistic | [[claim.lift.lift_tested]]       | `experiments_with_lift_claims()` | ctr_t     | `the CTR lift claim stands at the registered significance — **alpha:** the claim is evaluated at the test's declared alpha; **window:** the claim holds over the declared observation window` |
| lift_recorded   | unit | [[claim.lift.lift_tested]]       | `experiments_with_lift_claims()` | conv_t | `every lift claim carries its registered test source`            |
| retraction_emitted | unit | [[claim.lift.lift_retracted]] | `experiments_with_failing_tests()` | ctr_t | `the failure carries the lift_retracted label with detail`       |
| retraction_named | unit | [[claim.lift.retraction_surfaced]] | `experiments_with_failing_tests()` | conv_t | `the operator message names the offending test and window`       |
| significance_cases | law | [[claim.lift.tests_registered]] | `experiments_with_statistic_claims()` | ctr_t | `the lift claim holds in every declared case — **identity:** a claim tested against itself stands; **associativity:** composing tests is order-independent; **alpha:** significance is evaluated at the test's declared alpha; **window:** the claim holds only over the declared observation window` |

Nothing pack-specific in the layers themselves — traces_to, guards, emits, coverage: all core-format machinery, taught properly in the generic worked example.

First full lint — a dangling reference, then the fix

The author’s first full draft carries one typo: the lift_tested constraint traces to [[claim.lifst]] — letters transposed, the same classic as the reservation example. Lint the file:

spk lint claim-lift.md
lint: 1 file(s) linted, 1 finding(s), 1 advisory warning(s)
  claim-lift.md [linter.total_refs] dangling reference `[[claim.lifst]]` from constraints.traces_to — target not defined in any spec file
  advisory claim.lift [linter.observability] pack `empirical.registry` activated for `claim.lift` (vocabulary match: empirical.statistic, StatTests, tested_by) — empty checked-set (no violations to report)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

Exit 1 — a finding, never a silent pass. Two things to read here:

  1. The finding and the advisory ride different channels. The pack activated (its vocabulary is all over the file — note the match list names every token that triggered it: the fiber kind, the section name, the reference field), but activation lives on the warnings channel and never gates. The dangling reference lives on the findings channel and does.
  2. empty checked-set (no violations to report) — the pack’s declared checkers ran and honestly report an empty violation set. More on what that does and does not mean below.

Fix the typo — [[claim.lifst]] → [[claim.lift]] — and lint again:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory claim.lift [linter.observability] pack `empirical.registry` activated for `claim.lift` (vocabulary match: empirical.statistic, StatTests, tested_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

Zero findings, exit 0 — and now the advisory is the whole output. Read it as the meter it is: an exit-0 lint alone proves nothing (a spec using none of the pack vocabulary also exits 0, silently); the activation line naming empirical.registry is the observable that the pack was discovered, matched, and engaged. The pipeline’s next stage runs pack-aware too:

spk graph claim-lift.md
graph: 1 file(s), 20 node(s), 23 edge(s), 0 dangling, 0 typing violation(s), 0 supersedes cycle(s), 0 external boundary(ies)
→ Run: specodelic lint

What a missing pack looks like

The demo depends on the pack file being discovered. Copy the finished spec into a directory with no kind: profile file in it — the machinery goes inert:

lint: 1 file(s) linted, 2 finding(s), 0 advisory warning(s)
  claim.lift [linter.property_kind_closed] property `ctr_claim` has kind `empirical.statistic` — outside the closed set {unit, law} (kinds.md property_row_shape)
  claim.lift [linter.orphan_vocabulary] orphan vocabulary: pack-qualified token(s) `empirical.statistic` used by `claim.lift`, but no `kind: profile` pack in namespace `empirical` is discovered — candidate pack `empirical.*` (prefix-derived: only the namespace is known); remediations: add/enable a `kind: profile` pack file declaring the vocabulary, or fix the vocabulary (un-qualify or retype the token)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

Different from the sibling packs’ story, and worth pausing on: this spec does not lint silently without its pack, because it uses the pack’s fiber kind in a base-table kind column. A fiber kind’s typeability is the pack — with no active declaring pack, the empirical.statistic cell is outside the base closed set (linter.property_kind_closed) and the token itself is orphan vocabulary (linter.orphan_vocabulary, naming the candidate empirical.* and both remediations: enable a pack declaring the vocabulary, or fix the token). The byte-identical guarantee still holds exactly as specified — it covers files using none of the pack vocabulary. Retype the one fiber-kind cell back to unit in that same pack-less directory and the file goes quiet again:

lint: 1 file(s) linted, 0 finding(s), 0 advisory warning(s)
→ Run: specodelic graph

No advisory, no findings — a spec with no pack vocabulary is markdown the pack machinery never interprets, by design: a pack can never gate a file that did not opt in. Note what quiet means here: with the pack gone, the tested_by column, the ## StatTests section, and the alpha:/window: case labels are all inert decoration — linted as ordinary markdown, interpreted by nothing. A pack-less lint never errors on pack vocabulary alone; it only errors once a pack-qualified kind lands in a closed-set column (the fiber kind cell, as above). The reliable diagnostic either way: a spec you meant to be pack-enabled but lint with no activation advisory is a spec whose pack was not discovered.

What the linter does not catch (yet)

Honesty check — the failures this page has not shown are the two you might expect first, because the pack declares a checker for each.

A tested_by edge that dangles. Change ctr_t to ghost_t in the tested_by column and lint the pack-enabled workspace:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory claim.lift [linter.observability] pack `empirical.registry` activated for `claim.lift` (vocabulary match: empirical.statistic, StatTests, tested_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

Byte-for-byte the clean output — exit 0, activation advisory, nothing else. That is not the linter missing the dangle by accident: empirical.stat_test_closed ships as a declaration.

Floor labels dropped. Strip the alpha: and window: case labels out of ctr_claim’s predicate and lint:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory claim.lift [linter.observability] pack `empirical.registry` activated for `claim.lift` (vocabulary match: empirical.statistic, StatTests, tested_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

Identical again. empirical.statistic_labels is the same kind of declaration.

In v1, pack checkers are honest-empty — activation and the empty checked-set are reported truthfully, violation evaluation is not implemented yet (the guide documents this, and verification boundaries places it on the guarantee ladder). The format’s answer to the gap is the one this spec already embodies: each unenforced claim lives where the evidence plan lives — the dangling-edge claim in the tests_registered invariant and its claims_resolvable property, the floor in the ctr_claim and significance_cases predicates’ enumerated cases — each waiting on a real executable predicate. When the checkers gain evaluation, the declarations are already in place; the spec does not change.

The finished spec

Every block above assembles into this one file, claim-lift.md — exactly as it lints at 0 findings, 1 activation advisory:

---
id: claim.lift
kind: intent
statement: "WHEN an experiment concludes THE system SHALL record every lift claim it holds together with the stat test and evidence window that supports it."
---

# Experiment lift claims

A small empirical registry for one growth team: each experiment measures
click-through and conversion, and every stated lift claim is an
empirically held statistic backed by a registered significance test over
a declared observation window.

## StatTests

| name   | metric     | alpha | window |
|--------|------------|-------|--------|
| ctr_t  | ctr        | 0.05  | 14d    |
| conv_t | conversion | 0.01  | 30d    |

## Constraints

| id              | kind      | expr                                                                                      | traces_to      | observes                    |
|-----------------|-----------|-------------------------------------------------------------------------------------------|----------------|-----------------------------|
| tests_registered| invariant | `every stat test named by a claim is declared in the ## StatTests table of this file`      | [[claim.lift]] |                             |
| lift_tested     | invariant | `every empirically held lift claim names exactly one registered test as its tested_by source` | [[claim.lift]] |                          |
| lift_retracted  | effect    | `claim.lift.lift_retracted(detail)`                                                       | [[claim.lift]] |                             |
| retraction_surfaced | invariant | `every retracted claim reaches the operator with the offending test and window named` | [[claim.lift]] | [[claim.lift.lift_retracted]] |

## Model

### States

- `ramped`
- `measured`
- `tested`
- `recorded`
- `failed` (emits: `[[claim.lift.lift_retracted]]`)

### Transitions

| id       | from     | to       | guard                                       |
|----------|----------|----------|---------------------------------------------|
| measure  | ramped   | measured | `[[claim.lift.tests_registered]]`           |
| test     | measured | tested   | `[[claim.lift.lift_tested]]`                |
| record   | tested   | recorded | `window elapsed without retraction`         |
| fail     | ramped   | failed   | `¬[[claim.lift.tests_registered]]`          |

## Properties

| id              | kind | derives_from                     | generator                    | tested_by | predicate                                                       |
|-----------------|------|-----------------------------------|------------------------------|-----------|-----------------------------------------------------------------|
| claims_resolvable | unit | [[claim.lift.tests_registered]] | `experiments_with_registered_tests()` | ctr_t  | `every tested_by name resolves to a declared ## StatTests row`   |
| ctr_claim        | empirical.statistic | [[claim.lift.lift_tested]]       | `experiments_with_lift_claims()` | ctr_t     | `the CTR lift claim stands at the registered significance — **alpha:** the claim is evaluated at the test's declared alpha; **window:** the claim holds over the declared observation window` |
| lift_recorded   | unit | [[claim.lift.lift_tested]]       | `experiments_with_lift_claims()` | conv_t | `every lift claim carries its registered test source`            |
| retraction_emitted | unit | [[claim.lift.lift_retracted]] | `experiments_with_failing_tests()` | ctr_t | `the failure carries the lift_retracted label with detail`       |
| retraction_named | unit | [[claim.lift.retraction_surfaced]] | `experiments_with_failing_tests()` | conv_t | `the operator message names the offending test and window`       |
| significance_cases | law | [[claim.lift.tests_registered]] | `experiments_with_statistic_claims()` | ctr_t | `the lift claim holds in every declared case — **identity:** a claim tested against itself stands; **associativity:** composing tests is order-independent; **alpha:** significance is evaluated at the test's declared alpha; **window:** the claim holds only over the declared observation window` |

To reproduce every block on this page: copy packs/empirical-registry.md from the repo into a fresh git workspace, save the file above as claim-lift.md, and run spk lint claim-lift.md.

Where to go next

Worked example — the bioimage.data pack, failures included

The generic worked example builds a spec with the core format alone, and the data.lineage, numeric.predicates, and empirical.registry pages run the same journey pack by pack. This page does it for bioimage.data — the pack mechanism’s pilot: the thin instance that stress-tests what the packs it consumes could not exercise alone, and the mechanism’s first cross-pack ## Requires consumer. It adds a typed ## Axes section (image axes with OME-NGFF-style semantics), the bioimage.transform fiber property kind, a same_shape_as reference field resolving to ## Data rows, a named data-shaped predicate grammar (bioimage.dtype_is, bioimage.shape_eq, bioimage.units_convertible), and a kind-dependent case-label floor enumerating preserves: and dtype: — all without a format revision, without growing any base closed set, and while OME/NGFF and BioImage.IO stay authoritative external standards. You will see a small spec use the pack’s vocabulary end to end, the pack-activation advisory that proves the pack actually engaged, genuinely failing variants with their real labeled findings, and — just as important — the failures the linter does not catch yet, shown honestly.

How packs are enabled and what a pack adds mechanically is the job of using packs — the practical guide; read that for the mechanism, this page for the hands-on loop. Every lint and graph block below is real output from specodelic 0.10.0 on the file as it stood at that moment. On a TTY spk prints the human-readable text shown here; piped, it emits a JSON envelope instead.

The story

An imaging facility runs a light-sheet pipeline: raw microscopy frames land from the microscope, a flat-field correction is applied, and the corrected volume is written as an OME/NGFF zarr store. The spec’s job is to record that conversion — the image axes every dataset lives on, which datasets share a voxel geometry, and the law each transform step asserts about how it reshapes image data. One capability, one file, named plate7-ngff.md; the format’s naming law maps - to the namespace dot, so the frontmatter id is plate7.ngff.

Deliberately out of scope: how OME/NGFF structures the zarr store and what BioImage.IO says about the acquisition metadata. Those are the opaque columns’ job — scale, unit, and binding are prose the format never parses, keeping OME/NGFF and BioImage.IO authoritative outside the format. The pack bridges them; it never absorbs them. Lint behavior is byte-identical no matter what those columns carry.

The setup

Packs are discovered by scanning the workspace, not by any config file: every kind: profile file in the git repository toplevel of the linted spec is a candidate pack. bioimage.data is a consumer pack — its ## Requires table pins the base format revision plus the packs whose vocabulary it reuses (data.lineage for the ## Data section, numeric.predicates for the opaque unit domain its bioimage.units_convertible checker bridges, empirical.registry for empirically held transform claims). So the demo workspace copies the pack under test and the three it consumes:

mkdir demo && cd demo && git init
cp /path/to/specodelic/packs/{bioimage-data,data-lineage,numeric-predicates,empirical-registry}.md .

That is the whole enablement story. The discovery and activation rules (corpus-scan anchors, word-boundary vocabulary matching, the byte-identical guarantee) are in the guide; this page just runs the loop.

Layer 1 — Intent

---
id: plate7.ngff
kind: intent
statement: "WHEN the imaging pipeline processes a light-sheet plate THE system SHALL record the image axes of every dataset it writes together with the transform laws each pipeline step asserts about how it reshapes image data."
---

# Plate 7 NGFF conversion

A small bioimage record for one light-sheet run: the pipeline acquires
raw microscopy frames, applies flat-field correction, writes an
OME/NGFF zarr store, and every transform step states the law it obeys —
what it preserves and in which dtype.

Lint it as it stands:

spk lint plate7-ngff.md
lint: 1 file(s) linted, 1 finding(s), 0 advisory warning(s)
  plate7-ngff.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.model_present — a spec with an intent but no Model section is incomplete by construction, same as in the generic worked example. Note what is missing from this output: no pack advisory. The file uses none of the pack vocabulary yet, so the byte-identical guarantee holds — the pack machinery is invisible. That changes with the next section.

Layer 2 — the ## Data and ## Axes registries

Two registries carry the pack’s data claims. The first is data.lineage’s ## Data section (the pack consumes it rather than redeclaring it — that is what the ## Requires table records), with its fixed row shape | name | kind | dtype | units | binding |:

## Data

| name        | kind             | dtype   | units     | binding              |
|-------------|------------------|---------|-----------|----------------------|
| raw_frames  | data.dataset     | uint16  | intensity | file://scope/raw-p7  |
| ome_zarr    | data.artifact    | uint16  | intensity | zarr://ngff/plate7   |
| flat_field  | data.artifact    | float32 | gain      | file://calib/p7      |
| lightsheet  | data.environment | manifest| run       | equipment://lsm9     |

Each column, defined for a cold read:

  • name — the row’s id inside this file; the pack’s same_shape_as edges point at it.
  • kind — data.lineage’s closed set: data.dataset (a bounded collection of measurements), data.artifact (a derived object a pipeline produces or consumes), data.environment (the execution or measurement context). These are fiber kinds — pack-declared vocabulary, never a growth of the base closed sets.
  • dtype — free-form descriptor of the data’s element type (uint16, float32). The pack does not constrain its values — though the dtype: floor case below makes the law state it.
  • units / binding — opaque prose for the unit of measure and the pointer to the external system of record (zarr://…, file://…). The linter never interprets either: OME/NGFF and BioImage.IO stay authoritative.

The second registry is the pack’s own namespaced section, declared in its ## Sections manifest with the fixed row shape | name | axis | scale | unit |:

## Axes

| name | axis | scale | unit    |
|------|------|-------|---------|
| x    | x    | 0.65  | µm      |
| y    | y    | 0.65  | µm      |
| z    | z    | 2.00  | µm      |
| c    | c    | 1     | channel |
| t    | t    | 300   | s       |
  • name — the axis row’s id inside this file.
  • axis — the dimensional label with OME-NGFF-style semantics (x, y, z, c for channel, t for time). Free prose; the pack does not constrain it.
  • scale / unit — opaque prose recording voxel size and its unit (0.65 µm). The format never parses these columns — that is exactly what keeps OME/NGFF external.

Shape claims are the pack’s reference field, declared in its ## References manifest — same_shape_as, resolving to a ## Data row of the same file. It rides as a column on a second table under ## Data:

| row       | same_shape_as |
|-----------|---------------|
| ome_zarr  | raw_frames    |

Read the edge aloud: the written ome_zarr store keeps the voxel geometry of the acquired raw_frames — same x/y/z/c/t extents, per the ## Axes rows above.

The pack declares four named checkers in its ## Checkers manifest — bioimage.dtype_is, bioimage.shape_eq, and bioimage.units_convertible (the data-shaped predicate grammar, resolving against declared ## Data rows — the last one bridging numeric.predicates’ opaque unit domain), and bioimage.same_shape_closed (every same_shape_as name resolves to a ## Data row declared in the same file). It also declares a kind-dependent case-label floor in its ## Floors manifest: bioimage.transform properties must carry preserves: and dtype: case labels. The Properties layer below pays that floor in full.

Layer 3 — Constraints, Model, Properties

The rest of the file is the ordinary four-layer shape — the pack adds vocabulary, it does not change the layers. Two invariants state the record’s claims, an effect constraint labels the failure output, an observes edge ties the observer to the effect, and the model is a five-state run lifecycle whose failure terminal emits. The Properties table includes one row with the pack’s fiber kind, norm_cases — kind: bioimage.transform, typeable in the base-table kind column because the pack is active — which enumerates the pack floor’s preserves: and dtype: case labels:

## Constraints

| id             | kind      | expr                                                                                      | traces_to        | observes                  |
|----------------|-----------|-------------------------------------------------------------------------------------------|------------------|---------------------------|
| axes_declared  | invariant | `every dataset's voxel geometry is declared in the ## Axes table of this file`              | [[plate7.ngff]]  |                           |
| shapes_paired  | invariant | `every ome_zarr names its raw dataset as its same_shape_as source`                          | [[plate7.ngff]]  |                           |
| norm_fail      | effect    | `plate7.ngff.norm_fail(detail)`                                                            | [[plate7.ngff]]  |                           |
| fail_surfaced  | invariant | `every normalization failure reaches the operator with the offending dataset named`         | [[plate7.ngff]]  | [[plate7.ngff.norm_fail]] |

## Model

### States

- `acquired`
- `corrected`
- `written`
- `published`
- `failed` (emits: `[[plate7.ngff.norm_fail]]`)

### Transitions

| id       | from     | to        | guard                                                    |
|----------|----------|-----------|-----------------------------------------------------------|
| correct  | acquired | corrected | `[[plate7.ngff.axes_declared]]`                           |
| write    | corrected| written   | `[[plate7.ngff.shapes_paired]]`                           |
| publish  | written  | published | `ome_zarr binding written`                                |
| fail     | acquired | failed    | `¬[[plate7.ngff.axes_declared]]`                          |

## Properties

| id               | kind                | derives_from                     | generator                        | predicate                                                       |
|------------------|---------------------|----------------------------------|----------------------------------|-----------------------------------------------------------------|
| axes_resolvable  | unit                | [[plate7.ngff.axes_declared]]    | `plates_with_axis_rows()`        | `every dataset's axes resolve to declared ## Axes rows`          |
| shapes_resolvable| unit                | [[plate7.ngff.shapes_paired]]    | `plates_with_paired_shapes()`    | `every same_shape_as name resolves to a declared ## Data row`    |
| fail_emitted     | unit                | [[plate7.ngff.norm_fail]]        | `plates_with_norm_failures()`    | `the failure carries the norm_fail label with detail`            |
| fail_named       | unit                | [[plate7.ngff.fail_surfaced]]    | `plates_with_norm_failures()`    | `the operator message names the offending dataset`               |
| norm_cases       | bioimage.transform  | [[plate7.ngff.axes_declared]]    | `plates_with_flatfield_steps()`  | `the flat-field step transforms image data in every declared case — **preserves:** the corrected volume keeps the acquired voxel geometry; **dtype:** the corrected volume stays in the acquired dtype, uint16` |

Nothing pack-specific in the layers themselves — traces_to, guards, emits, coverage: all core-format machinery, taught properly in the generic worked example. Note what the norm_cases row does not carry: the base law floor’s identity: and associativity: cases are not demanded here, because the floor is kind-dependent — the base law floor stays untouched, and a kind with no declared floor inherits none.

First full lint — a dangling reference, then the fix

The author’s first full draft carries one typo: the axes_declared constraint traces to [[plate7.nff]] — plural, misremembered, the same classic as the reservation example. Lint the file:

spk lint plate7-ngff.md
lint: 1 file(s) linted, 1 finding(s), 2 advisory warning(s)
  plate7-ngff.md [linter.total_refs] dangling reference `[[plate7.nff]]` from constraints.traces_to — target not defined in any spec file
  advisory plate7.ngff [linter.observability] pack `bioimage.data` activated for `plate7.ngff` (vocabulary match: bioimage.transform, Axes, same_shape_as) — empty checked-set (no violations to report)
  advisory plate7.ngff [linter.observability] pack `data.lineage` activated for `plate7.ngff` (vocabulary match: data.dataset, data.artifact, data.environment, Data) — empty checked-set (no violations to report)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

Exit 1 — a finding, never a silent pass. Three things to read here:

  1. The finding and the advisories ride different channels. Both packs activated (their vocabulary is all over the file — the match list names every token that triggered each), but activation lives on the warnings channel and never gates. The dangling reference lives on the findings channel and does.
  2. Two advisories, two packs. bioimage.data activated on its own vocabulary (bioimage.transform, Axes, same_shape_as); data.lineage activated on the ## Data rows the consumer pack reuses. The two packs the file uses no vocabulary of — numeric.predicates, empirical.registry — stay silent: activation is per-vocabulary-use, not per-## Requires row.
  3. empty checked-set (no violations to report) — the packs’ declared checkers ran and honestly report an empty violation set. More on what that does and does not mean below.

Fix the typo — [[plate7.nff]] → [[plate7.ngff]] — and lint again:

lint: 1 file(s) linted, 0 finding(s), 2 advisory warning(s)
  advisory plate7.ngff [linter.observability] pack `bioimage.data` activated for `plate7.ngff` (vocabulary match: bioimage.transform, Axes, same_shape_as) — empty checked-set (no violations to report)
  advisory plate7.ngff [linter.observability] pack `data.lineage` activated for `plate7.ngff` (vocabulary match: data.dataset, data.artifact, data.environment, Data) — empty checked-set (no violations to report)
→ Run: specodelic graph

Zero findings, exit 0 — and now the advisories are the whole output. Read them as the meter they are: an exit-0 lint alone proves nothing (a spec using none of the pack vocabulary also exits 0, silently); the activation line naming bioimage.data is the observable that the pack was discovered, matched, and engaged. The pipeline’s next stage runs pack-aware too:

spk graph plate7-ngff.md
graph: 1 file(s), 19 node(s), 22 edge(s), 0 dangling, 0 typing violation(s), 0 supersedes cycle(s), 0 external boundary(ies)
→ Run: specodelic lint

What a missing pack looks like

The demo depends on the pack file being discovered. Copy the finished spec into a directory with no kind: profile file in it — the machinery goes inert, and now that inertness bites, because norm_cases uses the pack’s fiber kind in a base-table kind column:

lint: 1 file(s) linted, 2 finding(s), 0 advisory warning(s)
  plate7.ngff [linter.property_kind_closed] property `norm_cases` has kind `bioimage.transform` — outside the closed set {unit, law} (kinds.md property_row_shape)
  plate7.ngff [linter.orphan_vocabulary] orphan vocabulary: pack-qualified token(s) `bioimage.transform` used by `plate7.ngff`, but no `kind: profile` pack in namespace `bioimage` is discovered — candidate pack `bioimage.*` (prefix-derived: only the namespace is known); remediations: add/enable a `kind: profile` pack file declaring the vocabulary, or fix the vocabulary (un-qualify or retype the token)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.orphan_vocabulary — the finding always names the candidate (namespace-derived, bioimage.* here) and states both remediations: enable a pack declaring the vocabulary, or fix the token. linter.property_kind_closed fires alongside it: with no pack active, the walkers accept only the base kinds in the kind column (base ∪ active-pack-fiber, never narrower). Copy the pack files back into the workspace and both findings clear — the same file, byte-identical, lints clean. The reliable diagnostic is the one this section started with: a spec you meant to be pack-enabled but lint with no activation advisory is a spec whose pack was not discovered.

What the linter does not catch (yet)

Honesty check — the failures this page has not shown are the two you might expect first, because the pack declares a checker and a floor for each.

A same_shape_as edge that dangles. Change raw_frames to ghost_row in the same_shape_as column and lint the pack-enabled workspace:

lint: 1 file(s) linted, 0 finding(s), 2 advisory warning(s)
  advisory plate7.ngff [linter.observability] pack `bioimage.data` activated for `plate7.ngff` (vocabulary match: bioimage.transform, Axes, same_shape_as) — empty checked-set (no violations to report)
  advisory plate7.ngff [linter.observability] pack `data.lineage` activated for `plate7.ngff` (vocabulary match: data.dataset, data.artifact, data.environment, Data) — empty checked-set (no violations to report)
→ Run: specodelic graph

Byte-for-byte the clean output — exit 0, activation advisories, nothing else. That is not the linter missing the dangle by accident: bioimage.same_shape_closed ships as a declaration.

Floor labels dropped. Strip the preserves: and dtype: case labels out of norm_cases’s predicate and lint:

lint: 1 file(s) linted, 0 finding(s), 2 advisory warning(s)
  advisory plate7.ngff [linter.observability] pack `bioimage.data` activated for `plate7.ngff` (vocabulary match: bioimage.transform, Axes, same_shape_as) — empty checked-set (no violations to report)
  advisory plate7.ngff [linter.observability] pack `data.lineage` activated for `plate7.ngff` (vocabulary match: data.dataset, data.artifact, data.environment, Data) — empty checked-set (no violations to report)
→ Run: specodelic graph

Identical again. The pack’s floor is the same kind of declaration: the manifest requires the labels, but in v1 pack checkers are honest-empty — activation and the empty checked-set are reported truthfully, violation evaluation is not implemented yet (the guide documents this, and verification boundaries places it on the guarantee ladder). The format’s answer to the gap is the one this spec already embodies: each unenforced claim lives where the evidence plan lives — the dangling-edge claim in the shapes_paired invariant and its shapes_resolvable property, the floor in the norm_cases predicate’s enumerated cases — each waiting on a real executable predicate. When the checkers gain evaluation, the declarations are already in place; the spec does not change.

The finished spec

Every block above assembles into this one file, plate7-ngff.md — exactly as it lints at 0 findings, 2 activation advisories:

---
id: plate7.ngff
kind: intent
statement: "WHEN the imaging pipeline processes a light-sheet plate THE system SHALL record the image axes of every dataset it writes together with the transform laws each pipeline step asserts about how it reshapes image data."
---

# Plate 7 NGFF conversion

A small bioimage record for one light-sheet run: the pipeline acquires
raw microscopy frames, applies flat-field correction, writes an
OME/NGFF zarr store, and every transform step states the law it obeys —
what it preserves and in which dtype.

## Data

| name        | kind             | dtype   | units     | binding              |
|-------------|------------------|---------|-----------|----------------------|
| raw_frames  | data.dataset     | uint16  | intensity | file://scope/raw-p7  |
| ome_zarr    | data.artifact    | uint16  | intensity | zarr://ngff/plate7   |
| flat_field  | data.artifact    | float32 | gain      | file://calib/p7      |
| lightsheet  | data.environment | manifest| run       | equipment://lsm9     |

| row       | same_shape_as |
|-----------|---------------|
| ome_zarr  | raw_frames    |

## Axes

| name | axis | scale | unit    |
|------|------|-------|---------|
| x    | x    | 0.65  | µm      |
| y    | y    | 0.65  | µm      |
| z    | z    | 2.00  | µm      |
| c    | c    | 1     | channel |
| t    | t    | 300   | s       |

## Constraints

| id             | kind      | expr                                                                                      | traces_to        | observes                  |
|----------------|-----------|-------------------------------------------------------------------------------------------|------------------|---------------------------|
| axes_declared  | invariant | `every dataset's voxel geometry is declared in the ## Axes table of this file`              | [[plate7.ngff]]  |                           |
| shapes_paired  | invariant | `every ome_zarr names its raw dataset as its same_shape_as source`                          | [[plate7.ngff]]  |                           |
| norm_fail      | effect    | `plate7.ngff.norm_fail(detail)`                                                            | [[plate7.ngff]]  |                           |
| fail_surfaced  | invariant | `every normalization failure reaches the operator with the offending dataset named`         | [[plate7.ngff]]  | [[plate7.ngff.norm_fail]] |

## Model

### States

- `acquired`
- `corrected`
- `written`
- `published`
- `failed` (emits: `[[plate7.ngff.norm_fail]]`)

### Transitions

| id       | from     | to        | guard                                                    |
|----------|----------|-----------|-----------------------------------------------------------|
| correct  | acquired | corrected | `[[plate7.ngff.axes_declared]]`                           |
| write    | corrected| written   | `[[plate7.ngff.shapes_paired]]`                           |
| publish  | written  | published | `ome_zarr binding written`                                |
| fail     | acquired | failed    | `¬[[plate7.ngff.axes_declared]]`                          |

## Properties

| id               | kind                | derives_from                     | generator                        | predicate                                                       |
|------------------|---------------------|----------------------------------|----------------------------------|-----------------------------------------------------------------|
| axes_resolvable  | unit                | [[plate7.ngff.axes_declared]]    | `plates_with_axis_rows()`        | `every dataset's axes resolve to declared ## Axes rows`          |
| shapes_resolvable| unit                | [[plate7.ngff.shapes_paired]]    | `plates_with_paired_shapes()`    | `every same_shape_as name resolves to a declared ## Data row`    |
| fail_emitted     | unit                | [[plate7.ngff.norm_fail]]        | `plates_with_norm_failures()`    | `the failure carries the norm_fail label with detail`            |
| fail_named       | unit                | [[plate7.ngff.fail_surfaced]]    | `plates_with_norm_failures()`    | `the operator message names the offending dataset`               |
| norm_cases       | bioimage.transform  | [[plate7.ngff.axes_declared]]    | `plates_with_flatfield_steps()`  | `the flat-field step transforms image data in every declared case — **preserves:** the corrected volume keeps the acquired voxel geometry; **dtype:** the corrected volume stays in the acquired dtype, uint16` |

To reproduce every block on this page: copy packs/bioimage-data.md and the three pack files it requires (packs/data-lineage.md, packs/numeric-predicates.md, packs/empirical-registry.md) from the repo into a fresh git workspace, save the file above as plate7-ngff.md, and run spk lint plate7-ngff.md.

Where to go next

Worked example — the quant.finance pack, failures included

The generic worked example builds a spec with the core format alone, and the data.lineage, numeric.predicates, empirical.registry, and bioimage.data pages run the same journey pack by pack. This page does it for quant.finance — the mechanism’s restraint instance: most of what a quant desk would ask for already ships in the packs it requires (tolerance semantics in numeric.predicates, statistics in empirical.registry, backtest fixtures and datasets in data.lineage), so this pack declares only the vocabulary no other pack carries — a typed ## Limits section for bounded risk measures and pricing invariants, the quant.risk and quant.pricing kinds, and the capped_by outbound-leaf edge. Unit systems stay outside: ISO4217 currency codes and market-data conventions remain authoritative external standards, bridged through the opaque unit column, never absorbed into any closed set. You will see a small spec use the pack’s vocabulary end to end, the pack-activation advisory that proves the pack actually engaged, genuinely failing variants with their real labeled findings, and — just as important — the failures the linter does not catch yet, shown honestly.

How packs are enabled and what a pack adds mechanically is the job of using packs — the practical guide; read that for the mechanism, this page for the hands-on loop. Every lint and graph block below is real output from specodelic 0.10.0 on the file as it stood at that moment. On a TTY spk prints the human-readable text shown here; piped, it emits a JSON envelope instead.

The story

A prop trading desk keeps a risk register: an overnight VaR limit, the expected-shortfall limit that reconciles against it, and a NAV consistency bound. The spec’s job is to record that register — every limit with its unit and bound, and the cap edge between the two risk limits. One capability, one file, named desk-risks.md; the format’s naming law maps - to the namespace dot, so the frontmatter id is desk.risks.

Deliberately out of scope: which external standard each unit comes from and where the market data pricing the bounds lives. USD is an ISO4217 code, bps is a market convention — the pack treats both as opaque strings in the unit column and never interprets them.

The setup

Packs are discovered by scanning the workspace, not by any config file: every kind: profile file in the git repository toplevel of the linted spec is a candidate pack. So the demo workspace needs two files — the pack definition (copied from this repo’s packs/ directory) and the spec under test:

mkdir demo && cd demo && git init
cp /path/to/specodelic/packs/quant-finance.md .

That is the whole enablement story. The pack’s ## Requires table also declares numeric.predicates and data.lineage — but those are complementary vocabulary, not prerequisites for this example: backtest fixtures and datasets are ## Data rows (data.lineage), tolerance semantics live in numeric.predicates, and the spec below uses neither. Copying just the pack above is enough; the discovery and activation rules (corpus-scan anchors, word-boundary vocabulary matching, the byte-identical guarantee) are in the guide.

Layer 1 — Intent

---
id: desk.risks
kind: intent
statement: "WHEN the desk books trades against its risk limits THE system SHALL record every bounded risk measure and pricing invariant together with the cap edges between them."
---

# Desk risk register

A small risk register for one prop trading desk: overnight VaR, its
expected-shortfall companion, and the NAV consistency bound — each
stated with its unit and bound, and the cap edges between them.

Lint it as it stands:

spk lint desk-risks.md
lint: 1 file(s) linted, 1 finding(s), 0 advisory warning(s)
  desk-risks.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.model_present — a spec with an intent but no Model section is incomplete by construction, same as in the generic worked example. Note what is missing from this output: no pack advisory. The file uses none of the pack’s vocabulary yet, so the byte-identical guarantee holds — the pack machinery is invisible. That changes with the next section.

Layer 2 — the ## Limits section

This is the pack’s namespaced section, declared in the pack’s ## Sections manifest with the fixed row shape | name | kind | unit | bound |:

## Limits

| name      | kind          | unit | bound   |
|-----------|---------------|------|---------|
| var_1d    | quant.risk    | USD  | 250_000 |
| es_1d     | quant.risk    | USD  | 400_000 |
| nav_drift | quant.pricing | bps  | 25      |

Each column, defined for a cold read:

  • name — the row’s id inside this file; cap edges point at it.
  • kind — a short label closed per pack to risk and pricing (a risk measure vs. a valuation invariant). These are the row-level form of the pack’s quant.risk/quant.pricing kinds — and note the boundary: the mechanism never checks row-kind cells. The closure is the pack’s own prose law; what the linter enforces is the pack-qualified kind tokens in the Properties layer, below.
  • unit — opaque. USD is an ISO4217 code, bps a market convention; the pack declares no syntax for either and the linter never interprets the column. The external standards stay authoritative — the pack bridges them, it does not absorb them.
  • bound — the limit’s numeric value. Also opaque prose; the mechanism never parses it.

Cap edges are the pack’s reference field, declared in its ## References manifest — capped_by, resolving to a ## Limits row of the same file. It rides as a column on a second table under the same section:

| row    | capped_by |
|--------|-----------|
| es_1d  | var_1d    |

Read the edge aloud: es_1d is capped by var_1d — the expected-shortfall limit names the VaR limit it reconciles against.

The pack also declares two checkers in its ## Checkers manifest — quant.limit_closed (every capped_by name resolves to a ## Limits row declared in the same file) and quant.risk_labels (quant.risk laws enumerate their horizon and confidence case labels per the pack’s floor). Both ship as declarations: the mechanism names them, it does not yet execute them — keep reading, the page shows exactly what that means. The same manifest style declares the pack’s floor: law-kind properties about quant.risk rows must carry horizon: and confidence: case labels. The base law floor is untouched — the mandatory identity:/associativity: labels ride base law rows (see the numeric.predicates page); this floor is kind-dependent and rides the fiber kind, as the Properties layer below pays it.

Lint the file with the section in place, Model still missing:

lint: 1 file(s) linted, 1 finding(s), 1 advisory warning(s)
  desk-risks.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
  advisory desk.risks [linter.observability] pack `quant.finance` activated for `desk.risks` (vocabulary match: quant.risk, quant.pricing, Limits, capped_by) — empty checked-set (no violations to report)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

There is the activation advisory, and the match list names every token that triggered it: both fiber kinds, the section name, and the reference field.

Layer 3 — Constraints, Model, Properties

The rest of the file is the ordinary four-layer shape — the pack adds vocabulary, it does not change the layers. Two invariants state the register’s claims, an effect constraint labels the failure output, an observes edge ties the observer to the effect, and the model is a four-state day lifecycle whose failure terminal emits:

## Constraints

| id              | kind      | expr                                                                                   | traces_to      | observes                     |
|-----------------|-----------|----------------------------------------------------------------------------------------|----------------|------------------------------|
| caps_closed     | invariant | `every capped_by name resolves to a ## Limits row declared in this file`                 | [[desk.risks]] |                              |
| limit_breach    | effect    | `desk.risks.limit_breach(detail)`                                                       | [[desk.risks]] |                              |
| breach_surfaced | invariant | `every limit breach reaches the risk officer with the offending row and its bound named` | [[desk.risks]] | [[desk.risks.limit_breach]]  |

## Model

### States

- `booked`
- `checked`
- `published`
- `failed` (emits: `[[desk.risks.limit_breach]]`)

### Transitions

| id      | from    | to        | guard                              |
|---------|---------|-----------|------------------------------------|
| check   | booked  | checked   | `[[desk.risks.caps_closed]]`       |
| publish | checked | published | `end-of-day run written`           |
| fail    | booked  | failed    | `¬[[desk.risks.caps_closed]]`      |

## Properties

| id             | kind       | derives_from                   | generator                    | predicate                                                                                                                                                    |
|----------------|------------|--------------------------------|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| caps_resolve   | unit       | [[desk.risks.caps_closed]]     | `registers_with_cap_edges()` | `every capped_by name resolves to a declared ## Limits row`                                                                                                   |
| breach_emitted | unit       | [[desk.risks.limit_breach]]    | `registers_with_breaches()`  | `the failure carries the desk.risks.limit_breach label with detail`                                                                                           |
| breach_named   | unit       | [[desk.risks.breach_surfaced]] | `registers_with_breaches()`  | `the risk-officer message names the offending ## Limits row and its bound`                                                                                     |
| es_reconciles  | quant.risk | [[desk.risks.caps_closed]]     | `registers_with_es_limits()` | `the ES limit reconciles against the VaR limit in every declared case — **horizon:** both limits are stated over the same 1-day horizon; **confidence:** both limits assume the same 99% confidence level` |

One pack-specific row: es_reconciles is a law whose kind is the fiber kind quant.risk — the Properties layer paying the pack’s floor, its predicate enumerating horizon: and confidence: as named cases. Everything else — traces_to, guards, emits, coverage — is core-format machinery, taught properly in the generic worked example.

First full lint — a dangling reference, then the fix

The author’s first full draft carries one typo: the caps_closed constraint traces to [[desk.riss]] — misremembered, the same classic as the reservation example. Lint the file:

spk lint desk-risks.md
lint: 1 file(s) linted, 1 finding(s), 1 advisory warning(s)
  desk-risks.md [linter.total_refs] dangling reference `[[desk.riss]]` from constraints.traces_to — target not defined in any spec file
  advisory desk.risks [linter.observability] pack `quant.finance` activated for `desk.risks` (vocabulary match: quant.risk, quant.pricing, Limits, capped_by) — empty checked-set (no violations to report)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

Exit 1 — a finding, never a silent pass. Two things to read here:

  1. The finding and the advisory ride different channels. The pack activated (its vocabulary is all over the file — note the match list names every token that triggered it), but activation lives on the warnings channel and never gates. The dangling reference lives on the findings channel and does.
  2. empty checked-set (no violations to report) — the pack’s declared quant.limit_closed checker ran and honestly reports an empty violation set. More on what that does and does not mean below.

Fix the typo — [[desk.riss]] → [[desk.risks]] — and lint again:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory desk.risks [linter.observability] pack `quant.finance` activated for `desk.risks` (vocabulary match: quant.risk, quant.pricing, Limits, capped_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

Zero findings, exit 0 — and now the advisory is the whole output. Read it as the meter it is: an exit-0 lint alone proves nothing (a spec using none of the pack vocabulary also exits 0, silently); the activation line naming quant.finance is the observable that the pack was discovered, matched, and engaged. The pipeline’s next stage runs pack-aware too:

spk graph desk-risks.md
graph: 1 file(s), 15 node(s), 17 edge(s), 0 dangling, 0 typing violation(s), 0 supersedes cycle(s), 0 external boundary(ies)
→ Run: specodelic lint

What a missing pack looks like

The demo depends on the pack file being discovered. Lint the same finished spec in a fresh git workspace with no kind: profile file in it — not a subdirectory of the first workspace, whose repo toplevel the discovery scan still anchors to — and the machinery goes inert… almost. First, the truly silent case: drop the one fiber-kind row (the es_reconciles law, whose kind cell is pack vocabulary) and lint:

lint: 1 file(s) linted, 0 finding(s), 0 advisory warning(s)
→ Run: specodelic graph

No advisory, no findings — the byte-identical guarantee in action. The ## Limits table is now just markdown the linter does not interpret, and that is by design: a pack can never gate a file that did not opt in. But inert cuts both ways, and the linter tells you when vocabulary expects a pack. Restore the law row and lint in that same pack-less workspace:

lint: 1 file(s) linted, 2 finding(s), 0 advisory warning(s)
  desk.risks [linter.property_kind_closed] property `es_reconciles` has kind `quant.risk` — outside the closed set {unit, law} (kinds.md property_row_shape)
  desk.risks [linter.orphan_vocabulary] orphan vocabulary: pack-qualified token(s) `quant.risk` used by `desk.risks`, but no `kind: profile` pack in namespace `quant` is discovered — candidate pack `quant.*` (prefix-derived: only the namespace is known); remediations: add/enable a `kind: profile` pack file declaring the vocabulary, or fix the vocabulary (un-qualify or retype the token)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.orphan_vocabulary — the finding always names the candidate (namespace-derived, quant.* here) and states both remediations: enable a pack declaring the vocabulary, or fix the token. Copy the pack file back into the workspace and the pair clears — with the pack active, the walkers accept a fiber kind in a kind column (base ∪ active-pack-fiber), so that mis-typing only surfaces when the pack is missing. The reliable diagnostic is the one this section started with: a spec you meant to be pack-enabled but lint with no activation advisory is a spec whose pack was not discovered.

What the linter does not catch (yet)

Honesty check — the failures this page has not shown are the ones you might expect first. Change var_1d to ghost_row in the capped_by column and lint:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory desk.risks [linter.observability] pack `quant.finance` activated for `desk.risks` (vocabulary match: quant.risk, quant.pricing, Limits, capped_by) — empty checked-set (no violations to report)
→ Run: specodelic graph

Byte-for-byte the clean output — exit 0, activation advisory, nothing else. That is not the linter missing the dangle by accident: quant.limit_closed ships as a declaration. In v1, pack checkers are honest-empty — activation and the empty checked-set are reported truthfully, violation evaluation is not implemented yet (the guide documents this, and verification boundaries places it on the guarantee ladder). The same applies to the floor: drop the horizon: and confidence: case labels from es_reconciles and the lint output is identical — quant.risk_labels is also named, not executed.

The format’s answer to the gap is the one this spec already embodies: the dangling-edge claim lives where the evidence plan lives — the caps_closed invariant, its caps_resolve property, and eventually a real executable predicate. When the checkers gain evaluation, the declarations are already in place; the spec does not change.

The finished spec

Every block above assembles into this one file, desk-risks.md — exactly as it lints at 0 findings, 1 activation advisory:

---
id: desk.risks
kind: intent
statement: "WHEN the desk books trades against its risk limits THE system SHALL record every bounded risk measure and pricing invariant together with the cap edges between them."
---

# Desk risk register

A small risk register for one prop trading desk: overnight VaR, its
expected-shortfall companion, and the NAV consistency bound — each
stated with its unit and bound, and the cap edges between them.

## Limits

| name      | kind          | unit | bound   |
|-----------|---------------|------|---------|
| var_1d    | quant.risk    | USD  | 250_000 |
| es_1d     | quant.risk    | USD  | 400_000 |
| nav_drift | quant.pricing | bps  | 25      |

| row    | capped_by |
|--------|-----------|
| es_1d  | var_1d    |

## Constraints

| id              | kind      | expr                                                                                   | traces_to      | observes                     |
|-----------------|-----------|----------------------------------------------------------------------------------------|----------------|------------------------------|
| caps_closed     | invariant | `every capped_by name resolves to a ## Limits row declared in this file`                 | [[desk.risks]] |                              |
| limit_breach    | effect    | `desk.risks.limit_breach(detail)`                                                       | [[desk.risks]] |                              |
| breach_surfaced | invariant | `every limit breach reaches the risk officer with the offending row and its bound named` | [[desk.risks]] | [[desk.risks.limit_breach]]  |

## Model

### States

- `booked`
- `checked`
- `published`
- `failed` (emits: `[[desk.risks.limit_breach]]`)

### Transitions

| id      | from    | to        | guard                              |
|---------|---------|-----------|------------------------------------|
| check   | booked  | checked   | `[[desk.risks.caps_closed]]`       |
| publish | checked | published | `end-of-day run written`           |
| fail    | booked  | failed    | `¬[[desk.risks.caps_closed]]`      |

## Properties

| id             | kind       | derives_from                   | generator                    | predicate                                                                                                                                                    |
|----------------|------------|--------------------------------|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| caps_resolve   | unit       | [[desk.risks.caps_closed]]     | `registers_with_cap_edges()` | `every capped_by name resolves to a declared ## Limits row`                                                                                                   |
| breach_emitted | unit       | [[desk.risks.limit_breach]]    | `registers_with_breaches()`  | `the failure carries the desk.risks.limit_breach label with detail`                                                                                           |
| breach_named   | unit       | [[desk.risks.breach_surfaced]] | `registers_with_breaches()`  | `the risk-officer message names the offending ## Limits row and its bound`                                                                                     |
| es_reconciles  | quant.risk | [[desk.risks.caps_closed]]     | `registers_with_es_limits()` | `the ES limit reconciles against the VaR limit in every declared case — **horizon:** both limits are stated over the same 1-day horizon; **confidence:** both limits assume the same 99% confidence level` |

To reproduce every block on this page: copy packs/quant-finance.md from the repo into a fresh git workspace, save the file above as desk-risks.md, and run spk lint desk-risks.md.

Where to go next

Worked example — the svc.contracts pack, failures included

The generic worked example builds a spec with the core format alone, and the data.lineage, numeric.predicates, empirical.registry, bioimage.data, and quant.finance pages run the same journey pack by pack. This page does it for svc.contracts — the pack for services whose published contracts live in different repositories: a typed ## Interfaces registry section (name, kind, repo, binding, evolution), the svc.compat compatibility law kind, and the published_as outbound-leaf reference field. It adds no cross-file edge and no consumer listing: the base format already carries those (extension_point + satisfies for request contracts, effect + observes for events), and USAGE.md §2.6 forbids a publisher from enumerating its conformers. External contracts — OpenAPI, AsyncAPI, protobuf, JSON Schema — stay authoritative through an opaque binding column the pack never parses or absorbs.

Lifecycle: DRAFT. svc.contracts is the one standard pack still at draft — its pack file’s Model names the single state draft (pack definition, proposed by the archived add-svc-contracts-pack change). What that means for you today: the pack activates by vocabulary match only, everything it produces rides the advisory (warnings) channel with exit 0, and the activation advisory itself carries the suffix — draft status: findings are advisory-first and name it. Nothing a draft pack does can block a lint. Its vocabulary already parses (the fiber kinds extend the closed kind sets), while its checkers are honest-empty declarations — the same v1 semantics every pack ships. Every lint block below shows where the draft status appears; this page is a draft preview, not a promise of published-pack behavior, and promotion is a maintainer decision gated on a second independent consumer.

You will see a small spec use the pack’s vocabulary end to end, the pack-activation advisory that proves the pack actually engaged (draft suffix included), genuinely failing variants with their real labeled findings, and — just as important — the failures the linter does not catch yet, shown honestly.

How packs are enabled and what a pack adds mechanically is the job of using packs — the practical guide; read that for the mechanism, this page for the hands-on loop. Every lint and graph block below is real output from specodelic 0.10.0 on the file as it stood at that moment. On a TTY spk prints the human-readable text shown here; piped, it emits a JSON envelope instead.

The story

A checkout team publishes three contracts, and they do not live in one place: the cart request contract and the order-placed event are owned by the backend API repo, while the order-summary schema is owned by the web repo. The spec’s job is to register those three contracts — which repo owns each, which authoritative external artifact each binds to, how each is allowed to evolve — and to state each change’s consumer compatibility as a law. One capability, one file, named checkout-api.md; the format’s naming law maps - to the namespace dot, so the frontmatter id is checkout.api.

Deliberately out of scope: what any contract’s consumers look like and what the OpenAPI/AsyncAPI/JSON Schema files say inside. The publisher never lists its conformers (the base satisfies/observes edges carry that direction, derived from the graph), and the binding column stays opaque — openapi://…, asyncapi://…, json-schema://… are pointers the linter never interprets.

The setup

Packs are discovered by scanning the workspace, not by any config file: every kind: profile file in the git repository toplevel of the linted spec is a candidate pack. So the demo workspace needs two files — the pack definition (copied from this repo’s packs/ directory) and the spec under test:

mkdir demo && cd demo && git init
cp /path/to/specodelic/packs/svc-contracts.md .

That is the whole enablement story. The discovery and activation rules (corpus-scan anchors, word-boundary vocabulary matching, the byte-identical guarantee) are in the guide; this page just runs the loop.

Layer 1 — Intent

---
id: checkout.api
kind: intent
statement: "WHEN the checkout team publishes or changes a service contract THE system SHALL register every published contract with its owning repo, its authoritative external binding, its declared evolution mode, and the consumer compatibility law each change must satisfy."
---

# Checkout service contracts

A contract registry for one checkout team: a cart request contract, an
order-placed event, and an order-summary schema — each registered with
the repo that owns it and the authoritative external artifact it binds
to.

Lint it as it stands:

spk lint checkout-api.md
lint: 1 file(s) linted, 1 finding(s), 0 advisory warning(s)
  checkout-api.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.model_present — a spec with an intent but no Model section is incomplete by construction, same as in the generic worked example. Note what is missing from this output: no pack advisory. The file uses none of the pack’s vocabulary yet, so the byte-identical guarantee holds — the pack machinery is invisible. That changes with the next section.

Layer 2 — the ## Interfaces section

This is the pack’s namespaced section, declared in the pack’s ## Sections manifest with the fixed row shape | name | kind | repo | binding | evolution |:

## Interfaces

| name          | kind    | repo              | binding                               | evolution |
|---------------|---------|-------------------|---------------------------------------|-----------|
| cart_api      | request | acme/checkout-api | openapi://specs/cart-v2.yaml          | additive  |
| order_placed  | event   | acme/checkout-api | asyncapi://specs/order-placed-v1.yaml | versioned |
| order_summary | schema  | acme/checkout-web | json-schema://order-summary-v3.json   | frozen    |

Each column, defined for a cold read:

  • name — the row’s id inside this file; contract rows point at it through published_as (Layer 3).
  • kind — a short label closed per pack to request (a consumer conforms to it via the base satisfies edge), event (consumers watch it via the base observes edge), and schema (a shared data shape). Boundary note, same as every pack: the mechanism never checks row-kind cells — the closure is the pack’s own prose law.
  • repo — opaque. The repo that owns and publishes the contract; the pack declares no syntax for it and the linter never parses it.
  • binding — opaque. The pointer to the authoritative external artifact — an OpenAPI or AsyncAPI document, a protobuf definition, a JSON Schema file. The pack bridges to those standards, it never absorbs them: the .yaml/.proto/.json file stays the system of record, and nothing in this spec is allowed to contradict it.
  • evolution — closed per pack to additive (only compatible additions), versioned (breaking changes ship as new versions), and frozen (no changes at all). Also unchecked by the mechanism — the closure is prose.

The pack declares one reference field in its ## References manifest — published_as, resolving to a ## Interfaces row of the declaring file — and two checkers, svc.interface_closed (every published_as name resolves to an ## Interfaces row declared in the same file) and svc.compat_cases (svc.compat laws enumerate their added and removed case labels per the pack’s floor). Both ship as declarations: the mechanism names them, it does not yet execute them — keep reading, the page shows exactly what that means. The same manifest style declares the pack’s floor: law-kind properties of kind svc.compat must carry added: and removed: case labels — the two cases that decide whether existing consumers keep working. The base law floor is untouched — the mandatory identity:/associativity: labels ride base law rows (see the numeric.predicates page); this floor is kind-dependent and rides the fiber kind, as the Properties layer below pays it.

Lint with the section in place, Model still missing:

lint: 1 file(s) linted, 1 finding(s), 1 advisory warning(s)
  checkout-api.md [linter.model_present] Model section incomplete: 0 states, 0 transitions — both a States list and a Transitions table must exist
  advisory checkout.api [linter.observability] pack `svc.contracts` activated for `checkout.api` (vocabulary match: Interfaces) — empty checked-set (no violations to report) — draft status: findings are advisory-first and name it
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

There is the activation advisory, draft suffix and all: — draft status: findings are advisory-first and name it is the pack’s lifecycle speaking. The match list names every vocabulary token that triggered it — so far just the section name. The finding on the findings channel and the advisory on the warnings channel are independent: the draft status cannot change the exit code, ever.

Layer 3 — Constraints, Model, Properties

The rest of the file is the ordinary four-layer shape — the pack adds vocabulary, it does not change the layers. The two contract rows are base-format rows: a request contract is an extension_point (consumers satisfies it, from their own files), the event is an effect (consumers observes it). The pack’s published_as field rides as a column on those rows, tying each contract to the ## Interfaces row that registers it. Two invariants state the registry’s claims, a failure effect labels the breach output, and the model is a four-state publish lifecycle whose failure terminal emits:

## Constraints

| id                 | kind            | expr                                           | traces_to        | observes                       | published_as |
|--------------------|-----------------|------------------------------------------------|------------------|--------------------------------|--------------|
| cart_contract      | extension_point | `a consumer conforms to the cart request contract` | [[checkout.api]] |                              | cart_api     |
| contracts_closed   | invariant       | `every published_as name on a contract row resolves to a ## Interfaces row declared in this file` | [[checkout.api]] |                              |              |
| order_placed_event | effect          | `checkout.api.order_placed_event(payload)`     | [[checkout.api]] |                                | order_placed |
| compat_breach      | effect          | `checkout.api.compat_breach(detail)`           | [[checkout.api]] |                                |              |
| breach_surfaced    | invariant       | `every compatibility breach reaches the consumer team with the interface and change case named` | [[checkout.api]] | [[checkout.api.compat_breach]] |              |
| event_on_bus       | invariant       | `every order event reaches the message bus topic its binding declares` | [[checkout.api]] | [[checkout.api.order_placed_event]] |          |

## Model

### States

- `registered`
- `checked`
- `published`
- `failed` (emits: `[[checkout.api.compat_breach]]`)

### Transitions

| id    | from       | to        | guard                             |
|-------|------------|-----------|-----------------------------------|
| check | registered | checked   | `[[checkout.api.contracts_closed]]`  |
| ship  | checked    | published | `all published_as bindings written` |
| fail  | registered | failed    | `¬[[checkout.api.contracts_closed]]` |

## Properties

| id             | kind       | derives_from                        | generator                        | predicate                                                                                                                                                                                                  |
|----------------|------------|-------------------------------------|----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| order_emitted  | unit       | [[checkout.api.order_placed_event]] | `checkout_runs_with_orders()`    | `every order publication carries the order_placed payload`                                                                                                                                                 |
| bus_written    | unit       | [[checkout.api.event_on_bus]]       | `checkout_runs_with_orders()`    | `every order event is written to the topic its binding declares`                                                                                                                                           |
| contracts_resolve | unit    | [[checkout.api.contracts_closed]]   | `contract_rows_with_published_as()` | `every published_as name resolves to a declared ## Interfaces row`                                                                                                                                      |
| breach_emitted | unit       | [[checkout.api.compat_breach]]      | `contract_changes_with_breaches()` | `the failure carries the checkout.api.compat_breach label with detail`                                                                                                                                   |
| breach_named   | unit       | [[checkout.api.breach_surfaced]]    | `contract_changes_with_breaches()` | `the consumer-team message names the interface and the change case`                                                                                                                                      |
| cart_compat    | svc.compat | [[checkout.api.cart_contract]]      | `cart_contracts_with_changes()`  | `every cart contract change keeps existing consumers working in every declared case — **added:** optional fields and new endpoints keep existing clients valid; **removed:** a removal never ships inside an additive binding — it ships as a new versioned binding` |

One pack-specific row: cart_compat is a law whose kind is the fiber kind svc.compat — the Properties layer paying the pack’s floor, its predicate enumerating added: and removed: as named cases (the two directions a published contract can break in). Everything else — traces_to, guards, emits, coverage, the observes edges that keep every effect somebody’s watched output — is core-format machinery, taught properly in the generic worked example. And note what the Constraints table cannot grow: a consumers column. The pack declares no provider-to-consumer field — that direction is the graph’s job (satisfies from the consumer’s file, observes likewise), never the publisher’s authored list.

First full lint — a dangling reference, then the fix

The author’s first full draft carries one typo: cart_contract’s traces_to cell says [[checkout.apt]] — misremembered, the same classic as the reservation example. Lint the file:

spk lint checkout-api.md
lint: 1 file(s) linted, 2 finding(s), 1 advisory warning(s)
  checkout-api.md [linter.total_refs] dangling reference `[[checkout.apt]]` from constraints.traces_to — target not defined in any spec file
  checkout.api [linter.single_root_reachable] 2 row(s) unreachable from any intent row — an orphaned island (traces_to/derives_from/guard/from-to/emits): checkout.api.cart_compat, checkout.api.cart_contract
  advisory checkout.api [linter.observability] pack `svc.contracts` activated for `checkout.api` (vocabulary match: svc.compat, Interfaces, published_as) — empty checked-set (no violations to report) — draft status: findings are advisory-first and name it
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

Exit 1 — findings, never a silent pass. Three things to read here:

  1. One typo, two labeled findings. The dangling traces_to is the direct hit; linter.single_root_reachable is the cascade — with the edge broken, cart_contract and the law that derives from it (cart_compat) become an island no intent can reach. Fixing the typo clears both.
  2. The finding and the advisory ride different channels. The pack activated (its vocabulary is all over the file — the match list names all three tokens now: the kind, the section, the field), but activation lives on the warnings channel and never gates, draft status or not. The dangling reference lives on the findings channel and does.
  3. empty checked-set (no violations to report) — the pack’s declared svc.interface_closed checker ran and honestly reports an empty violation set. More on what that does and does not mean below.

Fix the typo — [[checkout.apt]] → [[checkout.api]] — and lint again:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory checkout.api [linter.observability] pack `svc.contracts` activated for `checkout.api` (vocabulary match: svc.compat, Interfaces, published_as) — empty checked-set (no violations to report) — draft status: findings are advisory-first and name it
→ Run: specodelic graph

Zero findings, exit 0 — and now the advisory is the whole output. Read it as the meter it is: an exit-0 lint alone proves nothing (a spec using none of the pack vocabulary also exits 0, silently); the activation line naming svc.contracts is the observable that the pack was discovered, matched, and engaged. The pipeline’s next stage runs pack-aware too:

spk graph checkout-api.md
graph: 1 file(s), 20 node(s), 23 edge(s), 0 dangling, 0 typing violation(s), 0 supersedes cycle(s), 1 external boundary(ies)
  external boundary: checkout.api
→ Run: specodelic lint

The 1 external boundary is not a defect — it is this pack’s whole point, derived for free. A file hosting an extension_point row is an external boundary: the checkout team’s spec is the seam between their repo and every consumer’s repo, and the graph says so without the publisher ever listing a consumer.

What a missing pack looks like

The demo depends on the pack file being discovered. Lint the same finished spec in a fresh git workspace with no kind: profile file in it — not a subdirectory of the first workspace, whose repo toplevel the discovery scan still anchors to — and the machinery turns from advisory into findings:

lint: 1 file(s) linted, 2 finding(s), 0 advisory warning(s)
  checkout.api [linter.property_kind_closed] property `cart_compat` has kind `svc.compat` — outside the closed set {unit, law} (kinds.md property_row_shape)
  checkout.api [linter.orphan_vocabulary] orphan vocabulary: pack-qualified token(s) `svc.compat` used by `checkout.api`, but no `kind: profile` pack in namespace `svc` is discovered — candidate pack `svc.*` (prefix-derived: only the namespace is known); remediations: add/enable a `kind: profile` pack file declaring the vocabulary, or fix the vocabulary (un-qualify or retype the token)
→ Run: fix the reported invariants — each rule's semantics: spk explain lint-rules

linter.orphan_vocabulary — the finding always names the candidate (namespace-derived, svc.* here) and states both remediations: enable a pack declaring the vocabulary, or fix the token. Copy the pack file back into the workspace and the pair clears — with the pack active, the walkers accept a fiber kind in a kind column (base ∪ active-pack-fiber), so that mis-typing only surfaces when the pack is missing. The reliable diagnostic is the one this section started with: a spec you meant to be pack-enabled but lint with no activation advisory is a spec whose pack was not discovered.

For the other direction — proof the guarantee still runs toward silence — strip every pack-vocabulary token from the same file (drop the ## Interfaces section, the published_as column and the prose mentions of it, and the svc.compat law row), then lint in that same pack-less workspace:

lint: 1 file(s) linted, 0 finding(s), 0 advisory warning(s)
→ Run: specodelic graph

No advisory, no findings — the byte-identical guarantee in action. What is left is an ordinary base-format spec, and a pack can never gate a file that did not opt in.

What the linter does not catch (yet)

Honesty check — the failures this page has not shown are the ones you might expect first. Change cart_api to ghost_row in the published_as column of the finished spec and lint:

lint: 1 file(s) linted, 0 finding(s), 1 advisory warning(s)
  advisory checkout.api [linter.observability] pack `svc.contracts` activated for `checkout.api` (vocabulary match: svc.compat, Interfaces, published_as) — empty checked-set (no violations to report) — draft status: findings are advisory-first and name it
→ Run: specodelic graph

Byte-for-byte the clean output — exit 0, activation advisory, nothing else. That is not the linter missing the dangle by accident: svc.interface_closed ships as a declaration. In v1, pack checkers are honest-empty — activation and the empty checked-set are reported truthfully, violation evaluation is not implemented yet (the guide documents this, and verification boundaries places it on the guarantee ladder). The same applies to the floor: drop the added: and removed: case labels from cart_compat’s predicate and the lint output is identical — svc.compat_cases is also named, not executed.

The format’s answer to the gap is the one this spec already embodies: the dangling-edge claim lives where the evidence plan lives — the contracts_closed invariant, its contracts_resolve property, and eventually a real executable predicate. When the checkers gain evaluation, the declarations are already in place; the spec does not change. Until then, remember what draft means here twice over: the pack’s findings are advisory-first, and its checkers are declarations — this page is a preview of a mechanism still being filled in, not a compatibility guarantee you can test today.

The finished spec

Every block above assembles into this one file, checkout-api.md — exactly as it lints at 0 findings, 1 activation advisory:

---
id: checkout.api
kind: intent
statement: "WHEN the checkout team publishes or changes a service contract THE system SHALL register every published contract with its owning repo, its authoritative external binding, its declared evolution mode, and the consumer compatibility law each change must satisfy."
---

# Checkout service contracts

A contract registry for one checkout team: a cart request contract, an
order-placed event, and an order-summary schema — each registered with
the repo that owns it and the authoritative external artifact it binds
to.

## Interfaces

| name          | kind    | repo              | binding                               | evolution |
|---------------|---------|-------------------|---------------------------------------|-----------|
| cart_api      | request | acme/checkout-api | openapi://specs/cart-v2.yaml          | additive  |
| order_placed  | event   | acme/checkout-api | asyncapi://specs/order-placed-v1.yaml | versioned |
| order_summary | schema  | acme/checkout-web | json-schema://order-summary-v3.json   | frozen    |

## Constraints

| id                 | kind            | expr                                           | traces_to        | observes                       | published_as |
|--------------------|-----------------|------------------------------------------------|------------------|--------------------------------|--------------|
| cart_contract      | extension_point | `a consumer conforms to the cart request contract` | [[checkout.api]] |                              | cart_api     |
| contracts_closed   | invariant       | `every published_as name on a contract row resolves to a ## Interfaces row declared in this file` | [[checkout.api]] |                              |              |
| order_placed_event | effect          | `checkout.api.order_placed_event(payload)`     | [[checkout.api]] |                                | order_placed |
| compat_breach      | effect          | `checkout.api.compat_breach(detail)`           | [[checkout.api]] |                                |              |
| breach_surfaced    | invariant       | `every compatibility breach reaches the consumer team with the interface and change case named` | [[checkout.api]] | [[checkout.api.compat_breach]] |              |
| event_on_bus       | invariant       | `every order event reaches the message bus topic its binding declares` | [[checkout.api]] | [[checkout.api.order_placed_event]] |          |

## Model

### States

- `registered`
- `checked`
- `published`
- `failed` (emits: `[[checkout.api.compat_breach]]`)

### Transitions

| id    | from       | to        | guard                             |
|-------|------------|-----------|-----------------------------------|
| check | registered | checked   | `[[checkout.api.contracts_closed]]`  |
| ship  | checked    | published | `all published_as bindings written` |
| fail  | registered | failed    | `¬[[checkout.api.contracts_closed]]` |

## Properties

| id             | kind       | derives_from                        | generator                        | predicate                                                                                                                                                                                                  |
|----------------|------------|-------------------------------------|----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| order_emitted  | unit       | [[checkout.api.order_placed_event]] | `checkout_runs_with_orders()`    | `every order publication carries the order_placed payload`                                                                                                                                                 |
| bus_written    | unit       | [[checkout.api.event_on_bus]]       | `checkout_runs_with_orders()`    | `every order event is written to the topic its binding declares`                                                                                                                                           |
| contracts_resolve | unit    | [[checkout.api.contracts_closed]]   | `contract_rows_with_published_as()` | `every published_as name resolves to a declared ## Interfaces row`                                                                                                                                      |
| breach_emitted | unit       | [[checkout.api.compat_breach]]      | `contract_changes_with_breaches()` | `the failure carries the checkout.api.compat_breach label with detail`                                                                                                                                   |
| breach_named   | unit       | [[checkout.api.breach_surfaced]]    | `contract_changes_with_breaches()` | `the consumer-team message names the interface and the change case`                                                                                                                                      |
| cart_compat    | svc.compat | [[checkout.api.cart_contract]]      | `cart_contracts_with_changes()`  | `every cart contract change keeps existing consumers working in every declared case — **added:** optional fields and new endpoints keep existing clients valid; **removed:** a removal never ships inside an additive binding — it ships as a new versioned binding` |

To reproduce every block on this page: copy packs/svc-contracts.md from the repo into a fresh git workspace, save the file above as checkout-api.md, and run spk lint checkout-api.md.

Where to go next

reservation-order — the finished spec


id: reservation.order kind: intent statement: “WHEN a customer submits an order THE reservation service SHALL hold stock for every line item and accept the order, or reject it with nothing held and nothing charged.”

Reservation & Order

A small order pipeline: submitting an order holds stock for every line item or rejects the order outright; accepted orders are charged exactly once, fulfilled, or released by cancellation or expiry. The subject of this spec is the reservation service itself — nothing here constrains or mentions any checking tool.

Constraints

idkindexprtraces_toobserves
all_or_nothinginvariantthe order is accepted only if every line item's requested quantity is available; otherwise no unit is held and nothing is charged[[reservation.order]]
held_or_convertedinvariantevery unit held for an accepted order is either converted to a fulfillment or released; no held unit outlives both[[reservation.order]]
release_is_totalinvariantwhen a hold is released, no unit remains held for that order; releasing an already-released hold changes nothing[[reservation.order]]
charge_iff_fulfilledinvariantthe customer is charged if and only if the order reaches fulfilled[[reservation.order]]
cancel_refunds_exactly_chargedinvariantIF a charged order is cancelled, THEN the refund equals exactly the amount charged — never more, never less[[reservation.order]]
expiry_releases_holdsinvariantan unfulfilled reservation expires after its TTL; expiry releases the hold without charging the customer[[reservation.order]]
stock_exhaustedeffectreservation.order.stock_exhausted(detail)[[reservation.order]]
reject_reason_surfacedinvariantevery rejection reaches the caller with the exhausted line items named[[reservation.order]][[reservation.order.stock_exhausted]]

Model

States

  • submitted
  • reserved
  • charged
  • fulfilled
  • cancelled
  • released
  • reserve_failed (emits: [[reservation.order.stock_exhausted]])

Transitions

idfromtoguard
acceptsubmittedreserved[[reservation.order.all_or_nothing]]
reject_ordersubmittedreserve_failed¬[[reservation.order.all_or_nothing]]
chargereservedchargedpayment authorized ∧ [[reservation.order.charge_iff_fulfilled]]
fulfillchargedfulfilledpayment settled ∧ [[reservation.order.charge_iff_fulfilled]]
cancel_paidchargedcancelledcustomer cancelled ∧ ¬payment settled ∧ [[reservation.order.cancel_refunds_exactly_charged]]
cancel_unpaidreservedcancelledcustomer cancelled ∧ [[reservation.order.held_or_converted]]
expirereservedreleasedreservation TTL elapsed ∧ [[reservation.order.expiry_releases_holds]]

Properties

idkindderives_fromgeneratorpredicate
no_charge_on_rejectionunit[[reservation.order.all_or_nothing]]orders_with_mixed_availability()nothing is charged for any rejected order
holds_all_convertedunit[[reservation.order.held_or_converted]]arbitrary_closed_orders()every held unit is converted or released when the order closes
double_release_noopunit[[reservation.order.release_is_total]]order_released_twice()the second release changes nothing
fulfilled_implies_chargedunit[[reservation.order.charge_iff_fulfilled]]arbitrary_accepted_orders()charged(order) == (outcome(order) == fulfilled)
refund_boundedunit[[reservation.order.cancel_refunds_exactly_charged]]charged_orders_cancelled_before_settlement()refund(order) == amount_charged(order)
expiry_freeunit[[reservation.order.expiry_releases_holds]]orders_past_ttl()nothing is charged and no unit remains held after expiry
rejection_labels_emittedunit[[reservation.order.reject_reason_surfaced]]orders_with_exhausted_items()the rejection message names exactly the exhausted line items
stock_exhausted_emittedunit[[reservation.order.stock_exhausted]]rejections_over_sold_out_items()the rejection carries the stock_exhausted label with the item detail

batch-resume — derived parallelism, worked end to end


id: batch.resume kind: intent statement: “WHEN a batch run starts and the manifest marks some items done, THE processor SHALL invoke processing only on items whose content fingerprint differs from the manifest’s record.”

Batch Resume

A processor consumes a collection of files and records per-item progress in a sidecar manifest, so an interrupted run resumes without reprocessing unchanged items. The subject of this spec is the batch processor itself — per USAGE.md §0, nothing here constrains or mentions any checking tool.

Constraints

idkindexprtraces_to
done_iff_output_durableinvariantmanifest[item].status == done → output(item) was durably written before the marker was written[[batch.resume]]
resume_touches_only_unprocessedinvarianta resumed run invokes process(item) only if fingerprint(item) ≠ manifest[item].fingerprint[[batch.resume]]
changed_input_invalidates_markerinvariantfingerprint(item) ≠ manifest[item].fingerprint → the item is treated as pending regardless of its recorded status[[batch.resume]]
failed_is_not_doneinvariantmanifest[item].status == failed → item is reprocessed on resume; status == partial → processing resumes from manifest[item].offset[[batch.resume]]
manifest_is_sidecarinvariantthe manifest lives outside every output artifact; no output contains manifest rows[[batch.resume]]
offset_version_contractinvarianta recorded offset is valid only for the processor version that wrote it; a version mismatch demotes the item to pending[[batch.resume]]
resumed_equivalent_to_freshinvariantresult(resume(run interrupted at t)) == result(uninterrupted rerun over the same inputs)[[batch.resume]]
map_is_parallel_unconditionalinvariantdeterministic per-item processing runs over any partition without coordination — map parallelism is licensed by determinism alone, never gated on merge algebra[[batch.resume]]
reduce_sound_iff_monoidinvariantpartitioned results may be combined by merge iff merge is associative with an identity; partition order is free iff merge is additionally commutative — no reduce-parallelism claim exists apart from these laws[[batch.resume]]
process_is_deterministicinvariantprocess(item) is a pure function of (item content, offset) — no reads of wall-clock, randomness, or unrecorded external state[[batch.resume]]
emits_survive_replayinvariantevery emitted artifact is a pure function of (item, offset), so reprocessing after a crash rewrites identical bytes; emissions that cannot be rewritten (notifications, appends) are deduplicated by (item fingerprint, offset) before taking effect[[batch.resume]]
manifest_merges_idempotentlyinvariantconcurrent workers checkpoint into per-worker manifests combined by union of per-item markers; marker ∪ marker is associative, commutative, and idempotent, so any merge order and any checkpoint frequency yields the same manifest[[batch.resume]]

Model

States

  • pending
  • in_progress
  • partial
  • done
  • failed

Transitions

idfromtoguard
startpendingin_progressitem unmarked ∨ fingerprint(item) ≠ manifest[item].fingerprint
completein_progressdone[[batch.resume.done_iff_output_durable]]
checkpointin_progresspartialoutput-so-far written ∧ offset recorded
failin_progressfailed¬[[batch.resume.done_iff_output_durable]] ∧ ¬(output-so-far written ∧ offset recorded) — cites the union of success siblings per guard_negation_total
resume_partialpartialin_progressrecorded offset version matches the current processor
requeue_failedfailedpending[[batch.resume.failed_is_not_done]]
invalidatedonepending[[batch.resume.changed_input_invalidates_marker]]

Properties

idkindderives_fromgeneratorpredicate
done_marker_implies_output_readableunit[[batch.resume.done_iff_output_durable]]crash_between(write_output(item), write_marker(item))no resumed run reports done for an item whose output is missing
resumed_run_invocation_countunit[[batch.resume.resume_touches_only_unprocessed]]manifest with k done items, n−k changed itemsinvocation_count(process) == n − k
edited_item_reprocessedunit[[batch.resume.changed_input_invalidates_marker]]edit an item after its marker was writtenthe item is processed on the next resume
failed_item_reprocessedunit[[batch.resume.failed_is_not_done]]mark an item failed, then resumeinvocation_count(process(item)) == 1
outputs_contain_no_manifest_rowsunit[[batch.resume.manifest_is_sidecar]]arbitrary completed runmanifest rows appear in no output artifact
version_mismatch_invalidates_partialunit[[batch.resume.offset_version_contract]]bump processor version with stale partial offsets recordedpartial items reprocessed from 0, never from the stale offset
crash_resume_equivalentunit[[batch.resume.resumed_equivalent_to_fresh]]arbitrary crash-injection schedule over the runresult(resumed_run) == result(uninterrupted_run)
resume_compositionlaw[[batch.resume.resumed_equivalent_to_fresh]]arbitrary manifests and crash schedules**associativity:** resume(resume(m, a), b) == resume(m, a ++ b) **identity:** resume(empty_manifest, items) == process_all(items)
results_merge_monoidlaw[[batch.resume.reduce_sound_iff_monoid]]arbitrary triples of partial results (a, b, c)**associativity:** merge(merge(a, b), c) == merge(a, merge(b, c)) **identity:** merge(e, a) == a == merge(a, e) — fails ⇒ reduce is inherently sequential, chunked execution unsound (map stays parallel per map_is_parallel_unconditional)
results_merge_commutativeunit[[batch.resume.reduce_sound_iff_monoid]]arbitrary pairs of partial resultsmerge(a, b) == merge(b, a) — optional case, feeds the tier table below: holds ⇒ workers need no ordering; fails ⇒ merge is a non-commutative monoid (e.g. ordered append), reduce still parallel-sound, merge order fixed
manifest_merge_semilatticelaw[[batch.resume.manifest_merges_idempotently]]arbitrary triples of per-worker manifests**associativity:** (m ∪ n) ∪ o == m ∪ (n ∪ o) **identity:** ∅ ∪ m == m **idempotence:** m ∪ m == m — idempotence is what makes double-checkpointing harmless
map_chunks_uncoordinatedunit[[batch.resume.map_is_parallel_unconditional]]arbitrary item partition across workersper-item results match the sequential run regardless of partition boundaries
deterministic_replayunit[[batch.resume.process_is_deterministic]]same item processed twice under any interleavingoutputs are byte-identical
replay_dedupes_emissionsunit[[batch.resume.emits_survive_replay]]crash after emit, before marker; resumeoutput artifact state equals an uninterrupted run's — no duplicated appends, no replayed notifications

Notes

Transducer framing. process is a transducer: a step function over (accumulator, item) → (accumulator, emits). The Model section is that transducer per item. Transducers compose; chunkability is a property of the accumulator’s algebra, not of transducer-hood — a transducer whose step is associative parallelizes like a scan (parallel prefix); one whose state entangles order does not. So the design-raising questions this spec forces are exactly three:

is the accumulator a monoid — and is the process deterministic, with replay-safe emissions?

Three answers, three architectures, all derived rather than asserted (map parallelism needs none of these — only determinism; the algebra gates the reduce):

accumulator algebraarchitecture the law row licenses
deterministic, emissions replayableparallel map over any partition — no algebra required (map_is_parallel_unconditional, emits_survive_replay)
results form a monoid (results_merge_monoid)+ chunked parallel reduce; merge in tree order
+ commutative (results_merge_commutative)+ workers need no ordering at all; any shuffle, any reduce tree
+ idempotent (semilattice, manifest_merge_semilattice)+ concurrent workers checkpoint freely; duplicates vanish
results not a monoid (e.g. running average, ordered state machine)reduce is inherently sequential — still streamable, never chunkable; say so here rather than discovering it in production

The resume design of the Constraints table is itself an instance: the manifest is a semilattice, which is why resume composes (resume_composition) and why concurrent checkpointing is safe.

The three decisions the constraints force, in dependency order:

  1. Marker placement (manifest_is_sidecar): the manifest is a sidecar (e.g. .state.jsonl), never embedded in outputs — half-written markers must not be readable by downstream consumers.
  2. Fingerprints, not paths (changed_input_invalidates_marker): items are keyed by content fingerprint; renames between runs keep their progress, edits discard it.
  3. Partial is a contract, not a bookmark (offset_version_contract): once offsets are recorded, the processor version is part of their meaning; alternatively, promote sub-steps to items and keep markers boolean-shaped (see no_boolean_columns in specodelic.md for why the status vocabulary is named variants, not flags).

done_iff_output_durable exists to make the worst interleaving — crash after marker, before output — unreachable; emits_survive_replay closes the mirror-image hole (crash after emit, before marker: at-least-once replay must not duplicate side effects — the semilattice protects manifests, not outputs). crash_resume_equivalent is the property a test suite must actually check to prove resume is just a cache in front of a deterministic rerun — which is why process_is_deterministic is a constraint in its own right, not an implicit assumption. Failure effects (a kind = "effect" row per error, per the corpus’s error contract) are omitted here; add them if the processor exposes an error surface.

Using specodelic (formerly spec-format)

Read this after AGENTS.md and specodelic.md, before writing a spec for a piece of software (a “domain spec”) rather than for this repo’s own linter. Everything here is about how to point the four existing layers — Intent, Constraints, Model, Properties — at a real feature, including a few shapes that don’t look like they fit until you see where they go.


Positioning: what the format assumes — and when NOT to use it

Prose governance only — editorial positioning, reviewed against the convergent findings of the 2026-10 external evaluations. No rule enforces any of this.

The format’s value presumes a spec-first workflow: the spec is the design artifact, and the implementation is machine-checked, regenerable code authored by an agent — the compile artifacts say “edit the spec, not here,” and llms.txt names AI agents as the primary audience. The Constraints/Properties tables only earn their keep because something downstream actually consumes them: compiled proptest scaffolding, the TLA+ module, verify, model-check, the ah contract gate.

When the presumption holds — agent-authored, spec-driven development; design conversations where you want counterexamples, not vibes; contracts several implementations must honor — the format is leverage: the linter catches shape drift, the model checker explores interleavings you didn’t, and verify keeps the properties honest.

When it does not, the structured layers become pure tax. Every third-party evaluation of the format (2026-10) reached this verdict independently:

  • Hand-maintained code. If humans edit the implementation directly and nothing regenerates it from the spec, the coverage/anchoring discipline buys nothing and costs every edit. Write an ordinary design doc instead.
  • Exploratory or throwaway prototypes. A day-old sketch does not need a guard-complete state machine.
  • Quantitative or scientific claims you want actually checked. Today’s guard grammar is propositional; real-valued predicates are uncheckable — the single most convergent demand in the external reviews. State them in prose and let spk conform report unknown rather than forcing them into rows that pretend otherwise.
  • A spec you already maintain elsewhere. Migration (§3 below) is a rewrite into the schema — do it because you want the pipeline, not for cosmetics.

The honest one-line test: will anything mechanical consume the structured rows? If no — write prose and skip spk. The format adds no value the linter cannot enforce for you, and prose_untouched guarantees it will never pretend otherwise: prose-only claims stay explicitly unchecked and are never counted as verified (see the verification boundaries discussion in the site docs).


0. Terminology: four words that are easy to confuse

Prose governance only — the parser never reads any of this (prose_untouched), so these conventions are enforced by review and the sweep in the acceptance criteria of the tracking ticket, not by a lint rule.

TermMeansExample
the formatthe markdown schema/language itself: frontmatter fields, the four layer tables, wiki-links, the 5 kinds. Defined by specodelic.md, kinds.md, theory.md.“states are named variants, not booleans” — a rule of the format
the tool (spk)the specodelic CLI that lints/compiles/checks files written in the format. Specified by the linter-*.md, compile.md, … corpus.spk lint reports linter.frontmatter findings
the subjectwhatever a given spec file is about. For this corpus the subject is the tool itself (dogfooding); for a domain spec it’s whatever system you’re specifying. Declared by a file’s statement + prose — deliberately not a frontmatter field, hence never machine-checkable.orchestrate.md’s subject is the pipeline; order-cancel.md’s is the refund policy
spec fileone document conforming to the formatopenspec/specs/orchestrate/spec.md
the corpus / specs/the directory of spec files this repo maintains“the corpus is dogfooding”
spec-formatthe project’s former name. Appears only in provenance contexts (rename history, CHANGELOG); never in current prose“renamed from spec-format on import (2026-09-28)”

Rules of thumb:

  • Bare “specodelic” names the project/repo only. “the specodelic format”, “a specodelic spec file”, “the specodelic CLI” are fine (adjectival); “the specodelic” as a bare noun for the format or the tool is the violation this section exists to prevent.
  • “spec” is likewise four senses — file, format, corpus, legacy name — and bare “the spec” is best avoided in prose for the same reason.
  • Subject-relative litmus test: a constraint expr that mentions the checker or the pipeline is layer conflation iff the file’s subject is not the tool. orchestrate.md’s lint_gate_matches_checker_ownership mentioning checkers is correct — its subject is the pipeline. A domain spec about a refund policy mentioning spk would be conflation.
  • What the format contributes to a domain spec is narrow and structural: no_boolean_columns forces states like done/partial/failed to be named variants, append_only_variants governs growing that set, and guard_required forces each race/handoff to be an explicit guarded transition. Everything else about a subject’s semantics is ordinary spec-writing, expressible in the format but not supplied by it.

1. Quick start: writing a new domain spec

Every file is the same four sections, in this order, whether it’s a five-line CRUD endpoint or specodelic.md itself. Save the example below as order-cancel.md — the filename stem must equal the frontmatter id with . mapped to - (order.cancel → order-cancel.md; _ is literal in both):

---
id: order.cancel
kind: intent
statement: "WHEN a customer cancels a paid order, THE system SHALL refund
  the payment in full within 5 business days."
---

# Order Cancellation

One paragraph of prose: why this exists, what it's not (the parser never
reads this paragraph — see `prose_untouched` in `specodelic.md`).

## Constraints

| id              | kind      | expr                                              | traces_to        |
|------------------|-----------|--------------------------------------------------|-------------------|
| refund_bounded    | invariant | `refund_amount == paid_amount`                    | [[order.cancel]] |
| refund_timely     | invariant | `refund_issued_at - cancelled_at <= 5 business days` | [[order.cancel]] |
| refund_traces_resolve | invariant | `**kernel:** resolves(traces_to)`          | [[order.cancel]] |
| refund_guard_reaches | invariant | `**kernel:** reachable(order.cancel.refund, order.cancel.refund_bounded, guard)` | [[order.cancel]] |

## Model

### States
- `active`
- `cancel_requested`
- `refunded`

### Transitions

| id       | from              | to        | guard                                            |
|----------|-------------------|-----------|---------------------------------------------------|
| request  | active            | cancel_requested | `customer submitted a cancel request`      |
| refund   | cancel_requested  | refunded  | [[order.cancel.refund_bounded]] ∧ [[order.cancel.refund_timely]] |

## Properties

| id              | kind | derives_from                    | generator                    | predicate                          |
|------------------|------|----------------------------------|-------------------------------|--------------------------------------|
| full_refund_only | unit | [[order.cancel.refund_bounded]] | `arbitrary_paid_order()`      | `refund(cancel(order)) == order.paid_amount` |
| refund_within_term | unit | [[order.cancel.refund_timely]] | `arbitrary_paid_order()`    | `days_between(cancelled_at, refund_issued_at) <= 5` |
| traces_resolve_prop | unit | [[order.cancel.refund_traces_resolve]] | `arbitrary_paid_order()` | `every constraint trace resolves` |
| guard_reaches_prop | unit | [[order.cancel.refund_guard_reaches]] | `arbitrary_paid_order()` | `the refund transition's guard reaches the bounded invariant` |

The two **kernel:** rows are the example’s executable slice — the min-expr kernel’s closed atomic grammar (add-min-expr-kernel): resolves(traces_to) asserts every traces_to reference in the file resolves, and reachable(…, guard) asserts the refund transition’s guard actually cites the bounded invariant. The kernel evaluates these over the file’s own rows and references — the domain-data cells above them (refund_amount == paid_amount, the days-between bound) stay informal strings, exactly as §4 below says: kernel semantics never outruns the instances the format itself stores, and spk model-check reports each kernel claim’s status (verified here) in its run report.

That’s the whole shape. The rest of this guide is about the parts that don’t obviously fit — a closed set of node types, a machine that produces output, several interchangeable implementations, a lazy pipeline, a contract a consumer extends from outside your file, an append-only event log, an empirical runtime bound — each of which turned out to be an existing pattern applied somewhere non-obvious, not a reason to invent a new section.

Before finishing any new file, run the same self-check every checker file in this repo already used (STATUS.md §5, step 9): does every Constraint trace to this file’s Intent, does every Constraint have a deriving Property, does the Model’s guard set match what linter-model_shape.md requires, and — new as of this guide — does any part of the domain need one of the patterns in §2 before it’s forced into the wrong table.

Inspecting the corpus. spk graph specs derives the typed reference graph from the corpus. --format edges|dot|mermaid writes raw text projections to stdout — a six-column TSV edge list, a Graphviz DOT diagram, or a Mermaid flowchart (pipe into dot -Tsvg or a mermaid renderer; rendering stays external) — and --view wiring (requires --format) projects constraints.satisfies edges to file level so you can see which spec consumes which extension point. spk explain graph-views has the one-pipe recipes.


2. Pattern catalog

These are not new mechanisms. Each is the existing four-layer schema pointed at something it wasn’t obviously built for, worked out by checking a real domain (a lazy, category-theoretic data library) against the format end to end. Use these instead of inventing a fifth section.

2.1 A closed, exhaustively-matched set of node types (“sealed AST”)

Don’t put this in Model/States. States are a lifecycle — one thing moving through phases over time. A closed set of value constructors (an expression grammar’s node kinds, a tagged union’s variants) is not a lifecycle; nothing is “transitioning” between Literal and BinOp.

Do put it in the Constraints table, one row per constructor, each an invariant stating that constructor’s shape:

| id              | kind      | expr                                                          | traces_to  |
|------------------|-----------|----------------------------------------------------------------|-------------|
| expr_literal      | invariant | `Literal node has exactly field {value: Scalar}`                | [[expr]]   |
| expr_column       | invariant | `Column node has exactly field {name: str}`                     | [[expr]]   |
| expr_binop        | invariant | `BinOp node has exactly fields {left: Expr, right: Expr, op: Op}` | [[expr]] |

“Sealed” — closed except by deliberate revision — is exactly what append_only_variants already guarantees for any 𝒦-governed id-set: this constructor list can only grow, and only under a new Revision heading in this file. You get exhaustiveness-by-construction for free; you don’t need to declare it separately.

2.2 A state machine that produces output (Moore machine)

If a state needs to say what it emits, not just what it transitions to, give it an emits field pointing at an effect-kind Constraint:

### States
- `seeded`
- `accumulating` `emits: [[reducer.partial_sum]]`
- `finalized` `emits: [[reducer.total]]`

## Constraints

| id            | kind   | expr                                  | traces_to     |
|----------------|--------|------------------------------------------|----------------|
| partial_sum     | effect | `output == running_total_so_far`          | [[reducer]]   |
| total           | effect | `output == sum(all_seen_values)`          | [[reducer]]   |

A state with no emits is a plain automaton state — both are valid in the same Model. Don’t add emits to every state out of habit; only the ones whose whole point is what they hand back.

2.3 Several interchangeable implementations of one contract

Don’t try to parametrize a single Model over “which backend.” Do reuse the Checker Ownership shape from specodelic.md: one shared Intent file, and N implementation files that each own their own Constraints and Properties but all traces_to the same Intent:

storage.abstract.md      — the Intent + Constraints every backend must satisfy
storage.in_memory.md     — traces_to [[storage.abstract]], its own Model + Properties
storage.arrow.md         — traces_to [[storage.abstract]], its own Model + Properties

“All backends conform” is then the same thing linted already is for this repo’s eight gating checkers: a limit over a dependency diagram, passed only when every leaf reports passed. No new object in 𝒦, no new table — the proof this works is that it’s already running, right now, as this repo’s own lint pipeline.

2.4 Build now, execute later (laziness / staged evaluation)

Split it into two states with a guarded transition between them, the same way compile.md separates extracting from emitting:

### States
- `unmaterialized`
- `materialized`

### Transitions

| id           | from            | to             | guard                                      |
|--------------|-----------------|-----------------|-----------------------------------------------|
| materialize  | unmaterialized  | materialized    | `.collect() or .compute() was explicitly called` |

Building the expression graph is everything that happens in unmaterialized; nothing there is a state of its own unless it needs its own emits or its own guarded sub-transitions.

2.5 A law beyond identity/associativity

law_requires_cases in specodelic.md is a floor: every law property needs at least identity and associativity, but nothing stops it from requiring more, named in its own predicate:

| id            | kind | derives_from        | generator                          | predicate |
|----------------|------|-----------------------|--------------------------------------|-------------|
| sigma_delta_pi | law  | [[poco.adjoint_triple]] | `arbitrary_schema(), arbitrary_functor()` | **identity:** `...`  **associativity:** `...`  **unit:** `η: Id ⇒ Δ∘Σ`  **counit:** `ε: Σ∘Δ ⇒ Id`  **triangle:** `(ε∘Σ)∘(Σ∘η) == id_Σ` |

Don’t wait for a schema change to add unit/counit/naturality/triangle- identity cases to an adjunction or functor law — add them to the case list directly, the way rename_naturality already added a third case beyond the two the floor requires.

Idempotency needs no new case name, just a predicate, the same floor-plus-cases shape:

| id          | kind | derives_from      | generator            | predicate |
|--------------|------|-----------------------|----------------------|-------------|
| retry_safe   | law  | [[api.rate_limit]]   | `arbitrary_request()` | **identity:** `...`  **associativity:** `...`  **idempotent:** `apply(apply(x)) == apply(x)` |

A monad’s laws are the same floor plus its own named cases — not a different mechanism from the adjunction example above, just a different domain wearing it:

| id           | kind | derives_from         | generator                          | predicate |
|---------------|------|--------------------------|---------------------------------------|-------------|
| result_monad  | law  | [[result.bind_contract]] | `arbitrary_value(), arbitrary_kleisli_fn()` | **identity:** `bind(pure(x), f) == f(x)`  **associativity:** `bind(bind(m,f),g) == bind(m, x -> bind(f(x),g))`  **left_identity:** `bind(pure(x), f) == f(x)`  **right_identity:** `bind(m, pure) == m` |

The floor’s identity/associativity cases already are two of a monad’s required laws under different traditional names — a monad law property doesn’t need four independent cases, it needs the floor plus left_identity/right_identity named explicitly so a reader unfamiliar with monad terminology can still see the floor is satisfied.

2.6 A contract a consumer extends from outside your file (Open/Closed, protocol-style)

Julia multiple dispatch on a package-owned type hierarchy, and any purely internal “closed set of cases,” are just §2.1 again — a sealed enumeration keyed on type instead of on a tagged value. This pattern is for the other shape: Clojure-style protocols/multimethods, or a generic function you expect downstream packages to extend for their own types, where the whole point is that a consumer can conform without ever editing your file — the expression-problem move, and the actual mechanism behind the Open/Closed Principle (closed for modification, open for extension).

Don’t try to enumerate conformers in your own file, and don’t add a reachability edge pointing back at them. You can’t ever know the full set — that’s not a gap to work around, it’s the same kind of unboundedness model_check.md already admits for infinitely-deep recursive structures, just spread across files and time instead of depth. A schema that pretended to close over “all conformers, including ones not yet written” would be claiming something it can’t check.

Do publish the contract as an extension_point-kind Constraint in your own file — this is a communication artifact, not an enforcement one:

| id                | kind             | expr                                                                                          | traces_to |
|--------------------|------------------|----------------------------------------------------------------------------------------------------|-----------|
| symmetry_contract   | extension_point  | `∀ T conforming: symmetry(T)::SymmetryTag, canonical_order(T)::Vector{Int}, sign(T, perm)::Int`      | [[canon]] |

A consumer who wants to conform writes their own ordinary spec file, with one Constraint row’s satisfies field pointing back at your extension_point row:

| id                | kind      | expr                                                          | traces_to        | satisfies                         |
|--------------------|-----------|-------------------------------------------------------------------|--------------------|--------------------------------------|
| my_tag_symmetry     | invariant | `symmetry(MyTag) == :cyclic; canonical_order sorts by weight`      | [[my_extension]]  | [[xact.canon.symmetry_contract]]  |

That row is reachable the ordinary way, through its own traces_to pointing at its own file’s Intent — satisfies is an extra outbound pointer sitting beside it, exactly the way guard and emits already coexist with traces_to without disturbing reachability. Nothing in your file changes, needs updating, or even needs to know the consumer’s file exists. ref_kind_compatible checks the consumer’s satisfies row resolves to a real, correctly-typed extension_point — same as any other typed reference — but that only confirms they pointed at a real contract, not that their expr is actually faithful to it; that’s the same human/test-suite judgment call every other invariant already rests on.

Two things this needs nothing new for, worth knowing so you don’t over-build it: guard’s Reference Typing admits only an invariant Constraint (or a State citation, specodelic.md Revision 12), so an extension_point row (like advisory and effect) is still excluded from gating any transition, by the same existing typing fact — don’t add a fresh “extension points can’t gate” invariant, cite the existing one (§AGENTS.md #3a). And don’t reach for single_root_reachable’s carve-out machinery either — there isn’t one, because there’s nothing to carve out.

When the consumer is an external checker (an outside test suite claiming one of your invariants), the same open/closed shape applies one level out, through the kernel.binding claim path: your Constraint row may carry a kernel.binding column, and compile extracts the cell as an opaque string into the compiled Constraints artifact — verbatim, never parsed, validated, or interpreted. The checker claims the constraint on its own side, by binding its tests through its contract-TOML flags ([[tests.cargo]]/[[tests.pytest]]/ [[tests.shell]]); specodelic never learns the checker’s language — the bridge carries the claim, it never absorbs the checker (design D4 of add-min-expr-kernel; the name is namespaced against pack binding columns). Don’t invent a registry of checker languages or a parser for binding contents — an opaque carried string is the whole contract.

2.7 An append-only event log with current state as a derived projection (event sourcing)

The format already does this to itself — append_only_variants plus supersedes mean a Revision history never overwrites a prior row, and “is this row current” is computed (superseded(x) ⟺ ∃ y. y.supersedes ∋ x), never stored as a boolean anywhere (no_boolean_columns covers it for free, per specodelic.md’s own Notes on no_stored_superseded_flag). Point that same mechanism at a domain whose whole design is an event log instead of mutable rows — an audit trail, a ledger, a CRDT-backed document history:

Don’t model “current balance” or “current document state” as a State in the Model section that gets overwritten on each event. A State that’s silently replaced on every transition, with the old value discarded, is exactly the mutable-row shape append_only_variants was built to make impossible for the format’s own tables — the same shape should be avoided in a domain being specified with it.

Do model each event kind as a §2.1 sealed Constraint (deposited, withdrawn, reversed — an append-only, exhaustively-matched set of event shapes), and current state as a Property whose predicate folds over the log rather than a State the Model stores directly:

## Constraints

| id          | kind      | expr                                                    | traces_to  |
|--------------|-----------|-------------------------------------------------------------|-------------|
| deposited     | invariant | `Deposited event has exactly field {amount: Money}`          | [[ledger]] |
| withdrawn     | invariant | `Withdrawn event has exactly field {amount: Money}`          | [[ledger]] |
| reversed      | invariant | `Reversed event has exactly field {target_event_id: EventId}` | [[ledger]] |

## Properties

| id               | kind | derives_from       | generator            | predicate                                                             |
|-------------------|------|-------------------------|----------------------|----------------------------------------------------------------------|
| balance_is_a_fold  | unit | [[ledger.deposited]]   | `arbitrary_event_log()` | `balance(log) == fold(log, 0, apply_event)` — never a field assigned to directly |

A revision, correction, or reversal is a new event appended to the log (§2.1’s constructor set grows, exactly as append_only_variants already requires), never an edit to a past event — the same discipline this repo’s own CHANGELOG.md follows for itself (“past entries are never edited — a correction gets a new entry”). Model/States is still the right place for a genuinely different concept: the processing lifecycle of one event (received → validated → applied → acknowledged) is a normal finite-state lifecycle per §2.1’s own distinction between a lifecycle and a closed value shape; it’s the ledger’s current balance that’s a fold over Constraints-typed events, not a State.

2.8 An empirical runtime bound (latency/throughput/memory SLA)

Don’t route this through the model checker. model_check.md is explicit that unbounded checking never terminates, and — the reason this case needs its own note rather than just citing that line — TLA+ verify discrete state reachability against a specified model, not wall- clock behavior against real hardware. “This state machine always responds within 50ms” isn’t a deeper version of no_counterexample, it’s a different verification method entirely (a load test, not a state-space search), and treating it as a Model-section guard would silently promise a proof no model checker here can give.

Do treat it as a threshold Property, the same mechanism Revision 5 already established for confidence-scored checks — expr/predicate are already unparsed strings, so a threshold needs no new field:

| id              | kind | derives_from          | generator                                          | predicate                                        |
|------------------|------|----------------------------|---------------------------------------------------------|-----------------------------------------------------|
| eval_latency_slo  | unit | [[reply.eval_contract]]   | `fixed_benchmark_corpus(n=10_000 evals, warm_process)` | `p99_latency(corpus) ≤ 50ms`                       |
| concurrency_ceiling_holds | unit | [[reply.resource_limits]] | `load_test(concurrent_clients=64, duration=60s)` | `no request exceeds max_concurrent_evals ⟹ queued, never dropped` |

One property genuinely different in kind from every other row in this table, worth stating so it isn’t mistaken for one: a passed acyclic_traces check is a permanent fact about a graph; a passed eval_latency_slo benchmark is a fact about this run, on this hardware, at this commit — re-running it can legitimately produce a different result with no regression having occurred, the identical “re-runnable, not a one-time verified fact” framing model_check.md already uses for its own checker output. Record the benchmark environment (hardware, OS, load level) as rationale prose beside the row rather than a structured field — per prose_untouched, the parser never reads it, but a human comparing two runs across commits needs it to know whether a changed number reflects a real regression or a different machine.

Design-time resource bounds are not this pattern and need no threshold Property at all. A configurable ceiling like REPLy’s max_message_bytes or max_eval_time_ms is a declarative fact about the contract itself (“requests over N get rejected”), not an empirical measurement — it’s an ordinary invariant Constraint with the violation case as a named terminal state (timeout, concurrency-limit-reached), no different from any other guarded transition. Reach for this section only when the claim is actually measured against a corpus or a load scenario, not merely declared as a configured limit.


2.11 Declaring what your domain adds (domain packs)

When your domain needs vocabulary the core format doesn’t have — an optional section, an extra kind value, a new outbound reference field, per-kind required case labels — declare it as a domain pack (specodelic.md Revision 14, full contract in packs.md): a four-layer spec file with kind: profile whose six manifest tables (## Sections, ## Kinds, ## References, ## Checkers, ## Floors, ## Requires) declare exactly what the pack introduces.

idkindexprtraces_touses
foo.uses.barinvariantfoo's rows may carry bar's declared vocabulary[[foo]][[bar]] [[baz]]

Three facts govern the mechanism:

  • Opt-in is advisory-first and triggered by use. A file that uses vocabulary a discovered pack declares gets that pack’s checkers run for it (advisory-first); an explicit uses column (set-valued, like traces_to) upgrades to declared enablement, which is what pinning and revision-skew checks read. Files using no pack vocabulary lint byte-identically to before.
  • The pack is discovered by corpus scan — every kind: profile file in the workspace is a candidate pack; no config file, no registry. Declared vocabulary used with no pack discovered or declared is a labeled failure finding naming the candidate pack and both remediations (enable/declare it, or fix the vocabulary).
  • Base closed sets are frozen. profile and uses are the only core growth (Revision 14); everything else a pack introduces is pack-qualified (bioimage.tolerance) so independent packs coexist instead of colliding.

3. Migrating an existing spec into specodelic

This maps most naturally from artifact-per-purpose formats (OpenSpec-style proposal.md / design.md / specs/*.md / tasks.md), but the same four questions apply no matter what you’re migrating from.

Existing artifactAskGoes to
Proposal’s “why”Can this be stated as one EARS-pattern sentence?Frontmatter statement

2.9 Declaring what must be observable (observes)

An effect Constraint says a state emits something (§2.2). It says nothing about whether anyone is supposed to be watching. If a behavior’s output is part of the contract — a metric, an event feed, a finding a consumer surfaces — say so with an observes column on the row that consumes the output, pointing back at the effect:

## Constraints

| id         | kind      | expr                        | traces_to     | observes              |
|------------|-----------|-----------------------------|---------------|-----------------------|
| eff_out    | effect    | `output == {value}`          | [[publisher]] |                       |
| watch      | invariant | `output_seen == value`       | [[publisher]] | [[publisher.eff_out]] |

observes is one-directional and cross-file: the observer’s file points at the publisher’s effect and needs no other link between the files. It is an extra outbound pointer beside traces_to — it never replaces the row’s own reachability, joins no acyclic set (mutual cross-file observation is fine), and typing allows only kind == effect targets. Every effect that nothing observes is reported as an advisory warning (linter.observability, exit 0 — never a lint failure): if the output is genuinely part of the contract, add an observer; if it was scaffolding, delete the effect. That warning is the format asking “who is this output for?” before the system ships with a firehose nobody attached a hose to.

2.10 Derived parallelism — the accumulator’s algebra licenses the architecture

Whether a batch/stream processor can run in parallel is not an assertion, it is a derivation from the accumulator’s algebra — and since Revision 13 every tier of that derivation is a machine-checkable declaration, not prose: the law row’s named cases (**name:** labels, §2.5) are enforced by linter.law_cases (the identity and associativity floor is a minimum) and compile expands one proptest block per case. The worked example at docs/src/examples/batch-resume.md carries this table end to end; its shape:

the accumulator’s algebra — each tier a named casethe architecture the law row licenses
deterministic step, replayable emissions (unit properties, §2.2’s emits)parallel map over any partition — no algebra required at all
results form a monoid (**identity:** + **associativity:**)+ chunked parallel reduce; merge in tree order
+ commutative (**commutativity:**)+ workers need no ordering; any shuffle, any reduce tree
+ idempotent merge (**idempotence:** — a semilattice)+ concurrent workers checkpoint freely; duplicates vanish
results not a monoid (running average, ordered state machine)reduce is inherently sequential — still streamable, never chunkable; say so here rather than discovering it in production

The point of doing this in the format instead of a design doc: the tiers are law rows deriving from a stated invariant (e.g. reduce_sound_iff_monoid), so a claimed tier whose case is missing fails lint before it fails in production, and the map side needs none of the algebra — only determinism (map_is_parallel_unconditional).

| Proposal’s “what”, design decisions | Is this a hard requirement, or a stated-but-non-gating design principle? | Constraints table — invariant if it must hold to pass lint/verify; advisory if it’s a design intent that should be visible but never blocks a transition (see §2.1 of specodelic.md’s Revision 5) | | A closed set of request/response/node types the design defines | Is anything actually transitioning, or is this just an enumeration of shapes? | If enumeration only → Constraints table, one row per shape (§2.1 above). If it’s genuinely a lifecycle → Model/States | | Design’s lifecycle / workflow diagram | Are these states of one thing over time? | Model — States + Transitions, each transition’s guard citing the Constraint(s) that must hold | | Tasks.md acceptance criteria, “must produce X given Y” | Is this a checkable input→output claim? | Properties table — unit kind, one row per scenario; promote to kind: law only if it’s an algebraic property (identity, associativity, or a case set from §2.5) rather than a single example | | Design’s “alternative backends” / “works with any of X” | Multiple things must satisfy the same contract, and you own every implementation | Split into one shared-Intent file + N implementation files (§2.3) | | Design’s “third parties can extend this” / a protocol, multimethod, or plugin interface | Consumers you’ll never see must satisfy a contract, and their files aren’t yours to enumerate | An extension_point Constraint in your file; each consumer’s own file points satisfies back at it (§2.6) | | Design’s “this must be observable” / a metric, event feed, or surfaced finding | Does something consume the output, or is it a firehose nobody watches? | The effect Constraint (§2.2) plus an observes column on each consuming row — unobserved effects get an advisory warning (§2.9) | | Design’s “materialized lazily” / “computed on demand” | A build phase and an execute phase are genuinely different | Two states + a guarded transition (§2.4) | | Design’s “audit trail” / “event log” / “append-only ledger” / “CRDT history” | Is “current state” actually a stored, overwritten field, or a fold over past events? | Events as a §2.1 sealed Constraint set; current state as a Property whose predicate folds the log (§2.7) | | Design’s “must handle N req/s” / “p99 under Xms” / a load-test or benchmark requirement | Is this measured against a corpus/load scenario, or just a configured ceiling on the contract? | Measured → threshold unit Property with a benchmark generator (§2.8, re-runnable, not a permanent fact). Configured ceiling → ordinary invariant Constraint with the violation as a named terminal state |

Worked micro-example — migrating an OpenSpec-style proposal fragment:

proposal.md: “Add rate limiting to the API. Requests over the limit get a 429. The limit is configurable but defaults to 100/min. This is a stopgap; we’d like adaptive limiting eventually but that’s out of scope.”

Maps to:

---
id: api.rate_limit
kind: intent
statement: "WHEN a client exceeds the configured request rate, THE API
  SHALL respond 429 for further requests until the window resets."
---

## Constraints

| id                 | kind      | expr                                          | traces_to           |
|---------------------|-----------|------------------------------------------------|-----------------------|
| limit_enforced       | invariant | `requests_in_window > limit ⟹ response == 429`  | [[api.rate_limit]]  |
| default_limit        | invariant | `default(limit) == 100 per minute`              | [[api.rate_limit]]  |
| adaptive_limiting     | advisory  | `limit could vary with observed load`           | [[api.rate_limit]]  |
| rate_traces_resolve  | invariant | `**kernel:** resolves(traces_to)`               | [[api.rate_limit]]  |
| exceed_guard_reaches | invariant | `**kernel:** reachable(api.rate_limit.exceed, api.rate_limit.limit_enforced, guard)` | [[api.rate_limit]]  |

## Model

### States
- `open`
- `limited`

### Transitions

| id     | from    | to       | guard                              |
|--------|---------|----------|------------------------------------|
| exceed | open    | limited  | [[api.rate_limit.limit_enforced]]  |
| reset  | limited | open     | `the rate window resets`           |

## Properties

| id               | kind | derives_from                        | generator             | predicate                            |
|-------------------|------|-------------------------------------|------------------------|---------------------------------------|
| over_limit_is_429 | unit | [[api.rate_limit.limit_enforced]]   | `arbitrary_request()`  | `response == 429`                     |
| default_is_100    | unit | [[api.rate_limit.default_limit]]    | `arbitrary_config()`   | `default(limit) == 100 per minute`    |
| adaptive_is_advisory | unit | [[api.rate_limit.adaptive_limiting]] | `arbitrary_config()` | `varying(limit) never blocks a response` |
| rate_traces_resolve_prop | unit | [[api.rate_limit.rate_traces_resolve]] | `arbitrary_request()` | `every constraint trace resolves` |
| exceed_guard_reaches_prop | unit | [[api.rate_limit.exceed_guard_reaches]] | `arbitrary_request()` | `the exceed transition's guard reaches the enforced limit` |

The two **kernel:** rows are this example’s executable slice, the same shape the quick-start shows: resolves(traces_to) and reachable(…, guard) evaluate over the file’s own rows and references (the min-expr kernel, add-min-expr-kernel), and spk model-check reports each one’s status in its run report — the domain-data cells above them stay informal strings per §4.

The “stopgap… adaptive eventually” aside becomes the advisory row — recorded, traceable, and non-gating by typing rather than left as a sentence a linter can’t see. Nothing about it can ever end up in a guard field (specodelic.md’s Reference Typing table forbids it), so it can never accidentally become a hard requirement by a later transition citing it.


4. What not to force in

  • Don’t invent a table for something already covered. Before adding anything, check whether it’s actually one of §2’s patterns first — most things that look like a missing feature turn out to be an existing one aimed at the wrong section. (Left uncounted deliberately here, after this being stale once already — see CHANGELOG.md #28 — check §2’s own headings for the current count rather than trusting a number restated in prose.)
  • expr/generator/predicate stay informal strings. Formalizing a categorical law so a machine can execute it (rather than a human read it) is a theorem-proving project, not a specodelic extension — see specodelic.md Revision 6’s closing note. Write the law clearly in prose-math; don’t try to make the schema parse it. The one opt-in is the **kernel:** marker shown in the quick start above: a data-structural fact inside the min-expr kernel’s closed atomic grammar becomes an executable claim over the file’s own rows and references — that is not a widening of what a law cell can express, so prose-math stays prose.
  • The model checker is bounded. model_check.md is explicit that unbounded checking never terminates. A Model section is for a finite-state lifecycle (a reducer’s phases, a request’s lifecycle) — it is not how you verify a property over an unboundedly deep recursive structure (an arbitrarily nested expression tree, an arbitrarily long pipe chain). That belongs in the Properties table instead, as a law or unit property with a generator that samples arbitrary depth/length — PBT doesn’t need to terminate exhaustively the way model checking does.
  • If a domain still doesn’t fit after checking §2, that’s a real gap — fold it back into specodelic.md as a new Revision the same session, per AGENTS.md, rather than working around it locally in one file.

specodelic — Status & Plan

Read this file first, on its own, with no other context. It is written to be self-sufficient: a reader who has never seen the conversation that produced this project should be able to understand what it is, what exists, and what to do next from this document alone.


1. What this project is

specodelic is the project: a Rust CLI (spk) for a markdown-based specification format for software features (and a corpus of specs, written in that format, that specify the CLI itself — see USAGE.md §0 for this project/format/tool/subject distinction), designed so that one file gives you four things at once:

  1. Something a human can read — plain prose intent, EARS-style requirement statements, ordinary markdown.
  2. Something a machine can lint — because every structured field lives in YAML frontmatter or a markdown table with a fixed column schema, not free text.
  3. Something you can refactor automatically — every id that’s defined appears once, in a table cell; every place that id is used appears as a [[wiki-link]]. A rename tool changes the definition and find/replaces every link — safely, because links and definitions are syntactically distinguishable.
  4. Something you can simulate before writing code — the Model section of a spec is a state machine (states + guarded transitions) that compiles to TLA+, so a model checker backend (stateright by default, TLC opt-in — see model_check.md) can find deadlocks, unreachable states, or violated invariants before any implementation exists. The same guards compile to property-based test (proptest!-style) generators, so verification and PBT come from the same source data instead of being written twice.

The four layers, present in every spec file

LayerWhere it lives in the filePurpose
IntentYAML frontmatter (id, kind, statement) + opening proseHuman-readable purpose; statement must match one of the 5 EARS patterns
ConstraintsA ## Constraints table: id | kind | expr | traces_toInvariants, formalized enough to check, each tracing to an Intent
Model## Model — ### States (a list) and ### Transitions (a table: id | from | to | guard)A finite state machine; guards reference Constraints by file-qualified [[wiki-link]] ([[<file-id>.<row-id>]] — bare ids do not resolve)
PropertiesA ## Properties table: id | kind | derives_from | generator | predicatePBT-style checks, one kind = "law" variant that requires associativity/identity cases

The core design decisions and why

  • One feature = one markdown file. Keeps the reference graph acyclic-by-construction at the file level and matches this ecosystem’s existing convention (one tool = one repo).
  • [[wiki-link]] references, not prose references. This is what makes rename-refactoring mechanical: find every [[old_id]], replace with [[new_id]], done. No natural-language matching required.
  • Frontmatter + tables only are parsed; prose is never inspected. The linter must never branch on the content of a rationale or free-text paragraph — only on structured fields. This keeps linting deterministic and keeps the format from trying to formalize writing quality (a separate, already-solved problem — see §2).
  • Data-oriented, Clojure-flavored bias. Every section is the same underlying shape (rows of a map with an id and a kind column), differentiated by kind rather than by bespoke per-section parsers — one generic table-extractor and one reference-resolver serve every section. Ids are namespaced keys (order.cancel.refund_bounded), not nominal types. This is a deliberate echo of clojure.spec: validate plain data with predicates, don’t model concepts as class hierarchies.
  • Extension is append-only. New cases are added as new table rows, never edited into an existing match/switch-shaped structure. This is what makes certain code-smell categories impossible to write, not just linted against (see §2).

The formal guarantees, in plain terms

  • The five kinds are a fixed schema: every row in every spec file is one of exactly Intent, Constraint, State, Transition, Property.
  • The reference fields (traces_to, derives_from, guard, from/to, supersedes, emits) are typed foreign keys — each must point at a specific kind of row, never any kind (see the Reference Typing table in specodelic.md).
  • One spec file is a document conforming to that schema — the same relationship a JSON file has to its JSON Schema.
  • Linting = schema validation + referential integrity + coverage: no dangling reference, and every constraint has a matching test.
  • Refactoring = safe rename: renaming an id updates its definition and every reference to it, with a guarantee that nothing breaks — the same guarantee an IDE’s “rename symbol” gives for source code.
  • Cross-file ids are qualified names: order.cancel.refund_bounded is file.local_id, the same idea as a qualified name in any module system.

None of this needs anything beyond the above to use the format. It has a precise mathematical restatement (categories, functors, natural transformations, the Grothendieck construction) so the guarantees above are provable facts rather than ad hoc prose rules — that restatement lives in full, exactly once, in theory.md; every other file, including this one, links there instead of repeating it.


2. Where this came from: the diagnostician mapping

The format’s specific irrepresentability rules were derived by taking a public list of code-smell “diagnosticians” (invalid-states, composability, modularity, rigidity, mutability, error-handling, specification-evaluation, testability-implementability) and asking, for each: can the pathology this flags be made ungrammatical in the schema, rather than merely lint-flagged after the fact? Concretely:

PathologyMade irrepresentable by
Boolean blindness / ad-hoc state machinesNo boolean column type exists; states must be named variants
Unconstrained optionalityguard is a required, non-empty field on every transition
Switch/case rigidity (OCP violation, within one file’s own governed set)Extension points are open, append-only tables — a new case is an insert, not an edit
Switch/case rigidity (OCP violation, across files — a consumer extends your interface without ever editing it)An extension_point-kind Constraint publishes the contract; a consumer’s own file points satisfies back at it (specodelic.md Revision 7, USAGE.md §2.6) — a different mechanism from the row above, not a restatement of it
Side-effect entanglementGuards (pure) and actions (effectful) are syntactically distinct row kinds; actions can’t appear inside a guard expression
Flattened generic errorsFailure constraints must be a tagged variant, not a free-text error string
Missing algebraic lawsA kind = "law" property requires associativity/identity cases as a schema-level requirement, not a suggestion
God object / cyclic dependencyOne file = one feature id; the traces_to/derives_from graph must be a DAG (checked)

One diagnostician category — weak phrases, passive voice, vague temporals in prose (testability-implementability-evaluator) — was explicitly kept out of scope. That’s a prose-quality judgment, and the format’s own rule is that prose is never parsed. It’s a separate tool that should run on the compiled statement field, not something this schema should try to absorb.


3. Inventory — what exists right now

All files are markdown, in specodelic’s own format, describing specodelic and its linter using themselves (a self-hosting spec, the same way a self-hosting compiler compiles its own source). Location: since the single-tree migration (Changelog #130, specodelic-jf1) each corpus file below lives at openspec/specs/<dir>/spec.md (specodelic.md → openspec/specs/specodelic/spec.md, linter-coverage.md → openspec/specs/linter-coverage/spec.md, …); USAGE.md, STATUS.md, theory.md and CHANGELOG.md live at openspec/.

FileKind / idDescribesStatus
specodelic.mdspecodelicThe format itself: its own constraints, its own lifecycle (draft → parsed → linted → compiled → model_checked → verified), the Reference Typing table, the Checker Ownership tableDone — Revision 14 (frontmatter kind set now {intent, profile}, uses reference field — the domain-pack mechanism, see packs.md)
kinds.mdkindsCanonical field set and closed kind-column value set for each of 𝒦’s five objects (Intent, Constraint, State, Transition, Property)Done — Revision 4
USAGE.md—How to point the four layers at a real domain: quick-start, pattern catalog (sealed enumerations, Moore output, multi-implementation conformance, staged/lazy evaluation, extended law cases, consumer-extended contracts, event-sourced logs, empirical runtime bounds), and a migration guide from artifact-per-purpose formats (e.g. OpenSpec)Living document
theory.md—Every category-theoretic claim in this repo, stated once, each paired with a plain-language restatement; every other file links here instead of restating the math locallyDone (Changelog #24)
graph.mdgraphMechanically derived, queryable reference graph over every typed edge in the repo — blast-radius (transitive closure) queries, never re-derived by other tools independentlyDone (Changelog #25)
refactor.mdrefactorNon-gating tidy-first advisor: flags a node with high, unrelated fan-in (or a changeset touching only part of a node) as a split candidate, via graph.md queriesDone (Changelog #25)
merge.mdmergeSemantic conflict detection across two divergent branches (id collisions, rename-vs-new-reference splits) that a textual git merge can’t see, via graph.md and rename.mdDone (Changelog #25)
compile.mdcompileThe Compile functor: Constraints → TOML, Model → TLA+, Properties → proptest!, plus totality/id-preservation/round-trip guaranteesDone
model_check.mdmodel_checkWhat actually running the model checker means: bounded, re-runnable, minimal-counterexample reporting, backend-pluggable (stateright default, TLC opt-in); clarifies model_checked vs no_counterexample; claim-gated aggregation (required/unchecked classification, verdict priority, versioned scope-bound report, dual-format command isolation)Done
verify.mdverifyExecutes compile.md’s proptest! blocks and combines the result with model_check.md’s clean/counterexample outcome into specodelic.md’s verified gate; required claims must all verify, evidence is scope-bound and recomputed, and all report views agree on blockersDone
rename.mdrenameThe rename/refactor tool itself: a single (old_id, new_id) request’s own lifecycle (validate → apply → verify), and the local invariants (id-availability, filename-matching, atomicity, kind-preservation, prose non-interference) that make rename_naturality a law of an actual processDone
linter-external_completeness.mdlinter.external_completenessOptional, per-repo check that every item in a declared external checklist has an explicit covered/waived mapping to a real constraint or property, or a stated rationale — mechanizes “nothing was silently unconsulted,” not “the repo is complete”Done
orchestrate.mdorchestrateThe top-level orchestrator: drives parsed → verified in stage order, gating each stage on the prior stage’s exact specodelic.md guard, skipping dependents of a failed checker while independent branches keep runningDone
packs.mdpacksThe first-class domain-pack mechanism (Revision 14): kind: profile pack artifact with six manifest tables, corpus-scan discovery, advisory-first opt-in, uses edges, lifecycle + revision-skew advisories, honest-empty checkingDone — implemented (src/packs.rs; linter.pack_shape / orphan_vocabulary / skew_advisory)
../packs/data-lineage.mddata.lineageThe first standard pack (artifact, not a spec-of-record): typed ## Data section, data.dataset/data.artifact/data.environment kinds, produced_by/consumed_by lineage fields, data.lineage.closure checker (honest-empty), data.artifact provenance floor, opaque binding (bridge-never-absorb)Done — shipped (add-data-lineage-pack; the bioimage pilot consumes it via uses)
../packs/numeric-predicates.mdnumeric.predicatesThe second standard pack (artifact): typed ## Quantities section, numeric.quantity/numeric.bound/numeric.tolerance kinds, measured_by outbound-leaf field, tolerance case-label floor (bound, against), opaque unit/domain (bridge-never-absorb); vocabulary prose-safe (no bare-English tokens)Done — shipped (add-numeric-predicates-pack; the bioimage pilot consumes it via uses)
linter-frontmatter.mdlinter.frontmatterFirst gate: frontmatter has id/kind/statement, id matches filenameDone
linter-referential_integrity.mdlinter.referential_integrityNo duplicate ids, no dangling [[refs]], refs point at a kind-compatible targetDone
linter-graph_shape.mdlinter.graph_shapetraces_to/derives_from graph is a DAG, every row reachable from its own file’s IntentDone
linter-model_shape.mdlinter.model_shapeEvery transition has a guard, states/transitions reference each other validly, no boolean columns in the modelDone
linter-ears_syntax.mdlinter.ears_syntaxstatement matches an EARS pattern; ids don’t encode two capabilities or universal quantifiersDone
linter-schema_shape.mdlinter.schema_shapeVariant tables only grow across revisions; the parser never branches on prose contentDone
linter-coverage.mdlinter.coverageEvery constraint has a deriving property; every law has its required casesDone
linter-observability.mdlinter.observabilityEvery effect Constraint is the target of ≥1 observes reference from a different row; unobserved effects are warned (advisory, exit 0 — never gating in Revision 1); derives external boundaries from published extension_point contractsDone
errors.mderrorsThe cross-cutting error contract: error-kind envelopes with ok:false, the 0/1/2 exit-code mapping, one file-id-namespaced labeled error per failing stage with a remediation hint — published as extension_point rows every tool file points satisfies at; every failure terminal emits a labeled, falsifiable error Constraint. Enforcement routed three-tiered: existing checkers today, linter-failure_shape when implemented, pipeline fixtures for runtime rowsDone (Changelog #66–#67)
linter-failure_shape.mdlinter.failure_shapeThe error contract’s tier-2 checker: mute failure terminals, per-file error-label collisions, and typed-negation guard totals against the recorded carve-out list — all graph-decidable; spec-only (no Checker Ownership row until implemented, design D6)Spec-only; implementation ticket filed
CHANGELOG.md—Append-only, chronological record of what changed, across all filesLiving document
AGENTS.md—Standing operating instructions for any agent working in this repoLiving document
STATUS.md (this file)—Status, plan, and self-contained primerLiving document

Every checker file in specodelic.md’s Checker Ownership table now exists. linted (the join point of all six leaf checkers) and compile’s gate (linter.coverage) are both fully specified end to end.

The corpus lints clean. As of CHANGELOG #30 every constraint in the corpus has a deriving property: spk lint specs reports 18 files, zero findings, exit 0 — the tool enforces its own description of itself without exemptions.

Lint findings are self-describing, and the format guide is embedded. Every finding carries a stable linter.<name> rule_id and a one-line rule_semantics (from the same src/lint.rs rule table the linter emits from), so an agent can read a violation without repo access; spk explain serves the embedded primer (spk explain lint-rules renders that same catalog), and --version --json reports format_revision (specodelic.md Revision 8) so a consumer can detect corpus drift against their installed binary.

Revision log for specodelic.md

  • Revision 1: initial constraint/model/property list, written before any checker was decomposed.
  • Revision 2: folded in four gaps that decomposing the checkers into separate files surfaced by inspection (not by any mechanism yet — see the open problem in §4, P2): id_matches_file, ref_kind_compatible (with an explicit Reference Typing table), single_root_reachable, and the every_state_used/every_transition_valid pair. Also replaced the flat seven-clause lint guard with a reference to the Checker Ownership table, since the flat conjunction was itself an instance of the God-transition / God-object pathology from §2, just written in a guard field instead of a class.
  • Revision 3: a Rule-of-5 review (rule-of-5-universal) of the full corpus found id_matches_file was CRITICAL-broken — its hyphen→dot reversal wasn’t a well-defined function, since hyphens were also standing in for underscores within a segment, and applying the rule literally would have made the linter reject 5 of its own 7 checker files. Fixed by reserving - for the namespace dot only and preserving _ literally in filenames. Five files were renamed as part of this fix (see the corrected inventory table below). Also corrected two documentation-drift bugs the same review found: a miscounted claim in linter-coverage.md (“seven checker files” — the Checker Ownership table had six then, and coverage wasn’t a row in it; the table has eight gating rows today — see §1’s reading order), and stale “not yet written” notes in specodelic.md left over from before linter-schema_shape.md and linter-coverage.md existed.
  • Revision 4: writing kinds.md surfaced that a Constraint/Property row’s own kind column had no closed set anywhere. Added constraint_kind_closed and property_kind_closed, both enforced by linter-schema_shape.md the same session.
  • Revision 5: checked against ten features from an unrelated polyglot tool ecosystem. Seven needed no schema change (non-gating signals, confidence-scored properties, feedback loops, cross-language adapter contracts — see specodelic.md’s own Revision 5 for the reasoning on each). Two did: advisory added to Constraint.kind (non-gating by typing, since guard narrows to kind == invariant only), and supersedes added as a self-typed Reference Typing field so a row can declare what it replaces, checked as its own acyclic graph independent of traces_to/derives_from.
  • Revision 6: checked against a second unrelated domain (a lazy, category-theoretic data library). Most of what looked missing was an existing pattern aimed at the wrong section — now written up on its own in USAGE.md rather than repeated per-checker. One real addition: emits, an optional field on State (Reference Typing: State → Constraint, kind == effect), giving a Model the output half of a Moore machine that had nowhere to live before. One simplification: append_only_variants, kind_field_extensible, and reference_field_extensible — the same “grows only, only via Revision” rule, discovered three times with wordings that had already drifted out of sync — collapsed into one statement of append_only_variants covering all three id-sets it governs. One latent wording bug fixed in linter-referential_integrity.md: ref_kind_compatible’s expr named three reference fields by hand and had already gone stale (missing supersedes); reworded to read the Reference Typing table generically, matching what the implementation was already doing.
  • Revision 14: the extension mechanism became first-class — domain packs. frontmatter_valid’s kind set grows {intent} → {intent, profile} (a profile frontmatter marks a pack file) and the Reference Typing table gains uses (Constraint, any file → Intent of a kind: profile file, set-valued, outbound leaf). The full pack contract lives in packs.md; base closed sets freeze by policy from this Revision on — pack vocabulary is per-pack, never global.
  • Revision 17: the min-expr kernel (add-min-expr-kernel) — the decidable bounded fragment over the finite instances becomes format vocabulary: the kernel: marker opt-in under a closed atomic set, three-valued never-coerced evaluation, guard-citation evaluation (fragment_guard_rejected stands), and the opaque kernel.binding bridge. Normative rows live in compile.md (kernel_expr_opt_in, kernel_binding_opaque); this file’s own migrated kernel rows (total_refs, coverage, every_transition_valid, supersedes_acyclic) are the corpus’s executable slice. (Revisions 15–16 — executable predicate fragments and the closed fragment-tag grammar — live in compile.md and the changelog; their rows changed no id-set here.)
  • Revision 21: a law-kind Property row may carry one executable body per named case — the case key **name::** followed by the fragment marker in fragment position (**identity::** `**rust:** v0.len() >= 1` ). The body is emitted verbatim as that case’s block body; a case with no body keeps the todo_predicate! placeholder. The **name:** labels stay the enumeration of record (a body never adds a case), the closed tag set, the fragment-position rule and the hygiene list are unchanged, and one shared parser (law.rs) backs both the linter’s law_cases rule and the compiler’s block expansion. Normative rows live in compile.md (fragment_law_rejected, fragment_language_closed, predicate_fragment_opt_in, properties_to_proptest); this file’s own law_requires_cases row gains the body arm (no id-set change).

4. What’s NOT specced yet — prioritized

Ordered by dependency (earlier items block later ones) and by how structurally central the gap is, not just by when it was noticed.

Done — the compile/verify pipeline

Compile, model_check, and verify — specodelic.md’s linted → compiled → model_checked → verified lifecycle — are now fully specified: compile.md (the Set^𝒦 → TOML/TLA+/proptest! functor), model_check.md (what running the checker against compile.md’s output means, and the model_checked vs. no_counterexample distinction — CLAR-003), and verify.md (executing compile.md’s proptest! blocks and combining that with model_check.md’s outcome into one gate). The verified verdict is now REACHABLE, not merely honest: specodelic.md Revision 15 (specodelic-rjb, 2026-10-03) adds executable predicate fragments — the **rust:** opt-in marker whose fragment compiles verbatim into the proptest artifact and executes as a scratch-crate BFS invariant — so a file whose predicate and invariant fragments pass verifies for real; files without fragments behave exactly as before (honest exploration_only / properties_failed).

Verification claims (2026-10, define-verification-claim-gates): every opted-in invariant claim — executable **rust:** fragments, kernel expressions, and whole-cell citations — must be verified before a file verifies; prose-only invariants stay explicitly unchecked, claim reports are versioned and bound to the structured corpus scope, and the JSON, human, and persisted report views name the same blockers and counts. The assurance semantics — what a verified verdict does and does not imply — are stated once in the repo’s README (“Verification is not application testing”); this file does not restate them.

Done — the rename/refactor tool

rename_naturality appeared as a property in three different files (specodelic.md, linter-referential_integrity.md, linter-graph_shape.md’s topo_sort_naturality) before the tool itself — its own Intent, states, constraints, and properties — was written up as a feature in its own right. rename.md now specifies it: a single (old_id, new_id) request’s own lifecycle, ending in a verify step that re-runs linter.referential_integrity and linter.graph_shape before reporting passed. One Needs Human Review item opened there: whether a batch (whole-namespace) rename is one atomic transaction or n independent ones — not decided yet.

Done — external completeness checking

linter-external_completeness.md closes this. It doesn’t make internal consistency into completeness — that gap is irreducible from inside the framework, and the file’s own Notes say so plainly. What it mechanizes instead: given a declared external checklist, every item must carry an explicit human claim — covered (mapped to a real constraint/property id) or waived (with a stated rationale) — so the checklist can never be silently unconsulted, even though whether a given mapping is semantically correct stays outside what any checker here can verify. It’s optional per repo and doesn’t gate linted/compiled/verified; see its Notes for why. The manifest format was decided (mp1 row 10, 2026-09-29): a checklist is a dedicated *.checklist.md artifact OUTSIDE 𝒦 — flat ## Items list plus a ## Mapping table with exactly item/status/mapped_ids/rationale columns; presence of the file declares the checklist. All five linter.external_completeness rules are implemented (specodelic-b15); mapping_naturality is enforced by the rename tool (specodelic-4d5): spk rename rewrites every checklist’s mapped_ids cells (bare and [[…]] spellings alike) and its verify gate re-runs covered_maps_resolve over the post-rename corpus — a missed cell is rejected before any byte is written, never a silent dangle.

Done — orchestration

orchestrate.md closes this. A top-level idle → lint_stage → compile_stage → model_check_stage → verify_stage → succeeded/failed driver that calls the six Checker Ownership checkers in dependency order (skipping a checker’s dependents, not failing them, when a dependency fails; letting independent branches run and report regardless of each other), then linter.coverage, compile.md, model_check.md, and verify.md in sequence, gating each stage transition on the exact guard specodelic.md already specifies for it — never a looser or stricter check invented at the orchestration layer. linter.external_completeness runs when a checklist is declared but never gates any stage. Explicitly out of scope: driving rename — that stays a separate, on-demand operation a pipeline run never triggers implicitly. One Needs Human Review item opened: whether the orchestrator should also own each file’s own draft → parsed transition, or stay scoped to parsed → verified as specified.

Every item this section had prioritized (the old P0 through P2) is now specced. What’s left below are the lower-severity, already-flagged loose ends — none block each other or anything above.

Done — the reference graph, tidy-first advisor, and merge check

Three files, building on each other: graph.md turns the cross-file reference graph into a derived, queryable artifact instead of something only reconstructible by hand; refactor.md uses it to flag a node with high, unrelated fan-in as a tidy-first split candidate, always non-gating (kind == effect, already excluded from every guard by specodelic.md’s existing typing — no new “never gates” invariant was needed, see orchestrate.md’s Notes); merge.md uses it to catch what a textual git merge can’t see — id collisions and a rename left dangling by a reference minted on a different branch — before reporting a merge complete. Three Needs Human Review items opened; two resolved 2026-09-30:

  • graph.md: whether linter-referential_integrity.md and linter-graph_shape.md should be refactored to query this artifact internally instead of independently re-deriving reachability.
  • refactor.md: RESOLVED (HITL specodelic-mp1 row 3): unrelated fan-in keys off the id namespace (“shares no namespace segment below root” stands as written); physical directory placement rejected.
  • merge.md: RESOLVED (HITL specodelic-mp1 row 2): “a human has explicitly approved” means an explicit, attributable, recorded operator decision — mechanism-agnostic floor, no gate or role assumed. See merge.md’s decision-of-record Notes paragraph.

Deferred follow-ups of the language-neutral property binding (Rev 16)

The tag-widening change landed the closed set {rust, py, ts} with **rust:** as the only executable tag; two follow-ups are deferred of record and must land as their own changes when picked up:

  • add-py-fragment-emission (and its add-ts-fragment-emission sibling) — the per-language emitters behind PropertiesRunner. The change that lands a first emitter MUST land the generator-vocabulary decision (design D5: language-neutral core vocabulary + per-project domain generators) in the same change, not before and not after. Until then every compiled strategy stays Just(const) — vacuous properties_pass once lf3 wires verify green (see openspec/research/2026-10-04-generator-coverage-gap/synthesis.md).
  • specodelic-lf3 — wire spk verify specs into just ci after the corpus migrates todo_predicate! stubs to executable fragments.

One acknowledged loose end inside an existing file — RESOLVED

linter-schema_shape.md’s no_prose_field_parsed was flagged as not fitting the generator/predicate shape (“verified by code audit, not by a runnable PBT case”). Decided of record 2026-09-30 (HITL ticket specodelic-mp1 row 5): the claim is mechanically testable by a planted-prose differential parse, so it will be rewritten as a runnable unit property (lands with specodelic-cxq) and no audit kind is added — kinds.md Revision 6 records the dissolution; kind ∈ {unit, law} stays closed.

One guideline, three instances (not three unrelated items)

CLAR-001, CLAR-002, and CLAR-003 were originally filed separately; they’re the same class of problem — two names sharing a token differ in what they actually guarantee, without a disambiguating rename — now stated once as a standing guideline in AGENTS.md #6. Listed together rather than under three headings, since fixing one likely wants the same disambiguating-rename treatment applied to all three in one Revision:

  • CLAR-001: the constraint id coverage (in specodelic.md) and the checker id linter.coverage (a whole file) are easy to conflate on a skim — plausibly what caused the “seven checker files” miscount that Revision 3 fixed. Consider renaming the constraint to constraint_coverage.
  • CLAR-002: “kind” is overloaded — 𝒦’s five objects (Intent, Constraint, State, Transition, Property) vs. the kind column that Constraint rows (invariant) and Property rows (unit/law) each separately carry. Not resolved yet: the fix is a column rename and should go through rename_naturality rather than be done by hand.
  • CLAR-003: specodelic.md’s lifecycle state model_checked sounds like “the model was checked and holds,” but its guard (model_present) only confirms a Model section exists; whether a run happened and found a counterexample are separate facts (model_check.checker_invoked, specodelic.no_counterexample), already spelled out in model_check.md’s Notes but not fixed by renaming the state.
  • EXCL-001: a related but distinct shape (a missing kind, not a confusable name) — RESOLVED by dissolution 2026-09-30 (specodelic-mp1 row 5): no audit kind; the single motivating claim becomes a runnable unit property instead. See kinds.md Revision 6 and the “One acknowledged loose end” section above.

5. How to resume this in a fresh session

  1. Read AGENTS.md first — standing rules that apply regardless of which task you’re picking up.
  2. Read specodelic.md in full — it is the root of everything else.
  3. Read kinds.md — the canonical definition of the five objects every other file in this repo instantiates. 3a. Read USAGE.md if the task ahead is writing a spec for a piece of software rather than another checker file — it has the pattern catalog (worked out against a real external domain) for the cases that don’t obviously fit the four-layer shape at first glance.
  4. Read compile.md, model_check.md, and verify.md — together they specify specodelic.md’s whole linted → compiled → model_checked → verified lifecycle.
  5. Skim CHANGELOG.md for the chronological “what happened and why,” if the reasoning behind a past decision isn’t clear from the file itself.
  6. Read the eight gating checker files (the Checker Ownership table’s rows) in ownership order: frontmatter → referential_integrity → graph_shape → model_shape → failure_shape, plus the parallel branches ears_syntax and schema_shape (not sequential continuations), and the join leaf coverage (step 7 reads it with the tooling it feeds).
  7. Read linter-coverage.md, then rename.md, linter-external_completeness.md, and orchestrate.md — the tooling layer built on top of the checker files, in that order (each depends on facts the ones before it establish).
  8. Every item §4 once prioritized (compile/verify pipeline, rename, external completeness, orchestration) is now specced. Pick the next thing to work on from the lower-severity loose ends below (CLAR-001 through CLAR-003, EXCL-001, the acknowledged no_prose_field_parsed shape mismatch, or either file’s own Needs Human Review notes) unless the person names something else.
  9. When writing a new spec file, follow the same self-check every prior file used: does every constraint trace to an intent, does every property derive from a constraint, does the model’s guard set match what linter-model_shape.md requires? For a domain spec specifically, also check USAGE.md §2 before concluding something doesn’t fit — most things that look unsupported are an existing pattern aimed at the wrong section. If a new file surfaces a genuine gap in specodelic.md itself, fold it back in as a new Revision, the way Revision 2 did, rather than letting gaps accumulate unaddressed across files.

Theory

Not a spec file — no frontmatter, exempt from the four-layer shape, same category as AGENTS.md/STATUS.md/USAGE.md/CHANGELOG.md. This is where every category-theoretic claim in this repo lives, in full, exactly once. Every other file states its guarantees in plain terms and links here for the rigorous version, rather than restating or paraphrasing the math — paraphrase drift is exactly how append_only_variants, kind_field_extensible, and reference_field_extensible ended up as the same rule stated three slightly different ways (specodelic.md Revision 6). One home for the theory prevents that happening to this vocabulary too.

Links into this file use single-bracket markdown links ([naturality](theory.md#naturality-safe-rename)), never [[double-bracket]] wiki-links — this file carries no frontmatter kind, so it is not a valid target for any typed reference field, and a future linter resolving [[...]] against real 𝒦-typed rows would treat a link here as dangling. Links to this file only ever appear in prose (Notes, rationale), never in a structured field (expr, guard, predicate), consistent with prose_untouched.


Schema (𝒦)

Plain: A fixed, closed set of five record types — Intent, Constraint, State, Transition, Property — the only kinds of thing a spec file’s rows can be. Rigorous: 𝒦 is a small fixed category whose objects are exactly these five kinds. Nothing else in this repo needs the categorical statement; every other file can just say “one of the five kinds” or “the schema.”

Typed foreign keys (generating morphisms)

Plain: Every reference field (traces_to, derives_from, guard, from/to, supersedes, emits) is a foreign key that must point at a specific kind of row, never any kind — the same shape as a database foreign key with a CHECK constraint on the target table. Rigorous: These fields are 𝒦’s generating morphisms, each with a fixed source/target typing. The Reference Typing table in specodelic.md is that typing written out explicitly; ref_kind_compatible is the invariant that enforces it.

Document instance (functor and copresheaf)

Plain: One spec file is one document that conforms to the schema — the same relationship a JSON file has to its JSON Schema, or a row has to a table definition. Rigorous: A spec file is a functor I : 𝒦 → Set (a copresheaf) — it assigns a set of ids to each kind and a real function to each reference field.

Well-formedness (linting)

Plain: Linting is schema validation plus referential integrity (no dangling foreign key) plus a coverage rule (every Constraint has a matching Property) — nothing more exotic than what any strict schema validator already does. Rigorous: Linting checks that the functor I is well-formed: no dangling reference means every generating morphism’s image is total; “every constraint has a test” means a particular morphism is surjective.

Naturality (safe rename)

Plain: Renaming an id updates its definition and every place it’s referenced, with a guarantee that nothing breaks — the same guarantee an IDE’s “rename symbol” gives you, just for markdown tables instead of source code. Rigorous: A rename is a natural transformation η : I ⇒ I' between two functor instances; naturality is the commuting square that formally states the rename didn’t silently break a reference. See rename_naturality (specodelic.md) and rename.md.

Namespacing (Grothendieck construction)

Plain: A cross-file id like order.cancel.refund_bounded is just a qualified name — file.local_id — the same idea as a qualified name in any module system (package.Class.method). Rigorous: Cross-file ids form a Grothendieck construction: the dotted id is a point in the total space ∫I over the indexing category of feature files; the short local id used inside one file is its fiber coordinate.

Interface-contract tests (algebraic laws)

Plain: Some properties aren’t a single example — they’re a contract: if you claim your operation is a “law” of a certain shape, a fixed list of test cases becomes mandatory (the same way implementing Comparable obligates you to test reflexivity and transitivity, not just one comparison). Rigorous: A kind: law Property is a claimed algebraic law. law_requires_cases sets the floor (identity, associativity); a specific law (an adjunction, a functor) may require further named cases (unit, counit, naturality, triangle identity) listed in its own predicate. See USAGE.md §2.5 for the worked example and case names.

State with output (Moore machine)

Plain: A state that not only transitions but also hands back a value — the same idea as a reducer function returning (newState, output) instead of just newState. Rigorous: A state’s optional emits field gives the state machine the output-function half of a Moore machine (states, transitions, and a function from state to output). emits must resolve to a Constraint with kind == effect (see the Reference Typing table).

Limit over a dependency diagram (independent checks joined)

Plain: When several independent checks must all pass before you can move on, and some depend on others finishing first, that’s just a dependency graph with a single “all done” gate at the end — the same shape as a build system’s DAG of tasks. Rigorous: linted is a limit over the Checker Ownership dependency diagram — the product of all eight gating checkers’ passed states, subject to the arrows between them; lint fires only when every terminal node reports passed, not on a fixed sequence.

Additive-only evolution

Plain: An enum, a variant list, or a set of allowed reference-field targets can only gain new members over time — nothing is ever removed, renamed in place, or silently redefined. Same discipline as protobuf/Avro schema evolution rules (“never remove a field, never renumber”). Rigorous: append_only_variants states this once, generally, for any id-set governed by 𝒦: it grows only under a new Revision heading, never silently, and a narrowing is permitted only in the same Revision that introduces the split it depends on, and only if it invalidates nothing previously valid.

Affected graph (transitive closure / blast radius)

Plain: Everything upstream or downstream of a proposed change, found by walking the reference graph — the same thing a monorepo build tool means by “affected targets” (Bazel’s rdeps(), Nx’s affected-graph). Rigorous: The forward and backward transitive closure of edges reachable from a node, computed within the free category generated by 𝒦’s typed morphisms. See graph.md’s blast_radius_is_transitive_closure.

Confluence (merging two divergent rewrites)

Plain: When two people each make a valid, independent edit starting from the same file, and those edits need to be combined into one result that’s still valid — not just “the text merges cleanly,” but “the rules the file must obey still hold after combining them.” A rename on one side and a brand-new reference to the old name on the other is the case that looks fine textually and isn’t. Rigorous: Two divergent instances I_A, I_B derived from a common I by independent rewrites are a critical pair if their rewrites don’t commute; the merge is a pushout of I_A and I_B over I, and confluence is the property that this pushout is itself a well-formed instance of 𝒦, resolving the critical pair rather than producing a broken result. See merge.md’s rename_replayed_onto_foreign_edits.

Plain term (use everywhere else)Rigorous term (defined above)
schema / the five kinds𝒦
typed foreign keygenerating morphism
document instancefunctor / copresheaf
well-formedness checkfunctor well-formedness
safe renamenaturality / natural transformation
qualified nameGrothendieck construction
interface-contract test casesalgebraic law (identity/associativity/…)
state with outputMoore machine
all-must-pass dependency gatelimit over a diagram
grows-only enumadditive-only / append-only variants
affected/impacted nodestransitive closure (blast radius)
combined valid result from two divergent editsconfluence / pushout

Note on “kind” overloading

Two unrelated things are both called “kind” elsewhere in this repo: 𝒦’s five objects (which table a row belongs to), and the kind column that Constraint and Property rows separately carry (invariant/unit/ etc.). This file uses “kind” only for the first sense and “sub-kind” or “tag” for the second, for clarity — this is the same confusion tracked as CLAR-002 in STATUS.md, unresolved there pending a column rename via rename_naturality.

Changelog

#136 — v0.14.0: vacuity advisories, conform expectations, hardened tool edges

Release entry for everything since v0.13.0 (2026-11-15): four archived changes (add-vacuity-advisories, add-conform-expectation, harden-archive-companion, harden-tool-edges), the Rule-of-5 reliability round, and the README front-door pass. Format revision stays 22 — the changes add advisories, additive record fields, and contracts for behavior that already shipped; no spec grammar moved.

  • feat(conform) — oracle expectations and tiered verdict accounting (specodelic-f4sx, specodelic-18mt): scenario records accept an optional expect field (closed set {forbidden}, still deny_unknown_fields). A forbidden verdict matching the declaration is agreement-tier — counted in agreement_counts, excluded from the hard verdict buckets, exit 0; an unmet expectation keeps the mechanical verdict, prefixes its reason with expectation_unmet, and stays gating (exit 1). Prose-only covering claims keep verdict unknown but ride the advisory tier (advisory: true, advisory_counts), so a prose-dominated corpus no longer reads as hard unknowns. VerdictRecord gains expect and expectation_met (null when undeclared); records without expect keep today’s semantics.
  • feat(lint) — vacuity advisories (specodelic-h5ks): two advisory rules on the warnings channel, exit 0, one finding per subject. linter.fragment_binds_nothing: a **rust:** fragment in an invariant expr or a non-law property predicate that cites no declared model element (whole-token matching; the intent id is excluded; law predicates are outside the surface). linter.vacuous_invariant: a fragment’s state != "<literal>" comparison naming a state absent from Model/States. Citation-versus-declaration only — declared elements that are simply never exercised stay silent, so the rules are not reachability or coverage checks.
  • feat(explain) — oracle-contract topics (specodelic-5iez, specodelic-f4sx, specodelic-i51): three append-only topics (oracle-records, verdict-taxonomy, claim-executable) document the JSONL record fields including expect, the closed verdicts plus the advisory tier and the declared-expectation exit rule, and the permitted-requires-executable-claims rule. The lint-rules topic now states the warnings-duplication contract (advisories ride the envelope warnings channel and also appear in data.warnings by design); spk explain serves thirteen topics.
  • fix(compile) — duplicate artifact stems (specodelic-523w): a corpus whose distinct files map to one artifact stem is refused with artifact_stem_collision before lint or any write, instead of overwriting one file’s artifacts with another’s.
  • fix(verify) — routed artifact resolution (specodelic-1ey4): the properties gate, the model-check report, and the scope digest resolve every artifact through artifact_dir, so duplicate-stem corpora read each file’s own routed artifacts while corpus-unique stems keep the flat layout byte-identical.
  • fix(audit) — folded row keys (specodelic-3yt9): the merged report disambiguates row keys on collision instead of collapsing two records into one.
  • fix(archive-companion) — bounded archiver and honest failure (specodelic-54c6, specodelic-wq7n): the openspec archive child is bounded (DEFAULT_ARCHIVE_TIMEOUT_SECS, SPK_ARCHIVE_TIMEOUT_SECS override) with expiry as a labeled failure; rollback failures are reported instead of dropped; placeholder head prose is derived rather than carried forward.
  • fix(graph) — model anchors (specodelic-39w): a typed [[model.state]] / [[model.transition]] link is interned as the documented pseudo-node instead of panicking (uninterned node id, exit 101 with no envelope); the anchor edge appears in every projection.
  • fix(lint) — corpus-wide resolution for subset invocations (specodelic-f4sx): linting files inside a specs tree resolves their references against that tree while reporting findings only for the files named; files_linted still counts the request and a warning names the resolution corpus. Per-capability gates (ah sync) can pass.
  • fix(cli) — symlink cycles and truncated reports (specodelic-p39i, specodelic-nnbf): the corpus walk visits each canonical directory once, so a symlink back to an ancestor no longer recurses forever; a non-EPIPE write failure now fails the run (exit 1) instead of exiting 0 on a truncated envelope, while broken pipes (spk graph | head) stay graceful.
  • fix(status) — claim reasons (specodelic-60e, specodelic-dzn): a citation resolving to a refuted rust-fragment invariant attaches a self-naming reason instead of persisting a gating claim with none; citation_corpus now defines CorpusStatusRow once and the kernel re-exports it instead of mirroring its fields (serialized shape unchanged).
  • docs: the README applies the dulce-de-leche §5.1 front-door contract (specodelic-wvzt) — When to use, Quick start with captured output, Common workflows, a Commands table, and first-screen FAQ/positioning links; the command reference documents exit 101, graph’s projection --format, and lint’s resolution scope; the explain topic lists are refreshed to thirteen.
  • chore: pretender excludes vendored assets by path shape (specodelic-5ae1), audit fixtures and the Python kernel agreement backend are deduped (specodelic-gixd, specodelic-y5x8), orchestrate help and the orphan fixture are tidied (specodelic-i51, specodelic-7nu4), and cargo clippy --all-targets is clean again.

Changes archived with this release: add-vacuity-advisories, add-conform-expectation, harden-archive-companion, harden-tool-edges.

#135 — v0.13.0: Revision 22 — evidence audit, typed-reference enforcement, and revision upgrades

Release entry for everything since v0.12.1 (2026-10-21): format Revisions 20–22 and the five changes archived with them (add-evidence-audit, add-ref-kind-enforcement, add-revision-upgrade, add-shared-fragment-helpers, add-verify-runner-seams).

  • feat(format) — Revision 20 (specodelic-814): the Reference Typing guard cell names both regimes — prose-only stays exploration-only and honestly uncounted, while a cited invariant Constraint carrying a **rust:** fragment executes natively. Append-only; no id-set or typing change.
  • feat(format) — Revision 21 (specodelic-1nhe): a kind = "law" Property row may give each of its named cases its own executable body under the case key (**name::**). The **name:** labels stay the enumeration of record, and one shared parser keeps the linter’s law_cases rule and the compiler’s block expansion from disagreeing.
  • docs(format) — Revision 22 (specodelic-mlc): the outbound-leaf carve-out (cross-file typed edges are leaves, never reachability paths, never acyclic-edge-set members) moves to a single normative paragraph in specodelic.md; packs, observability and graph-shape files point there. Prose-only.
  • feat(lint) — Reference Typing enforced (add-ref-kind-enforcement): linter.ref_kind_compatible is now a real rule — typed links are checked against the target row’s kind, read from the Schema-as-data. A kind-incompatible typed reference is a gating finding.
  • feat(lint) — closed row shape (linter.row_shape_closed, the four kinds.md/specodelic.md row-shape rows): a row’s field set must be exactly its kind’s base fields plus the typed reference columns the Reference Typing table declares; the reference half comes from the Schema, and a State bullet’s named tail field surfaces as an extra cell instead of being swallowed as an emits value. New gating rule.
  • feat(lint) — content advisories (specodelic-xci): whole-cell placeholders (TODO/TBD/FIXME, stub statements, scaffold_* ids in a scaffold-signature file) and narrow tautologies (true/⊤, x == x) warn on the warnings channel — exit 0, never a failure. Fragment interiors and effect/advisory exprs are never judged.
  • feat(audit) — the graded-evidence audit (add-evidence-audit): new verb spk audit <file> --oracle <corpus.jsonl> classifies every oracle row into {current, stale, unchecked, contradicted}, each row carrying both the audit class and the underlying conform verdict. --before <report> diffs a prior report (same ⇒ current, worsened ⇒ stale, absent ⇒ new) with labeled refusals on scope/schema mismatch; --declare-expectation records a baseline whose stale rows fail the later diff. Exit 1 iff contradicted (or stale under a declaration), 2 on a gate/invocation/diff refusal, never nonzero on unchecked/new. Pack-check outcomes join as audit rows — an empty checked-set is unchecked, never a pass — and the binds_nothing vacuity advisory plus a per-file ladder-rung aggregate ride the report.
  • feat(verify) — runner seams (add-verify-runner-seams): the verify scratch crate takes a path dependency on the tool exactly when the artifact references specodelic::; the public specodelic::fixtures registry (registry/lookup/materialize/names/ is_known) lets fixture-named generators materialize real four-layer fixtures; scope_verdict reports a properties-only verdict that is never verified and never fails on a skipped model stage. The corpus’s demonstration row now calls the real compiler.
  • feat(compile) — shared fragment definitions (add-shared-fragment-helpers): an optional per-file ## Fragments section of def <name>: fenced rust bodies; a fragment cell references a helper with @name, and compile inlines each referenced body at its use sites. Labeled failures for malformed/duplicate defs, symbol collisions, banned constructs, unknown references and cycles; a def reachable from no cell is a dead-helper warning. \| escapes are unescaped before emission.
  • feat(migrate) — spk migrate --to-revision <N> (add-revision-upgrade): carries a corpus across the known format revisions from the core-owned REVISIONS registry (now 2..22), with per-file revision detection or --from-revision, shape-guarded steps in ascending order, and a plan that writes only changed files. A dry run unless --write; --rekey/--to-revision combinations refuse labeled.
  • feat(kernel) — resolve-checked id literals (specodelic-8mta): an id literal that names no declared node evaluates unknown with a labeled reason naming the literal — never a vacuous verified over a claim that was never checked.
  • feat(citation) — kernel outcomes compose (specodelic-9o1h): the citation algebra consumes the same invocation’s kernel claim statuses as a second evidence source (exec → kernel → citation row → property row → missing), so [[exec]] ∧ [[kernel]] can resolve instead of staying unknown forever. One-way composition: the closed kernel grammar has no back-references.
  • feat(packs) — kernel vocabulary pack (specodelic-04c): a standard kernel.pack artifact ships beside the domain packs.
  • feat(corpus) — executable predicates: 43 of 47 specodelic+kinds Property rows, all 16 pack rows and all 35 compile rows now carry executable **rust:** predicates; just verify-specs gates [compile, packs, specodelic, kinds] on every file’s properties state being exactly pass.
  • fix(archive-companion): the sidecar’s identity namespace is re-keyed at attach, so deployed error labels live under the deployed id.
  • chore: FORMAT_REVISION 19 → 22; the migrate registry records Revisions 20–22; spk graph derives typed reference columns from the Schema instead of a hardcoded list.

Revision 22 — the outbound-leaf carve-out has one normative home (specodelic-mlc)

  • docs(corpus): the rule that cross-file typed edges (guard citations of foreign constraints, satisfies, observes, uses, and every pack-added reference field) are outbound leaves — never reachability paths, never acyclic-edge-set members — moves to a single normative paragraph under specodelic.md’s Reference Typing section. Every pack, observability, and graph-shape file that restated it now carries at most one pointer to that section. Prose-only: no id-set, typing, checker, or graph semantics change.
  • chore: FORMAT_REVISION 21 → 22, the migrate registry gains the Revision 22 entry (no migration step — crossing it is a byte-stable no-op), and tests/outbound_single_source.rs enforces the one-home meter.

Revision 21 — law-kind rows carry one executable body per named case (specodelic-1nhe)

  • feat(format): a kind = "law" Property row may give each of its named cases its own executable body — the case key **name::** followed by the fragment marker in fragment position, as **identity::** `**rust:** v0.len() >= 1` . The body is emitted verbatim as that case’s block body; a case with no body keeps the honest todo_predicate! placeholder. The **name:** labels stay the enumeration of record: a body never adds, renames or replaces a case.
  • feat(lint/compile): one shared parser (law.rs) reads the law cell, so the linter’s law_cases rule and the compiler’s block expansion cannot disagree on what a case is — and a **rust:** occurrence is never counted as a case label.
  • labeled failures: an unassociated fragment, a second body for one case, a body naming a case the row does not enumerate, an empty body, a case key that introduces no body, and a case key on a non-law row are each a labeled extraction failure naming the rule and the case. The closed tag set, the fragment-position rule, the hygiene list and the mention-vs-extraction rule are unchanged.
  • chore: FORMAT_REVISION 20 → 21 (src/guide.rs), the migrate registry gains the Revision 21 entry, and the compiled corpus artifacts are regenerated by the tool.

#134 — v0.12.0: Revision 19 — plain deltas + layer.md sidecars (add-delta-layer-sidecar)

Release entry for the Rev 19 epic and its companion thread (tasks 1–7):

  • feat(format)!: Revision 19 retires the dual-format delta class — a change’s deltas are plain openspec files and the specodelic layer rides in a sibling layer.md sidecar (id: <cap>.layer, the naming-law arm added to id_matches_file). The delta-pairing lint rules (linter.dual_format_valid’s pairing arm, linter.requirement_drift) retire by construction: the shapes they policed are unwritable (1.x strict rejects a mirror).
  • feat(migrate): the wrap path now scaffolds the sidecar pair — the plain delta stays byte-untouched, the generated layer.md carries frontmatter + scaffold layers; mirror generation removed.
  • feat(archive-companion): openspec applies, the companion re-attaches (design D2) — openspec archive runs with default spec application and the layer is re-attached from the archived sidecar; fail-closed guards moved to sidecar-less refusal before the destructive archive, plus a post-attach shape assertion. The verbatim-deploy flow and delta_self_contained retire with their subject.
  • chore(gates): the openspec-validate 0.19.0 pin is retired — the gate is a plain openspec validate --all --strict 1.x invocation (@fission-ai/openspec@1.14.2, decision 2026-10-19-validate-pin-retired); the corpus migrates (task 5) and archives (task 7) keep it 0-findings.

#133 — v0.11.0: archive-companion owns the archive recipe end-to-end, conformance modes, pack-discovery fix

Release entry for the thread shipped since #132:

  • feat(archive-companion) (specodelic-bhp, design D9, decisions/2026-10-16-archive-companion-single-tree.md): the companion now owns the archive recipe end-to-end — after the verbatim deploy it strips the frontmatter block from each archived delta copy, mechanizing the manual post-step every archive since the quant pack redid by hand (the archived spec.md id-collision trap). Re-run recognition replaces blind re-copy: a layer-less archived delta whose deployed target already carries the dual-format layer is a no-op success; anything else stays fail-closed. The spk archive-companion envelope gains a stripped list.
  • feat(conform) (gh-17, specodelic-1v30): corpus-scoped input gate
    • --structural-only agree mode — structural-only claims agree without executing executable fragments.
  • feat(docs) (gh-18, specodelic-4543b81): spk explain conform — oracle JSONL schema, verdict taxonomy, permitted-requires-executable-claims.
  • fix(packs) (specodelic-o5bh): order-independent pack discovery — every linted corpus is anchored, so pack activation no longer depends on directory traversal order.
  • fix(migrate) (gh-16, specodelic-nvs9): MODIFIED-only deltas are wrapped too — the ADDED-only mirror assumption is retired.
  • fix(orchestrate) (gh-13, specodelic-yl39): shared collide-only per-file artifact routing.
  • fix(compile) (gh-15, specodelic-w9ju): emitted *_props.rs artifacts are rustfmt-clean.
  • new pack (specodelic-kjzh, #132): fifth standard pack svc.contracts at draft lifecycle.
  • docs: “Using packs” guide + six pack worked examples (specodelic-ilfx epic); graph-views page with ASCII renderings through the gently pipe (specodelic-4al1/qzw8/f7yi — D8-sanctioned external renderer, --render parked).
  • chore(deps): genesis-vibes 0.11.1 → 0.13.2 (update-check downgrade-suggestion fix; lefthook wiring compatible — this repo is the donor implementation); rustls 0.23.46 for RUSTSEC-2026-0349.
  • ci: pretender version pin (single-source guard script), CI auto-retry for runner-acquisition failures, pack-count prose gate.
  • FORMAT_REVISION unchanged at 18.

Gates: just ci green; ah check –run-tests 0 findings.

#132 — add-svc-contracts-pack: fifth standard pack (svc.contracts, draft) — no base change, no format revision

Maintainer decision specodelic-kjzh (OQ-P1): adopt the external bundle’s svc-contracts pack proposal — single-requester demand, landed conservatively at draft lifecycle (packs/svc-contracts.md, id svc.contracts). The pack declares an ## Interfaces registry row (name, kind, repo, opaque binding, evolution), the namespaced svc.compat law kind with an added/removed compatibility floor, and the published_as outbound leaf. Checkers are declaration-only (honest-empty); no src/ change, no base closed-set growth, no format revision. Vocabulary audit re-run against the post-jf1 corpus: zero exact-case hits for every scanned token. Promotion to published awaits a second independent consumer; open questions OQ-P2 (repo normalization) and OQ-P7 (column rename) remain recorded in the change’s design.md.

#131 — v0.10.0: single-tree corpus release — specs/ retired, two panic-class fixes

Release entry for the thread shipped since #130:

  • Single-tree corpus migration (specodelic-jf1, #130): the corpus moved from specs/ into openspec/specs/ — every corpus file is a markdown spec written in the format it describes, at openspec/specs/<dir>/spec.md. Gates, docs, tooling, and espectacular contracts (281 TOMLs, 535 passed) all re-keyed onto the new layout. This is the workflow-breaking change driving the minor bump: external tooling pointed at specs/ must re-point at openspec/specs/.
  • fix(verify) (specodelic-kbmv): drain runner pipes during the wall-clock poll — scratch cargo test no longer wedges past the pipe buffer (a hang, root-caused and fixed).
  • fix(migrate) (specodelic-7i7): refuse a bare one-line delta heading labeled — no more byte-OOB panic.
  • fix(deny): CRLF-safe thin-pointer guard + cargo-deny ignore for RUSTSEC-2024-0375; advisory id corrected to unsafe-libyaml.
  • fix(corpus) (specodelic-7jw8): acset-core closure_laws_hold case labels out of fragment position.
  • docs: positioning section in openspec/USAGE.md — what the format assumes, and when NOT to use it (specodelic-vpq).
  • FORMAT_REVISION unchanged at 18.

Gates: just ci green.

docs — positioning: what the format assumes, and when NOT to use it (specodelic-vpq)

  • openspec/USAGE.md gains a Positioning section right after the intro: the spec-first/agent-authored/regenerable-code assumption, the four cases where the structured layers are pure tax (hand-maintained code, throwaway prototypes, quantitative claims that need real checking, specs already maintained elsewhere), and the honest one-line test — will anything mechanical consume the structured rows? Worded against the convergent verdicts of the 2026-10 external evaluations (the prose_untouched ↔ domain-semantics tension; the uncheckable real-valued predicate wall). Positioning only: no rules, no format changes.
  • Site surfaces updated to match: the introduction’s cold-read path (index.md) now carries a short “Is this for you?” paragraph, and the FAQ answers “Should I use this for my hand-maintained codebase?” — both linking to the USAGE section as the authoritative statement.

#130 — single-tree corpus migration (repo rollout, specodelic-jf1)

  • The corpus moved from specs/ into the single tree openspec/specs/: each corpus file is now openspec/specs/<dir>/spec.md (Revision 18 naming law — a spec.md derives its expected id from the parent directory). Frontmatter ids kept verbatim; ## Purpose promoted from the prose under the H1; a ## Requirements mirror generated from the Properties table (one #### Scenario: per property, each with a VERIFIES link). The transform script (scripts/migrate_corpus_single_tree.py) is validated idempotent.
  • The compile.md/packs.md deploy divergence was resolved by taking the corpus as truth: the deployed capability specs were overwritten by the migrated corpus versions.
  • The corpus prose companions moved with it: openspec/STATUS.md, openspec/USAGE.md, openspec/theory.md, openspec/CHANGELOG.md (this file), and openspec/specs/AGENTS.md + openspec/specs/claim-guidance.checklist.md (the manifest stays in the lint set — checklists_declared reads 1 again).
  • Dogfood gates re-pointed at the new layout: lint/graph over the whole tree (corpus-wide), compile + model-check over the corpus-backed capability dirs (compile refuses stateless specs — the justfile CORPUS_DIRS list, mirrored by tests/common corpus_dirs()).
  • Artifact naming fixed for the single tree (compile::artifact_stem): a spec.md file names its artifacts (and TLA+ module) by id in dash form — compile.toml, linter-graph_shape.toml — instead of every file colliding on the flat stem spec. verify.rs’s duplicated artifact_stem now delegates to compile’s (the drift it would have caused was caught by the dual-format parity tests).
  • Espectacular re-keyed: 281 contract TOMLs generated for the mirror scenarios (ah sync refuses on per-file lint — total_refs is corpus-wide, so a single file never lints clean; the refusal is an upstream gap, filed). Bindings are loose and real: hand-curated real cargo tests, validated against cargo test -- --list. The replaced deployed specs’ 31 contracts were re-keyed onto the corpus mirror scenarios. ah check --run-tests: 535 passed, 0 findings.
  • Docs: single book copy (docs/src/specs), SUMMARY restructured, the docs/src/openspec mirror retired with the two-tree layout.

#129 — v0.9.0: spk skill install — the managed skill pack ships

Release entry for the thread shipped since #128:

  • Managed skill pack (add-skill-pack, six phases, archived dual-format) — the specodelic-design skill ships inside the binary: the pack is generated from single tracked sources (include_str! over skill-packs/specodelic-design/SKILL.md and the book’s docs/src/examples/reservation-order.md), the format reference renders through the same tables that serve spk explain (no drift class — membership tests fail the build on any unresolvable topic/rule/EARS mention), and the embedded worked example lints clean through the same linter API the corpus gate runs.
  • spk skill install [--dir <dir>] — writes the pack under ~/.claude/skills (or any --dir), refuses to overwrite files without the managed marker (exit 2, path named, file untouched), and emits the written paths plus pack_content_hash (SHA-256 over sorted path + NUL + content).
  • spk doctor staleness check (spk.managed-skill-pack) — stale installs are a warning naming both hashes and the regenerate command; missing installs are an optional hint; the doctor exit code never changes for either.
  • Docs wiring — thin-pointer book page design-conversations.md, SUMMARY/README/llms verb entries, and an executable thin-pointer guard (tests/docs_thin_pointer.rs) so no book page can duplicate the protocol prose or the worked example.
  • Deployed capability spec openspec/specs/skill-pack/ (archived via the dual-format recipe, byte-identical deploy) with 10 per-scenario contract TOMLs under .espectacular/skill-pack/ — ah check reports zero findings.

Housekeeping: CI hardening for the verify scratch-crate hang on ubuntu runners and the doc-gate cold-compile retry. FORMAT_REVISION unchanged at 18 — this release adds a verb and docs, not corpus rules.

#128 — v0.8.0: spk conform external-oracle conformance, quant-finance pack, docs book round

Release entry for the three threads shipped since #126:

  • spk conform (add-conform, specodelic-eczv) — the first command that evaluates a spec against evidence from outside it: recorded traces from a legacy system, curated case set, or reference implementation classified against the compiled Model and its executable claims. Closed five-value taxonomy, evidence-class separation (--closed-world is the only route to forbidden for uncovered traces), byte-identical reruns, evidence_scope data in both views, exit-code contract 0/1/2, strictly read-only and outside the lifecycle. See #127.
  • quant-finance pack (add-quant-finance-pack) — the D6 second thin domain pack (quant.finance, base pin Revision 18) with namespaced ## Limits, quant.risk/quant.pricing kinds, capped_by references, honest-empty checkers, and six dogfood probes; archived dual-format with 10 scenario contracts. See #126.
  • Human-facing docs round (specodelic-lf4b) — architecture page, worked example, guarantee-ladder / verification-boundaries page, cold-reader glossary, tool-relationships page, verbatim quickstart captures with a replay-on-CI docs-accuracy gate (doc-examples), explain-topic anti-drift guard, one-line when/why notes on every verb in the command reference, and llm.txt stamped at commit time with release.md committed at release (lf4b.11).

Housekeeping: pretender vendor excludes now cover ./-anchored walk paths (specodelic-m1rk). FORMAT_REVISION unchanged at 18 — this release adds code and docs, not corpus rules.

#127 — spk conform: external-oracle trace conformance (add-conform)

add-conform implemented end-to-end (specodelic-eczv, five phases) — the mechanism’s first command that evaluates a spec against evidence from outside it: recorded traces from a legacy system, curated case set, or reference implementation are classified against the compiled Model’s transition relation and its declared executable claims. Closed five-value taxonomy (permitted | forbidden | underspecified | unknown | unsupported, never collapsed to pass/fail); evidence-class separation per D2 (a contradiction is forbidden in any invocation mode; an uncovered trace is forbidden only under --closed-world, otherwise underspecified — a spec gap, never a prohibition); claim classification reuses model_check’s types (no new status vocabulary). The run report is byte-identical across reruns over identical inputs (records sorted by scenario id, no timestamps), binds a conform-local report_schema_version and a scope_sha256 over the parsed spec and consumed corpus bytes, and carries the fixed evidence_scope field — “agreement on the supplied corpus; not a proof of behavioral equality” — in both JSON and --human views (D6: data, not docs). Exit-code contract: 0 = no forbidden/unsupported, 1 = any such verdict, 2 = invocation error or gate refusal (stale artifacts, lint-dirty file, malformed corpus) with zero verdict records emitted. conform is strictly read-only and outside the artifact lifecycle: never an orchestrate stage, never gates a transition, never writes. Ship record: commits f1e48e7..bc18293 (tests: classification, report, gate, CLI, lifecycle; docs book page conform.md). Archive + per-scenario contract TOMLs sequenced as specodelic-6aj0.

#126 — the D6 second domain pack: quant-finance (add-quant-finance-pack)

add-quant-finance-pack implemented — no code, no base-set change: the mechanism’s second thin domain instance (the decision of record’s D6 “quant second” sequencing) ships as an in-repo kind: profile artifact at packs/quant-finance.md (id quant.finance, base pin specodelic.md Revision 18 — the current revision; the 14-pinned standard packs stay valid under append_only_variants, skew advisory) with cross-pack ## Requires deps on numeric.predicates and data.lineage. Its design stress is restraint: most of what the two vendor quant designs asked for already ships in the standard packs tolerance is numeric.tolerance, statistics are empirical.statistic, fixtures/datasets are ## Data rows — so the pack declares only the vocabulary no standard pack carries: a namespaced ## Limits section (row shape | name | kind | unit | bound |, row-kind labels closed to risk/pricing per-pack), the quant.risk and quant.pricing kinds (a law-shaped kind with its floor deliberately deferred to a later release under append_only_packs), the capped_by reference field resolving to a ## Limits row of the declaring file (outbound leaf, intra-file, no reachability join — the measured_by precedent), the honest-empty pack-qualified checkers (quant.limit_closed, quant.risk_labels — the mechanism names them, never executes them), and the kind-dependent risk case-label floor (**horizon:** + **confidence:** — grok-quant’s tolerance fields reduced to the R4 per-kind floor precedent; the numeric pack’s numeric.tolerance absorbs {metric, abs, rel, unit}). Vocabulary hygiene pre-paid: every declared token audited (risk, Limits, horizon, capped_by, quant.* 0-file; bare limit 4+1, confidence 5+0, Fixtures 4+4 corpus-contaminated → excluded; horizon/confidence survive only as floor case labels the activation scanner never reads). Six dogfood probes verified (91kt/9h3z): RED/GREEN orphan + kind-column + dangling capped_by (linter.total_refs, row id named) shapes, base law floor byte-identical with the pack discovered, and all-five-pack corpus lint byte-identical with vs without quant (no_pack_no_change). Archive deployed the capability spec openspec/specs/quant-finance-pack/ (id quant.finance.pack`) via the dual-format companion recipe.

#125 — v0.7.0: Revision 18 single-tree authoring + the --rekey migration path

The breaking-format release: Revision 18 (update-id-derivation-spec-md, specodelic-mcy) retires id: spec — a spec.md file now derives its id from its PARENT DIRECTORY name (openspec/specs/ge-cli/spec.md → id: ge.cli), so single-tree spec authoring (one corpus, real ids, no per-repo deploy transforms) is legal format. Everything that made the two-tree architecture load-bearing retires with it: dual_format_valid no longer polices the id, total_refs resolves every file corpus-wide, the command scope law folds isolated_scope_required into duplicate_corpus_identity, spk new targets openspec/specs/<id>/spec.md by default, and spk migrate scaffolds the real derived id. FORMAT_REVISION 17 → 18.

  • The migration path (add-migrate-rekey): spk migrate <file> --rekey rewrites a 0.6.0-era id: spec dual-format file to its real id in place, re-keying every [[spec.*]] ref — idempotent (already-real files are warning no-ops), refusals never rewrite. Recipe: spk lint <tree> finds the files, spk migrate <file> --rekey per file.
  • Strictly stronger scope law: a combined command invocation whose inputs claim the same intent id (transitionally: an active change’s delta and its deployed spec) fails duplicate_corpus_identity before any write — the old law’s per-file id: spec exemption is gone.
  • Scaffolds teach the single tree: spk new defaults to openspec/specs/<id>/spec.md; new users cannot produce the two-tree distinction.

#124 — Revision 18: id derivation — spec.md takes its id from its parent directory (update-id-derivation-spec-md, specodelic-mcy)

The naming law no longer forces id: spec on openspec-housed files. A file named spec.md derives its expected id from its PARENT DIRECTORY name (openspec/specs/ge-cli/spec.md → id: ge.cli; - ⇔ .; _ literal; a bare spec.md falls back to the stem), so single-tree spec authoring — one corpus, real ids, no deploy transforms — is now legal format. id: spec retires with its whole machinery: dual_format_valid no longer polices the id, total_refs resolves every file corpus-wide (the self-containment scoping and its bare-local arm are gone), the command scope law folds isolated_scope_required into duplicate_corpus_identity, spk new defaults to openspec/specs/<id>/spec.md, and spk migrate scaffolds the real derived id. FORMAT_REVISION 17 → 18; this repo’s openspec tree migrated in the same change (archived deltas drop their frontmatter as frozen pre-protocol evidence).

#123 — v0.6.0: kernel + verification-claims capabilities ship; the exit-code/envelope contract enforced end-to-end

First release carrying the two new deployed openspec capabilities — kernel (executable corpus invariants, FORMAT_REVISION 16→17) and verification-claims (required/unchecked claim classification gating model-check and verify verdicts) — plus the 2026-10-08 bug sweep that brought the runtime in line with the published error contract (openspec/specs/errors/spec.md) and the docs-readiness pass that aligns every user-facing page with implemented behavior (verify.assurance_views_agree → release_docs_match_implemented_capabilities).

  • Kernel + verification claims: **kernel:** claims execute on the native backend (closed atomic grammar, per-cell marker opt-in); a refuted required claim gates the verdict (counterexample_found, exit 1, ok:false); scope-bound versioned claim reports (claim_schema_version=1, canonical scope_sha256, freshness recompute, isolated_scope_required preflight) bind evidence to inputs.
  • Errors obey the published contract: failures never ride success-shaped envelopes (ok:false/envelope_kind:error on every labeled failure across compile/model-check/verify/orchestrate); unknown and counterexample claim records carry their reason, naming the offending id; graph projections obey the 0/1/2 exit-code mapping in text modes.
  • graph/migrate robustness: member-path link targets intern canonical ids (no more panic on [[v.row.deep]]); the migrate mirror aggregates ADDED + MODIFIED deltas and refuses conflicting headings labeled.
  • Docs: commands.md, README and USAGE describe the claim gates, the graph projection flags, and the lowercase bold-label compile edge; the #114 no-emitter hint strings match the code.

#122 — kernel claim records carry their reason when not verified (specodelic-7gh, eval F4/F6)

A **kernel:** claim that evaluated to unknown — e.g. reachable(order.cancel.nope, …, guard) with a dangling seed endpoint, which lints and compiles clean — persisted a bare {"evaluator":"kernel","id":…,"status":"unknown"} record with no reason, so a run downgraded to exploration_only with nothing pointing at the bad id (the diagnosability asymmetry: a mistyped morphism in resolves(…) gets a labeled compile error, a mistyped endpoint in reachable(…) got unlabeled unknown).

  • spk model-check / spk orchestrate: kernel evaluation now threads the labeled reason through the same Kleene-with-reasons shape the citation path already uses — a traversal error names the offending endpoint (the QueryError display, e.g. unknown seed order.cancel.nope``), a discharge failure names why (type mismatch, non-integer ordering, composition provenance), and a counterexample record names itself. A verified status still carries no reason, and the persisted qualified claim records carry the same reason.
  • Verdict semantics untouched: the unknown itself was deliberate (never a fabricated verdict) — statuses, the aggregate outcome (exploration_only), and all exit codes are unchanged.

#121 — graph projections obey the 0/1/2 exit-code mapping (specodelic-0zk)

spk graph --format edges|dot|mermaid (and the wiring view) reported success for both failure shapes: a typo’d path exited 0 like an empty corpus (JSON mode exited 2), and a typing-violations corpus exited 0 while JSON mode exited 1 — so a pipeline could neither catch the typo nor gate on violations in text mode.

  • F3: a nonexistent or unreadable named path is now an invocation error (exit 2) — a labeled refusal envelope goes to stderr (projection stdout stays the raw text channel), matching the JSON envelope mode and openspec/specs/errors/spec.md’s exit_code_mapping. Zero spec files on a real path keep the parsed-not-linted exit 0 with empty output (the intentless-corpus contract the Python transform’s scope gate relies on).
  • F8: typing violations in the corpus now flip the projection exit to 1 — matching JSON mode — while the violation annotation rows still ride along unchanged (openspec/specs/graph/spec.md D3: a view is never cleaner than the artifact). JSON-mode exits are unchanged.

A corpus carrying a member-path link — [[v.row.deep]], which the reference resolver’s member arm resolves to the label-qualified v.row (deep) (specodelic-njh) — crashed spk graph with uninterned node id: v.row (deep) at the acset instance builder: the builder interns only defined ids, and the display qualifier made the resolved target address no node.

  • spk graph (every format, plain --json included) now interns the canonical row id: the member-path link projects as the edge v.mem → v.row, and fan in/out are computed — the display qualifier was already stripped at projection (add-graph-views D2), so user-visible projections are unchanged apart from no longer crashing.
  • The link stays resolved-clean (specodelic-njh semantics): the typing check still consults the raw resolved spelling, so lint and graph do not diverge on the same link. An unresolvable member path (v.norow undefined under [[v.norow.deep]]) still dangles on its labeled path — never silently resolved.

#119 — migrate mirrors mixed deltas (ADDED + MODIFIED) instead of the ADDED body only (specodelic-54v)

spk migrate on a delta carrying both ## ADDED Requirements and ## MODIFIED Requirements wrote the mirror as a byte-exact copy of the ADDED body only — the MODIFIED section was dropped. Since #93, linter.requirement_drift compares per requirement across all carried delta sections, so the freshly migrated file was guaranteed to fail lint (migrate exit 0 → lint exit 1):

  • spk migrate now aggregates the mirror: the ADDED body lands byte-exact as before, and each MODIFIED requirement lands in its modified form under the same ## Requirements heading — the same per-requirement comparison the linter performs. spk lint on the freshly migrated mixed delta exits 0.
  • A requirement heading appearing in both ADDED and MODIFIED can never be mirrored faithfully (one heading, two texts) — migrate now refuses labeled (exit 2) naming the requirement, with a remediation hint, instead of silently producing a guaranteed lint failure. The file is never rewritten.
  • ADDED-only deltas are byte-for-byte unchanged (the mirror is still the byte-exact ADDED slice); MODIFIED-only deltas are still refused as not-a-delta.

#118 — model-check never silently demotes a malformed kernel claim (specodelic-m6k, eval F2)

After a successful spk compile, editing a **kernel:** constraint cell so it breaks the closed grammar (e.g. a non-member atomic) and running standalone spk model-check silently dropped the claim from the required set — claim_classification saw no guard_kernel entry for the grammar-broken cell, landed it in unchecked_claim_ids, and the run reported no_counterexample with exit 0 over a spec compile itself rejects:

  • spk model-check now runs the labeled kernel-grammar pre-check (compile’s kernel_grammar_violation_labeled validation, mirrored in kernel::grammar_failures) before any backend run or report write: an invariant row that opts in via **kernel:** and breaks the closed grammar fails with stage kernel_grammar, naming the row and the offending atomic — never prose, never silence.
  • No change to legitimately-stale detection (edited transitions still fail via artifact consistency), to verify/orchestrate (scope digest + recompile already cover them), or to never-required claims (prose-only cells stay explicitly unchecked).

#117 — failures never ride success-shaped envelopes (specodelic-4v1, eval F1)

The 2026-10-08 external evaluation’s sharpest finding, fixed in the code (the corpus was already normative-correct — openspec/specs/errors/spec.md’s envelope_error_kind and exit_code_mapping rows say what the tools now do):

  • spk model-check: a refuted kernel claim (counterexample_found, #116’s failing aggregate outcome) is findings: exit 1 with an error-kind envelope (ok:false), the payload intact. The old convention (“the verdict lives in the report, not the exit code”) is retired for the failing aggregate.
  • spk compile / spk verify / spk orchestrate: a labeled failure, a blocked verdict, or a failed overall emits an error-kind envelope with ok:false — exit codes were already correct; the ok bit lied to consumers gating on .ok.
  • Honest non-failure outcomes are unchanged: timed_out and exploration_only keep model-check’s exit 0 (model_check.md says neither is a failure — verify’s model gate rejects them), invocation errors still exit 2, and lint findings still exit 1.
  • Docs: docs/src/commands.md’s exit-codes paragraph states the fixed mapping; verify’s section documents that the scope digest binds structured inputs, not result statuses (eval F7: forged check.json statuses yield a blocked verdict, never a clean model gate).

#116 — verification claims gate the verdict (define-verification-claim-gates)

specodelic.md‘s no_counterexample and verified gates get explicit evidence contracts — without a Revision bump (see the discipline note in model_check.md): the claim semantics live in the two capability files that already own those gates’ precise meanings, widening them instead of restating them in the core.

  • openspec/specs/model_check/spec.md gains required_claims_classified (required = executable/kernel/citation opt-ins; prose-only invariants are enumerated unchecked — a deriving Property never implies evaluation), claim_aggregate_governs (fixed priority: refuted → counterexample_found, exhausted budget → timed_out, incomplete → exploration_only; a nonempty all-verified required set is the only clean), claim_report_schema (claim_schema_version 1, canonical qualified records, expected/unchecked ids, and a content-bound — never path-bound — scope_sha256 digest), and dual_format_isolated_scope (a dual-format id: spec file is the sole parsed input of command evaluation; multi-file lint stays valid). finish_clean’s guard now cites the claim aggregate.
  • openspec/specs/verify/spec.md gains the acceptance-side twins: required_claims_govern_acceptance (verified requires every required claim verified plus every property block passing; malformed/duplicate records rejected, never inferred unknown success), evidence_scope_bound (verify recomputes scope and the required set; stale, swapped, or old reports fail with a rerun hint and are never rewritten), and assurance_views_agree (CLI JSON, human output, and the persisted report name the same blockers and unchecked claims; release docs distinguish lint / bounded exploration / verified claims / external application-test binding). The accept/reject transitions cite all three new constraints.
  • New rows derive coverage (9 unit properties in model_check.md, 7 in verify.md), each bound to the CLI fixtures define-verification-claim-gates §1–§3 already deployed — the compiled corpus artifacts are regenerated (spk compile specs).

#115 — the min-expr kernel becomes Revision 17 (add-min-expr-kernel)

The kernel landed in two moves that deliberately outran the Revision heading — the per-file corpus migration (USAGE.md examples, then specodelic.md’s invariants, 2026-10-06/07, each gated lint-clean and command-verified) used the grammar before this Revision declared it. Revision 17 is that declaration of record:

  • openspec/specs/specodelic/spec.md gains ## Revision 17 — the min-expr kernel becomes format vocabulary: the kernel: marker opt-in under the closed atomic set (equality, comparisons, bounded ∀/∃ over the finite instances, ∧/¬, resolves/unique/acyclic/reachable, each grounded in proven machinery, widening gated on decidability), the three-valued never-coerced status chain, guard-citation evaluation (slice 1 — fragment_guard_rejected stands), and the opaque kernel.binding bridge.
  • openspec/specs/compile/spec.md carries the normative rows: kernel_expr_opt_in and kernel_binding_opaque (invariants) each derive coverage — kernel_expr_extracts, kernel_nonmember_labeled, binding_text_surfaces_verbatim, claim_path_is_flags — so the corpus-wide linter.coverage gate stays green.
  • FORMAT_REVISION 16 → 17 (src/guide.rs) with every embedded literal: the init AGENTS.md block fixture, doctor’s format_revision assertions (×3), and the pack revision-skew advisory assertion. Guide-drift guard green.
  • Compiled corpus artifacts regenerated (spk compile specs): compile.toml carries the two new invariant constraints, compile_props.rs the four new unit properties.

#114 — language-neutral property binding: the closed fragment-tag grammar lands (add-language-neutral-property-binding)

Revision 16’s corpus delta shipped with v0.5.2 (1ec6b90, c5d2b39); this entry records the implementation landing that activates it:

  • Closed tag grammar {rust, py, ts} in the extraction path — a marker is ** + a tag-shaped label ([a-z][a-z0-9_-]*) + :** in fragment position; acceptance is grammar-level and emitter-independent. Unknown tag-shaped markers fail labeled naming the tag and the closed set (unknown_tag_rejected), never silence; ordinary bold prose (**Note:**) stays prose — the lowercase-initial tag shape separates them. One grammar collision resolved by row kind: a law-kind predicate’s **label:** occurrences are the law-case grammar, never fragment markers.
  • No-emitter gate (no_emitter_labeled_failure): a **py:** or **ts:** fragment gates compile with stage compile.emission_failure and remediation naming its follow-up (add-py-fragment-emission py, add-ts-fragment-emission ts) — never a silent fall-through to Rust emission. **rust:** extraction is byte-identical to Revision 15 (rust_back_compat); the lenient IR path only ever extracts Rust.
  • Pytest exemplar binding (the espectacular seam, tasks 1.2–1.4): parse’s export-full-ir scenario now also binds a hypothesis property test over generated corpus inputs (tests/python/test_exemplar_props.py, node-id binding in the contract TOML); ci.yml installs pinned pytest+hypothesis so the executed gate passes on runners (ci_wiring drift guard pins it).
  • Docs + corpus notes: commands.md records the two-binding-layers boundary (CORR-001) and the tracing-vs-semantics line (D6); compile.md’s notes gain the grammar section the Rev 16 rows reference and drop the stale “neither has its own spec yet” prose (task 3.5); STATUS.md §4 records the deferred emitter follow-ups and the D5 generator-vocabulary coupling.

Append-only. Past entries are never edited — a correction gets a new entry, the same discipline specodelic.md’s own append_only_variants rule requires of spec files themselves. Displayed newest first; numbered chronologically ascending (#1 = oldest) so a new entry always gets the next integer regardless of where it’s inserted in the display order.

#113 — v0.5.2: executable release tarballs land post-tag; binary re-syncs to corpus Revision 16 (specodelic-6sb, mvl, PR #11)

The v0.5.1 tag shipped before three fixes landed the same day, so its published artifacts lagged main. This patch releases them together:

  • Executable release tarballs + curl install docs + LLM summaries on Pages (PR #11, aee950f): the v0.5.1 tarball assets lost the exec bit (upload-artifact v4) and the README curl snippet referenced a wrong asset name. Users who downloaded 0.5.1 assets got non-executable archives — this is the primary reason for the patch.
  • FORMAT_REVISION 15→16 (specodelic-6sb, c5d2b39): the property-binding corpus bump (1ec6b90) outran the released binary — the v0.5.1 binary embeds Revision 15 while docs deployed from main describe Revision 16. The binary now embeds 16, with the two new deriving Properties (one_tag_extracts_per_cell, missing_emitter_labeled) keeping linter.coverage unblocked.
  • llm.txt at repo root (specodelic-mvl, 0158614): required by the ddl sibling-repo conformance rule s2_llms_txt_at_root; the cke guard is reversed to REQUIRE it (llms.txt stays the deploy target, not deployed).
  • Gate-drill advisory lock (specodelic-do8, 5f4335b): drills hold .beads/gate-drill.lock; the pre-commit hook refuses commit/push while a drill is live — closes the dz4 concurrent-session race’s hook-side interlock. Also shipped: the commit-hygiene standing instruction (specodelic-2g1) and the g17 file-splits/ratchet (internal, no behavior change).

No format Revision change (16 already on main); no spec corpus change.

#112 — graph-views schema view re-pointed at the acset Schema value; docs/governance sweep around the acset landing (specodelic-hya, F7, F9)

The pending add-graph-views change’s schema view was pinned (design D4, 2026-09-29) to guide’s closed value sets — written before the acset Schema value existed. With add-acset-core landed, following the original D4 would have created two sources for one table: the lint-gated Schema and guide’s ungated REFERENCE_TYPING const.

  • D4 revised (specodelic-hya, closed 2026-10-04): the schema view derives from acset::schema::canonical() — the Reference Typing table as data, already lint-gated against openspec/specs/specodelic/spec.md row-for-row by schema_matches_typing_table — plus the format revision marker. The alternative (keep both sources + a build-time cross-check) was rejected as redundant: the Schema is already doc-gated at lint time.
  • guide::REFERENCE_TYPING is demoted to a render-only surface (the embedded guide’s prose); spk guide --json stays in scope for value-set-only consumers, and the schema view no longer consumes it.
  • Stale evidence refreshed throughout the change docs: the corpus’s 38 typing violations (the drafting-era number) are gone — the acset landing typed them away, spk graph reports 0 as of 2026-10-04 — so violation rendering is now proven via fixture corpora, not the live corpus.
  • README pipeline/status claims re-verified against code (finding F7: “not implemented yet” claims for verbs that all ship, and the missing Rev 15 executable-fragment mention) — fixed 2026-10-04.
  • Finding F9 filed as specodelic-814: the corpus’s guard-typing row doesn’t mention the **rust:** executable-fragment escape hatch (Rev 15 transition residue); recorded in the external-architecture reviews register.

#111 — acset writer: span-preserving writer over recorded parse spans; rename realized through it (specodelic-p5b, acset slice S3)

spk rename’s rewriting was a second, hand-wired edit path beside the parser — the exact duplication the acset adoption targets. The writer makes every file rewrite happen through spans the parser recorded.

  • The parser now records byte spans for id cells, links, and state bullets; the writer emits by those recorded spans — identity emission is verified corpus-wide (emitting without edits reproduces the input byte-for-byte), and edit laws pin identity, composition, and a roundtrip gate.
  • spk rename runs through the writer path (run_via_writer); the dead hand-wired rewriting was deleted, so there is one edit path.
  • The rename parity property (writer-driven rename must equal the hand-wired run byte-for-byte, 64-case proptest plus fixtures) caught two real bugs before the flip: the hand-wired frontmatter rewrite corrupted single-char intent ids (id: i → irenamed: i, an unanchored replace — now anchored on the id: prefix), and the roundtrip link check misclassified rewritten links when the new id has the old id’s old_id.<child> shape (now a target multiset over before-links).

#110 — acset core: the Reference Typing schema and typed instances as data (specodelic-84i.1, acset slices S1+S2)

The format’s Reference Typing table existed twice in code: as a documented table (openspec/specs/specodelic/spec.md) and as hand-written enforcement (a match in graph.rs whose agreement with the table nothing checked). The acset-core landing makes the schema a value and enforcement read from it.

  • acset::schema::canonical() — the schema as data: objects, typed morphisms (with refinements, source rules, violation prose, endo-acyclicity flags) in canonical order. The doc and the code cannot drift silently: the lint-time gate schema_matches_typing_table compares the Schema row-for-row against the corpus doc’s Reference Typing section (parsed via Spec.reference_typing_body), firing in either direction; the gate no-ops for corpora without the section.
  • Typing enforcement delegates to the Schema (schema::typing_violation) — the hand-written match is retired, and graph/merge/refactor outputs stay byte-identical (parity gates held throughout the landing).
  • A typed instance builder (acset::instance): dangling references are values (labeled), no link is dropped, forbidden edges are stored as violations and never recorded as edges, duplicate ids resolve first-wins parity, rebuild is byte-stable.
  • Closure/query primitives (one traversal primitive) replace per-command edge walks where adopted.
  • The corpus’s 38 typing violations (the drafting-era figure cited in several openspec change docs) are resolved — spk graph reports 0 as of 2026-10-04.

#109 — **rust:** mentions are not opt-ins (specodelic-sd1)

The extractor treated ANY occurrence of the marker as an opt-in — including mentions. The corpus rows that DEFINE the mechanism (compile.md’s predicate_fragment_opt_in, invariant_fragment_opt_in, fragment_law_rejected, fragment_guard_rejected, properties_to_proptest; model_check.md’s executable_invariants_execute) carry a **rust:** occurrence inside their own expr code spans, and verify.md’s fragments_reach_verified carries one in prose between spans — so the prose after each mention was extracted as a “fragment”: committed compile.tla carried 5 bogus INVARIANT entries of raw prose, and the scratch runs hard-failed (spk model-check specs exit 101 on 2 files; the verify.md predicate left a properties_uncompilable residual after specodelic-8aq). The exact bootstrapping-bug shape specodelic.md’s Notes warn about: the tool’s own description of the mechanism broke the mechanism.

  • Fragment position is now structural: an occurrence opts in only when it STARTS the cell (after leading whitespace) or immediately follows an opening code-span backtick (`**rust:** <expr>` — the Revision 15 authoring form). Any other occurrence — mid-span or in prose between spans — is a mention and never extracts. A marker after a CLOSING backtick (`x` **rust:** y) is prose-position: a mention.
  • “Exactly one marker” sharpens to “exactly one marker in fragment position”; the two-opt-in-span cell still fails labeled.
  • Transition-guard rejection now fires only on real opt-ins (a mentioning guard cell is prose, never a labeled rejection).
  • Spec-side sharpening: compile.md’s predicate_fragment_opt_in / invariant_fragment_opt_in rows define fragment position; verify.md’s fragments_reach_verified predicate reworded to not carry the literal marker in prose.
  • Deliberately NO new advisory: mention-position markers are legitimate prose in a spec ABOUT the marker — this corpus proves the pattern; an advisory would fire on the defining rows forever. A mis-authored opt-in falls back to the honest placeholder (pre-Revision-15 behavior).
  • Corpus artifacts regenerated: compile.tla / model_check.tla now declare “No executable invariant fragments”; spk model-check specs runs 20/20 scratch-clean; spk verify specs reports 0 uncompilable.

#108 — parameterless property blocks emit outside proptest! (specodelic-8aq)

A Property row whose generator cell yields no strategy params (no name( occurrence — e.g. `(a, b)` where one was removed prose) was emitted as a bare fn name() INSIDE the proptest! macro, which requires (pat in strategy) on every fn — a parse error that left the scratch crate uncompilable, so verify reported properties_uncompilable (worse than the honest todo-panic failure it replaced) for 7/22 corpus files.

  • Blocks with no generators now emit OUTSIDE the macro as plain #[test] fns — same metadata comments (// id: / // case: / // generator: / // predicate:) so verify’s staleness fingerprint and block discovery are unchanged, same honest todo_predicate! / verbatim-fragment assert! bodies. Blocks with strategies keep the proptest! form; the macro is opened/closed around contiguous runs so row order is preserved.
  • Law-case splitting is intact: a parameterless law row still yields one plain #[test] fn per required case.
  • The use proptest::prelude::*; import is emitted only when at least one block carries strategies — a fully parameterless artifact stays warning-clean.
  • Fragment rows are unchanged (the rjb emission shape); a parameterless row opting in with **rust:** emits its verbatim fragment as the assert! body of the plain fn.

#107 — vocabulary-triggered orphan labeling (the second half of orphan_vocabulary_labeled, specodelic-erd)

The pack mechanism’s orphan rule fired only on declared uses edges — pack vocabulary used with no pack discovered and no uses edge fell through silently (found by the bioimage D6 pilot’s probes: ## Data + data.dataset used with the data.lineage pack absent produced no orphan finding). packs.md’s orphan_vocabulary_labeled constraint requires both halves; the vocabulary half now ships.

  • The signal is structured-position-only: a pack-qualified (dotted) token in a kind cell (frontmatter kind, Constraint/Property kind cells) or a table column header whose namespace matches no discovered pack’s namespace. Prose stays unscanned — a dotted token in prose (compile.extraction_failure, a row-id citation) is not vocabulary — so the signal stays false-positive-free and files using no pack vocabulary lint byte-identically (no_pack_no_change holds).
  • A discovered pack in the token’s namespace (namespace = the pack id’s first segment; dotless ids name their namespace directly) means the token is in an active-namespace workspace — vocabulary matching and the fiber-kind walkers handle it, no orphan fires.
  • The finding names the candidate pack prefix-derived when only the namespace is known (data.dataset → candidate data.*) and both remediations (add/enable a kind: profile pack declaring the vocabulary, or fix the vocabulary) — never a generic dangling message, never silent. A concrete uses-edge orphan for the same namespace wins (it names the exact pack); the prefix-derived finding does not duplicate it.

#106 — executable predicate fragments (specodelic.md Revision 15, specodelic-rjb)

The verified gate becomes reachable: specodelic-mp1 row 7’s option C ships as a format Revision. A Property’s predicate cell or an invariant-kind Constraint’s expr cell may opt into executable translation with exactly one **rust:** marker — the cell text after it is a Rust boolean expression emitted verbatim (no mini-language; Property fragments bind the generator values v0… as Strings, invariant fragments bind the current state’s id). Cells without the marker behave byte-identically to Revision 14 — pure widening.

  • compile.md grows the fragment contract: predicate_fragment_opt_in, invariant_fragment_opt_in, and the three labeled rejection rows (fragment_law_rejected — one fragment cannot honestly serve a law row’s several named cases; fragment_guard_rejected — executable guards have no binding over the program-counter model, deferred of record; non_invariant_fragment_labeled) plus fragment_hygiene — the banned-token security/totality guard (unsafe, extern, include!, std::fs, std::process, std::net, std::env, asm!, Command), defense-in-depth, not a sandbox. The proptest scaffolding’s element type simplifies from the GenVal wrapper to plain String.
  • model_check.md grows the execution contract: executable_invariants_execute (the native backend executes every executable invariant as a dependency-free scratch-crate BFS run — engine attribution native-bfs, BFS keeps counterexample_is_minimal by construction) and invariant_totality (a panicking fragment is a violation, never a pass). rerun_on_model_change extends to fragment edits: the module now carries the fragment manifest as comments, so the artifact hash covers them. TLC still reports exploration_only against fragment artifacts — it cannot execute Rust and never claims clean.
  • verify.md pins the reachable verdict: fragments_reach_verified — both gates clean on a fragment fixture is verified at last; both_gates_required and every honesty rule untouched.

specodelic.md carries the Revision 15 decision-of-record heading; no row of its own tables changes.

#105 — the D6 pilot: bioimage-data domain pack (add-bioimage-pack)

add-bioimage-pack implemented — no code, no base-set change: the mechanism’s thin domain instance (the decision of record’s D6 pilot) ships as an in-repo kind: profile artifact at packs/bioimage-data.md (id bioimage.data, base pin specodelic.md Revision 14) and the mechanism’s first cross-pack ## Requires consumer (deps: data.lineage, numeric.predicates, empirical.registry). It declares a namespaced ## Axes section (row shape | name | axis | scale | unit | — OME-NGFF-style axis semantics with opaque scale/unit columns, bridge-never-absorb), the bioimage.transform property kind (the first fiber kind whose natural home is a base-table kind column — riding specodelic-ung’s base ∪ active-pack-fiber walkers), the same_shape_as reference field resolving to a ## Data row of the declaring file (cross-pack dependency, intra-file resolution — no reachability join, no acyclic edge set), the R2 data-shaped predicate grammar declared as named pack-qualified checkers (bioimage.dtype_is, bioimage.shape_eq, bioimage.units_convertible — the mechanism names them, never executes them; specodelic-rjb owns the executable-fragment track) plus the bioimage.same_shape_closed closure checker (the data.lineage.closure precedent), and the kind-dependent transform floor (**preserves:** + **dtype:** — the base law floor’s non-universality critique made concrete; purely additive, byte-identical with the pack discovered). Vocabulary hygiene pre-paid a third time: every declared token is dotted or verified absent (Axes, same_shape_as, preserves 0-file; bare bioimage documented asymmetry; bare predicate tokens never declared — they ride the checker rule names; pipeline prose-heavy → rejected, within prose-toxic → excluded; dtype survives only as an opaque column header and floor label). Pilot probes verified: orphan uses: [[bioimage.data]] with the pack absent → labeled linter.orphan_vocabulary exit 1; kind = bioimage.transform accepted with the pack active, labeled finding without it; base law floor byte-identical with all four packs discovered; corpus lint byte-identical except the delta’s own known activation. Probe gap filed: vocabulary-triggered orphan labeling (no pack, no uses edge) is mechanism work, not this pack’s.

#104 — pack fiber kinds are typeable in base-table kind columns (specodelic-ung)

The domain-pack mechanism’s closed-set walkers (property_kind_closed / constraint_kind_closed) walked the static base sets, so a pack-declared fiber kind (e.g. empirical.statistic) fired the finding even with its pack discovered. The walkers’ effective set is now base ∪ active-pack-fiber — the ## Kinds tokens of every pack active for the file (declared uses edge or vocabulary match, the standard advisory-first activation rule) — never narrower than the base set: base set members are accepted unconditionally, the base sets themselves do not grow (no format Revision; the packs’ Revision 14 base pins stay valid), and a fiber kind with no active declaring pack stays outside the closed set, firing the labeled finding — never a silent pass. A pack activates per-file, so a file using none of a pack’s vocabulary keeps byte-identical lint findings. Recorded in openspec/specs/packs/spec.md (Notes + fiber_kinds_typeable property), openspec/specs/linter-schema_shape/spec.md (both closed-set rows + Notes), and openspec/specs/kinds/spec.md (row shapes + Notes). Implementation: packs::active_fiber_kinds (workspace scan shared with discovery) wired into the schema-shape family; the empirical-registry pack’s fiber_kinds_typeable contract is now enforced end-to-end.

#103 — the third standard pack: empirical registry (add-empirical-registry-pack)

add-empirical-registry-pack implemented — no code, no base-set change: the statistical half of the R4 vendor convergence (mistral ×2, grok, zai) ships as an in-repo kind: profile artifact at packs/empirical-registry.md (id empirical.registry, base pin specodelic.md Revision 14). It declares a namespaced ## StatTests section (row shape | name | metric | alpha | window |), the empirical.statistic property kind, the tested_by outbound-leaf reference field, the empirical.statistic_labels and empirical.stat_test_closed checker declarations (honest-empty), and the per-kind case-label floor (**alpha:** + **window:** — the Floors facet’s first real consumer, reusing the **name:** enumeration machinery with a different required label set than the base law floor; floors are per-kind in the pack fiber, purely additive — the base law floor is byte-identical with the pack discovered, and a law-kind row may carry the labels additively, floor-not-ceiling). Vocabulary hygiene pre-paid twice (the D6 lesson): no bare-English token is declared — window appears in corpus prose and is excluded from every vocabulary-carrying facet (floor label + column only, neither in vocabulary()); StatTests, tested_by, alpha, bare statistic verified absent; bare empirical cannot falsely activate (dotted tokens cannot match prose words). Orphan probe verified: a declared uses: [[empirical.registry]] edge with the pack absent produces the labeled linter.orphan_vocabulary finding naming the candidate pack and both remediations, exit 1. A fiber kind in a base Properties kind column is not typeable under mechanism v1 (property_kind_closed walks the static base set) — the mechanism follow-up is specodelic-ung, never silently passing. Completes what the bioimage D6 pilot (specodelic-0dn) consumes; its proposal sits at the approval gate as openspec/changes/add-empirical-registry-pack/.

#102 — the second standard pack: numeric predicates (add-numeric-predicates-pack)

add-numeric-predicates-pack implemented — no code, no base-set change: the numeric half of the R1/R2/R4 vendor convergence ships as an in-repo kind: profile artifact at packs/numeric-predicates.md (id numeric.predicates, base pin specodelic.md Revision 14). It declares a typed ## Quantities section (row shape | name | kind | unit | domain |), the namespaced numeric.quantity / numeric.bound / numeric.tolerance kinds, the measured_by outbound-leaf reference field, the numeric.quantity_closed and numeric.tolerance_labels checker declarations (honest-empty), and the tolerance case-label floor (**bound:** + **against:** — R4’s reuse phrasing; floors are not in vocabulary(), so the labels never trigger activation). Unit systems (UCUM, ISO4217, microscopy) stay opaque in unit/domain — bridge-never-absorb, lint byte-identical across systems. Vocabulary hygiene pre-paid (the data pack’s D6 lesson): no bare-English token is declared — within (13 corpus files + 7 dual-format files), bound, against, unit, domain are excluded from every vocabulary-carrying facet; corpus lint issues+warnings verified byte-identical with both packs discovered. A tolerance kind here is pack-fiber-relative — the general per-kind floor registry is specodelic-aal’s separate proposal. Completes a third of what the bioimage pilot (specodelic-0dn) consumes.

#101 — the first standard pack: data/lineage (add-data-lineage-pack)

add-data-lineage-pack implemented — no code, no base-set change: the first standard pack on the Revision 14 mechanism ships as an in-repo kind: profile artifact at packs/data-lineage.md (id data.lineage, four-layer spec in its own right, base pin specodelic.md Revision 14). It declares a typed ## Data section (row shape | name | kind | dtype | units | binding |), the namespaced data.dataset / data.artifact / data.environment kinds, the produced_by / consumed_by lineage reference fields (each resolving to a ## Data row of the declaring declarative file — outbound leaves, intra-file), the data.lineage.closure checker declaration (honest-empty), and the data.artifact provenance floor. The binding column stays opaque: external standards (OME/NGFF, Parquet, BioImage.IO) are bridged, never absorbed — lint is byte-identical regardless of binding target. Deviation from the R3 trio, recorded in the change’s design D6: bare produces is NOT declared — the word appears in corpus prose and the mechanism’s whole-word vocabulary match would falsely activate the pack on every lint; append_only_packs lets a later release add it. The corpus lints byte-identically with the pack discovered (issues + warnings diffed equal); data.lineage is now the enablement target the bioimage pilot (specodelic-0dn) consumes via uses.

#100 — the extension mechanism becomes first-class: domain packs (specodelic-dcx)

add-domain-pack-mechanism implemented (Revision 14). A domain pack is a four-layer spec file with kind: profile frontmatter whose six manifest tables (Sections/Kinds/References/Checkers/Floors/Requires) declare exactly what the pack introduces. Discovery is a corpus scan anchored at the git toplevel; opt-in is advisory-first, triggered by vocabulary use, upgradeable to a declared uses edge (set-valued, targets the pack’s frontmatter id); a uses edge to a pack that is not discovered is a labeled orphan failure naming the candidate pack and both remediations. The pack-authored ## Requires table pins the base format revision — skew against the workspace corpus revision is a warnings-channel advisory, never silent, never failing. Lifecycle states draft/published/ deprecated are read from the pack’s Model (full machine = published; single state = that state); draft findings name the draft status and deprecated findings name the deprecation. Pack files are self-exempt (their manifest rows never activate checkers or produce orphan findings). Files without packs lint byte-identically: the packs data key surfaces only when a pack is discovered. Three lint rules added (append-only): linter.pack_shape, linter.orphan_vocabulary, linter.skew_advisory. V1 scoping: orphan detection is typed (the declared uses edge), not a prose-token heuristic — honest-empty beats over-reporting; pack checkers ship as declarations reporting an empty checked-set. spk doctor surfaces discovered packs.

#99 — corpus prose sweep: checker counts reconciled to eight, non-gating checkers named, copresheaf anchor fixed (specodelic-5f2)

Rule-of-5 corpus review (2026-10-01) CLAR-001 (HIGH) + EDGE-001 (MEDIUM)

  • CLAR-002 (LOW) — a prose-only sweep, no schema change, no Revision heading (corrections of record per the review’s own scope note):
  • CLAR-001 — checker counts reconciled. specodelic.md’s prose said “the join point of seven” while its own Checker Ownership table lists 8 rows (failure_shape joined 2026-09-30, specodelic-hhp); the prose now says eight. STATUS.md §1’s reading-order step 6 said “the six checker files” and omitted linter-failure_shape.md; it now names all eight gating rows including failure_shape (coverage noted as the join leaf read with the tooling in step 7), and the Revision 3 narrative’s historical count is stamped as historical (“had six then; eight gating rows today”). Two further stale counts the review’s line numbers missed, same class, fixed in the same sweep: theory.md’s limit prose said “all six checkers” and USAGE.md §2.3 “this repo’s six checkers” — both now “eight gating checkers”; linter-external_completeness.md’s “Unlike the six checkers” → eight; linter-failure_shape.md’s “Ownership is deliberately absent … ships no table row” note was stale since the row landed (specodelic-hhp) — rewritten as “was deliberately absent, then granted” with the decision of record; and linter-coverage.md’s “All six checker files … now exist” (a list missing failure_shape and coverage itself) → all eight, coverage included.
  • EDGE-001 — non-gating checker files named at the table. A one-line note under the Checker Ownership table now states that linter-observability.md (advisory, warnings channel, exit 0 by its own advisory_severity) and linter-external_completeness.md (runs only when a repo declares a checklist; never gating per orchestrate.md’s external_completeness_never_gating) exist as instances of the same format but sit outside the join on purpose — their absence is a membership statement, not an oversight.
  • CLAR-002 — broken copresheaf anchor. specodelic.md’s document instance link targeted theory.md#document-instance-functor-copresheaf, but the heading “Document instance (functor / copresheaf)” slugs with a double hyphen in every renderer — broken on the deployed docs site too. Heading reworded to “(functor and copresheaf)” and the link updated to match. A same-class dead example anchor in theory.md’s own link-usage note (#naturality — no such slug; the heading is “Naturality (safe rename)”) fixed to the real one.

Verification: table-row count == prose count (grep ^| \linter-= 8); no "six checker" inSTATUS.md; an ad-hoc anchor check over all intra-corpus markdown links (heading-slug match, CHANGELOG's historical entries excluded) reports zero broken anchors; just lint-specs0 issues (prose_untouched holds);just ci` green.

#98 — kinds.md Revision 7: reject guard de-tautologized; optional frontmatter keys declared (specodelic-x4w)

Two spec bugs from the Rule-of-5 corpus review (2026-10-01, CORR-002 + CORR-003, both MEDIUM), fixed together in kinds.md Revision 7 — rewordings that narrow nothing:

  • CORR-002 — reject’s guard was a tautology. ¬(intent_row_shape ∧ … ∧ property_row_shape): no single row can satisfy all five mutually-exclusive shape conditions, so the conjunction was always false and reject fired unconditionally from shape_checked — well-formed rows had both accept and reject enabled (non-deterministic model). The guard now negates the applicable disjunct (¬((row.kind==Intent ∧ intent_row_shape) ∨ …)) — exactly one disjunct applies per row. The same-shaped reject in linter-graph_shape.md is correct as-is: its four conjuncts co-apply to one artifact.
  • CORR-003 — intent_row_shape now acknowledges optionally-declared frontmatter keys. It read “exactly {id, kind, statement}”, but ten corpus files carry the fourth key checked_against_core (the AGENTS.md convention), documented but undeclared. Base fields stay exact; optional keys are acknowledged, mirroring the optional-typed-columns carve-out constraint_row_shape got in Revision 5. No linter change: frontmatter_valid is a subset check and stays one — the spec text is the only guard, and the pinning fixture extra_frontmatter_key_lints_clean (tests/cli.rs) asserts the tool-level reading (lints clean; the parser captures the key as an extra field rather than dropping it).

#97 — single_root_reachable enforces the Revision 10 own-file reading, tiered (specodelic-erb)

The shipped checker had drifted from its spec (Rule-of-5 CORR-001, 2026-10-01 review): it implemented undirected connectivity to SOME intent row corpus-wide, while specodelic.md Revision 10 (HITL mp1 row 8) had reworded the invariant to own-file primary linkage — a row reaches its file’s OWN intent through traces_to/derives_from chains resolved within the file, and cross-file typed edges (guard citations of foreign constraints, satisfies, observes) are outbound leaves, never reachability paths. The loose reading was the exact bootstrapping bug the format’s Notes warn about: a cross-feature reference filed under the wrong id false-resolved through another file’s intent and passed silently — the self-lint was structurally blind to it.

Now the checker builds the own-file edge set per file (plus the model’s from/to edges — connectivity, not outbound-only, so non-emitting states are not flagged) and requires every row to reach its own intent within it. Enforcement is tiered exactly as Revision 10 specifies: a row with no own-file path whose full-graph component still contains some intent row produces an advisory warning on the warnings channel (exit 0 — “anchor them to this file’s intent, or they may be filed under the wrong id”); a row with no path to ANY intent at all remains an orphaned island and hard-fails. RULE_TABLE’s semantics string (and therefore spk explain lint-rules) now states the own-file reading + tier note, replacing the superseded loose wording.

Corpus effect: zero hard failures (the cxq reconciliation holds) — three law rows (linter.coverage.coverage_naturality, linter.external_completeness.mapping_naturality, linter.referential_integrity.rename_naturality) now ride the advisory tier by design: they derive from [[specodelic.rename_naturality]] cross-file, the “same claim, two altitudes” restatement pattern, so their only tie IS cross-file — the advisory tier is their sanctioned home (the converse anti-goal — hard-failing legitimate cross-file structure — is what Revision 10’s tiering exists to prevent). The conformance case graph_typing_traces_to_constraint gains the advisory expectation: the rows stranded by the wrong-file traces_to are no longer silently false-resolved through the foreign intent.

#96 — deployed llms.txt carries a version stamp; undeployed llm.txt variant resolved (specodelic-2m7, specodelic-cke)

The deployed site rebuilds from main, but llms.txt carried no version identifier — an agent writing specs from the deployed grammar could target a format newer than its installed spk crate, and lint failures were then undiagnosable (Rule-of-5 EDGE-001, 2026-10-01 session). Separately, the repo root had an llm.txt richer variant (install + Links sections) that was deployed nowhere (404) and referenced by no build recipe — pure drift surface.

Now: scripts/stamp_llms.py runs at docs build time in BOTH paths (the docs.yml workflow and just docs-build share the script, so they cannot drift). The page phase generates docs/src/release.md from Cargo.toml

  • git ref before mdbook build (version claims never hand-typed — §6, DDL-j0u); the llms phase copies llms.txt into book/llms.txt after the build and appends a Release Status stamp — version, built-from ref, and a link to the generated Release Status page. The repo-source llms.txt is never touched (it stays the static, versionless input). The llm_txt_served invariant is unaffected — the deployed copy is still the tool summary at the site root. The undeployed llm.txt variant is deleted; its unique content (Installation, Links) is merged into llms.txt. Guards in scripts/test_stamp_llms.py (stdlib unittest, wired into just ci via the discover recipe): stamp content, source-file immutability, and the drift guards (no llm.txt at repo root; llms.txt carries the merged sections).

#95 — graph dangling messages for consumption edges are interface-shaped (specodelic-2q8)

A dangling typed consumption reference (satisfies, and by symmetry observes) reported the generic dangling shape — consumer → [[producer.nope]] — which left a reader unable to tell “typo’d row id” from “consuming a contract nobody published”; the remediation differs (fix the id vs publish the row). Found by the contract-wiring spike (specodelic-x30, case p2a); the spike’s review pass endorsed exactly this follow-up and no other.

Now: when the failing link’s column is a consumption column, the graph dangling entry is interface-shaped — consumer.hooks_installed (satisfies) → [[producer.nope]]: no published contract row producer.nope exists — publish it in the producer's file or fix the id. It names the consumer row, the consumption column, the missing row, and BOTH remediations without claiming which applies (honesty rule: structurally the two causes are the same fact). Non-consumption columns (traces_to, derives_from, guard, transitions.*, supersedes, emits) keep the generic shape. The wrong-kind path (Reference Typing violations) was already interface-shaped and is untouched. No spec row pins the dangling message format; graph.md’s total_extraction semantics are unchanged — this is message polish riding the existing dangling machinery, not a new checker (the spike rejected all four candidate checkers).

#94 — spk lint fails on parse errors, even alongside clean files (specodelic-in9)

A malformed-frontmatter file in a batch that also held parseable specs rode the warnings channel of a success envelope — exit 0 — so the pre-commit gate let a corrupted spec commit (empirically verified with a gate-probe commit). The exit-2 failure only fired when NOTHING in the batch was linted.

Now: parse errors fail the lint stage (exit 1) whenever any are present, with a next-step hint naming that the file was NOT linted; the error still names the offending file on the notes channel. Single-malformed-file invocations keep their labeled invocation failure (exit 2). Commands that consume parse_batch directly (orchestrate) already threaded parse errors into their stage results — the gap was lint-only.

#93 — linter.requirement_drift compares per requirement, not per section (specodelic-eh0, GH#8)

requirement_drift (gh#4’s rule) compared the ## Requirements mirror against each delta section with whole-section normalized equality — which made a dual-format file carrying BOTH ## ADDED Requirements and ## MODIFIED Requirements unsatisfiable: the mirror can never equal both sections at once. Reported from the consumer side (espectacular’s CI went red when the rule was widened to MODIFIED; their mixed-delta 2026-09-30-adopt-genesis/specs/cli/spec.md has no satisfying mirror under 0.3.0).

The rule now compares per requirement: each ### Requirement: in every carried delta section must appear in the mirror with identical normalized text (same trailing-space/blank-line normalization as before). Single-section semantics are unchanged — a drifted requirement still fires, now naming the requirement and its delta section in the finding. RULE_TABLE semantics updated to match.

#92 — spk parse: the typed Spec IR exits the crate (specodelic-9rv)

The four-layer grammar was fully parsed in-process — spec::Spec is a typed, Serialize-derived IR — but only from inside the crate: external consumers had to reimplement the markdown-table parser (a silent drift vector against format revisions) or scrape spk compile --json, which embeds generated artifact text and exposes no Properties rows as structure. spk parse <file> is the minimal exposure: the parsed Spec emitted directly as a json envelope — intent, constraints, states, transitions, properties (cells as keyed maps), structured links — nothing filtered, no new IR. Parse is syntax-only: it succeeds on lint-dirty files and embeds no lint status (single-purpose envelopes; consumers chain spk lint themselves, and the envelope’s hint names the command). Exactly one file per invocation — no globbing; consumers loop. Unparseable, missing, non-regular (FIFO/device), and >2 MiB input are labeled error envelopes with remediation hints and non-zero exit (the suz hostile-input discipline; placeholder parse-error labels are remapped to the real path). Requested by espectacular (ah sync consumes the IR through the versioned-binary boundary); docs/src/commands.md carries the reference, and the parse capability spec now lives at openspec/specs/parse/spec.md.

#91 — law-row named cases are machine-checkable: linter.law_cases (specodelic-9qw)

Law rows are monoid witnesses, but where their cases appeared in the predicate was free prose — the linter could not tell a declaration from a mention. specodelic.md Revision 13 ratifies the machine form compile’s required_law_cases always parsed: required cases are **name:** case labels in the row’s own predicate, the identity + associativity floor mandatory, extras first-class. The new append-only rule law_cases enforces the floor at lint time (shared spec::law_case_labels helper — compiler and linter cannot disagree), ahead of compile’s precondition gate, whose unlabeled fallback is now defense-in-depth only. The repo’s first ## MODIFIED Requirements delta shipped alongside: the dual-format mirror rules (requirement_drift, dual_format_valid, check_section_sync.py) widen additively to MODIFIED-carrying files. Dogfood: the rule immediately caught three corpus law rows living on prose (coverage_naturality, mapping_naturality — missing associativity; topo_sort_naturality — missing both); each now carries rename-instantiation floor cases and compiles one proptest block per case. Companions: USAGE §2.10 (derived parallelism — the accumulator’s algebra licenses the architecture) and the batch-resume worked example promoted out of /tmp to docs/src/examples/, its law rows relabeled to the machine form.

#90 — spk archive-companion: dual-format survival of the openspec archive round-trip (specodelic-fzo, GH#7)

openspec archive strips the specodelic half when merging deltas; the hardened recipe is now a tool: spk archive-companion <id> runs openspec archive <id> --skip-specs --yes, verifies each archived delta carries the layer (frontmatter + ## Constraints), and deploys it verbatim to openspec/specs/<cap>/spec.md. Fail-closed on any stripped delta (the tool never deploys one); idempotent re-run skips the invocation; newest archive dir wins and is named; --dry-run resolves without invoking or writing; empty delta set is a stated success. just archive-change delegates via cargo run (never a stale PATH spk). Dogfood proof: the add-archive-companion change archived itself through its own command. 16 module tests (injectable runner seam, zero spawned processes) + 3 integration tests.

#89 — SUMMARY.md forbids absolute-URL entries (specodelic-j0m)

mdbook 0.5 materializes absolute-URL SUMMARY entries as literal src/https:/... directories — the ecosystem-map entry added with the landing page (DDL-frh) produced docs/src/https:/charly-vibes.github.io/... at build time. Fix: the ecosystem link moved from SUMMARY.md into docs/src/index.md prose (new Ecosystem section), and the summary-completeness gate (specodelic-b3p’s checker) now FAILS on any http(s):// link target in SUMMARY.md with a move-it-into-prose hint — the regression cannot recur silently. Relative links unaffected.

#88 — doctor carries a crates.io update-availability notice (specodelic-4le)

spk doctor now consults genesis update_check (binaries, not libs, notify — genesis-2ex) with our own crate name + version: a newer stable specodelic on crates.io rides the warnings channel with the actionable geness notice (specodelic X.Y.Z available — you have … (cargo install specodelic)), same advisory discipline as the knowledge-currency warning. 7-day cache TTL ($XDG_CACHE_HOME/$HOME/.cache → genesis/update-check/specodelic.json); transport failures are silent by the genesis contract — the doctor never fails on the network. CI runs and GENESIS_NO_UPDATE_CHECK skip the check entirely.

Doctor-only by design: a startup-time check would tax every invocation (revisit only if doctor-only proves invisible).

Gotcha fixed en route: XDG_CACHE_HOME is itself the cache home — the wiring initially appended .cache to it unconditionally, sending the check to a nonexistent directory (silent) — caught by the hermetic CLI test, pinned with doctor_warns_when_a_newer_version_is_on_crates_io.

#87 — spk init registers specodelic in .genesis/tools.toml (specodelic-las)

spk init now declares specodelic’s presence via genesis discovery::register — .genesis/tools.toml gains a [tools.specodelic] entry with a file detector on AGENTS.md, so orchestrators (wai) discover the tool without hardcoding. register creates the file when absent and merges without clobbering sibling tool entries; re-running init is idempotent (no duplicates). A failure (e.g. an unwritable .genesis) becomes a warnings-channel note — the AGENTS.md block stays the primary payload and init still succeeds.

#86 — spk doctor runs on the genesis doctor framework, gains --fix (specodelic-sok)

The three issue checks (specs/ directory, beads, SPECODELIC block) are genesis DoctorCheck impls run through DoctorRunner; workspace facts (mode, core format spec, corpus discovery) render from detail helpers — a consumer workspace is a legitimate state, not a finding. Genesis maps Warning/Advisory to warn and only Error to fail, so the doctor capability’s warn-never-fail invariant holds by construction.

New spk doctor --fix: the SPECODELIC block check auto-fixes via blocks::inject_into (the same idempotent code path as spk init) and the runner verifies after fixing — an uncured fix is reported as a failure, honestly. Envelope shape, currency warnings, next-step footers, and exit 0 unchanged; all 10 existing doctor integration tests pass unchanged.

#85 — hooks wiring migrated onto genesis ensure_command_wired (specodelic-x56)

The consolidation ticket closed the loop: genesis-vibes 0.10.0 ships lefthook::ensure_command_wired — the two-case anchor (in-mapping insert at the mapping’s entry indent, wrapper for missing/empty/ commands-less stages) upstreamed from this repo’s donor implementation (genesis-au8). src/hooks.rs install() now delegates to it; the local wire_wrapper / insert_inside_commands surgery and the private-helper mirrors (find_anchor, stage_section, children_indent, find_commands_key, is_column_zero_key, wrapper_at, wired_entry_at) are deleted. The framework gate (husky/prek refusals) and uninstall stay local; genesis errors map onto the module’s labeled HooksError variants, preserving remediation hints.

Behavior is byte-identical, pinned by golden install/uninstall round-trip tests over 2-space and 4-space configs committed before the migration (so the pre-migration bytes were the baseline the migration had to reproduce). 21 hooks unit + 6 CLI integration tests green.

#84 — failure_shape joins the Checker Ownership table and the lint stage (specodelic-hhp)

The ct5 deferral resolved, decision (a): the failure-shape checker now has its Checker Ownership row and rides the orchestrator’s lint stage — it was already enforced on every spk lint pass (ct5) but had no ownership row and no orchestrate entry, so spk orchestrate’s lint stage under-reported the checkers that actually gate linted.

Wiring: lint::failure_shape_findings (the checker’s engine-side invocation, over the same lint_failure_shape_family slice the flat pass runs) joins run_lint_stage as branch A’s tail, dependent on linter.model_shape — the failure-shape walk reads the Model’s states, transitions and emits edges, so it runs only once the model is proven well-formed (dependency_respecting_skip); a model_shape failure skips it with the dependency’s status, and its verdict joins the stage’s conjunction. The stage doc comment and the schema_shape entry’s stale “tracked coverage gap” basis note (superseded by 7h8) were corrected in the same stroke.

Spec changes: specodelic.md’s Checker Ownership table gains the linter-failure_shape.md row (owns the three rules, depends on linter-model_shape.md) and the join-point prose now says seven checker files; linter-failure_shape.md’s “deliberately deferred” note is replaced by the decision of record.

TDD: 1 new orchestrate test (clean corpus → checker present and passed; mute failure terminal → checker failed and the stage fails) + the dependency-skip and checker-list tests extended. Gates: just ci + lint-specs 0 + openspec strict.

#83 — constraint_kind_closed + property_kind_closed as real table-walking lint rules (specodelic-7h8)

The 8kk dogfood’s honest-stub finding, closed: linter-schema_shape.md’s constraint_kind_closed and property_kind_closed invariants were declared but never enforced as lint rules — spec.rs parses row kind as Option<String> with no validation, schema_shape_findings returned an honest empty vec, and a Constraint row with kind made_up (or a Property row with kind audit) passed spk lint silently.

Two table-walkers now enforce the closed sets from the same constants the scaffold and the primer render from (guide.rs’s CONSTRAINT_KINDS / PROPERTY_KINDS — the enforced values and the documented values cannot disagree): an unreadable (absent) kind cell is outside the closed set by the invariant’s own reading, and the finding names the offending kind plus every closed-set member. Wired into lint_one’s composition last (frontmatter → referential → model_shape → ears → failure_shape → schema_shape), so spk lint and the orchestrator’s linter.schema_shape checker (already wired) both run them; spk explain lint-rules and the spk init managed block pick the rows up automatically from RULE_TABLE (append-only growth).

TDD: 3 unit tests (made-up constraint kind, made-up property kind, missing kind cell) + a fixture-corpus entry keeping the catalog-covers-every-emittable-rule test true.

#82 — constraint-level derives_from declared out-of-format; acyclic’s edge set qualified (specodelic-huf)

The vv8 conformance matrix’s constraint_derives_cycle gap, closed by spec decision (the ticket’s option c, with the typing hole closed properly): linter-graph_shape.md’s acyclic invariant read “traces_to ∪ derives_from ∪ guard-as-edge has no cycle” — unqualified — while the checker built the edge set from (constraints, traces_to), (properties, derives_from) and (transitions, guard) only. A constraint↔constraint derives_from cycle escaped both the acyclic check and edge typing (which read only the Must-resolve-to column).

Decision of record: constraint-level derives_from is out-of-format. A constraint is derived FROM by properties; it does not derive. The Reference Typing table’s Appears on: Property column is normative, not descriptive. ref_kind_compatible now reads it source-side for derives_from (typing_violation in graph.rs) — the same way it already read supersedes’ same-kind rule — so a Constraint-row derives_from is a labeled typing violation recorded as no edge. The cycle is unrepresentable, not merely uncycled; acyclic’s edge set stays closed over well-formed edges, and its invariant text now names the exact implemented set.

Spec changes: linter-graph_shape.md acyclic expr qualified + a decision note (the edge set grows only under a new Revision, same discipline as the observes exclusion) + a pinning property (derives_from_edges_property_sourced); specodelic.md gains constraint_derives_from_rejected (unit, ref_kind_compatible) pinning the Appears-on reading beside supersedes_cross_kind_rejected. Corpus artifacts regenerated; no Revision bump — no normative row changed, the table was already normative on this point.

TDD: integration test constraint_row_derives_from_is_a_typing_violation (red: the edge was recorded, no violation fired) + the matrix case flipped from conformance_matrix_known_gaps into cases() with its amended spec-true expectation (find:linter.single_root_reachable + graph.typing — the island condition persists, the cycle does not). The known-gaps harness is now empty; its flip pattern stays documented in the file.

#81 — no_orphan_property resolves the derives_from target, not just its presence (specodelic-rk3)

The vv8 conformance matrix’s orphan_property gap, closed: linter-coverage.md’s invariant reads “p.derives_from resolves to a real constraint”, but the checker only verified that a derives_from link exists — a unit property deriving from a non-law Property row passed silently (only the graph layer’s edge_kind_matches_typing flagged it).

lint_coverage now resolves each derives_from target the way total_refs does (file.row by file, bare row own-file-first then corpus-wide) against a (file_id, row_id) → kind map, and fires no_orphan_property when the target resolves to a Property row and the source property is not law — the cxq law-restates-law edge stays the one sanctioned same-kind derivation. Unresolved targets remain total_refs’ beat (the invariant restates it, scoped to this edge) — no double-firing.

TDD: 3 unit tests (target-kind rejection naming the property + required kind, law→Property passes, dangling target stays total_refs’ beat); the matrix case flipped from conformance_matrix_known_gaps into cases() with its spec-true expectation (find:linter.no_orphan_property

  • graph.typing).

#80 — spk verify --timeout-secs: wall-clock bound on the runner’s cargo run (specodelic-xx1)

The bc39f9d..main Ro5’s advisory DoS finding, closed: CargoRunner executed the scratch cargo test unbounded, so a pathological (user-authored) predicate could hang spk verify forever — the same flavor specodelic-suz fixed on the ingest path, cargo-test domain.

run_bounded (the run_tlc try_wait/kill poll pattern) wraps the whole cargo run (build + test) under a wall-clock bound: --timeout-secs <N> (default 600, 0 = unbounded). A run exceeding the bound is killed, reaped, and its partial output captured — libtest’s “has been running for over N seconds” lines name the hanging block — and reported as a labeled failure, never a silent hang.

The label is deliberately its own verdict stage: the new PropsGateState::TimedOut { secs, detail } maps to status properties_timed_out with a raise-the-bound-or-pass-0 hint, distinct from properties_failed (spec: new bounded_wall_clock invariant + hang_reported_as_labeled_timeout unit property in verify.md) — a timeout is no verdict on the property, so a legitimately long suite is re-run with a raised bound instead of misread as a failing predicate.

TDD: 5 new unit tests (bounded completion, unbounded escape hatch, hang kill → labeled TimedOut with partial output, kill reaps the child, gate/verdict mapping distinct from Failed).

#79 — Reference Typing guard row reconciled with the shipped State-citation typing; specodelic.md Revision 12 (specodelic-tik)

The independent reference oracle’s KNOWN GAP, closed: the cxq reconciliation shipped guard→State typing in graph.rs and the oracle, but the Reference Typing table still said Constraint, kind == 'invariant' only, and graph.md’s wrongly_typed_edge_rejected note contradicted graph.md’s own Model extract (whose extract transition guards on [[specodelic.parsed]], a State).

specodelic.md gains Revision 12: the guard row now admits an invariant Constraint or a State (the “has reached state X” pattern — graph.md’s extract, refactor.md’s analyze, orchestrate.md’s start_lint); a State citation records progress, it gates nothing; advisory still can never gate, by typing. A deriving Property (state_guard_citation_accepted, unit, under ref_kind_compatible) pins the acceptance beside the existing rejection rows. The stale surface is reconciled in the same stroke: graph.md’s fixture now picks a still-rejected target (guard → Property), USAGE.md §2.6’s typing remark, the embedded guide (REFERENCE_TYPING const + three prose spots + FORMAT_REVISION → Revision 12, pinned by the drift guard), the spk new scaffold’s guard comment, and guard_required’s RULE_TABLE semantics (presence-only; target typing is ref_kind_compatible’s beat). The oracle’s KNOWN GAP comment now cites Revision 12. Corpus artifacts regenerated (21 compiled, 0 failed).

#78 — verify scratch dir retention policy + SPECODELIC_VERIFY_SCRATCH override (specodelic-5m2)

Found during specodelic-oet’s just ci run: the properties gate’s shared scratch base (<tmp>/specodelic-verify) accumulated 21GB of cargo artifacts and exhausted the /tmp quota (Os error 122). The per-invocation crate dirs were already removed post-run; the growth is the shared target/ compile cache, which never shrank.

CargoRunner::run_blocks now prunes the scratch base before staging: orphaned crate dirs (from killed runs — normal lifetime is seconds) are removed after 24 hours, identified by the <pid>-<nanos>-<blocks> name shape (other entries are never touched — the base may point at a user-chosen location); the shared target/ dir is never age-pruned (it IS the compile cache) but is dropped whole when it exceeds 4 GiB, trading one cold proptest rebuild for quota headroom. The base path is overridable via SPECODELIC_VERIFY_SCRATCH. Pruning is best-effort — it never fails a verify. Documented in docs/src/commands.md.

#77 — graph extraction honors the closed union of typed reference columns (specodelic-mlg)

Found by the conformance matrix’s total_refs_dangling gap case, now flipped ungated. graph::build walked ALL links and recorded an edge whenever typing_violation fell through — which it does for untyped columns — so a [[ref]] inside an expr, predicate, or frontmatter statement cell became an edge and could dangle in the graph report, violating total_extraction‘s closed union. The links loop now skips every column outside the typed set {traces_to, derives_from, guard, supersedes, emits, satisfies, observes}: no edge, no graph dangling, no typing — resolution of non-reference links is total_refs’ beat in the linter, which already scopes over every link in the file. from/to stay out of the links loop by design: the transitions walk owns those fields (one edge per well-formed cell), so nothing double-records.

Authority note: the filter uses the Reference Typing table’s field set, not graph.md’s stale parenthetical — satisfies joined the typed fields in Revision 7 and errors.md’s contract_satisfied_from_consumer pins satisfies edges as extracted. graph.md’s total_extraction enumeration is reconciled to restate the table (and now says so). Corpus effect: 33 edges removed (expr/predicate/frontmatter kinds), dangling stays 0, violations 0, supersedes cycles 0. Gates: just ci, lint-specs 21/0, openspec strict, sync-sections; conformance matrix + oracle green.

#76 — corpus reconciled with its own Reference Typing table (specodelic-cxq)

The mp1 decisions of record (#75) applied to the corpus itself. All 38 typing-forbidden edges spk graph specs reported are gone — the corpus now passes the complete typed check with zero violations, and the dogfood graph gate is meaningful (exits 0):

  • 31 constraints.traces_to → Constraint retargets to own intent. Every linter checker file’s invariant rows previously traced to the specodelic.md constraint rows they re-own ([[specodelic.guard_required]] et al.) — a Constraint→Constraint target the table forbids. Each now traces to its own file’s intent; the cross-file “same claim, two altitudes” relationship moves into prose (each file’s Notes record the reconciliation).
  • Guard citations bridged to legal targets. The three file-level guard citations (graph.extract, orchestrate.start_lint → [[specodelic]]; refactor.analyze → [[graph]]) now cite States: [[specodelic.parsed]] / [[graph.queryable]] — Revision 10 admits State targets for guards, so “has reached state X” is typed where a state exists, prose elsewhere. orchestrate.compile_gate_matches_coverage’s expr dropped its stray [[specodelic.coverage]] citations (an expr citing its own target row — nothing to add).
  • Typing table: derives_from gains the same-kind law edge. The checker-file *_naturality laws derive from specodelic.rename_naturality (a Property) — the same-kind law-restates-law edge is now typed (derives_from: Property → Constraint, or the same Property when the deriving row is itself a law), kept well-formed by acyclic_traces, which already includes derives_from. A Revision-11-in-specodelic.md fact under append_only_variants.
  • Three laws completed to law_requires_cases. linter.coverage.coverage_naturality gained its identity case; linter.external_completeness.mapping_naturality gained identity; linter.referential_integrity.rename_naturality gained its naturality case (it had identity+associativity only).
  • Six row ids renamed off forbidden tokens (no_universal_in_id applied to every row kind): scan_all → scan_effects, warning_never_fails → warning_never_gates, parser_ast_never_reads_prose → parser_ast_prose_free, external_completeness_never_gates → external_completeness_never_gating, fan_in_never_rewalked → fan_in_graph_sourced, law_cases_all_run → law_cases_unexecuted. linter-ears_syntax.md’s no_universal_in_id expr now scopes the rule to every row kind explicitly (decision of record in that file).
  • no_prose_field_parsed rewritten as a runnable unit property (kinds.md Revision 6’s landing step): parser_ast_prose_free is now the planted-prose differential parse — no audit framing, no generator-preclusion claim remains.
  • linter-coverage.md added to specodelic.md’s Checker Ownership table — the corpus’s own dogfood had left the last checker unlisted.

Also reconciled: the openspec model-check capability spec’s two Constraint→Constraint traces_to rows (backend_identified, provenance) retargeted to [[spec]]. Graph tool tests pin the widened typing (law→law allowed, guard→State allowed, invariant-only and unit-Property halves still enforced); graph_corpus_is_fully_resolved now asserts zero violations and exit 0.

#75 — mp1’s final four rows decided: guard typing, reachability, EXCL-001, merge approval (of record)

All ten HITL rows on specodelic-mp1 are now decided — the last four via a grill session (one question per turn, each user-approved and advised by a typed Jev evaluation, jev-1.13.0):

  • Row 7 — guard typing = hybrid (jev 0.95, conf 0.93): a transition guard may be prose, but when its gating condition corresponds to a declared constraint it must cite that typed invariant Constraint. The bridge pattern is precedented in the corpus (hooks capability spec, specodelic-b15). Landed in specodelic.md Revision 10’s Reference Typing guard row; the target typing is unchanged.
  • Row 8 — reachability = tiered own-file intent (jev 0.95, conf 0.92): single_root_reachable reworded in Revision 10 — a row reaches its own file’s intent through own-file primary linkage (traces_to/derives_from chains within the file); cross-file typed edges (guard/satisfies/observes) are outbound leaves, never reachability paths. Enforcement is tiered: cross-file-only rows are advisory-flagged first; hard enforcement flips after corpus reconciliation (specodelic-cxq) anchors the ~150 failures — cxq’s first step is the strict-reachability dry-run. The strict reading of the old expr would fail ~150/375 corpus rows; the some-intent reading the shipped checker implemented would silently accept a cross-feature reference filed under the wrong id.
  • Row 5 — EXCL-001 dissolved (jev 1.00, conf 1.00): no audit property kind; kind ∈ {unit, law} stays closed (kinds.md Revision 6). The single motivating claim (no_prose_field_parsed) is mechanically testable by a planted-prose differential parse and will be rewritten as a runnable unit property with cxq; linter-schema_shape.md’s Needs Human Review flag is retired.
  • Row 2 — merge approval semantics (jev 1.00, conf 1.00): “a human has explicitly approved” = an explicit, attributable, recorded operator decision (deliberate approve step + decision-trail entry); mechanism-agnostic floor, no CI gate or role assumed — merge.md decision-of-record Notes paragraph, constraint text unchanged (same treatment as rename.md row 1).

Gates: lint-specs 21/0, graph 0 dangling, openspec strict 12/12. specodelic-mp1 closed — specodelic-cxq (corpus reconciliation) is the unblocked P2.

#74 — linter.failure_shape checker ships: the error contract’s tier-2 half (specodelic-ct5)

The three openspec/specs/linter-failure_shape/spec.md rules are now enforced by spk lint (previously spec-only by design D6 — normative-for-the-future, never claims about today’s linter):

  • terminal_states_emit — every failure terminal (inbound transitions, no outbound transitions, fail-named STATE segment) must emit exactly one file-owned effect Constraint; a mute terminal, a multi-label terminal, a cross-file or non-effect emit is a finding.
  • error_labels_unique — no two emitted error Constraints in a file share a variant head (the label’s last . segment); cross-file collisions are structurally impossible by errors.md error_expr_shape, so the check is per-file by construction.
  • guard_negation_total — every failure transition cites exactly the union of its success siblings’ citation sets (the negated disjunction), or is on the recorded carve-out list — exactly orchestrate.md’s four stage-fails (lint_fail, compile_fail, model_check_fail, verify_fail), checked membership, never an assumption; a zero-citation failure guard off the list is a finding.

All three are graph-decidable per file — the same derivation the failure_terminals_emit_labeled_errors fixture pins at corpus altitude (citation sets from transitions.guard edges, labels from states.emits edges), now walking each Spec in the lint pass. Nothing reads prose (the D2a decision: classes ⟺ distinct citation sets, never a prose judgment). v1 scope stays failure terminals only; timed_out / exploration_only remain the stated non-goal.

DOGFOOD CATCH: the new gate flagged the archived dual-format capability spec openspec/specs/compile/spec.md — its failed state predated the error contract and emitted nothing (exactly the pre-contract shape the tier-2 rules reject). Amended in place (self-contained dual format): effect Constraint compilation_failure, the failed state’s emits edge, and a label-asserted falsifying property.

Gates: just ci + lint-specs 21/0 + lint openspec 20/0 + graph + openspec strict 12/12; corpus findings stay zero (clean_repo_passes). 228 lib + 50 integration tests.

#73 — spk refactor ships: the tidy-first split advisor (specodelic-3l7)

The last pipeline-adjacent stub is gone: spk refactor [paths] [--high-fan-in N] [--changeset id1,id2] implements openspec/specs/refactor/spec.md — a non-gating advisory (exit 0 either way) that flags split candidates by exactly the specced finding shape {node_id, dependent_count, unrelated_namespace_count, suggested_split}. Every count is a graph query (the advisor consumes GraphReport’s derived edges, never walks markdown — fan_in_read_from_graph). Unrelated-namespace keying follows row 3’s decision of record (NCA == root, first-segment divergence); --high-fan-in implements threshold_is_per_repo_setting (default 3); --changeset enables narrow_diff_heuristic — a strict-subset edit depending on none of the node’s other owned rows flags regardless of fan-in (only Property→Constraint derives_from edges carry such dependencies legally, a constraint the typing table imposes on fixtures too). Human rendering + docs/commands.md section added; README’s stale stub list fixed (nothing specced remains unimplemented). Dogfood: the corpus itself flags specodelic as the top split candidate (12 unrelated dependents) — the exact pathology STATUS.md §2 names. CHANGELOG numbering: this is the implementation entry for the ticket whose row-3 decision landed as #72.

#72 — mp1 row 3 decided: refactor’s unrelated fan-in keys off the id namespace (of record)

openspec/specs/refactor/spec.md’s open question — does “unrelated fan-in” key off the id namespace or physical directory placement — decided of record: id namespace, test as written (“shares no namespace segment below root”). Directory placement rejected: ids are the format’s primary identity (id_matches_file, typed foreign keys) and every other checker reads relatedness from ids, while directory layout is outside the format’s ownership. Flat-namespace noise contained by the advisory’s non-gating typing plus the already-per-repo threshold; a configurable keying mode stays a possible future widening. No constraint text changes — decision recorded in the file’s Notes. Unblocks specodelic-3l7 (refactor tidy-first split advisor). Advised by a typed Jev (jev-1.13.0) evaluation — choice 0.70, conf 0.54, impact medium (0.85) — user-approved.

#71 — mp1 row 1 decided: batch rename is one atomic transaction (of record)

openspec/specs/rename/spec.md’s open question — is a whole-namespace batch rename one transaction or n independent ones — decided of record: one atomic transaction, all-or-nothing, the same precondition→apply→reverify shape as the single rename; a partial batch is exactly the dangling-ref_resolves failure atomic_operation exists to prevent, and git’s whole-commit atomicity makes per-file partials a policy a tool shouldn’t silently make. atomic_operation means the same thing at batch scope. Batch-rename implementation is a separate follow-up; no constraint text changes — decision recorded in the file’s Notes. Advised by a typed Jev (jev-1.13.0) evaluation — choice 0.83, conf 0.74, impact medium — user-approved.

#67 — spk migrate: wrap an openspec delta into the dual-format skeleton (specodelic-c32, gh#6 item 1)

The migration recipe (frontmatter + derive tables + byte-identical ## Requirements mirror) was fully manual — adopters converting 25 deltas by hand named the mirror’s sed one-liners as the top onboarding cost. New spk migrate <file> [--dry-run] wraps a delta in place: generated frontmatter (id: spec, EARS scaffold statement), wired scaffold layers (scaffold_constraint / one-state model / scaffold_property — wired so the file lints clean AS WRITTEN; an unwired skeleton would fail model_sections_paired and orphan-island checks on first run), and a byte-exact ## Requirements mirror. Merge semantics: existing frontmatter and layers pass through verbatim, only missing pieces are inserted; a file already carrying the mirror is refused (the mirror is the migration marker — re-running can never duplicate it). Files not named spec.md get the naming-law warning, not a silently wrong id. Anti-goal held: no prose is ever interpreted into rows — every inserted row is a marked placeholder the author replaces.

#71 — CI/supply-chain hardening: matrix, MSRV, cargo-deny, doc-example lint, honest dogfood baseline (specodelic-oet)

Six hardening slices, each gated:

  • serde_yaml → serde_yaml_ng: dtolnay archived serde_yaml in 2024-03; the frontmatter parser moves to the maintained fork (same API, zero behavior change — 395 tests green, corpus artifacts untouched).
  • MSRV: rust-version = "1.88" declared and pinned in CI (edition 2024’s floor is 1.85, but the dependency tree — icu 2.3 via miette — requires 1.88; the declared floor matches the tree’s real floor). A pinned test job ensures a dependency bump cannot silently raise it further without the declaration following.
  • Multi-OS: macOS + Windows legs run clippy + tests alongside the ubuntu full-pipeline leg — the crate is a CLI users install cross-platform. First Windows run surfaced two latent portability bugs: the quick-start test’s fence search was CRLF-sensitive, and sibling_blockers spawned WSL’s bash stub. Both fixed; guard-siblings’ hooksPath check now keys on sibling-tool CLAIMS (unset = compliant with a note), which is the honest reading of the AGENTS.md blocker and works on fresh CI clones.
  • cargo-deny: advisories + licenses gate in CI (deny.toml, permissive allow-list incl. MPL-2.0 for stateright).
  • Doc-example lint (just lint-doc-examples): fenced markdown blocks whose first non-empty line is --- are runnable format artifacts — they are extracted, named per the naming law, and linted with the freshly built spk. First run caught real drift: USAGE.md’s api.rate_limit worked example predated the four-layer law (Constraints only) — completed with Model + Properties. Regression suite: scripts/test_check_doc_examples.py (stdlib unittest).
  • Honest dogfood baseline (just lint-baseline): corpus findings vs openspec/specs/.lint-baseline, shrink-only — a new finding fails, and a baseline entry with no live finding also fails (accepted debt must be retired). Baseline is empty today: the corpus lints fully clean.
  • CI drift guards (tests/ci_wiring.rs): matrix coverage, MSRV pin, cargo-deny wiring, and the doc-example gate are pinned by tests, so the hardening cannot be silently edited away.
  • CI repair en route: main’s last three runs failed with openspec: command not found — ci.yml now installs @fission-ai/openspec@0.19.0 (pinned to the vendored version). The spike-dual-format archive fixtures were completed to full dual format (they carried ## ADDED Requirements without the capability half — the first thing spk lint openspec failed on in CI).

#70 — orchestrate.md: draft→parsed decision of record (mp1 row 4)

The Needs Human Review open question is resolved: the orchestrator stays scoped to parsed → verified — parsing remains outside its Model. The orchestrator runs the parse step and reports its outcome (parse errors gate lint via start_lint’s precondition), but the draft→parsed transition’s guards stay owned by the frontmatter checker and the parser; no Model change. Decision recorded in openspec/specs/orchestrate/spec.md Notes; unblocks closing specodelic-8kk.

#69 — Ro5 over specodelic-8kk: orchestrate hardening

Rule-of-5 review of the orchestrate changeset (converged stage 4, all findings verified/fixed). EDGE-001 (HIGH, TypeSafe-verified @ 0.97): a checklist-only corpus — zero spec files, one declared manifest — orchestrated to a vacuous succeeded (every stage passed over an empty file set, the specodelic-6pi false-green class); orchestrate now requires at least one spec file and exits 2 with a checklist-specific hint. CORR-001: the parse-stage gate keyed on substring-matching note prose (contains("parse error")) — a file whose path happens to contain the phrase would have flipped the gate; parse_batch now returns structured parse errors and orchestrate gates on ParseInput.parse_errors (unit test pins that note prose never flips the gate). CLAR-001: transitive skip reasons no longer claim a dependency “reported failed” when it was itself skipped — the reason carries the dependency’s actual status. DRAFT-001 noted (not fixed): cmd_orchestrate duplicates cmd_model_check’s backend-validation block — tidy candidate.

#68 — spk orchestrate: the four-stage pipeline driver (specodelic-8kk)

spk orchestrate replaces its stub: the orchestrator runs lint’s six Checker Ownership checkers in dependency order (frontmatter first gate; referential_integrity → graph_shape → model_shape; ears_syntax and schema_shape as independent parallel branches), then compile, model_check, and verify in sequence — halting at the first stage that fails, with every downstream stage reported as skipped (never failed) and its reason named. A failed checker’s dependents are never invoked: lint.rs now exposes per-checker family invocations (frontmatter_findings et al.) so the orchestrator runs exactly the checker whose turn it is, not one flat pass filtered for the report. Independent branches report regardless; external_completeness runs when a checklist is declared and never gates; the compile stage’s gate is exactly the coverage checker’s verdict. The model_check stage passes only on no_counterexample — the native backend’s exploration_only honestly fails the stage, so a native-only run halts there (TLC opt-in via --backend tlc --tlc-jar). Reports are byte-stable per deterministic_rerun. artifact_stem/ write_artifacts moved into compile.rs (shared with the driver); TlcPaths gained Clone. Schema_shape’s entry names its basis honestly: its rules are structural (parser + closed kind sets); the unimplemented table-walking residue is a tracked coverage gap.

#67 — docs: orchestrate shipped, refactor remains the only stub

docs/src/commands.md documents spk orchestrate’s stage/gate contract; the Pipeline-stubs section now lists only spk refactor.

#66 — mapping_naturality enforced: rename reaches into checklist mapped_ids (specodelic-4d5)

The follow-up specodelic-b15 deliberately deferred: a checklist sits outside 𝒦, so rename.md‘s old_id_fully_replaced never reached its mapped_ids cells — renaming a mapped id either dangled the cell (bare spelling, caught later by covered_maps_resolve) or — worse — failed the verify gate outright ([[…]]-wrapped cells inside table rows were wiki-link-rewritten into a file parse_str then rejected as post-rename parse failed). Both are fixed. spk rename now routes *.checklist.md files through a checklist-side rewriter (checklist::rewrite_text): only mapping data rows’ mapped_ids cells change (bare and [[…]] spellings alike, children following their parent, padding and terminators byte-exact; the items list, item/rationale cells, header, separator, and prose pass through). The verify gate now re-runs the external-completeness checker (covered_maps_resolve + manifest well-formedness) over the post-rename corpus — a missed cell or a rename that would dangle one is a labeled VerifyFailed before any byte is written (mapped(rename(I)) == rename(mapped(I))). Aspirational-note updates: openspec/specs/linter-external_completeness/spec.md, openspec/STATUS.md; docs/src/commands.md rename section. RED→GREEN with regression pinning at both the cell and file level plus a gate-rejection test.

#63 — observability contracts: observes typing, advisory check, derived boundaries (specodelic-7l3)

The format can declare outputs (emits, Revision 6) and contracts (extension_point/satisfies, Revision 7) but could not say what must be observable: a spec could declare effects nothing watches and lint clean. Landed, per add-observability-contracts (Ro5-reviewed twice — originating design pass + grounding pass that caught the Revision 8 numbering collision, the corpus’s live unobserved effect, and the missing advisory-severity machinery):

  • Format — specodelic.md Revision 9: Reference Typing gains observes (Constraint, any file → Constraint, kind == effect only), mirroring satisfies; joins no acyclic edge set (mutual cross-file observation is well-formed). kinds.md Revision 5 reconciles constraint_row_shape with optional typed reference columns (the table governs — resolves HITL specodelic-mp1 row 9). graph.md: observes in total_extraction, external_boundary_derived. linter-graph_shape.md: the acyclic union is unchanged, stated. New linter-observability.md: universe = invocation’s file set, self-observation does not count, dangling observes is referential_integrity’s beat, no waivers in v1.
  • Tool — graph: the observes typing arm (effect-only) and external_boundaries (a file is one iff it hosts ≥1 extension_point Constraint — derived, never authored). lint: rule linter.observability warns — on the success envelope’s warnings channel, exit 0, never an Issue — for every unobserved effect in the invocation’s file set. Report gains warnings; human output renders advisories.
  • Dogfood — the corpus’s own live unobserved effect (refactor.advisory_finding_emitted) is the first warning evidence (recorded in the change’s dogfood notes; gating decision deferred to a follow-up change). USAGE §2.9 pattern + decision-table row; STATUS row.

#62 — lint totality: model_shape remainder + graph_shape enforced (specodelic-b15)

Five rules that four checker files specced but no checker enforced are now lint rules (append-only additions to the rule table, TDD red-first):

  • every_state_used — a declared state no transition enters or leaves is machinery the model can never reach.
  • every_transition_valid — from/to must name declared states; a dangling to makes the model-checker simulate a different graph than the author wrote.
  • no_self_ref — a row tracing to itself via traces_to/derives_from has no owning purpose.
  • acyclic — the directed graph formed by traces_to ∪ derives_from ∪ guard-as-edge rejects cycles (rotation-normalized, reported once per cycle; self-loops are no_self_ref’s beat, never double-reported).
  • single_root_reachable — every constraint/property/state/transition row connects to some intent row (undirected connectivity over traces_to, derives_from, guard, from/to, emits — an outbound-only reading would flag every non-emitting state, which no corpus satisfies). Which intents count (any vs the file’s own) is specodelic-mp1 row 8’s open question; this implements the checker spec text as written.

Decision of record (ticket comment): reference typing stays graph-layer-owned (spk graph’s labeled violations + non-zero exit) — duplicating ref_kind_compatible in lint would double-report the same edges and pre-decide mp1 rows 7–9. The graph-shape rules land in lint because linter-graph_shape.md owns them and neither layer enforced acyclic/self-ref/reachability until now.

Dogfood consequences, all resolved in this change:

  • specs/ corpus: 18 files, zero findings under the new rules.
  • spk new scaffold: the placeholder model was an island (empty constraints table + prose guard) — the scaffold now ships a connected minimal loop (c1 invariant tracing to the intent, t1 guard citing it, p1 deriving from it) that lints clean out of the box and teaches the connected-shape law by example.
  • openspec tree bridges: hooks capability guards carry typed citations (prose kept, citation appended — the typing table’s guard→invariant law); model-check’s no_fabrication gained [[spec]] beside its prose pointer (openspec/specs/model_check/spec.md — a bare prose path produces no edge, so the constraint and its deriving property were an island). lint openspec and lint specs both report zero findings.
  • external_completeness (the fourth checker file) remains unimplemented: the checklist manifest format is Needs-Human-Review in the checker spec’s own Notes (a checklist file sits outside the four-layer shape; a sixth kind is explicitly deferred) — filed as specodelic-mp1 row 10.

#61 — bare row refs resolve in id:spec files (Option A) — specodelic-15g, gh#2.1

Adopter report (gh#2 point 1): in a dual-format delta (id: spec), a bare [[c1]] vanished — the metasyntactic skip ate the dotless target silently: lint stayed green, coverage counted it, but the graph edge never existed. Decision of record (ticket comment, user-approved): Option A — bare row refs resolve against the file’s own rows.

  • One rule: an id:spec file is self-contained (#42), so a dotless target naming one of its own rows has exactly one possible meaning — the local row. It now resolves (canonical spec.<row>) in BOTH lint (total_refs) and graph — the two paths share the law instead of graph resolving while lint skips.
  • Robustness preserved: the rule is fail-loud, not fail-open — a bare target naming NO own row still skips as metasyntactic (template placeholders), and typing violations on bare refs are now VISIBLE (a bare traces_to [[c1]] resolves and then violates Reference Typing — reported, never swallowed).
  • Dotful spellings unchanged: [[thing.one]]-style local ids keep dangling with the gh#5 self-file hint (a bare dotful target is genuinely ambiguous with file.row).
  • Coverage message fixed: it claimed “bare ids do not resolve” while its own check accepted the bare form — the claim is gone.
  • spk explain references updated: either spelling works inside a delta; files outside always use the file-qualified form.
  • Corpus churn: zero — the dogfood gates lint/graph the whole openspec tree every commit; no dual file used bare refs.

RED→GREEN: 4 tests (edge, visible typing violation, narrowness guard, lint agreement). Gates: just ci + lint-specs 18/0 + graph 0 dangling + openspec strict 9/9.

#60 — corpus discovery: consumer repos’ openspec/ tree is named where bare lint/graph/doctor dead-end (specodelic-ag5, gh#2.2)

Adopter report (gh#2 point 2): in an openspec-managed consumer repo, bare spk lint said “no spec files found” even with 14 dual-format files present; the working invocation spk lint openspec had to be found by trial. Now (option (b)+(c) from the ticket — minimal, composes with the exit-code contract):

  • lint/graph zero-files failures name the tree — when cwd carries an openspec/ directory, the exit-2 hint becomes “found an openspec/ tree — try: specodelic lint openspec” (graph likewise). The parse-error branch is untouched.
  • doctor gains a corpus discovery check — reports ok (specs/) in self-hosting repos, the openspec tree with a spec-file count in consumer repos, or the discovery rule (“pass a directory containing *.md specs; hidden and build dirs are skipped”) otherwise. The consumer next-step prefers spk lint openspec when the tree exists.
  • Decision of record (ticket comment): option (a) — a configured corpus path (env var / managed-block line) — deliberately deferred; (b)+(c) fix the discoverability gap without new config surface. Revisit only if adopters report the hint is not enough.

RED→GREEN: 4 tests (lint hint, graph hint, doctor openspec naming, doctor missing-corpus rule). Gates: just ci + lint-specs 18/0 + graph 0 dangling + openspec strict 9/9.

#59 — Ro5 review of bc39f9d..main: merge modify/delete conflicts, deletion blast radii, CRLF-safe rename

Review sweep over everything shipped since the suz Ro5 (verify, output contract, rename, TLC backend, graph edge contract, merge, adopter feedback r2). Findings + fixes:

  • merge: modify/delete conflicts were a false clean merged — a file edited on one branch and deleted on the other kept the edited copy in the union silently (or B’s version won silently), and the relint validated a tree the real merge would never produce. Now the conflict is flagged (textual_conflict, both directions) and the edited version stays only so the relint sees the tree the merge would actually produce. Confirmed empirically before the fix: git would conflict; spk merge said merged.
  • merge: deletions count as touches — a base id missing from a branch’s tip now enters touched_ids, so its dependents land in the blast radius (semantic_conflict_iff_blast_radius_intersects holds for deletions too).
  • merge: honest messages — the collision finding no longer claims “different definitions” when both branches made identical edits (the verdict still fails per no_new_id_collision’s strict reading); rename-replay findings say “removed (a rename or a deletion)” instead of asserting a rename, and distinguish replay vs stale-reference cleanup.
  • merge: --base omission is explained — without an ancestor every shared id reads as independently minted; the envelope now carries a warning saying exactly that.
  • rename: CRLF files keep their terminators — rewrite_text used lines() + \n rejoin, silently normalizing every \r\n to \n (byte churn violating prose_untouched_by_rename). Terminators are now preserved per line.
  • model-check: TLC scratch dir is cleaned on the module-write error path (was: partial residue in the temp dir).
  • Removed a stray demo-thing.md committed at the repo root (a manual spk new leftover; tests stage their own copies in temp dirs).
  • Advisory (unfixed): spk verify’s CargoRunner executes cargo test unbounded — a hanging predicate hangs the verify (cargo-test domain, not a tool bug; revisit if a wall-clock flag is ever wanted).
  • Pre-existing cosmetic: the CHANGELOG has a duplicate #56 heading (TLC ETXTBSY entry vs the ar2 entry) — left alone to avoid renumbering cited entries.

Gates: just ci + lint-specs 18/0 + graph 0 dangling + openspec strict 9/9.

#58 — adopter feedback round 2: drift is lint-enforced, self-file ref hint, help/DX papercuts (gh#4/#5/#6)

Second adopter migration (poco, 25 deltas) surfaced three issues; all claims verified on main before filing. Shipped:

  • linter.requirement_drift (gh#4) — the dual-format mirror is now enforced by spk lint itself: a file carrying both ## ADDED Requirements and ## Requirements must hold identical requirement text (per-line trailing space and blank lines ignored — same normalization as scripts/check_section_sync.py, which remains the repo-CI form). Previously drift was silently clean; the explain topic’s claim outran the checker.
  • total_refs self-file hint (gh#5) — a dangling ref whose target names a row defined in the same file now appends: “hint: row X is defined in this file; refs must be file-qualified: [[<file-id>.X]]” — no more corpus-hunting for a local fix.
  • explain dual-format documents traces_to: [[spec]] as the intended self-intent edge (gh#5) and credits spk lint (not the repo script) with drift enforcement (gh#4).
  • lint failure hint no longer cites the nonexistent Notes field — it points at spk explain lint-rules (gh#4).
  • spk --help no longer leaks the genesis CliFormat doc comment above Usage (fixed with an explicit long_about; upstream note for genesis pending) and the orchestrate stub is labeled “not yet implemented” in the subcommand list (gh#6).
  • explain format documents escaped pipes (\|) in table cells (gh#6).

Already-fixed-on-main credits: gh#5’s scaffold complaint was addressed in #56 (df1671e). Filed follow-ups: spk migrate (gh#6 item 1, highest-value), corpus discovery = specodelic-ag5.

#57 — Ro5 correction: the file-qualification doc must match checker behavior (specodelic-ar2 follow-up)

Rule-of-5 over #56 caught a doc/behavior mismatch in the very paragraph that change added: spk explain references claimed bare [[C-foo]] “fails”, but empirically a bare dotless [[row-id]] is skipped as metasyntactic — lint stays green, the coverage rule’s bare-id arm even counts it as covering (src/lint.rs derived.contains(*cid)), and the graph silently drops the edge (0 findings, 0 dangling, 0 edges on the fixture). Only the bare-TEXT form fails loudly (no reference at all → no_orphan_property).

Fixed: the references topic now states both behaviors accurately (bare text → orphan; bare bracketed → metasyntactic silent-vanish, “nothing fails but nothing resolves”); the spk new guard placeholder cell no longer demonstrates the bare [[id]] form and the emits placeholder is file-qualified too; STATUS.md’s design-decisions section drops the bare [[id]] shorthand. The checker-side gap (coverage accepting the bare form; metasyntactic skip eating refs) is the open subject of specodelic-15g.

#56 — docs/lint DX: the file-qualified ref law is now taught where authors trip over it (specodelic-ar2, gh#3)

An adopter authoring a dual-format delta wrote derives_from: C-foo (bare id), then bare text spec.C-foo — both invisible to the parser, which collects only [[wiki-links]] from structured cells; every property came back orphaned and coverage failed with no hint at the actual fix. Now the law is documented where the author already is:

  • spk explain references gains the file-qualification paragraph: refs are [[<file-id>.<row-id>]], bare ids and bare text do not resolve, and a dual-format delta cites its own rows with the spec. prefix ([[spec.<constraint-id>]]); spk explain format no longer teaches the bare by [[id]] form in the layer walkthrough.
  • spk new scaffold: the States/Transitions/Properties guidance comments render a concrete self-file example from the new spec’s own id (e.g. [[demo.thing.c1]]) and state the bare-id warning. Examples live only in comments — a dotted ref in an actual cell would dangle in a single-file corpus (metasyntactic skip is dotless-only).
  • Lint findings teach the fix: no_orphan_property now hints “derives_from takes a file-qualified wiki-link like [[<file-id>.<constraint-id>]]” using the finding’s own file id, and the coverage message shows the required target as the literal cell text to type (write [[t.c]] in the property's derives_from cell).
  • openspec/STATUS.md §1 primer Model row matches the law.

Gates: just ci (140 lib + integration) + lint-specs 18/0 + graph 0 dangling + openspec strict 8/8.

#55 — graph: the full edge contract — state edges, typing violations, supersedes cycles (specodelic-7pi)

spk graph now extracts every typed reference field instead of only the wiki-link columns. A Transition’s from/to cells are typed reference fields (→ State, same file) and yield transitions.from/transitions.to edges — the corpus graph grew from 407 to 569 edges; an unknown state in from/to dangles rather than vanishing. The Reference Typing table (openspec/specs/specodelic/spec.md) is now enforced at graph-build time: a typed reference column whose resolved target kind is forbidden (31 corpus traces_to→Constraint rows, 4 derives_from, 3 guard citing non- invariant Constraints) surfaces as a labeled violation in the report and is never recorded as an edge (openspec/specs/graph/spec.md’s edge_kind_matches_typing) — previously those edges were silently recorded. The report carries violations and supersedes_cycles; the supersedes edge set is cycle-checked (supersedes_dag, openspec/specs/linter-graph_shape/spec.md), rotation-normalized so a cycle reports once. The command exits 1 when anything is dangling, violated, or cyclic. The corpus’s own typing debts are tracked for reconciliation in specodelic-cxq — until then just graph-specs honestly reports them. The spk init managed block no longer advertises blast-radius (not yet implemented; re-added when it ships).

#56 — model-check: TLC shim spawn retries the ETXTBSY race

The TLC backend’s process spawns (version probe + run) retry a few times with short backoff on ETXTBSY (Text file busy, os error 26) — spawning a just-written script shim raced its write-close under parallel test load, flaking the TLC test harness ~2/15 on a clean tree with a spurious missing_checker. Any other spawn error, or exhausted retries, still surface immediately as the same labeled error — a genuinely missing JVM binary is never masked.

#54 — model-check: opt-in TLC backend — the JVM reference engine (specodelic-ug3)

spk model-check --backend tlc --tlc-jar <tla2tools.jar> runs the TLA+ TLC reference engine as a JVM subprocess over the compiled <stem>.tla module, -depth as the stated bound. MUST held by construction: a missing JVM binary (PATH or SPK_TLC_JAVA seam) or jar is a labeled missing_checker error — never a no_counterexample result.

  • Same run-report contract as the stateright default (backend_identified): the report carries engine: "tlc" + the version parsed from TLC’s -version probe, so two backends’ reports on the same compiled model and bound are attributable and comparable.
  • Same honesty as the native backend: zero corpus invariants are executable (prose — Decision 3, Option A), so a completed TLC run is exploration_only, never no_counterexample; a depth-cut behavior (The behavior up to this point is error-free) and a wall-clock budget the backend enforces itself (poll + kill) report timed_out.
  • Fail-closed classification: unrecognized output on a zero exit, a nonzero exit, and a violated engine invariant (TypeOK — not a Constraints-table id) are labeled tlc_error / tlc_invariant_violated errors; the counterexample leg waits on specodelic-mp1’s predicate-fragment decision.
  • --max-states has no TLC equivalent — labeled unsupported_bound, never silently ignored. The module runs in a scratch dir (TLC drops states/ beside its input — never beside the committed artifact).
  • Classification pinned by unit + integration tests through a fake-JVM seam; real-TLC agreement remains external evidence (25/25 differential, conformance suite specodelic-vv8).

#53 — merge: pre-merge id-collision + dangling-rename check (specodelic-7oq)

spk merge --branch <incoming-tree> [--base <ancestor-tree>] [current-tree] per openspec/specs/merge/spec.md — the check that runs after git’s 3-way merge succeeds, over the two branch tips’ spec trees (never runs git, writes nothing).

  • no_new_id_collision: ids defined on both tips are flagged unless the ancestor defines them identically (newly minted on both, or edited on both with divergent bodies = collision); inherited-and-unchanged ids are never falsely flagged.
  • blast_radii_recorded_pre_merge + intersection → needs_review: per- branch touched ids (files changed vs ancestor) and blast radii computed from each branch’s OWN graph artifact (graph_reused_not_rederived — fan-in/fan-out closure, no independent markdown walk).
  • rename_replayed_onto_foreign_edits flagged (replay itself delegated to spk rename): an id renamed away on one branch while the other branch mints a structured [[old]] reference is named with a remediation hint.
  • post_merge_relint_required: the union tree (A wins deletions; files A left untouched take B’s version) must re-parse, re-lint clean, and show zero dangling, or the merge is failed.
  • Findings kinds: id_collision, rename_replay, blast_radius_intersection, textual_conflict, relint_failure, unparsable. Verdicts: merged (exit 0) / needs_review (1) / failed (exit 1). The human-approval semantics of the resolved transition remain open in specodelic-mp1.

spk rename <old_id> <new_id> [files|dirs] per openspec/specs/rename/spec.md. The single-(old_id, new_id) rename lifecycle: validate → apply → verify.

  • Owner lookup by QUALIFIED id (intents by frontmatter id; rows by intent.id + local cell id — links carry the qualified id, table cells the local one; this distinction is the whole lookup).
  • Rewrites: [[old_id]] and child refs [[old_id.x]] anywhere (link syntax only — prose mentioning the old id in words is untouched, prose_untouched_by_rename); exact-id table cells and state bullets in the definition file only; the frontmatter id: line. A row rename must stay in its file’s namespace (intent.id.<new-local>).
  • Intent renames also rename the file per - ⇔ . (writes new file, removes old last — the definition is never momentarily missing).
  • Atomicity by construction: the full write set is computed and verified in memory (re-parse + linter.referential_integrity zero dangling — the two checkers openspec/specs/rename/spec.md’s Notes select) before any write, so collisions (new_id_available), unknown ids, and verify-gate rejections leave the repo byte-identical. Identity rename (a → a) is a no-op success (rename_naturality identity).
  • 4 integration tests (row rename + cross-file refs + prose untouched, intent rename + file move, collision rollback byte-identical, unknown id) + 2 unit tests; dogfooded on the real corpus (row + intent renames, 0 dangling / 0 lint issues after).
  • Exit codes: 0 renamed, 1 labeled rejection, 2 no files ingested.

#51 — Ro5 review of the hostile-input hardening set: hostile notes ride every verb’s empty failure envelope (suz follow-up)

Rule-of-5 review of #46 (f3e27f5 + 6f99b4a): verdict READY WITH_NOTES, converged at Stage 4. One MEDIUM fixed (CORR-001): the labeled hostile-input/parse notes were attached to the specs.is_empty() failure envelope only in lint and graph — compile, model-check, and verify still dropped them into a bare “no spec files to …” failure, the exact vanishing-diagnostic class #46 closed for lint. Now all five verbs carry the notes on the empty path (new integration test pins it for the three fixed verbs). LOW residuals documented, not fixed: the metadata→read gap is a TOCTOU race (airtight fix = open with O_NOFOLLOW | O_NONBLOCK

  • fstat on the fd — not worth the platform surface for a local CLI), and a duplicated doc-comment line above MAX_INPUT_BYTES was removed (CLAR-001).

#50 — output-contract residuals: exit codes for invalid invocations, human text everywhere (specodelic-7rr follow-up)

Pre-release sweep of the remaining 7rr-class warts:

  • Exit codes: unknown explain topics and new-onto-an-existing-file now exit 2 (invalid invocation — uniform with clap argument errors and the no-files case) instead of 1; 1 stays reserved for findings / tool-level failures.
  • --human is Debug-free repo-wide: explain (topic list renders as id — title lines), new (unquoted created <path>), init (one block-outcome line), and hooks install/uninstall (outcome + gate dry-run verdict) all render real text; every failure path now prints nothing to stdout — message, notes, and footer ride stderr. The old emit helper is gone; every verb routes through emit_report.

#49 — docs drift: STATUS revision row, USAGE quick-start lint-clean (specodelic-vpx)

  • openspec/STATUS.md’s corpus table recorded specodelic.md — Done — Revision 7 while the binary embeds Revision 8 (and the same file already referenced Revision 8 two sections later). Row corrected to Revision 8; the §2.6 citation of Revision 7 stays — it dates when extension_point/satisfies was introduced.
  • The USAGE.md §1 quick-start example failed the tool’s own lint: it never told the reader the filename (order.cancel must live in order-cancel.md — the id_matches_file law), and refund_timely had no deriving property (linter.coverage). The example now names the file up front and gains the refund_within_term unit property.
  • Kept honest without the CI-hardening ticket’s doc-example lint step: usage_quick_start_example_is_lint_clean extracts the §1 markdown block from openspec/USAGE.md and lints it — the new user’s first copy-paste can no longer rot silently.

#48 — output contract: exit codes 0/1/2, real human text, ok:false errors (specodelic-7rr)

The output contract tightened on four fronts (the ok:false half rides upstream — see below):

  • Exit codes are pinned and documented (--help after-help, README, docs/src/commands.md): 0 = success (lint with zero findings counts); 1 = the stage produced findings or a tool-level failure; 2 = invocation error — nothing was processed (path not found, no spec files matched, unreadable input). All five report verbs now exit 2 on an empty corpus — graph previously returned exit 0 with an empty report on a typoed path, a silent green. The JSON envelope’s envelope_kind agrees ("error").
  • --human renders real text: new src/human.rs — one formatter per report verb (lint/graph/compile/model-check/verify/doctor), each rendering from the same report values the JSON envelope carries, so the human story and the JSON story cannot drift. The Rust {:?} Debug dump is suppressed (verbosity-threshold trick, the explain pattern); failure paths print nothing to stdout — message, notes, and footer go to stderr. Snapshot regression tests pin “no Debug markers” for every report verb.
  • Error envelopes carry ok:false: root cause was upstream — genesis Envelope::success hardcoded ok:true even when to_envelope passed kind = Error. Fixed in genesis (genesis-r13, hint commands also now carry the bare runnable command — no more → Run: run: doubling). The local regression test (error_envelope_serializes_ok_false) is #[ignore]d until the fixed genesis release lands in Cargo.toml; verified RED against 0.8.1.

#47 — verify: both gates, really executed (specodelic-1pv)

spk verify <files> — the model_checked → verified transition. The guard no_counterexample ∧ properties_pass was named in specodelic.md but never enforced; now both gates are evaluated and conjoined, and every deviation is a labeled failure:

Properties gate (*_props.rs): staleness is detected by comparing the artifact’s block-metadata fingerprint (// id: / // case: / // generator: / // predicate: comments, parsed back out) against what the current spec regenerates — a hand-translated predicate body keeps the fingerprint, a spec edit changes it, and a stale artifact is never executed (properties_pass_reflects_latest_run). Execution is real, not interpreted: the artifact is staged into a per-invocation scratch cargo crate (unique test filename so parallel verifies sharing the persistent CARGO_TARGET_DIR never collide on a test binary) and run via cargo test; libtest output is parsed per block. An un-translated todo_predicate! panics and reports honestly as properties_failed — with proptest’s shrunk minimal failing input (failure_reports_shrunk_counterexample) — never as a skip. Zero property rows pass vacuously without invoking the runner.

Model gate (<stem>.check.json): the report must parse, its artifact_sha256 must match the current <stem>.tla (a missing module fails closed as stale — rerun_on_model_change), and its outcome must be no_counterexample. The native backend only ever reports exploration_only, which is explicitly not clean — verified is reachable only through a backend that actually executes invariants.

CLI: spk verify <files> --out-dir <dir>; single-file .data.status is verified exactly under the conjunction, else the first blocking stage. Both gates are always evaluated; the payload carries both so no stage is hidden.

Gates: just ci + lint-specs + openspec strict; 117 lib + 56 integration tests (incl. the cargo-backed honest-failure path).

#46 — hostile-input hardening: ingestion gate + codegen identifier sanitizer (specodelic-suz)

Two trust boundaries read or emitted from files that may not be what they claim:

Ingestion (parse_batch, shared by lint/compile/verify/model-check): std::fs::read_to_string with no file-type or size check — spk lint on a FIFO named *.md blocks forever (exit 124 under timeout); /dev/zero reads unbounded and OOM-kills (confirmed mechanism, tested under ulimit). Now: metadata is checked before any read — only regular files under a 2 MiB cap (corpus files are ~10-50 KB) are ingested; everything else is labeled, names the offending path, and is skipped. When nothing else was linted, the labeled notes ride the failure envelope (they previously vanished into the generic “no spec files found” — parse-error notes had the same silent fate, now fixed).

Codegen (sanitize_ident): the row-id → Rust-identifier sanitizer covers hostile ids — leading digits and unicode were already handled (pinned); reserved words (fn fn(…) does not compile) are prefixed with _, the empty id becomes _, and ids beyond a 64-char cap are truncated with a stable FNV-1a hash suffix (std’s DefaultHasher is release-unstable; emitted artifacts are byte-stable) so same-prefix ids never collide.

Gates: just ci + lint-specs 0 + graph 0 dangling + openspec strict 8/8; corpus artifacts byte-identical (corpus ids are short — no fn-name churn).

#45 — artifact consistency checks edges and Output, not just ids (specodelic-8nt)

assert_artifact_consistent compared only the compiled .tla module’s StateValues line and the disjunct-comment id set against the IR — so a hand-edited or stale module whose code edges differed from its comments (an edited to-state, a deleted code line with its comment left behind) passed silently, and the run report attached the modified file’s SHA-256 as provenance. The checker explored the IR’s transitions while claiming to have checked the on-disk module.

Fixed in three comparisons, all against the IR extracted from the live spec: (1) the edge multiset parsed from the \/ vpc = "…" /\\ vpc' = "…" code disjuncts; (2) the Output function verbatim — ModelIr gains emits_values (state → the value the emitter writes: the effect-Constraint’s expr, computed through the same constraint_exprs map model_to_tla reads so IR and artifact cannot diverge); (3) the existing states/id-set checks. Anything outside the emitted shape is fail-closed artifact_unreadable (a \/ line that doesn’t parse, a malformed Output entry).

Refactor: extraction split into parse_artifact_shape (pub(crate) ArtifactShape) so the TLC backend (specodelic-ug3) reuses the same parse. run() validates IR integrity (invalid_model) before IR↔artifact agreement. Dogfood catch: the specodelic-len artifact regeneration covered .tla/.check.json but left compile.toml, *_props.rs, and model_check.tla’s StateValues stale against the same commit’s spec edits — all regenerated here (the exact staleness class the new gate exists to catch).

Gates: just ci + lint-specs 0 + graph 0 dangling + openspec strict 8/8; corpus model-check 18/18 exploration_only under the new gate.

#44 — exploration_only: a completed model-check run is never a clean verdict (specodelic-len)

spk model-check reported outcome: no_counterexample with invariants_checked: [] — a clean verdict over an empty invariant set, i.e. verification that did not happen (visible in every committed specodelic/*.check.json). Fixed honestly, in the direction of the spec: the native backend interprets guards as prose (Decision 3, Option A) and executes zero invariant predicates, so a completed exhaustive exploration now terminates in a new exploration_only outcome — explicitly NOT clean, and consumers (verify’s gate) must treat it like timed_out. no_counterexample stays reserved for a backend that actually executed invariant predicates; the CORR-002 cap+1 confirmation re-run survives, now distinguishing “space ends within the bound” (exploration_only) from “genuinely truncated” (timed_out) instead of gating a clean claim.

En route, the .tla emission was fixed for opt-in TLC: the module header is now the single-line TLA+ form (---- MODULE merge ----) — the previous three-line box was not a parseable header — and Next carries a closing UNCHANGED vpc stuttering disjunct so terminal states don’t read as engine-side deadlocks. All 18 corpus artifacts regenerated; openspec/specs/model_check/spec.md gained the exploration_only state + finish_exploration transition + exploration_run_is_not_a_clean_verdict property; openspec/specs/compile/spec.md’s model_to_tla wording and disjunct-count property updated.

#43 — spk hooks install/uninstall: the dual-format gate wired into the hook chain

Dual-format drift is now caught at commit time, not just in CI: spk hooks install wires spk lint openspec into the repo’s pre-commit: stage as a marker-guarded managed block (# <!-- SPK:START/END --> comment lines), built on genesis 0.8 git_hooks (framework detection, marker conventions). Design points grounded in verified behavior:

  • Never claims core.hooksPath, never writes .git/hooks/* or .beads/hooks/* — the beads → lefthook chain keeps flowing; the lefthook config is the sanctioned extension point.
  • Two-case anchor with children-indent inference: lefthook 1.13.6 rejects duplicate commands: keys (verified: mapping key "commands" already defined) and mixed-indent keys within one mapping, so the entry is inserted inside an existing commands: mapping at the existing entries’ indent; the full commands: wrapper is injected only when the stage has none.
  • genesis lefthook::ensure_wired is NOT used for injection: verified it glues the END marker onto the next existing line (its own tests pin END parallel: true), which with comment-prefixed markers turns that line into a YAML comment — silently deleting the following key. Local injection keeps markers on their own lines; upstream consolidation filed (specodelic-x56: ensure_command_wired).
  • Install reports a gate dry-run over the envelope (data.gate_dry_run); a failing gate is a warning carrying the failure summary and an spk hooks uninstall escape hint — never a commit trap.
  • Uninstall strips only the marked block; an install-appended stage is left as a documented empty section; uninstall on an unwired repo is a successful no-op.
  • New capability spec hooks (dual format) lands under openspec/ at archive time; husky and prek repos get labeled refusals with manual-wiring hints.

Gates: 82 unit + 46 integration tests green; change at the approval gate: openspec/changes/add-hooks-install/.

#42 — total_refs file-scoped for id: spec files: the self-containment law is enforced

A Rule-of-5 review of the unification change set demonstrated that the spec-integration law “deltas stay self-contained — wiki-refs resolve only within the file” was unenforced: all id: spec files shared one resolution bucket, so a dotted ref resolved against ANY dual-format file’s rows — a typo colliding with any row anywhere passed CI (demonstrated empirically). Fix: total_refs and the graph’s dangling detection resolve id: spec files against the file’s OWN rows only (other file ids keep corpus-wide resolution; all current dual-format refs are local, zero churn). Also: the capability-format check’s remediation now distinguishes deltas (mirror the ADDED text) from capability specs (keep ## Requirements), and the migrated model-check spec cites openspec/specs/model_check/spec.md by prose path instead of a metasyntactically-skipped [[model_check]] link. Residual, by design: a single-segment file-id ref from a dual-format file (e.g. [[specodelic]]) is skipped as metasyntactic rather than flagged — none exist; revisit if one appears.

#41 — spk explain dual-format: the protocol + migration recipe served offline

The embedded primer gained a seventh topic: the spec/openspec dual- format protocol — both grammars, the id: spec naming law, the enforcing rule (linter.dual_format_valid), and the migration recipe — so a consumer hit by a dual_format_valid finding can act without repo access. Topic ids grow at the end, never renumbered (OCP bias). README and docs pages updated (six → seven topics). CHANGELOG #40 added the CI-side capability-format check; this closes the primer-side gap the same Rule-of-5 review flagged (DRAFT-001).

#40 — Migration recipe + capability-format CI check (Rule-of-5 review of the unification)

A Rule-of-5 review of the unification code asked whether migration to specodelic compliance is clearly guided. Findings applied: the migration recipe (frontmatter → specodelic tables → mirrored Requirements → gates) now lives in openspec/project.md, with worked examples; the dual_format_valid missing-half message points at it (previously at the sync script, which cannot help when a half is absent); stale facts fixed (ddl → spk, genesis-vibes 0.8); and the enforcement gap closed — a capability spec under openspec/specs/ without frontmatter or specodelic tables now FAILS CI (just sync-sections capability-format check, stdlib-unittest-tested by just sync-sections-test), because spk lint parse-skips frontmatter-less files and would never see it. Archived deltas stay exempt (pre-protocol evidence).

#39 — linter.dual_format_valid: the dual-format protocol is tool-enforced

A new lint rule recognizes dual-format files structurally: any file carrying an ## ADDED Requirements section must declare id: spec (openspec hard-requires the spec.md filename) and pair it with a sibling ## Requirements section — a half-format file is now a lint finding, not a convention. The parser records both marker headings, so the rule needs no disk re-reads; plain corpus specs (no ADDED section) are exempt. The two spike fixtures in openspec/changes/archive/2026-09-28-spike-dual-format/ were completed to full dual format (mirrored ## Requirements siblings) so the protocol’s own evidence lints clean. Unification of the two spec systems is now closed end to end: add-dual-format-deltas archived via the verbatim recipe (spec-integration capability), add-model-check archived and migrated to dual format, and the protocol enforced by spk lint (#38 archived the changes).

#38 — Unification closed: spec-integration + model-check capability specs archived

The two remaining complete-but-unarchived openspec changes were archived, completing the dual-format unification: add-dual-format-deltas via the verbatim recipe (just archive-change — its dual-format delta is now byte-identical at openspec/specs/spec-integration/spec.md), and add-model-check via plain archive (its plain delta seeded the new openspec/specs/model-check/spec.md). spk feedback gained --title passthrough for genesis-vibes 0.8’s FeedbackArgs.title.

#37 — Dual-format protocol: openspec engineering truth is specodelic-lintable

The repo’s two spec systems now share requirement content instead of duplicating it. Every openspec change delta is a dual-format file — frontmatter + Constraints/Model/Properties tables alongside the openspec ## ADDED Requirements/## Requirements grammar — authored once, validated by both parsers (openspec validate --strict and spk lint), and lintable after archive. Because openspec hard-requires the filename spec.md, dual-format files declare id: spec; the reference index in lint.rs and graph.rs was fixed to aggregate row sets per file id (several id: spec files previously overwrote each other, dangling every cross-row link — found by linting the real openspec tree). Archive runs openspec archive <id> --skip-specs and copies the delta verbatim into openspec/specs/<cap>/spec.md (just archive-change), bypassing the archiver’s lossy regeneration; the section-sync check (scripts/check_section_sync.py, wired into just ci) fails any drift between a file’s ADDED and Requirements sections. All four archived capability specs (compile, doctor, embedded-guide, lint-findings) are migrated to dual format — just ci now gates openspec validate --all --strict, spk lint openspec, and section sync (beads specodelic-3gd, openspec add-dual-format-deltas).

#36 — spk model-check: the model_check step with the native stateright backend

spk model-check <files> runs openspec/specs/model_check/spec.md’s run state machine against compile’s output — it never re-compiles: a missing <stem>.tla artifact is a labeled missing_artifact error with a spk compile hint, never a silent run. The native default backend (stateright, embedded — no external binary) interprets the compiled ModelIR as a program-counter model: initial state = first listed, transitions as always-enabled actions, exactly the semantics the committed .tla emission commits to. The run explores exhaustively within the stated bound (--max-depth default 100, --max-states, --timeout-secs) and reports no_counterexample or timed_out — a reached cap means exhaustiveness cannot be proven, so it is reported timed_out, never collapsed into clean.

Honesty note (openspec add-model-check Decision 3, Option A — approved): the corpus language has no executable predicate semantics, so the native backend checks no user invariants and reports invariants_checked: [] rather than implying a semantic check that never ran; the counterexample leg of model_check’s contract awaits a predicate-fragment decision (beads specodelic-mp1). Run reports persist as <stem>.check.json next to the compile artifacts, carrying the consumed module’s SHA-256 — verify (specodelic-1pv) reads that hash to reject stale clean results (rerun_on_model_change). TLC stays opt-in and moves to specodelic-ug3. Dogfood: all 18 corpus files check clean (no_counterexample) within the default bound (beads specodelic-nx7).

Rule-of-5 review of the implementation set (converged stage 4, verdict READY WITH_NOTES → all fixes applied): (1) artifact-consistency guard — the run interprets the live spec’s IR, so the committed .tla is parsed (StateValues set + Next disjunct ids) and compared before any run; a mismatch is a labeled stale_artifact error with a spk compile hint, closing a drift hole where a run would check the new model while hashing the old artifact (reproduced before the fix); (2) depth_reached == cap ambiguity resolved — a confirmation re-run at cap+1 (depth-cap-only runs) proves exhaustiveness, so --max-depth equal to the model’s diameter now reports no_counterexample instead of a false timed_out; (3) RunReport/Backend/Bound/Outcome derive Deserialize (verify’s read path); (4) the SPECODELIC managed block advertises spk model-check; (5) cycle/self-loop fixture test; design.md Decision 2/3 carry the post-review amendments.

#35 — spk init (SPECODELIC managed block in AGENTS.md) and spk feedback

spk init writes or refreshes a <!-- SPECODELIC:START/END --> managed block in the repo’s AGENTS.md (genesis::managed_block injector — same convention wai and espectacular use): the lint rule catalog rendered from the same RULE_TABLE findings name, the embedded format_revision, and the core commands. Idempotent — injected when missing, updated in place when present, surrounding content never touched; parses its own revision so spk doctor can warn (never fail) when the block is missing, stale, or declares no revision. spk feedback files an issue against charly-vibes/specodelic via the genesis unified feedback handler: spk feedback bug --dry-run previews (content via stdin or --from-last-error); gh-unavailable fallback writes the body to a local file. Both ship in the 0.1.0 release (beads specodelic-ze4).

#34 — spk lint/graph/compile search directories recursively; lint never silently succeeds on zero files

collect_specs now walks directories depth-first (sorted, deterministic), so specs in nested directories are found (beads specodelic-6pi). Hidden and build directories (.git, anything dot-prefixed, target, node_modules) are never descended into — the explicitly named root is always searched. spk lint on a path set that yields zero spec files now fails with a remediation hint instead of a silent ok:true (a false green); the parse-error failure path is unchanged. Three integration tests pin the contract: nested specs are linted, hidden/build dirs are skipped, and the empty result fails with a hint.

#33 — spk doctor dual-mode: self-hosting vs consumer + knowledge-currency warning

spk doctor now classifies the workspace: self_hosting when openspec/specs/specodelic/spec.md exists, consumer otherwise, and reports the mode in its envelope data. Consumer mode never fails on the missing corpus — it reports the embedded guide’s format_revision and suggests spk new in an empty workspace. Whenever a local corpus exists, the doctor compares its latest ## Revision N heading (numerically largest trailing integer) against the binary’s embedded FORMAT_REVISION and warns — on the envelope’s warnings channel, never failing — when the corpus is newer than the binary; a corpus with no revision headings skips the check with an informational note (specodelic-amg, add-embedded-aix-guide tasks 5.1-5.3, 6.2).

#32 — Self-describing lint findings + explain lint-rules catalog

Every lint finding now carries a stable linter.<name> rule_id and a one-line rule_semantics stating what the rule requires, in both the JSON envelope and human output (src/lint.rs). The semantics come from a single RULE_TABLE — the same table spk explain lint-rules renders its catalog from, so the documentation can never disagree with what the linter emits. The EARS rule was renamed to the stable id linter.ears_syntax (matching openspec/specs/linter-ears_syntax/spec.md’s id), and the {{lint_rules}} placeholder in the embedded primer is no longer a stub. Unit tests pin the catalog to exactly the rule ids the linter can emit; --version --json already reports format_revision (specodelic-2kc, add-embedded-aix-guide tasks 3.1–3.3, 6.2, 6.3).

#31 — model_check made backend-pluggable: stateright default, TLC opt-in; Alloy dropped from the corpus

Neither TLC nor Alloy has native Rust bindings — both are JVM subprocesses — but stateright is an embedded Rust model-checking crate whose API already satisfies model_check.md’s whole contract: breadth-first exploration gives counterexample_is_minimal by construction, target_max_depth/timeout give exhaustive_within_bound’s stated bound and timed_out, and named properties give counterexample_names_violated_invariant. model_check.md now specifies a backend contract instead of naming engines in its invariants: stateright is the default (no JDK, unit- testable inside cargo test), TLC stays as the opt-in reference engine run against the .tla module, and a new backend_identified invariant requires every run report to name its engine and version (with its deriving property, keeping the corpus at zero coverage gaps). compile.md keeps emitting the .tla module unconditionally — it is the engine-portable, human-reviewable artifact, independent of backend choice. Alloy is gone corpus-wide (specodelic.md Revision 8, compile.md, STATUS.md, USAGE.md, linter-model_shape.md): a SAT-based engine returns an instance, not a minimal trace, which fights counterexample_is_minimal. specodelic.md’s no_counterexample now says “the selected model-check backend” instead of “(TLC/Alloy)”. Implementation of the two backends tracked as beads specodelic-ug3.

#30 — corpus reaches covered: 23 deriving Properties rows added, no schema change

spk lint specs reported 23 coverage-rule findings (beads specodelic-qc8): constraints across nine corpus files had no deriving property, including fourteen in specodelic.md itself — the format’s own description failing its own coverage invariant. Closed entirely on the corpus side, per qc8’s anti-goals: no lint rule was touched and no Notes-cited waiver was used. Each gap got a genuine deriving unit Property row whose generator/predicate test the constraint’s own claim (e.g. specodelic.prose_untouched ← prose_does_not_affect_lint, a two-specs-differing-only-in-prose generator; merge.graph_reused_not_rederived ← reachability_from_graph_artifact_only, a walker-patched-to-panic generator). tests/cli.rs’s corpus assertion was tightened from “coverage gaps are known and tracked” to “zero findings, exit 0”. Also fixed just lint-specs failing on cargo’s two-bin ambiguity (default-run = "specodelic" in Cargo.toml). This unblocks specodelic-lnq (compile), whose compile guard requires coverage to hold.

#29 — USAGE.md: empirical runtime bounds (§2.8), no schema change

Checked whether runtime/performance constraints belong in a spec at all. Split into three cases, only one of which needed a new write-up:

  • Configured resource ceilings (a max message size, a max eval timeout, a concurrency cap) were already representable and had already been used that way in practice (the REPLy.jl evaluation) without being named — an ordinary invariant Constraint, violation as a named terminal state. No change needed; called out explicitly in the new §2.8 so it isn’t confused with the pattern below it.
  • Measured performance SLAs (p99 latency, throughput, memory under load) reuse Revision 5’s threshold-Property mechanism (precision(check(corpus)) ≥ 0.95) unchanged — a unit Property with a benchmark-scenario generator. New in this entry: an explicit note that a benchmark result is re-runnable and environment-relative, not a permanent fact the way acyclic_traces is, borrowing model_check.md’s own framing for its checker output rather than inventing new language for the same idea.
  • Provable hard real-time guarantees (“this machine always responds within Xms,” verified by the model checker itself) — confirmed out of scope, for the reason model_check.md already states for unbounded checking generally: TLA+/Alloy verify discrete state reachability, not wall-clock behavior against real hardware. Recorded as a boundary, not built around.

Quick-start list, migration table, AGENTS.md’s catalog mention, and STATUS.md’s inventory row updated to match. No specodelic.md/ kinds.md/linter change: expr/generator/predicate were already unparsed strings before this entry, so a threshold needed no new field — same shape Revision 5 already established, applied to a new domain.

#28 — USAGE.md: event-sourcing pattern (§2.7), monad/idempotency law examples, no schema change

Surveyed FP and data-oriented practices (functional core/imperative shell, exhaustive matching, errors-as-data, algebraic laws, event sourcing) against the existing four layers the same way OOP practices were surveyed for Revision 7. All of it turned out already representable — several already enforced today but not narrated as such, none needing a schema change:

  • New §2.7, event sourcing. Current state as a Property whose predicate folds over a §2.1 sealed set of event-shaped Constraints, rather than a State the Model overwrites — the same append_only_variants/supersedes/“status is computed, never stored” mechanism this repo already uses on itself (no_stored_superseded_flag), pointed at a domain instead of at the format’s own Revision history. Model/States stays reserved for a genuinely different concept: one event’s own processing lifecycle, not the ledger’s running total.
  • §2.5 extended, not replaced: added a worked idempotency case (apply(apply(x)) == apply(x), a named case beside identity/ associativity) and a monad-laws worked example (bind’s left/right identity plus associativity), noting explicitly that the floor’s own identity/associativity cases already are two of a monad’s required laws under different traditional names.
  • Quick-start pattern list, migration table, AGENTS.md’s catalog mention, and STATUS.md’s inventory row all updated to list the new pattern alongside the existing six.
  • Fixed a staleness bug found while doing this: §4’s “one of §2’s five patterns” was already wrong after Revision 7 added §2.6 last session and nobody updated the count. Reworded to stop stating a number in prose at all — point at §2’s own headings instead — so this can’t go stale silently a third time.

No specodelic.md/kinds.md/linter change accompanies this entry: every addition here is either an existing mechanism applied to a new worked example (§2.5’s extra cases) or an existing mechanism narrated as a named pattern for the first time (§2.7) — nothing needed a new Constraint kind, reference field, or invariant the way Revision 7’s extension_point did.

#27 — specodelic.md Revision 7: consumer-extended contracts (extension_point / satisfies), OCP disambiguated

Checked this format against Julia multiple dispatch and, more sharply, Clojure protocols/multimethods — the expression-problem case where a consumer conforms to a generic function or interface from a file the origin author never edits. An earlier draft added a two-way implements edge and a single_root_reachable carve-out so the origin file could enumerate its conformers; discarded deliberately, since verifying unknown, not-yet-written code isn’t something this format’s own boundedness rules can honestly support (the same limit already admitted for unbounded recursive structures, here across files instead of depth).

  • specodelic.md — constraint_kind_closed widens to {invariant, advisory, effect, extension_point}; new Reference Typing row, satisfies (Constraint, any file → Constraint, kind == extension_point only), one-directional and outbound only. Two properties added (satisfies_wrong_kind_rejected, extension_point_needs_no_reachability_carveout). Written up as Revision 7, including why guard’s existing typing and single_root_reachable both needed zero changes, and why linter-referential_integrity.md needed zero code changes (same reason as supersedes/emits before it — it reads the Reference Typing table generically).
  • kinds.md — constraint_row_shape’s kind set widens to match (Revision 4); new acceptance property constraint_row_extension_point_accepted.
  • linter-schema_shape.md — constraint_kind_closed row widened to match; new acceptance property constraint_kind_extension_point_passes.
  • USAGE.md — new pattern, §2.6: publish the contract as an extension_point Constraint in your own file; a consumer’s own file points satisfies back at it. Migration table gets a new row for “third parties can extend this” (protocols, multimethods, plugin interfaces). Quick-start summary and AGENTS.md’s pattern-catalog mention both updated to list it alongside the existing five patterns.
  • STATUS.md §2 — the “Switch/case rigidity (OCP violation)” row is now two rows: OCP within one file’s own governed set (already solved by append-only variant tables) and OCP across files (this Revision) — flagged explicitly as two mechanisms, not one restated twice, per the same-token-different-guarantee guideline AGENTS.md #6 already tracks.

#26 — Simplification pass: removed a redundant invariant family, unified the CLAR items, added a frontmatter convention

A general review looking for abstractions/generalizations across all files (not just within one), rather than another new feature.

  • Removed, refactor.md: finding_kind_closed_advisory, finding_never_gates_orchestrate, and their Properties rows. Removed, orchestrate.md: refactor_advisory_never_gates and its Properties row. All three restated a fact specodelic.md already guarantees generically since Revision 5 (advisory_cannot_gate: no advisory- or effect-kind Constraint can ever be a guard target, by typing) — the exact “one rule, stated three ways” pattern Revision 6 already caught once for append_only_variants. Each file now cites [[specodelic.advisory_cannot_gate]] in Notes instead. Not removed: external_completeness_never_gates in orchestrate.md — its own constraints are invariant-kind, so its non-gating status is a wiring fact (no transition happens to cite it), not a typing fact the type system already forbids; it still needs asserting and testing. orchestrate.md’s Notes now state this distinction explicitly so it isn’t re-collapsed later.
  • AGENTS.md — new item 3a addendum: check whether a proposed “X can never gate Y” invariant is already implied by specodelic.md’s Reference Typing before adding one. New item 3b: record a clean check-against-core-constraints result (item #3) as a checked_against_core: clear frontmatter field, not as restated Notes prose; reserve prose for when a gap actually surfaced or a judgment call is worth showing. New item 6: file naming-confusion items as instances of one guideline, not as unrelated one-offs.
  • checked_against_core: clear added to the frontmatter of compile.md, verify.md, model_check.md, rename.md, linter-external_completeness.md, orchestrate.md, graph.md, refactor.md, merge.md; each file’s near-identical “no new gap surfaced” sentence trimmed to a one-line pointer, substantive remainder of each paragraph kept as-is.
  • STATUS.md — CLAR-001/CLAR-002/CLAR-003 regrouped under one heading citing AGENTS.md #6, instead of three separately-titled subsections; EXCL-001 kept adjacent but marked as a related-but-distinct shape (missing kind, not a confusable name). New “Done” subsection backfilled for graph.md/refactor.md/merge.md (missed in Changelog #25), including their three still-open Needs Human Review items.
  • orchestrate.md — new Notes paragraph stating explicitly that graph.md’s reference graph and this file’s Checker Ownership table are two different graphs (content-reference edges vs. tool-execution-order metadata) that shouldn’t be folded into one, flagged because the surface resemblance makes that an easy mistake later.
  • No schema change. Every removal above deleted a restatement, not a fact; every file’s actual checked behavior is unchanged.

#25 — graph.md, refactor.md, merge.md created; theory.md and orchestrate.md extended

Made the cross-file reference graph an explicit, queryable artifact instead of something only reconstructible by hand, then built two consumers on top of it: a non-gating tidy-first advisor and a merge-time semantic-conflict check.

  • graph.md — new file. Derives a single adjacency structure from every typed reference field in the repo (never hand-edited), and answers transitive-closure (“blast radius”) queries against it. Scope boundary flagged Needs Human Review: whether linter-referential_integrity.md and linter-graph_shape.md should be refactored to query this artifact internally, left open rather than forced.
  • refactor.md — new file. Mechanizes the “God object / cyclic dependency” pathology STATUS.md §2 already named and Revision 2 of specodelic.md already fixed once by hand: a node with high, unrelated fan-in (per graph.md), or a changeset touching only part of what a node owns, gets a non-gating finding. Reuses two existing mechanisms rather than adding new ones — the advisory Constraint kind (Revision 5) for non-gating, and emits (Revision 6) for the finding’s shape — no sixth 𝒦 object, no new kind.
  • merge.md — new file. Closes the gap textual (git) merges can’t see: independent id collisions, and a rename on one branch left dangling by a new reference minted on the other (a critical pair, resolved as a pushout — see theory.md’s new Confluence entry). Depends on graph.md for blast-radius queries and rename.md for the actual rewrite mechanism, rather than re-deriving either; checked against AGENTS.md #3a before adding rename_replayed_onto_foreign_edits as a new row, since it’s easy to mistake for a restatement of rename.md’s own old_id_fully_replaced (it isn’t — that one guarantees completeness within a single linear rename, this one is about a reference the rename never saw, minted on a different branch).
  • theory.md — two new entries: Affected graph (transitive closure / blast radius) and Confluence (pushout of two divergent rewrites), plus matching glossary rows.
  • orchestrate.md — one new invariant, refactor_advisory_never_gates, mirroring the existing external_completeness_never_gates shape; a Notes paragraph clarifying that graph.md/refactor.md/merge.md sit outside this file’s four-stage pipeline rather than adding a fifth or sixth stage.
  • No schema change beyond what’s listed above. specodelic.md’s own Constraints, Model, and Properties are untouched.

#24 — theory.md created; category-theory framing centralized

Every category-theoretic claim scattered across STATUS.md §1, specodelic.md’s Reference Typing intro, its Checker Ownership summary, and its Notes section is now stated in full exactly once, in theory.md. Each source location keeps a plain-language restatement of the same guarantee and links out ([term](theory.md#anchor)) rather than paraphrasing the math locally — the same “one stated rule, not several hand-maintained copies that drift” move Revision 6 already made for append_only_variants, applied to prose framing instead of a constraint.

  • New file: theory.md — ten entries (schema/𝒦, typed foreign keys, document instance, well-formedness, naturality, namespacing/Grothendieck construction, interface-contract laws, Moore output, limit-over-a- diagram, additive-only evolution), each as plain-term / rigorous-term pair, plus a glossary table and a note on the kind/kind-column overload (CLAR-002).
  • Edited, current prose only: STATUS.md §1’s “categorical formalization” section and the three CT-framed passages in specodelic.md (Reference Typing intro, Checker Ownership’s “Categorically:” paragraph, the Notes section’s opening sentence). Not touched: any Revision N section in specodelic.md, or any other file’s historical narrative — those are a record of what was true and reasoned about at the time, not current framing, and this repo’s own discipline (CHANGELOG.md’s header, above) is that past entries are never edited. 𝒦-notation left as-is inside structured expr/predicate/guard field text throughout, since theory.md’s glossary now defines 𝒦 rather than removing it from technical fields.
  • No schema change. No constraint, property, state, or transition was added, removed, or reworded — this is a documentation-layer change only.

#23 — specodelic.md Revision 6; kinds.md Revision 3; USAGE.md created

Checked the format against a second, unrelated domain (a lazy, category-theoretic Python data library) end to end, then folded in the same session per AGENTS.md:

  • emits — a new optional field on State ({id, emits?} in kinds.md), typed via a new Reference Typing row (State → Constraint, kind == effect) and a new effect value on Constraint.kind. Gives a Model the output half of a Moore machine, which had nowhere to live before (State was fixed to {id} only). compile.md’s model_to_tla extended to compile it into a small Output function alongside Next.
  • Simplification: append_only_variants (specodelic.md), kind_field_extensible (kinds.md), and reference_field_extensible (specodelic.md Revision 5) were the same “grows only, only via a new Revision heading” rule, discovered three times with wordings that had already drifted out of sync with each other. Collapsed into one statement of append_only_variants covering all three id-sets (variant tables, kind value-sets, the Reference Typing table’s field set); reference_field_extensible retired as a separate row, kind_field_extensible reworded to cite the merged rule instead of restating it. linter-schema_shape.md’s matching constraints and Properties merged the same way (id_set_grows_only/id_set_order_stable replacing three separate constraints), with no loss of enforcement.
  • Wording bug fixed: linter-referential_integrity.md’s ref_kind_compatible named three reference fields by hand (traces_to/derives_from/guard) instead of reading the Reference Typing table generically — already stale (missing supersedes, added Revision 5) despite specodelic.md’s own Revision 5 notes claiming this check needed zero changes for that addition. The implementation claim was true; the file’s wording wasn’t. Reworded to match.
  • USAGE.md created — a domain-spec quick-start plus a pattern catalog (closed enumerations, Moore output, multi-implementation conformance via the Checker Ownership shape, staged/lazy evaluation, law cases beyond the required floor) and a migration guide from artifact-per-purpose formats. Linked from AGENTS.md and STATUS.md §5 so it’s found before someone concludes the format needs a new mechanism it already has under a different name.

#22 — specodelic.md Revision 5: advisory Constraint kind, supersedes

Checked the format against ten features a real polyglot tool ecosystem needed. Seven were already representable with no schema change (non-gating quality signals via existing mechanisms once advisory below exists, confidence-scored properties via the already-unparsed predicate field, feedback/regression loops and priority-ordered fallback via the open States/Transitions table, cross-language adapter contracts via a new file rather than a sixth 𝒦 object). Two needed real additions:

  • advisory added to Constraint.kind ({invariant, advisory}), with guard’s Reference Typing row narrowed to Constraint, kind == invariant only — an advisory constraint can never gate a transition, by typing rather than by the checker remembering to skip it.
  • supersedes added as a new, self-typed Reference Typing field (Constraint→Constraint, Property→Property) so a newer row can declare what it replaces; checked for acyclicity as its own independent supersedes_acyclic graph, kept separate from traces_to/derives_from on purpose (lineage and intent-tracing answer different questions). reference_field_extensible added alongside it, since adding supersedes exposed that the Reference Typing table’s own field set had no stated growth rule (superseded, along with kind_field_extensible, by the merged rule in #23 above).

Enforced the same session: linter-schema_shape.md (kind-closure, reference-table growth) and linter-graph_shape.md (supersedes_acyclic as its own DAG check). linter-referential_integrity.md’s ref_kind_compatible needed no code change, since it already read allowed_targets(field) from the Reference Typing table rather than hardcoding it — though see #23 for the wording debt this created and didn’t pay off until the next revision.

#21 — orchestrate.md created; orchestration (P0) done — every prioritized §4 item now specced

Addressed STATUS.md §4’s last prioritized item, the top-level orchestrator (analogous to how ddl orchestrates the rest of that tool ecosystem). Every pipeline stage already had its own spec — the six Checker Ownership checkers plus linter.coverage for lint, compile.md, model_check.md, verify.md — but nothing specified the thing that calls them in order and gates each stage on the last. orchestrate.md closes that with an idle → lint_stage → compile_stage → model_check_stage → verify_stage → succeeded/failed lifecycle: checkers with a Checker Ownership dependency are skipped (not failed) if their dependency failed, independent branches (referential/graph/model vs. ears_syntax vs. schema_shape) always run and report regardless of each other, linter.external_completeness runs but never gates anything, and later stages never start before the prior stage’s exact specodelic.md guard is met.

Explicit scope boundary drawn in Notes: this file drives the lint/compile/model_check/verify pipeline only, never rename — a rename is always a separate, on-demand operation, not something a pipeline run can trigger implicitly.

No new gap surfaced in specodelic.md’s own constraint list, same reasoning as rename.md and linter-external_completeness.md. One Needs Human Review item opened: whether the orchestrator should also own driving each file’s own draft → parsed transition, or stay scoped to parsed → verified as specified here. With this file, every item STATUS.md §4 had prioritized (the old P0 through P2) is now specced; what remains is the lower-severity CLAR/EXCL loose ends already on record.

#20 — linter-external_completeness.md created; external completeness (P0) done

Addressed STATUS.md §4’s long-standing P1-then-P0 unsolved problem: every gap folded into Revision 2 was found by a human eyeballing a new checker file against specodelic.md’s existing list — linter.coverage mechanizes internal consistency (a present constraint has a test) but says in its own Notes it can never prove a constraint is missing outright. linter-external_completeness.md mechanizes the structurally different thing instead: given a declared external checklist, every item must carry an explicit covered (mapped to a real constraint/property id) or waived (with stated rationale) claim — so the checklist can never be silently unconsulted, even though whether a mapping is semantically correct stays outside what any checker here can verify (spelled out plainly in the file’s own Notes, the same honest half-measure linter.coverage makes one level in).

Unlike the six Checker Ownership table checkers, this one is optional per repo and doesn’t gate linted/compiled/verified — a repo with no declared checklist has nothing to be incomplete relative to. Whether to require it for release is left to CI or the still-unbuilt orchestrator, a policy layered on top of specodelic rather than a fact it asserts about every repo.

One Needs Human Review item opened: mapped_ids is a reference the existing Reference Typing table doesn’t name, because a checklist file isn’t itself a specodelic file (no frontmatter, no Constraints/Model layers) — whether it’s a sixth kind outside 𝒦 or a degenerate spec file reusing the four-layer shape is left undecided, and mapping_naturality is asserted aspirationally until that’s settled. No new gap folded into specodelic.md itself. STATUS.md’s P0 is now fully done; orchestration (previously P2) is renumbered P0.

#19 — rename.md created; rename/refactor tool (P0) done

Addressed STATUS.md §4’s P0 item. rename_naturality had been asserted as a property in three files (specodelic.md, linter-referential_integrity.md, linter-graph_shape.md’s topo_sort_naturality) without the tool it’s a law of ever having its own Intent, Constraints, Model, or Properties. rename.md closes that: a requested → checked → applying → applied → verifying → passed/failed lifecycle for a single (old_id, new_id) request, with local invariants for id-availability, filename-matching (per id_matches_file), atomicity (all-or-nothing, never a partial edit), kind-preservation, and non-interference with prose — then a verify step that re-runs linter.referential_integrity and linter.graph_shape (the two checkers whose owned constraints depend on cross-file state a single rename’s own bookkeeping can’t self-certify) before reporting passed.

No new gap surfaced in specodelic.md’s own constraint list — the four local invariants this file needed are the same shape as compile.md, model_check.md, and verify.md each carrying constraints specific to their own lifecycle step. One Needs Human Review item opened: whether a batch rename (a whole namespace prefix at once) is one atomic transaction or n independent ones — not specified here, left open rather than assumed. STATUS.md’s P0 is now fully done; P1 (external completeness checking) is renumbered P0.

#18 — verify.md created; compile/verify pipeline (P0) fully done

Addressed the last of STATUS.md §4 P0’s three items. specodelic.md names verify as the model_checked → verified transition guarded by no_counterexample ∧ properties_pass, but neither what “running the properties” means nor how that conjunction is enforced was specified. verify.md closes it: it executes every proptest! block compile.md produced, and combines that with model_check.md’s clean/counterexample outcome (both_gates_required) into the single verified gate.

law_cases_all_run deliberately echoes specodelic.md’s law_requires_cases: that constraint ensures a law-kind property has ≥ 2 cases before it’s allowed to compile; this one ensures all of the compiled cases actually pass before the file can verify — the same discipline on either side of compile.md.

No new gap surfaced in specodelic.md’s own constraint list. STATUS.md’s compile/verify pipeline P0 is now fully done and folded into a “Done” note; the rename/refactor tool (previously P1) is renumbered P0.

#17 — model_check.md created

Addressed the second of STATUS.md §4 P0’s three items. specodelic.md names model_check as the compiled → model_checked transition, guarded only by model_present (a Model section exists) — the actual invocation of TLC/Alloy against compile.md’s model_to_tla output, and what a result must contain, had never been specified. model_check.md specifies a bounded, re-runnable check with a minimal-counterexample guarantee and a clean/counterexample/timed_out outcome space.

New backlog item — CLAR-003: writing this file made explicit something implicit in specodelic.md’s naming: model_checked means “a run happened,” not “the run found no counterexample” — that fact (no_counterexample) is a separate invariant consumed only by verify’s guard. Same shape as CLAR-001 and CLAR-002; not resolved by renaming the state, for the same reason (should go through rename_naturality).

No new gap surfaced in specodelic.md’s own constraint list — every constraint in model_check.md traces to its own intent, referencing specodelic.md’s existing no_counterexample and model_present rather than restating them.

verify is the last item in the compile/verify pipeline (STATUS.md §4 P0) — it consumes both compile.md’s proptest! blocks and this file’s clean/counterexample outcome.

#16 — compile.md created

Addressed the first of STATUS.md §4 P0’s three items: Compile (specodelic.md’s linted → compiled transition) had never been given its own spec — only named as “the functor Set^𝒦 → TOML” in prose. compile.md specifies all three of its target translations (Constraints → TOML, Model → TLA+/Alloy, Properties → proptest!), plus totality, id-preservation, and round-trip-stability guarantees.

No new gap surfaced in specodelic.md this time — every constraint in compile.md traces to its own intent rather than to a top-level invariant. One thing it does retroactively firm up: specodelic.md’s rename_naturality law has always included a naturality case (compile(rename(I)) == rename(compile(I))) referencing a compile function that had no specification — that case is now checkable in practice, not just written down.

model_check and verify — the other two P0 items — both consume compile.md’s output (the TLA+/Alloy module and the proptest! blocks, respectively) but still need their own spec files for running the generated artifact and interpreting the result.

#15 — linter-schema_shape.md enforces constraint_kind_closed/property_kind_closed

Closed the follow-up kinds.md (#14) recorded but left open: no checker enforced the two new closed-kind invariants specodelic.md Revision 4 added. Added a kind_checking phase to linter-schema_shape.md’s model, ahead of the existing revision-diffing (diffing needs a prior revision to compare against; the kind-closed check doesn’t, so it runs first and independently — a diff_skip edge was added for files with no revision history, which the model previously had no path for). Two new properties (constraint_kind_invalid_rejected, property_kind_invalid_rejected) plus a passing case. Updated specodelic.md’s Checker Ownership table row for linter-schema_shape.md to list both newly-owned constraints.

STATUS.md’s P0 backlog item is now closed; P1 (compile/verify pipeline) renumbered to P0.

#14 — kinds.md created; specodelic.md Revision 4

Addressed STATUS.md §4 P0: Intent, Constraint, State, Transition, Property — the five objects of 𝒦 — had never been specified as subjects in their own right, only referenced from scattered prose and the Reference Typing table. kinds.md now gives each a canonical field set and, for the two that carry their own kind column (Constraint: invariant; Property: unit/law), a closed value set.

Gap surfaced, folded into specodelic.md as Revision 4 (same session): nothing previously required a Constraint or Property row’s own kind column to come from a closed set at all. Added constraint_kind_closed and property_kind_closed, tracing to kinds.md’s row-shape constraints. Follow-up recorded, not yet done: neither new invariant is enforced by any checker file’s Constraints table yet; linter-schema_shape.md is the natural owner and needs an edit to add the enforcing rows.

New backlog item — CLAR-002: kinds.md’s Notes flag that “kind” is overloaded in this repo — 𝒦’s five objects vs. the kind column that Constraint and Property rows separately carry. Same shape as the open CLAR-001 naming collision; not resolved here, since the fix is a column rename that should itself go through rename_naturality rather than be done by hand.

EXCL-001 note: property_row_shape’s kind ∈ {unit, law} in kinds.md is now the authoritative place that enum lives — when EXCL-001 (adding an audit kind) is actioned, this is the file that gets the new Revision, alongside linter-schema_shape.md.

#13 — Second Rule-of-5 review, fixes applied

Reviewed the full 11-file corpus, focused on the 3 files added in #12 and whether Revision 3’s fixes held. Found: STATUS.md had already drifted — still labeled specodelic.md as “Revision 2” one round after Revision 3 was made, plus two broken §5 cross-references that should have been §2 and §4. Also found AGENTS.md restated two constraints from specodelic.md as free prose instead of referencing them (a second source of truth that could silently drift), and CHANGELOG.md’s own historical section headers used pre-rename filenames with no pointer to the current name. All four fixed: STATUS.md’s revision label and both cross-references corrected; AGENTS.md items 2 and 4 now point to specodelic.md instead of repeating its content; stale changelog headers annotated with current filenames; sequence numbers (this note included) added to every entry.

#12 — AGENTS.md created

Standing operating instructions for any agent working in this repo, distinct from STATUS.md (current state + plan) and CHANGELOG.md (history): the file-naming rule, the required workflow for adding a spec file (check against the existing constraint list before considering it done — four of the first seven checker files needed this), the after-every-change checklist (update changelog + status, grep for stale references), and what parts of the pipeline don’t exist yet so an agent doesn’t assume otherwise.

#11 — Revision 3 — Rule-of-5 review fixes

Files renamed (5):

  • linter-referential-integrity.md → linter-referential_integrity.md
  • linter-graph-shape.md → linter-graph_shape.md
  • linter-model-shape.md → linter-model_shape.md
  • linter-ears-syntax.md → linter-ears_syntax.md
  • linter-schema-shape.md → linter-schema_shape.md

Files edited:

  • specodelic.md — fixed id_matches_file (was not an invertible function; hyphens collided between namespace dots and underscores). Removed stale “not yet written” notes. Added Revision 3 section.
  • linter-coverage.md — corrected “seven checker files” claim to the accurate count and scope (six in the Checker Ownership table; coverage itself gates compile, not lint).
  • STATUS.md — logged Revision 3, updated inventory table to renamed filenames.

Trigger: Rule-of-5 review (rule-of-5-universal) of the full corpus, requested by the user, found 1 CRITICAL, 2 HIGH, 2 MEDIUM, 3 LOW findings. The CRITICAL and both HIGH findings were fixed above. Two findings remain open (see Backlog in STATUS.md): the coverage/linter.coverage naming collision (CLAR-001), and the missing audit property kind for no_prose_field_parsed-style claims (EXCL-001).

#10 — linter-coverage.md created

Seventh file. Checks every constraint has a deriving property and every law-kind property has its associativity/identity cases. Gates the compile transition in specodelic.md. No new gaps in specodelic.md surfaced — third checker in a row to close clean, after linter.ears_syntax and linter.schema_shape.

#9 — linter-schema-shape.md created (now linter-schema_shape.md)

Checks variant tables only grow across revisions and that the parser never branches on prose field content. Scope narrowed from the original plan: no_boolean_columns ended up owned by linter-model-shape.md instead, scoped to the model section specifically. Surfaced one unresolved item: no_prose_field_parsed doesn’t fit the generator/predicate property shape (it’s a claim about the parser’s implementation, not spec-file content).

#8 — linter-ears-syntax.md created (now linter-ears_syntax.md)

Checks the intent statement matches an EARS pattern and that row ids don’t encode two capabilities or universal quantifiers. First checker to surface zero new gaps in specodelic.md.

#7 — specodelic.md Revision 2

Decomposing the linter into separate checker files surfaced four gaps in Revision 1’s constraint list: id_matches_file, ref_kind_compatible (a Reference Typing table was added to resolve it), single_root_reachable, and the every_state_used/every_transition_valid pair. The flat seven-clause lint guard was also replaced with the Checker Ownership table, since the flat conjunction was itself a God-transition.

#6 — linter-model-shape.md created (now linter-model_shape.md)

Checks every transition has a guard and the model’s states/transitions are internally consistent (declared states are used, transition endpoints exist). Surfaced two gaps folded into Revision 2: every_state_used/every_transition_valid.

#5 — linter-graph-shape.md created (now linter-graph_shape.md)

Checks the traces_to/derives_from reference graph is acyclic. Surfaced one gap folded into Revision 2: single_root_reachable (acyclicity alone doesn’t rule out an orphaned cluster with no path back to an intent).

#4 — linter-referential-integrity.md created (now linter-referential_integrity.md)

Checks id uniqueness (within file and across the repo) and that every [[wiki-link]] resolves. Surfaced one gap folded into Revision 2: ref_kind_compatible had no defined typing table at the time.

#3 — linter-frontmatter.md created

First checker file. Checks frontmatter has id/kind/statement and kind == "intent". Surfaced a new invariant not yet in specodelic.md at the time: id_matches_file.

#2 — specodelic.md Revision 1

Initial version. The meta-spec: specodelic described as an instance of its own format. Defined the core constraint list, the six-state lifecycle (draft → parsed → linted → compiled → model_checked → verified), and one law-kind property (rename_naturality) establishing the format’s refactor-safety guarantee.

#1 — Format design established (pre-file)

Before any file existed: the four-layer structure (Intent / Constraints / Model / Properties), the choice of markdown + YAML frontmatter + tables + [[wiki-links]] as the concrete syntax, the categorical formalization (𝒦, copresheaves, natural transformations for refactoring, the Grothendieck construction for cross-file ids), the diagnostician-to-schema mapping (making specific code smells ungrammatical rather than merely lint-flagged), and the data-oriented/Clojure-flavored bias (open maps, namespaced keys, predicates over inheritance).

#64 — external completeness implemented: the five linter.external_completeness rules (specodelic-b15)

The optional checker’s manifest format was the last open question (mp1 row 10) — decided of record in linter-external_completeness.md’s Notes: a checklist is a dedicated *.checklist.md artifact OUTSIDE 𝒦 (flat ## Items list, ## Mapping table with exactly item/status/mapped_ids/rationale columns, presence-of-file = the declaration), rejecting the degenerate-spec-file option that would have grown 𝒦 after all. Implemented TDD-style: a lenient manifest parser (src/checklist.rs — a manifest that cannot be read emits checklist_well_formed findings, never silently vanishes) and the five rules in src/lint.rs — checklist_well_formed, every_item_accounted (also owns the status set), covered_maps_resolve (mapped ids must resolve to real constraint/property rows — a file id or section anchor is machinery, not a claim), waiver_has_rationale, and no_duplicate_claim (one claim per item, never double-reported as unaccounted). Non-gating by construction: the pass runs only when a checklist is declared, never touches any file’s linted state, and spk compile’s precondition gate deliberately runs lint_corpus without it. mapping_naturality stays aspirational — the rename tool reaching into mapped_ids is deferred to its own ticket (until then a renamed id dangles loudly, covered_maps_resolve fires and names it). Corpus unchanged (no checklist declared: not_applicable), gates green.

#65 — external completeness hardening: Rule-of-5 fixes over specodelic-b15

The Rule-of-5 review of the shipped change set found one CRITICAL-class bug and five advisory gaps; all fixed. CORR-001 (false green): the missing-sections guard keyed on the LAST header seen, so a manifest with ## Mapping but no ## Items — or vice versa — reported zero defects and linted clean; replaced with section-visibility flags + regression tests (TypeSafe-verified @ 0.78, deterministic binary reproduction). Advisories: UTF-8 BOM tolerated at manifest parse (EDGE-001); a manifest declaring zero items is itself a checklist_well_formed defect (EDGE-002 — recorded in the decision text); ### -depth headers inside a section are prose, never section switches (EDGE-003); status/item mapping cells tolerate surrounding backticks, matching the header row’s leniency (CLAR-002); a bare single-segment mapped id’s finding now teaches the dotted file_id.row_id spelling (CLAR-003); the lint payload carries checklists_declared so a consumer can tell an empty pass from a skipped one (EXCL-002). Gates green.

#66 — the error contract is a published spec file (openspec/specs/errors/spec.md)

add-error-contract phase 1 (beads specodelic-uie, tasks 1.1–1.4): the cross-cutting output contract moves from CHANGELOG lore (#48’s specodelic-7rr exit-code/envelope work) into openspec/specs/errors/spec.md — three extension_point rows (envelope_error_kind, exit_code_mapping, remediation_hint_present) plus eight invariant rows (namespaced label shape, emitting failure terminals, graph-decidable failure classes, typed negation guards with an orchestrate carve-out, single labeled failure, label-falsifying properties, contract-exclusivity, enforcement routing). The RED is a graph fixture (error_contract_rows_are_published) asserting the three rows are published and property-covered; it failed before the file existed and passes after. Enforcement is routed three-tiered (existing checkers / future linter-failure_shape / pipeline fixtures) — no tier-2 rule claims today’s spk lint. No core Revision consumed (D7: Revision 9 stays free for add-observability-contracts). Corpus artifacts regenerated (errors.{toml,tla,props,check.json}); dogfood green.

#67 — every failure terminal now emits a labeled, falsifiable error

add-error-contract phase 2 (beads specodelic-uie, tasks 2.1–2.5): the corpus’s 15 mute failure terminals are restructured — compile.md splits failed into extract_failed/emit_failed per its own compile_is_total two-class argument, and every file with ≥2 failure transitions carrying differing negation citation sets splits its failure state per class (rename ×3, merge ×3, linter-schema_shape ×3, coverage/ referential_integrity/ears_syntax/external_completeness/model_shape/kinds ×2 each); single-class files keep failed and gain the emits edge. Every failure terminal emits exactly one file-owned effect-kind error Constraint whose label is file-id-namespaced (compile.extraction_failure(row_id, reason) …) and points satisfies at the three errors.md contract rows; every label carries a unit property asserting the exact label. The ¬x_ok.guard prose idiom is replaced by typed negations citing exactly the negated sibling’s citation set — orchestrate.md’s four stage-fails stay prose on the recorded D2 carve-out, now one failure state per stage (lint_failed/compile_failed/model_check_failed/verify_failed). The RED fixture failure_terminals_emit_labeled_errors derives terminals/citation sets/label sets mechanically from spk graph and failed pre-change (15 mute terminals, 0 emitting). Corpus artifacts regenerated (20 × {toml, props, tla, check.json}); all just ci gates green.

#68 — linter-failure_shape.md: the error contract’s tier-2 checker, spec-only

add-error-contract phase 3 (beads specodelic-uie, tasks 3.1–3.3): the checker file lands on the linter-external_completeness.md shape — terminal_states_emit (v1 scope: failure terminals only; timed_out/ exploration_only are the stated non-goal, keeping the exit-code question visible for a later Revision), error_labels_unique (per-file variant-head uniqueness — trivially green corpus-wide today because error labels are file-id-namespaced; exists so a format change cannot silently drop the namespacing law), and guard_negation_total (citation-set union equality against success siblings, or membership of the recorded carve-out list — currently only orchestrate.md’s four stage-fails). The class rule stays the graph-decidable form (D2a); no Checker Ownership row until implementation (D6). Implementation ticket filed: specodelic-ct5 (notes AGENTS.md’s stale 6pi blocker to the maintainer). STATUS §1 inventory gains errors.md + linter-failure_shape.md; docs SUMMARY updated; corpus artifacts regenerated (21 files). Fixture hardening en route: the RED fixture’s terminal/sibling heuristics now key on the STATE segment of the node id — linter.failure_shape’s own file id contains “failure”.

#69 — Rule-of-5 fixes over the error contract: the guard rule’s scope and the label shape

TypeSafe-verified Ro5 pass (jev-1.13.0, 3/3 HIGH findings verified @ 0.92/0.87/0.96) over the add-error-contract change set; all fixes applied. CORR-001 (HIGH): guard_negation_typed’s “zero intra-file constraints” scope made rename.md’s typed reject (cross-file citations) malformed as written, and the singular “the success transition it negates” didn’t cover linter-schema_shape.md’s negated disjunction — the rule now counts all cited ids and states the union-of-branches reading (errors.md row + delta rows + both mirrored Requirement sections; design D2 carries a post-review correction note). CORR-002 (HIGH): all 31 error Constraint exprs carried a prose suffix after the variant head, literally violating error_expr_shape’s “expr IS <file-id>.<variant_head>(field, …)” — suffixes stripped; exprs are now exactly the label shape. CORR-003 (HIGH): the delta’s tier-1 list claimed “graph citation-set comparison” is enforced today — no such checker exists (it is ct5’s future derivation); corrected to coverage, matching errors.md. CORR-004 (MEDIUM, unverified): “failure terminal” now has an operational definition (terminal state; failure = *fail*-named state segment) in linter-failure_shape.md. CLAR-003: STATUS errors.md row cites #66–#68. Gates: just ci, lint-specs 21/0, sync-sections, openspec strict; artifacts regenerated.

acset-core — capability


id: acset.core kind: intent statement: “THE acset-core capability SHALL hold the format’s fixed finite schema — five objects and typed reference morphisms — as one data value, SHALL build each parsed corpus into a typed instance whose dangling references are representable values rather than lint-time afterthoughts, and SHALL answer reachability questions through a single closure primitive shared by graph, merge, and refactor — all internal-only, with every migration gated by parity against the existing walks.”

acset-core Specification

Purpose

One place for the format’s schema and one way to walk it. Today the Reference Typing table lives as NodeKind/kind_index and match arms in src/graph.rs; src/merge.rs builds a private adjacency map despite openspec/specs/merge/spec.md mandating reuse of graph.md’s blast-radius query; and fan_in/fan_out are built in two duplicated edge loops. This capability replaces those with a Schema value, a typed instance builder, and closure primitives — with edge-for-edge parity gates so no behaviour changes. The rigorous reading (attributed C-sets over the small fixed category) ships with the later pushout change; nothing here needs it.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[acset.core]]
objects_closedinvariantthe schema's objects are exactly {Intent, Constraint, State, Transition, Property}; a sixth object is added only under a new Revision heading of openspec/specs/specodelic/spec.md (append-only discipline)[[acset.core]]
morphisms_typedinvariantevery morphism has a name, exactly one source object, and exactly one target object; the pair (source, name) is unique across the schema[[acset.core]]
typing_table_is_datainvariantallowed_targets(m) is read from the Schema value for every morphism m — never decided by a per-field match arm; adding a reference field is adding one row[[acset.core]]
refinement_declaredinvarianta typing rule that depends on a row's own kind column (emits targets effect Constraints only; satisfies targets extension_point only; observes targets effect only) is declared as a refinement predicate on the morphism's target, never inlined into the checker[[acset.core]]
endo_acyclicity_flaggedinvariantan endo-morphism (supersedes; derives_from between laws) carries an explicit flag saying whether cycles through it are forbidden; acyclicity is checked generically for flagged morphisms only[[acset.core]]
schema_matches_typing_tableinvariantwhen the lint target carries the format doc, the Schema value equals its Reference Typing table (openspec/specs/specodelic/spec.md) row for row, reported as a lint finding on divergence — the document and the code cannot drift; a corpus without the format doc is out of the gate's scope (no-op, never fabricated expected rows)[[acset.core]]
canonical_orderinvariantobjects and morphisms are enumerated in a canonical sorted order, so every artifact derived from the Schema is byte-stable[[acset.core]]
ids_internedinvarianteach object's id-set is a dense index 0..n-1 with a bidirectional map to the file-qualified string id; a duplicate file-qualified id is resolved first-wins and recorded in the builder's collision report — identical to the existing graph builder's or_insert behavior — and a lint-clean corpus carries none (no_duplicate_claim fires upstream)[[acset.core]]
morphisms_partialinvarianteach schema morphism is stored as a vector of optional indices, None meaning an unresolved reference; the builder never drops an unresolved reference at parse time[[acset.core]]
typing_enforced_at_buildinvarianta resolved reference whose target object or sub-kind violates the Schema's allowed_targets is recorded as a typing violation and is not stored as a morphism value — the behaviour of openspec/specs/graph/spec.md's edge_kind_matches_typing[[acset.core]]
adapter_totalinvariantfrom_specs is total on parsed corpora: every Link of every spec is stored as a morphism value, recorded as dangling, or recorded as a typing violation — none is silently dropped[[acset.core]]
adapter_graph_equivalentinvariantfor every corpus the existing graph builder accepts, the edge set derived from the instance equals the edges of the existing graph builder, edge for edge — the parity gate that retires the old path without a flag day[[acset.core]]
build_deterministicinvariantindex assignment follows sorted file-qualified id order; two builds of the same corpus serialize byte-identically regardless of input file order[[acset.core]]
cells_carriedinvariantnon-reference cells (expr, statement, generator, predicate, kind cells) are carried as attribute columns keyed by the same indices and are never inspected by the builder — consistent with openspec/specs/specodelic/spec.md's prose_untouched[[acset.core]]
seeds_existinvariantevery seed id is an id of the instance; an unknown seed is rejected, not ignored[[acset.core]]
scope_by_morphism_setinvarianta query names the set M of schema morphisms to follow; restricting M to supersedes yields exactly the supersedes subgraph, on which cycle detection is closure-based (openspec/specs/specodelic/spec.md's supersedes_acyclic)[[acset.core]]
single_traversal_primitiveinvariantforward_closure and backward_closure over a seed set and a morphism set M are the only traversal primitives; graph, merge, and refactor are expressed through them with no private adjacency map[[acset.core]]
closure_terminatesinvariantclosure on a finite instance terminates and visits each node at most once, including when M contains a cycle[[acset.core]]
dangling_not_followedinvariantan unresolved reference is not an edge: traversal skips it, the dangling report lists it, and it contributes to no reachability result[[acset.core]]
blast_radius_definedinvariantblast_radius(I, touched) == the mixed transitive closure — from every reached node, both the morphism values are followed forward and the references backward, i.e. the fixpoint of X ↦ backward_closure(forward_closure(X)); the backward closure of the touched ids alone, plus the targets reached forward from them, is NOT the definition (a backward-reached dependent's own forward reach joins the radius) — the definition in openspec/specs/graph/spec.md's blast_radius_is_transitive_closure, pinned by parity against merge.rs's pre-migration walk[[acset.core]]
fan_in_is_preimage_sizeinvariantfan_in(x) == the number of pairs (s, m) with the morphism value at s defined and equal to x[[acset.core]]
results_orderedinvariantquery results are sorted by file-qualified id, so output is deterministic[[acset.core]]
parity_with_existinginvariantfor every corpus, query-derived blast_radius, fan_in, and supersedes cycles equal the values computed by the pre-migration walks in graph.rs and merge.rs — the parity gate that lets the private adjacency maps be deleted[[acset.core]]

Model

States

  • proposed
  • approved
  • implemented
  • archived

Transitions

idfromtoguard
approveproposedapproved[[acset.core.process_lifecycle]] ∧ proposal reviewed and approved by the maintainer
implementapprovedimplemented[[acset.core.process_lifecycle]] ∧ all tasks.md items complete; parity gates hold over the corpus; just ci and openspec validate --strict pass
archiveimplementedarchived[[acset.core.process_lifecycle]] ∧ just archive-change id=add-acset-core ran with the dual-format recipe

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[acset.core.process_lifecycle]]lifecycle_model_present()check(file) == passed
sixth_object_rejectedunit[[acset.core.objects_closed]]schema_with_extra_object("Action")check(schema) == failed
duplicate_morphism_rejectedunit[[acset.core.morphisms_typed]]schema_with_two_morphisms_same_source_and_name()check(schema) == failed
duplicate_id_first_wins_parityunit[[acset.core.ids_interned]]corpus_with_two_rows_same_qualified_id()node_kinds(builder(corpus)) == node_kinds(existing kind_index(corpus)) — first-wins, and the collision report names the id
typing_read_from_schemaunit[[acset.core.typing_table_is_data]]schema_with_one_added_reference_field()typing_violation(edge_over_new_field) is decided with no change to checker code
endo_cycle_detectedunit[[acset.core.endo_acyclicity_flagged]]supersedes_cycle_a_b_a()check(instance) == failed
unflagged_endo_cycle_toleratedunit[[acset.core.endo_acyclicity_flagged]]law_derives_from_law_self_edge()check(instance) == passed — only flagged morphisms are cycle-checked
schema_drift_detectedunit[[acset.core.schema_matches_typing_table]]schema_missing_one_row_of_the_typing_table()check(schema, typing_table) == failed
index_roundtripunit[[acset.core.ids_interned]]arbitrary_corpus()name_of(object, index_of(object, id)) == id
emits_refinement_enforcedunit[[acset.core.refinement_declared]]emits_edge_to_invariant_constraint()check(edge) == failed — the effect-only rule comes from the declared refinement
order_is_canonicalunit[[acset.core.canonical_order]]arbitrary_schema_built_from_two_declaration_orders()schemas_equal_as_values() — enumeration order never depends on declaration order
dangling_is_a_valueunit[[acset.core.morphisms_partial]]corpus_with_one_unresolved_link()morphism_value(source) == None and the build reports no error
no_link_droppedunit[[acset.core.adapter_total]]arbitrary_corpus()card(stored) + card(dangling) + card(violations) == card(links)
graph_parityunit[[acset.core.adapter_graph_equivalent]]arbitrary_corpus_accepted_by_graph_build()edges(from_specs(c)) == the pre-migration builder's edges
forbidden_edge_not_storedunit[[acset.core.typing_enforced_at_build]]traces_to_pointing_at_a_state()morphism_value(source) == None and card(typing_violations) == 1
rebuild_is_byte_stableunit[[acset.core.build_deterministic]]arbitrary_corpus(), arbitrary_file_order()serialize(from_specs(shuffle(c))) == serialize(from_specs(c))
attributes_untouchedunit[[acset.core.cells_carried]]row_whose_expr_contains_wiki_link_syntax_in_prose()attribute(row, "expr") == original_cell
unknown_seed_rejectedunit[[acset.core.seeds_exist]]closure_over_unknown_seed()check(query) == failed
supersedes_scope_exactunit[[acset.core.scope_by_morphism_set]]corpus_with_supersedes_and_traces_edges()closure(M == supersedes) contains no traces edge
no_private_adjacencyunit[[acset.core.single_traversal_primitive]]grep_for_adjacency_map_construction()no adjacency-map construction exists outside acset::query
closure_on_cycle_terminatesunit[[acset.core.closure_terminates]]cyclic_morphism_set()closure(seed) terminates and visits each node at most once
closure_laws_holdunit[[acset.core.single_traversal_primitive]]arbitrary_instance(), arbitrary_seed_set(), arbitrary_morphism_set()the closure over a seed set satisfies its three named cases — contains: S ⊆ closure(S), idempotence: closure(closure(S)) == closure(S), monotonicity: S ⊆ T implies closure(S) ⊆ closure(T)
dangling_not_followed_in_traversalunit[[acset.core.dangling_not_followed]]corpus_with_one_dangling_link()closure(seed) skips the dangling endpoint and the dangling report lists it
blast_radius_parityunit[[acset.core.blast_radius_defined]]arbitrary_corpus_with_two_branch_tips()blast_radius(query) == blast_radius(pre-migration merge walk)
fan_in_matches_preimageunit[[acset.core.fan_in_is_preimage_size]]corpus_with_one_shared_target()fan_in(shared_target) == 2
results_sorted_by_idunit[[acset.core.results_ordered]]query_over_reverse_insertion_order()output == sorted(output)
walk_parity_fan_and_cyclesunit[[acset.core.parity_with_existing]]arbitrary_corpus()closure-derived fan_in, fan_out, and supersedes cycles == the pre-migration walks' values

Requirements

Requirement: Schema-as-data typing

The acset-core SHALL hold the format’s fixed finite schema — the five objects (Intent, Constraint, State, Transition, Property) and their typed reference morphisms — as a single Schema value read by one generic checker, so the Reference Typing table of openspec/specs/specodelic/spec.md is evaluated from data instead of per-field match arms in src/graph.rs; adding a reference field is adding one row.

Scenario: Typing read from schema

  • WHEN a new reference field is added as one schema row
  • THEN typing decisions for that field come from the Schema value with no change to checker code

Scenario: Schema drift detected at lint time

  • WHEN the Schema value diverges from openspec/specs/specodelic/spec.md’s Reference Typing table on any row
  • THEN lint reports the divergence naming the mismatched row

Scenario: Endo-acyclicity only where flagged

  • WHEN a cycle passes through an unflagged endo-morphism such as derives_from between laws
  • THEN it is not reported, while cycles through flagged endo-morphisms such as supersedes are reported

Requirement: Typed instance builder

WHEN a parsed corpus is loaded, the acset-core SHALL build a typed instance — an interned, dense id-set per schema object and a partial function per morphism — in which an unresolved reference is a representable value (None) that is never dropped and never a parse error.

Scenario: Dangling is a value

  • WHEN a corpus contains one link that resolves to no id
  • THEN the instance stores that morphism value as None and the build succeeds
  • WHEN a parsed corpus is built into an instance
  • THEN every link is stored, recorded as dangling, or recorded as a typing violation — the three counts sum to the link count

Scenario: Forbidden edge not stored

  • WHEN a corpus contains a reference whose target object is not in the morphism’s allowed targets
  • THEN the instance records a typing violation and stores no morphism value for it

Scenario: Graph parity edge for edge

  • WHEN a corpus accepted by the existing graph builder is built into an instance
  • THEN the derived edge set equals the existing builder’s edges exactly

Scenario: Byte-stable rebuild

  • WHEN the same corpus is built with input files in two different orders
  • THEN both serializations are byte-identical

Scenario: Duplicate id parity

  • WHEN a corpus contains two rows with the same file-qualified id (a corpus the existing builder accepts first-wins)
  • THEN the builder resolves the same way and records the collision in its collision report — never a hard failure the old path did not emit

Scenario: Empty corpus builds an empty instance

  • WHEN the input directory contains zero spec files
  • THEN the instance is empty and well-formed, closures over it are empty, and parity with the existing builder holds

Requirement: Single traversal primitive

The acset-core SHALL expose forward and backward closure over a seed set and a chosen set of schema morphisms as its only traversal primitives, through which graph fan-in, merge blast radius (openspec/specs/merge/spec.md), and the refactor advisor (openspec/specs/refactor/spec.md) are expressed with no private adjacency map — and query-derived results SHALL equal the pre-migration walks for every corpus.

Scenario: Parity with existing walks

  • WHEN closure-derived blast radius, fan-in, and supersedes cycles are computed over any corpus
  • THEN they equal the values the pre-migration graph.rs and merge.rs walks compute

Scenario: Unknown seed rejected

  • WHEN a closure is requested over a seed id that is not in the instance
  • THEN the query fails with a remediation hint rather than ignoring the seed

Scenario: Dangling not followed

  • WHEN traversal reaches an unresolved reference
  • THEN it is skipped for reachability, listed in the dangling report, and contributes to no result

Scenario: Supersedes-scoped cycles

  • WHEN M is restricted to supersedes and a cycle exists in the supersedes subgraph
  • THEN closure-based cycle detection over that scope reports it, matching the existing supersedes_acyclic behaviour

acset-writer — capability


acset-writer Specification

Purpose

The one module allowed to turn an instance edit back into text. It works from recorded source spans and returns a write-set, never re-serializing a table and never doing I/O itself. Without it, the typed acset core (acset-core) can read and query the corpus but every edit still flows through hand-wired rewriting in src/rename.rs — unspecified, unparityed, and drifting from the format’s byte-stability promises (rename.prose_untouched_by_rename). This capability makes emission a specified, identity-gated seam: emit(parse(x), no edit) == x byte for byte over every file the parser accepts, and every edit touches only the spans the edit names.

Constraints

idkindexprtraces_toobserves
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[acset.writer]]
source_spans_recordedinvariantparsing records the byte span of every id cell, every [[link]] occurrence, and every state bullet; the writer edits only recorded spans and never re-serializes a table[[acset.writer]]
emit_identityinvariantemit(parse(x), no edit) == x byte for byte, for every spec file the parser accepts[[acset.writer]]
untouched_bytes_preservedinvariantbytes outside the rewritten spans of edited rows are identical to the source text — including prose, CRLF terminators, trailing whitespace, and table padding (the mechanical realization of rename.md's prose_untouched_by_rename)[[acset.writer]]
width_padding_policyinvariantwhen an id edit changes a cell's width the writer leaves surrounding padding unchanged, so a column may become unaligned; realignment is a separate explicit formatting operation and never a side effect of an edit[[acset.writer]]
filename_follows_intent_idinvariantan edit to a file's own Intent id also produces the file rename implied by specodelic.md's id_matches_file rule[[acset.writer]]
write_set_atomicinvariantthe writer returns a write-set of (path, full new contents) plus optional removals and performs no I/O; applying it is the caller's single transaction (the shape of rename.md's atomic_operation write-set)[[acset.writer]]
edit_application_faithfulinvariantfor a morphism f : I → I' and source text x, from_specs(apply(f, x)) equals I' — the emitted text realizes exactly the instance the edit denotes[[acset.writer]]
edits_composeinvariantapply(g, apply(f, x)) == apply(compose(g, f), x)[[acset.writer]]
span_failureeffectspec.span_failure(detail) — the writer could not extract a recorded span because detail; the error envelope satisfies the fleet error contract (error-kind envelope, labeled, remediation hint present, non-zero exit)[[acset.writer]]
apply_failureeffectspec.apply_failure(detail) — an edit names an id no recorded span can realize because detail; the error envelope satisfies the fleet error contract (error-kind envelope, labeled, remediation hint present, non-zero exit)[[acset.writer]]
roundtrip_failureeffectspec.roundtrip_failure(detail) — the emitted text reparses to an instance other than the edit's target because detail; the error envelope satisfies the fleet error contract (error-kind envelope, labeled, remediation hint present, non-zero exit)[[acset.writer]]
failures_ride_the_envelopeinvarianteach of the writer's three failure outputs (span extraction, edit application, roundtrip verification) surfaces through the consuming command's envelope per the error contract — error-kind envelope, labeled, remediation hint present, non-zero exit — never a silent partial write-set[[acset.writer]][[acset.writer.span_failure]] ∧ [[acset.writer.apply_failure]] ∧ [[acset.writer.roundtrip_failure]]

Model

States

  • requested
  • spanned
  • applied
  • verified
  • span_failed (emits: [[acset.writer.span_failure]])
  • apply_failed (emits: [[acset.writer.apply_failure]])
  • roundtrip_failed (emits: [[acset.writer.roundtrip_failure]])

Transitions

idfromtoguard
recordrequestedspanned[[acset.writer.source_spans_recorded]] ∧ [[acset.writer.emit_identity]]
record_failrequestedspan_failed¬([[acset.writer.source_spans_recorded]] ∧ [[acset.writer.emit_identity]])
applyspannedapplied[[acset.writer.untouched_bytes_preserved]] ∧ [[acset.writer.width_padding_policy]] ∧ [[acset.writer.filename_follows_intent_id]] ∧ [[acset.writer.write_set_atomic]]
apply_failspannedapply_failed¬([[acset.writer.untouched_bytes_preserved]] ∧ [[acset.writer.width_padding_policy]] ∧ [[acset.writer.filename_follows_intent_id]] ∧ [[acset.writer.write_set_atomic]])
reparseappliedverified[[acset.writer.edit_application_faithful]] ∧ [[acset.writer.edits_compose]]
reparse_failappliedroundtrip_failed¬([[acset.writer.edit_application_faithful]] ∧ [[acset.writer.edits_compose]])

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[acset.writer.process_lifecycle]]lifecycle_model_present()check(file) == passed
span_covers_every_linkunit[[acset.writer.source_spans_recorded]]arbitrary_spec_file()card(link_spans) == card(links(parse(x)))
identity_emission_exactunit[[acset.writer.emit_identity]]arbitrary_accepted_spec_file()emit(parse(x)) == x
crlf_survives_editunit[[acset.writer.untouched_bytes_preserved]]crlf_file_with_one_renamed_id()line_terminators(apply(f,x)) == line_terminators(x)
prose_survives_editunit[[acset.writer.untouched_bytes_preserved]]row_whose_prose_mentions_the_old_id_as_a_word()prose_bytes(apply(f,x)) == prose_bytes(x)
padding_not_realignedunit[[acset.writer.width_padding_policy]]rename_that_lengthens_an_id_in_an_aligned_table()padding_bytes(apply(f,x)) == padding_bytes(x)
intent_rename_moves_fileunit[[acset.writer.filename_follows_intent_id]]rename_of_a_files_own_intent_id()path(apply(f,x)) == mapped_filename(new_id) and one removal is returned
writer_does_no_iounit[[acset.writer.write_set_atomic]]apply_with_io_calls_instrumented()io_calls == 0
text_realizes_instanceunit[[acset.writer.edit_application_faithful]]arbitrary_spec_file(), arbitrary_id_rename()from_specs(apply(f,x)) == rename(from_specs(x),a,b)
writer_edit_lawlaw[[acset.writer.edits_compose]]arbitrary_spec_file(), arbitrary_morphism_pair()identity: apply(id, x) == x associativity: apply(g, apply(f, x)) == apply(compose(g, f), x)
span_failure_label_assertedunit[[acset.writer.span_failure]]span_failure_raised()error_label == "spec.span_failure"
apply_failure_label_assertedunit[[acset.writer.apply_failure]]apply_failure_raised()error_label == "spec.apply_failure"
roundtrip_failure_label_assertedunit[[acset.writer.roundtrip_failure]]roundtrip_failure_raised()error_label == "spec.roundtrip_failure"
failures_surface_as_labeled_envelopeunit[[acset.writer.failures_ride_the_envelope]]any writer failure raised()envelope.has_label ∧ envelope.has_hint ∧ exit != 0 ∧ no write-set emitted

Requirements

Requirement: Span-preserving emission

The acset-writer SHALL emit markdown for an instance from recorded byte spans alone — never re-serializing a table — such that emission without an edit reproduces the source byte for byte, and an edit changes only the cells and links the edit names.

Scenario: Identity emission is byte-exact

  • WHEN the writer emits text for a parsed spec file with no edit applied
  • THEN the emitted text equals the source byte for byte, including prose, line endings, and table padding

Scenario: Spans cover every editable element

  • WHEN a spec file is parsed
  • THEN every id cell, every [[link]] occurrence, and every state bullet carries a byte span the writer can rewrite

Scenario: Untouched bytes survive an edit

  • WHEN an edit rewrites one id cell of a file whose prose mentions the old id as a word
  • THEN the prose bytes, line terminators, and table padding outside the rewritten span are identical to the source

Requirement: Edits realize typed morphisms

The acset-writer SHALL apply an edit (a morphism between instances) to source text by returning a write-set of (path, full new contents) plus optional removals, performing no I/O itself — applying the write-set is the caller’s single transaction.

Scenario: Text realizes the renamed instance

  • WHEN a rename morphism f : I → I’ is applied to source text x
  • THEN parsing the emitted text yields exactly I’

Scenario: Edits compose

  • WHEN two edits f and g are applied in sequence to x
  • THEN the result equals applying their composition in one step

Scenario: Intent rename moves the file

  • WHEN an edit renames a file’s own Intent id
  • THEN the write-set maps the file to the filename implied by the new id and returns one removal for the old path

Scenario: No realignment side effect

  • WHEN an id edit changes a cell’s width in an aligned table
  • THEN surrounding padding is left unchanged — the column may become unaligned, and realignment is a separate explicit operation

Scenario: Writer performs no I/O

  • WHEN the writer applies an edit
  • THEN it returns a write-set and performs no file operations itself

Requirement: Writer error contract

The acset-writer SHALL report its three failure modes — span extraction, edit application, and roundtrip verification — as labeled errors carrying remediation hints, surfaced through the consuming command’s envelope per the error contract.

Scenario: Span failure is labeled

  • WHEN the writer cannot extract a recorded span it needs (e.g. the source changed under the parse)
  • THEN the failure is labeled acset.writer.span_failure with a remediation hint

Scenario: Apply failure is labeled

  • WHEN an edit names an id no recorded span can realize
  • THEN the failure is labeled acset.writer.apply_failure with a remediation hint

Scenario: Roundtrip failure is labeled

  • WHEN the emitted text reparses to an instance other than the edit’s target
  • THEN the failure is labeled acset.writer.roundtrip_failure with a remediation hint

audit — capability


id: audit kind: intent statement: “WHEN a lint-clean spec file with current compiled artifacts is audited against a declared evidence corpus and an optional prior report, THE audit capability SHALL classify every evidence row with exactly one class from the closed set {current, stale, unchecked, contradicted, binds_nothing, new} — reusing conform’s walk machinery and artifact gate unchanged — and SHALL report the highest evidence-backed ladder rung, never treating unchecked evidence as verified and never claiming behavioral equality.”

audit Specification

Purpose

Compute the graded-evidence discipline the toolchain already names (the ladder, evidence_scope, exploration_only) uniformly over everything that claims to constrain behavior: recorded example corpora, pack checker results, fragment/claim bindings, and prior audit reports.

Constraints

idkindexprtraces_to
reuse_walkinvariantclassification reuses conform's walk machinery and artifact gate unchanged — a second trace evaluator is never introduced[[audit]]
closed_classesinvariant∀ evidence row: exactly one audit class from {current, stale, unchecked, contradicted, binds_nothing, new}, each record also carrying the underlying conform verdict with its reason — none or two is impossible[[audit]]
digest_bound_diffinvariant--before diffing refuses labeled on a scope-digest mismatch between reports, with zero classification emitted — cross-corpus-version diffs are impossible[[audit]]
contradiction_survives_diffinvariantthe prior-report overlay never retires a contradiction: a row contradicted in the current run keeps the class contradicted whatever the prior report said about it — held, graded differently, or unseen — so a currency label (current, stale, new) never replaces live contradictory evidence, so the exit predicate still fails the run[[audit]]
honesty_channelsinvariantunchecked and binds_nothing ride the warnings channel and never affect the exit code — unchecked evidence is countable, never a pass, and never a failure[[audit]]
binds_respect_sparseinvariantbinds_nothing requires that the fragment or claim cites no declared model element — legitimately sparse models with declared elements are never flagged[[audit]]
rung_derivedinvariantthe summary's ladder rung is derived at report time from evidence actually present and never exceeds it — a rung without its evidence is impossible[[audit]]
read_onlyinvariantaudit compiles nothing, writes no artifacts, and advances no lifecycle transition — refusal on ungated inputs is labeled with a remediation hint[[audit]]
row_keys_uniqueinvariantthe merged report carries no two rows with the same scenario_id: when a FOLDED row (bind:<owner-id>, pack:<pack_id>:<subject_id>) collides with a key already present, the folded row takes the first free ~<n> suffix (~2, ~3, …) while the oracle row keeps its corpus id verbatim; both rows survive with their own classes, so the prior diff's scenario_id lookup can never silently pick one and drop the other[[audit]]
disambiguation_deterministicinvariantfolded-row disambiguation is a pure function of the corpus rows — no counter, random state, or map-iteration order — so repeated assembly over identical inputs yields identical keys and byte-identical serialization, and a renamed row keeps its class: advisory rows stay advisory and the exit contract is untouched[[audit]]

Model

States

  • gated
  • classified
  • merged
  • diffed
  • reported

Transitions

idfromtoguard
classifygatedclassified[[audit.reuse_walk]] ∧ [[audit.closed_classes]]
mergeclassifiedmerged[[audit.row_keys_unique]] ∧ [[audit.disambiguation_deterministic]]
diffmergeddiffed[[audit.digest_bound_diff]] ∧ [[audit.contradiction_survives_diff]]
reportdiffedreported[[audit.rung_derived]] ∧ [[audit.honesty_channels]] ∧ [[audit.read_only]]

Properties

idkindderives_fromgeneratorpredicate
p_classesunit[[audit.closed_classes]]arbitrary_evidence_corpus()every row carries exactly one class ∧ an underlying verdict
p_diffunit[[audit.digest_bound_diff]]arbitrary_report_pair()digest match ⇒ diff; mismatch ⇒ labeled refusal ∧ zero rows
p_contradiction_keptunit[[audit.contradiction_survives_diff]]arbitrary_report_pair()current contradicted ⇒ diffed contradicted (held or unseen) ∧ exit 1
p_honestyunit[[audit.honesty_channels]]arbitrary_row_mix()unchecked/binds_nothing ⇒ exit 0 ∧ counts surfaced
p_sparseunit[[audit.binds_respect_sparse]]sparse_phase_model()declared-element model ⇒ no binds_nothing flag
p_rungunit[[audit.rung_derived]]arbitrary_evidence_mix()rung == highest evidence-backed rung ∧ never exceeds it
p_read_onlyunit[[audit.read_only]]ungated_input()labeled refusal ∧ corpus byte-identical ∧ zero records
p_walk_reuseunit[[audit.reuse_walk]]arbitrary_classification_run()audit classes match a conform-walk oracle reference run
p_unique_keysunit[[audit.row_keys_unique]]oracle_id_spelled_like_a_bind_row_key()the oracle row keeps the corpus id verbatim ∧ the folded row is <id>~2 ∧ no two merged rows share a scenario_id
p_rows_surviveunit[[audit.row_keys_unique]]merged_report_with_a_cross_kind_key_collision()both rows survive with their own classes ∧ the renamed row stays advisory
p_deterministicunit[[audit.disambiguation_deterministic]]same_corpus_folded_twice()merged keys are equal across runs — no counter or random suffix

Requirements

Requirement: Evidence row classification

spk audit <file> --oracle <corpus.jsonl> SHALL classify every oracle record and pack-check result against the current compiled model with exactly one audit class from the closed set {current, unchecked, contradicted, binds_nothing, stale, new}, each record carrying both the audit class and the underlying conform verdict with its reason, reusing conform’s walk machinery and artifact gate unchanged.

Scenario: Current evidence agrees

  • WHEN a record’s verdict class matches its class in the prior report (or no prior report exists and the walk classifies it)
  • THEN the row is current and names the underlying verdict

Scenario: Contradicted evidence fails the run

  • WHEN the walk classifies a record forbidden or unsupported
  • THEN the row is contradicted and the run exits 1 per the exit-code requirement — never a silent pass

Requirement: Evidence diff across reports

spk audit --before <report.json> SHALL compare per-row verdict classes against the prior report — dropped or worsened ⇒ stale, unseen ⇒ new — refusing labeled when the two reports carry different scope digests, and SHALL never retire a contradiction: a row contradicted in the current run stays contradicted whatever the prior report said about it, contradiction outranking every currency label.

Scenario: Dropped class is stale

  • WHEN a record was current in the prior report and is unchecked in the current run
  • THEN the row is stale, naming both classes

Scenario: Sustained contradiction is never demoted

  • WHEN a record is contradicted in the prior report and contradicted in the current run against the same corpus
  • THEN the diffed row stays contradicted — never current — the class counts include it, and the run exits 1

Scenario: Worsening into a contradiction stays contradicted

  • WHEN a record was current in the prior report and is contradicted in the current run
  • THEN the row is contradicted, never stale, and the run exits 1 — the currency label never displaces live contradictory evidence

Scenario: Unseen contradiction is never relabelled new

  • WHEN a record is contradicted in the current run and the prior report carries no row for it
  • THEN the diffed row is contradicted, not new, and the run exits 1

Scenario: Corpus-version mismatch refused

  • WHEN the prior and current reports carry different scope digests
  • THEN the run fails labeled naming the digest mismatch, with no classification emitted

Requirement: Audit honesty channels

Audit SHALL treat unchecked and binds_nothing as warnings-channel findings that never affect the exit code, and binds_nothing SHALL require that the fragment or claim cites no declared model element — legitimately sparse models with declared elements are never flagged.

Scenario: Empty checked-set is unchecked

  • WHEN a pack checker runs over vocabulary it activates but produces an empty checked-set
  • THEN the row is unchecked, countable in the summary — never a pass

Scenario: Unbound evidence flagged, sparsity respected

  • WHEN a fragment cites no declared model element
  • THEN the row is binds_nothing on the warnings channel; a model whose declared elements are simply not exercised stays unflagged

Scenario: Unchecked never fails the run

  • WHEN every row is unchecked or binds_nothing
  • THEN the exit code is 0 with counts surfaced in both output views

Requirement: Evidence rung aggregate

Audit summaries SHALL report, per file, the highest verification-ladder rung for which current evidence exists, derived at report time from existing outputs — never exceeding the evidence actually present.

Scenario: Rung matches evidence

  • WHEN a file is lint-clean but only model-checked, with no verify pass
  • THEN its reported rung is 3, and never 4 or 5

Scenario: Rung never claims without evidence

  • WHEN no audit, conform, or verify evidence exists for a file
  • THEN its reported rung is 1 (lint-clean at most), stated as such

Requirement: Merged evidence row keys are unique

The merged audit report SHALL never carry two rows with the same scenario_id: when a FOLDED row (bind:<owner-id> or pack:<pack_id>:<subject_id>) collides with a key already present — an oracle row whose corpus id is spelled exactly like a folded key included — the folded row SHALL take the first free ~<n> suffix while the row already present keeps its id, both rows SHALL survive with their own classes and counts, and the exit contract SHALL be unchanged.

Scenario: Oracle id spelled like a bind row key

  • WHEN an oracle corpus id equals a folded bind row’s key (bind:locked)
  • THEN the oracle row keeps bind:locked with its oracle class, the folded row is emitted as bind:locked~2 with class binds_nothing, and both rows are present in the report

Scenario: A pack row collision follows the same rule

  • WHEN a folded pack row’s key collides with a key already in the report
  • THEN the pack row takes the first free ~<n> suffix and the row already present keeps its id — no row is dropped or merged

Scenario: No duplicate ids survive the merge

  • WHEN any folded row collides with an existing row key
  • THEN the merged report carries no duplicate scenario_id, so the prior-report diff’s scenario_id lookup always addresses exactly one row

Requirement: Disambiguation is deterministic

Folded-row disambiguation SHALL be a pure function of the corpus rows — no counters, random state, or map-iteration order — so repeated assembly over identical inputs yields identical keys and byte-identical serialization, and a --before diff keeps matching every oracle row by its recorded corpus id.

Scenario: Same corpus merges to the same keys

  • WHEN the same oracle and folded rows are merged twice
  • THEN the two merged reports carry identical scenario_id sequences

Scenario: Oracle evidence is never renamed

  • WHEN a suffix is assigned in a collision
  • THEN only the folded row is renamed; every oracle row keeps its corpus id, so diffing against evidence recorded in a prior report still resolves

doctor — capability


id: doctor kind: intent statement: “THE doctor command SHALL classify the workspace mode and warn — never fail — when the binary’s embedded format knowledge lags the local corpus.”

doctor Specification

Purpose

Diagnose a workspace’s specodelic setup from inside the binary: classify the workspace as self-hosting or consumer, check the local corpus against the embedded format knowledge, and report findings over the standard envelope without failing on informational conditions.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[doctor]]
mode_detectioninvariantworkspace classifies as self_hosting when openspec/specs/specodelic/spec.md exists and consumer otherwise, with the mode reported in envelope data[[doctor]]
currency_warninginvariantwhenever a local corpus exists, the latest Revision N heading is compared numerically against FORMAT_REVISION; a lagging binary warns without failing; unreadable or revision-less corpora skip with an informational note[[doctor]]

Model

States

  • probed
  • classified
  • currency_checked

Transitions

idfromtoguard
classifyprobedclassified[[doctor.mode_detection]]
currencyclassifiedcurrency_checked[[doctor.currency_warning]]

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[doctor.process_lifecycle]]lifecycle_model_present()check(file) == passed
p_modeunit[[doctor.mode_detection]]arbitrary_workspace()mode == expected(ws) ∧ mode ∈ envelope_data
p_currencyunit[[doctor.currency_warning]]arbitrary_corpus_state()lag ⇒ warning ∧ ¬failure ∧ skip ⇒ note

Requirements

Requirement: Workspace Mode Detection

spk doctor SHALL classify the workspace as self_hosting when openspec/specs/specodelic/spec.md exists, and consumer otherwise, and SHALL report the detected mode in its envelope data.

Scenario: Self-hosting corpus

  • WHEN spk doctor runs in a workspace containing openspec/specs/specodelic/spec.md
  • THEN the envelope reports mode self_hosting and keeps today’s checks (specs directory, core format spec, beads)

Scenario: Consumer workspace without the core spec

  • WHEN spk doctor runs in a workspace with a specs/ directory but no openspec/specs/specodelic/spec.md
  • THEN the envelope reports mode consumer, the check for the core spec does not fail the command, and the envelope reports the embedded guide’s format_revision as ok

Scenario: Empty workspace

  • WHEN spk doctor runs in a directory with no specs/ at all
  • THEN the envelope reports mode consumer with an informational note suggesting spk new to start a corpus, and exits 0

Requirement: Doctor Reports Knowledge Currency

spk doctor SHALL — in any mode, whenever a local corpus is present (vendored consumer corpora included) — extract the latest Revision N heading (numerically largest trailing integer) from the local openspec/specs/specodelic/spec.md and SHALL emit a warning — not a failure — when that revision is newer than the binary’s embedded FORMAT_REVISION. A corpus with no Revision heading skips the currency check with an informational note.

Scenario: Corpus file is unreadable

  • WHEN the local openspec/specs/specodelic/spec.md exists but cannot be read (permissions, non-UTF-8 content)
  • THEN the currency check is skipped with an informational warning naming the read error, and the command neither fails nor claims the corpus is current

Scenario: Binary lags local corpus

  • WHEN spk doctor runs in a workspace whose vendored openspec/specs/specodelic/spec.md declares Revision 8 while the binary embeds Revision 7
  • THEN the envelope contains a warning naming both revisions and exits 0

Scenario: Binary current

  • WHEN spk doctor runs in a workspace whose corpus revision equals the embedded FORMAT_REVISION
  • THEN no knowledge-currency warning is emitted

Scenario: Corpus carries no revision headings

  • WHEN spk doctor runs in a workspace whose openspec/specs/specodelic/spec.md contains no Revision N heading
  • THEN the currency check is skipped with an informational note and the command neither warns nor fails

embedded-guide — capability


id: embedded.guide kind: intent statement: “THE CLI SHALL serve an embedded, repository-free guide to the format through spk explain and keep that knowledge pinned to a corpus revision.”

embedded-guide Specification

Purpose

Make the format’s knowledge travel with the binary: spk explain serves a distilled machine-facing guide embedded via include_str!, the embedded knowledge is pinned to a corpus revision and guarded against drift, and spk new scaffolds files that teach their own tables.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[embedded.guide]]
explain_topicsinvariantspk explain serves exactly six topics — format, ears, kinds, references, lifecycle, lint-rules — over the standard envelope; unknown topics fail with a hint listing valid ones[[embedded.guide]]
revision_pinnedinvariantFORMAT_REVISION names the mirrored corpus revision and appears in spk --version --json and every explain payload[[embedded.guide]]
drift_guardinvariantthe test suite fails when FORMAT_REVISION lags the corpus's latest Revision N heading, compared numerically[[embedded.guide]]
scaffold_teachesinvariantspk new generates per-layer guidance comments that the linter ignores[[embedded.guide]]

Model

States

  • queried
  • resolved
  • rendered

Transitions

idfromtoguard
resolvequeriedresolved[[embedded.guide.explain_topics]]
renderresolvedrendered[[embedded.guide.revision_pinned]]

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[embedded.guide.process_lifecycle]]lifecycle_model_present()check(file) == passed
p_topicsunit[[embedded.guide.explain_topics]]arbitrary_topic()known ⇒ body_nonempty ∧ unknown ⇒ hint
p_revisionunit[[embedded.guide.revision_pinned]]arbitrary_version()payload.contains(format_revision)
p_driftunit[[embedded.guide.drift_guard]]stale_constant()numeric(latest) > numeric(FORMAT_REVISION) ⇒ test_fails
p_scaffoldunit[[embedded.guide.scaffold_teaches]]arbitrary_new_file()guidance_present ∧ lint(f) == zero_issues

Requirements

Requirement: Embedded Format Guide Command

The CLI SHALL provide an explain subcommand that serves a distilled, machine-facing guide to the Specodelic format from content embedded in the binary (include_str!), requiring no repository access, and SHALL emit it through the standard genesis JSON envelope (human-readable under --human).

Scenario: Agent in a consumer repo asks for the format

  • WHEN spk explain format runs in a directory with no openspec/specs/specodelic/spec.md on disk
  • THEN it exits 0 and the envelope data.body contains the four-layer table and the lifecycle description

Scenario: Topic listing

  • WHEN spk explain runs with no topic argument
  • THEN it exits 0 and the envelope data.topics lists exactly the topics enumerated in the Guide Topics requirement

Scenario: Unknown topic

  • WHEN spk explain nope runs
  • THEN it exits non-zero with an envelope failure whose hint lists the valid topics

Requirement: Guide Topics

The guide SHALL expose exactly six topics: format (the four layers and the lifecycle), ears (the five EARS patterns), kinds (the closed kind value sets for all five schema objects), references (the Reference Typing table), lifecycle (the stage gates and checker ownership), and lint-rules (every rule id the binary can emit, each with a one-line semantics string).

Scenario: Closed kind sets rendered from enforced constants

  • WHEN spk explain kinds runs
  • THEN the rendered constraint/property kind sets equal the constants the linter enforces, because both render from the same pub const source in guide.rs

Scenario: Lint rule catalog is complete

  • WHEN spk explain lint-rules runs
  • THEN every rule id the linter can emit appears in the catalog with a non-empty semantics string (unit-tested by iterating the linter’s rule table)

Requirement: Embedded Format Revision Pinning

The binary SHALL declare a FORMAT_REVISION constant naming the corpus revision it mirrors (e.g. specodelic.md Revision 8); spk --version --json SHALL include it as format_revision and every explain payload SHALL include it.

Scenario: Version reports format knowledge

  • WHEN spk --version --json runs
  • THEN the envelope contains format_revision

Requirement: Guide-Drift Guard

The repo’s test suite SHALL fail if FORMAT_REVISION is stale relative to the latest Revision N heading in openspec/specs/specodelic/spec.md, comparing the trailing integers numerically, so binary knowledge cannot silently lag the corpus.

Scenario: Corpus revision bumped without updating the constant

  • WHEN openspec/specs/specodelic/spec.md gains a newer Revision N marker than FORMAT_REVISION and the test suite runs
  • THEN a unit test fails naming both revisions

Scenario: Double-digit revision ordering

  • WHEN the corpus’s latest heading is Revision 10 and FORMAT_REVISION names Revision 9
  • THEN the comparison reports the corpus as newer (numeric, not lexicographic, comparison)

Requirement: Scaffold Teaches the Format

spk new SHALL generate a template whose each of the four layers carries an HTML-comment guidance note (valid kinds for that layer’s rows, what a guard may cite, law-case requirements for kind = "law" properties), and the guidance SHALL be deletable without affecting lint results, because the linter never parses prose.

Scenario: Scaffolded file explains its own tables

  • WHEN spk new order.cancel runs
  • THEN the generated file contains comment guidance under the Constraints, Model, and Properties sections

Scenario: Guidance does not affect linting

  • WHEN a fully filled-in spec containing the scaffold guidance comments is linted
  • THEN the guidance produces no findings

docs-site — capability


id: docs.site kind: intent statement: “THE docs system SHALL render the spec corpus and the command surface as an mdBook site deployed to GitHub Pages on every push to main.”

docs-site Specification

Purpose

Give specodelic the family-standard public docs: an mdBook that renders the introduction, command reference, and the spec corpus itself (domain specs plus dual-format capability specs), served at charly-vibes.github.io/specodelic with an llms.txt for agents.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[docs.site]]
site_presentinvariantthe repo carries an mdBook under docs/ with book.toml at the root, an index, and a command reference[[docs.site]]
specs_in_bookinvariantSUMMARY.md links every domain spec file under specs/ and every dual-format capability spec under openspec/specs/; specs are copied at build time, never vendored[[docs.site]]
pages_deployedinvariantpushing to main builds the book and deploys it to GitHub Pages at /specodelic/ via docs.yml (upload-pages-artifact → deploy-pages)[[docs.site]]
llms_txt_servedinvariantthe site serves an llms.txt tool summary at its root, copied into the built book[[docs.site]]

Model

States

  • authored
  • built
  • deployed

Transitions

idfromtoguard
docs_buildauthoredbuilt[[docs.site.site_present]]
docs_deploybuiltdeployed[[docs.site.pages_deployed]]

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[docs.site.process_lifecycle]]lifecycle_model_present()check(file) == passed
p_siteunit[[docs.site.site_present]]fresh_checkout()docs-build() == ok ∧ index_html_exists
p_specsunit[[docs.site.specs_in_book]]arbitrary_spec_file()SUMMARY.md links f ⇒ book page for f resolves
p_deployunit[[docs.site.pages_deployed]]push_to_main()pages_url == /specodelic/ ∧ book deployed
p_llmsunit[[docs.site.llms_txt_served]]site_fetch()GET /llms.txt == 200 ∧ body non-empty

Requirements

Requirement: mdBook docs site

The repo SHALL carry an mdBook site under docs/ — book.toml at the repo root, SUMMARY.md, an introduction, and a command reference — buildable locally via just docs-build, which copies the spec trees into the book source, runs mdbook build docs, and places llms.txt in the built book.

Scenario: Local build succeeds

  • WHEN just docs-build runs in a fresh checkout with mdBook installed
  • THEN the build exits 0 and docs/book/index.html exists

Requirement: Spec corpus rendered

The book SHALL render one page per domain spec file under specs/ and one page per dual-format capability spec under openspec/specs/, with SUMMARY.md linking every such page; the spec trees are copied at build time and never vendored into docs/src/.

Scenario: Every corpus page reachable

  • WHEN the book is built
  • THEN every specs/*.md file and every openspec/specs/*/spec.md file is linked from SUMMARY.md and renders as a book page

Requirement: GitHub Pages deployment

Pushing to main SHALL build the book and deploy it to GitHub Pages at /specodelic/ through the docs.yml workflow — mdBook installed via peaceiris/actions-mdbook@v2, artifact uploaded via actions/upload-pages-artifact@v3, deployed via actions/deploy-pages@v4.

Scenario: Push deploys the site

  • WHEN a commit is pushed to main
  • THEN the workflow builds the book and deploys it, and the site is served at https://charly-vibes.github.io/specodelic/

Requirement: Agent summary served

The site SHALL serve an llms.txt summarizing the tool — what it is, core concepts, command surface — at the site root, copied into the built book by both the local recipe and the workflow.

Scenario: Agent fetches the summary

  • WHEN GET /llms.txt is issued against the deployed site
  • THEN the response is 200 with a non-empty body

hooks — capability


id: hooks kind: intent statement: “THE hooks step SHALL wire the specodelic dual-format gate into a repository’s hook chain as a marker-guarded managed block in its lefthook config, additively and idempotently, without ever claiming core.hooksPath or writing foreign hook files.”

hooks Specification

Purpose

Let spk hooks install wire spk lint openspec as a pre-commit command so dual-format drift fails before the commit lands, while the repo’s existing hook ownership (beads’ core.hooksPath, chained to lefthook) keeps flowing untouched.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[hooks]]
chain_preservedinvariantwiring is purely additive: existing commands, entries, and their order in the lefthook config are never dropped, reordered, or wrapped[[hooks]]
no_foreign_writesinvariantno install or uninstall path ever writes .git/hooks hook files, .beads/hooks hook files, or the core.hooksPath config[[hooks]]
honest_anchorinvarianta config whose stage or commands structure cannot be anchored is refused without modification, with a labeled error and a hint[[hooks]]
idempotent_lifecycleinvariantinstall on a wired repo and uninstall on an unwired repo are successful no-ops that leave the config byte-identical[[hooks]]

Model

States

  • unwired
  • wired
  • refused

Transitions

idfromtoguard
install_okunwiredwiredlefthook config exists and the stage is anchorable — [[hooks.chain_preserved]]
reinstall_okwiredwiredthe managed block is already present — [[hooks.idempotent_lifecycle]]
refuseunwiredrefusedno lefthook config, unsupported framework, or no anchor — [[hooks.honest_anchor]]
uninstall_okwiredunwiredthe managed block markers are present — [[hooks.chain_preserved]]
uninstall_notwiredunwiredunwiredno managed block present — reported, not an error — [[hooks.idempotent_lifecycle]]

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[hooks.process_lifecycle]]lifecycle_model_present()check(file) == passed
additive_wiringunit[[hooks.chain_preserved]]fixture config with an existing pre-commit commands mappingexisting entries unchanged and lefthook parses the config
idempotent_installunit[[hooks.idempotent_lifecycle]]install run twice on a fixtureconfig byte-identical after the second install
foreign_refusedunit[[hooks.no_foreign_writes]]fixture with a bd-owned pre-commit hook.git/hooks and .beads/hooks hook files byte-identical after install
clean_uninstallunit[[hooks.idempotent_lifecycle]]wired fixture, then uninstallrest of the config byte-identical and the gate entry gone
unsupported_frameworkunit[[hooks.honest_anchor]]fixture with a husky-sigil pre-commitinstall errors labeling the framework and the tree is untouched

Requirements

Requirement: spk hooks install wires the gate additively into the lefthook config

The system SHALL provide spk hooks install that injects a marker-guarded managed block wiring the command spk lint openspec into the pre-commit: stage of the repository’s lefthook config (lefthook.yml or lefthook.yaml) — and when the stage already has a commands: mapping, the entry SHALL be inserted inside that mapping rather than as a second commands: key, with indentation inferred from the stage’s own child entries (2 spaces for an empty stage), never assumed.

Scenario: entry added inside an existing commands mapping

  • WHEN the repo’s lefthook.yml has a pre-commit: stage whose section already contains a commands: mapping with other entries
  • AND spk hooks install runs
  • THEN the gate entry is inserted inside the existing commands: mapping as a marker-guarded block
  • AND the entry’s indentation matches the stage’s existing child entries
  • AND the pre-existing entries and their order are unchanged
  • AND lefthook still parses the config (no duplicate commands: key is created)

Scenario: full wrapper injected when the stage has no commands

  • WHEN the repo’s lefthook config has no pre-commit: section, or the section has no commands: mapping
  • AND spk hooks install runs
  • THEN the full commands: wrapper containing the marker-guarded gate entry is injected into the stage, formatted at the stage’s own children indentation

Requirement: spk hooks install is idempotent with a dry-run gate report

The install SHALL be idempotent, and it SHALL run the wired gate command once as a dry-run and report its outcome over the envelope — warning, never failing, when the gate would fail immediately.

Scenario: install is idempotent

  • WHEN spk hooks install runs on a repo whose config already contains the managed block
  • THEN the command succeeds reporting the already-wired outcome and the config is byte-identical

Scenario: gate that would fail immediately is a warning, not a trap

  • WHEN spk hooks install runs in a repo whose openspec tree does not yet pass the gate (for example, a change’s deltas whose sidecars are not yet written)
  • THEN the install succeeds and the envelope reports the dry-run outcome on the warnings channel
  • AND the warning carries the failure summary and an spk hooks uninstall escape hint

Requirement: hook wiring never claims foreign ownership

The system SHALL never claim core.hooksPath, never write hook files under .git/hooks/ or .beads/hooks/, and never modify a hook file owned by another tool — spk hooks install wires only the lefthook config, so an existing chain such as beads’ .beads/hooks shims → lefthook keeps flowing unchanged.

Scenario: beads-owned hook chain is left untouched

  • WHEN spk hooks install runs in a repo where core.hooksPath points at beads-owned hook shims that chain to lefthook
  • THEN the hook files under .beads/hooks/ and .git/hooks/ are byte-identical after the run
  • AND the wiring landed only in the lefthook config

Requirement: unsupported framework or missing config is a labeled error with a hint

The system SHALL refuse to wire, with a labeled error and a remediation hint and no file modification, when the repository has no lefthook config (never creating one), when the detected hook framework is unsupported (husky, prek), or when the target stage or its commands: key cannot be anchored (quoted, indented, unrecognized structure, or unascertainable children indentation).

Scenario: no lefthook config

  • WHEN spk hooks install runs in a repo with neither lefthook.yml nor lefthook.yaml
  • THEN the command fails with an error naming the missing config and a hint to create one first — no config is created

Scenario: unsupported framework

  • WHEN spk hooks install runs in a repo whose pre-commit hook carries the husky sigil and no lefthook config exists
  • THEN the command fails with an error naming the detected framework and a manual-wiring hint, and no file is modified

Scenario: unanchorable structure

  • WHEN the lefthook config’s commands: key inside the target stage is quoted or otherwise not anchorable, or the stage’s children indentation cannot be ascertained
  • THEN the command fails with an anchor error and the config file is unchanged

Requirement: spk hooks uninstall strips only the managed block

The system SHALL provide spk hooks uninstall that removes exactly the lines between the managed-block markers (inclusive) from the lefthook config — leaving the rest of the file byte-identical — and SHALL report a successful no-op (not an error) when no block is present. A stage section that install itself appended is left behind as an empty stage section rather than removed.

Scenario: block removed, rest intact

  • WHEN spk hooks uninstall runs on a wired repo
  • THEN the gate entry and its markers are removed
  • AND every other byte of the config is unchanged
  • AND a stage section that install itself appended remains as an empty stage section (residue is documented, not hidden)

Scenario: unwired repo is a no-op

  • WHEN spk hooks uninstall runs on a repo with no managed block
  • THEN the command succeeds reporting the not-wired outcome and the config is unchanged

kernel — capability


id: kernel kind: intent statement: “WHEN a corpus declares kernel expressions, THE toolchain SHALL evaluate them as a decidable bounded logic over the acset instances I(k) with every v0 atomic grounded in existing proven machinery, SHALL report every evaluation with an explicit three-valued status whose unknown propagates honestly and never coerces to pass, and SHALL register no new atomic that is not decidable over finite instances.”

kernel Specification

Purpose

Give the corpus’s data-dependent cells — the equational and bounded-quantified ones that are prose-only today — defined, decidable semantics: a closed kernel grammar over the finite instances I(k) supplied by the deployed acset substrate, a Kleene three-valued status chain that keeps unknown honest, per-atomic grounding in proven machinery so kernel semantics never outruns what is proven, a widening law that gates future atomics (including pack-defined predicates) on decidability, and an opaque binding column that lets external checkers claim constraints without specodelic learning their language.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[kernel]]
kernel_grammar_closedinvarianta kernel expression's atomics come from the closed set — equality, comparisons, bounded universal and existential quantification over I(k), conjunction, negation, and the reference-typed atomics resolves, unique, acyclic, reachable — an expression using an atomic outside the closed set is a labeled failure naming the atomic and the closed set, never prose and never silently ignored[[kernel]]
kernel_decidableinvariantevery kernel expression is decidable over the finite instances I(k) — evaluation is total, terminates, and yields exactly one of verified, counterexample, unknown — an addition to the closed set that fails decidability over finite instances cannot register[[kernel]]
kernel_status_three_valuedinvariantevery kernel evaluation reports an explicit three-valued status — verified, counterexample, unknown — unknown is honest (the claim could not be discharged) and propagates under Kleene rules; no evaluation path coerces unknown to pass or to counterexample[[kernel]]
kernel_grounded_in_machineryinvarianteach v0 atomic's semantics is grounded in existing proven machinery — acyclic and reachable on graph traversal, unique and resolves on acset traversal, equality, comparisons, and bounded quantifiers on model_check bounded evaluation — an atomic without a grounding entry cannot ship[[kernel]]
kernel_binding_opaqueinvariantthe per-constraint kernel.binding cell is an opaque claim carrier — the toolchain extracts and surfaces its contents verbatim and never interprets them; external checkers claim constraints through contract-TOML flags without the format learning their language; no registry is built[[kernel]]

Model

States

  • expr_absent
  • expr_evaluated
  • expr_unknown

Transitions

idfromtoguard
declareexpr_absentexpr_evaluatedan expr cell opts into kernel translation per [[kernel.kernel_grammar_closed]]
dischargeexpr_evaluatedexpr_unknownan evaluation cannot discharge its claim per [[kernel.kernel_status_three_valued]]
widenexpr_evaluatedexpr_evaluateda new atomic registers per [[kernel.kernel_decidable]] with a grounding entry

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[kernel.process_lifecycle]]lifecycle_model_present()check(file) == passed
unknown_propagatesunit[[kernel.kernel_status_three_valued]]expression_with_undischargable_subclaim()composite status is unknown and no coercion to pass or counterexample occurs
acyclic_decidesunit[[kernel.kernel_grounded_in_machinery]]instance_with_cycle_fixtures()acyclic atomic returns counterexample on a cyclic instance, verified on an acyclic one
quantifier_boundedunit[[kernel.kernel_decidable]]large_finite_instance()bounded quantifier evaluation terminates with exactly one status
unknown_atomic_failsunit[[kernel.kernel_grammar_closed]]expression_with_nonmember_atomic()grammar rejects labeled, naming the atomic and the closed set
binding_never_interpretedunit[[kernel.kernel_binding_opaque]]constraint_with_arbitrary_binding_text()binding cell contents surface verbatim; no parse, no interpretation

Notes

Cross-evaluator composition (specodelic-9o1h, E2 finding F2). A kernel claim’s status is same-invocation evidence for the citation algebra: a citation over a kernel-evaluated claim resolves against that claim’s status — verified discharges it, unknown keeps it unknown (with a reason naming the kernel cause, never a pass), and counterexample refutes it (the aggregate then names the citing citation row, with no invented state trace). The kernel grammar contains no [[..]] references, so a kernel claim can never cite back: the composition is one-way and introduces no citation cycle. A backend that cannot evaluate kernel claims reports them as labeled unsupported, and a citation over such a claim stays unknown — never an implied pass.

Kernel grammar is gated at compile (specodelic-cbh). spk lint validates structure, references, and schema shape; it does not parse **kernel:** expressions. Grammar is checked by spk compile (and, inside just ci, by spk model-check’s kernel_grammar pre-check): grammar_failures rejects unknown atomics, malformed expressions, and wrong morphism arity with a labeled failure naming the atomic and the closed set. spk verify never re-compiles; it reports a kernel-cell edit only as stale evidence. A lint-clean kernel cell is not compile-valid until compile has accepted it; gate on just ci, not just lint-specs alone. The decision is recorded in openspec/decisions/2026-11-14-kernel-grammar-gate-placement.md.

An empty morphism population is vacuously verified (specodelic-9ilm). resolves(m) ranges over the relation’s defined values; a corpus with no values for m has no counterexample, so the atomic is verified, not unknown. unknown is reserved for claims the evaluator cannot discharge (an id literal naming no declared id, a reachable seed or target that is not an id of the instance, an unsupported backend). The reading is documented in openspec/decisions/2026-11-14-resolves-empty-population.md and pinned by tests/kernel_status.rs::resolves_over_an_empty_morphism_population_is_vacuously_verified.

Requirements

Requirement: Decidable bounded kernel grammar

The kernel SHALL accept expressions built from the closed atomic set — equality, comparisons, bounded ∀/∃ over the finite instances I(k), ∧/¬, and the reference-typed atomics resolves, unique, acyclic, reachable — SHALL reject an expression using an atomic outside the closed set with a labeled failure naming the atomic and the closed set, and SHALL evaluate every accepted expression totally over finite instances.

Scenario: Closed atomic set accepts and rejects

  • WHEN an expr cell carries a kernel expression over the closed atomic set

  • THEN it parses and evaluates to exactly one status

  • WHEN an expr cell carries an expression using a non-member atomic

  • THEN the grammar rejects labeled, naming the atomic and the closed set — never prose, never silently ignored

Scenario: Evaluation is total and terminating

  • WHEN a kernel expression evaluates over any finite instance I(k)
  • THEN evaluation terminates with exactly one of verified, counterexample, unknown

Requirement: Three-valued evaluation status

Every kernel evaluation SHALL report an explicit three-valued status — verified, counterexample, unknown — where unknown is honest (the claim could not be discharged) and propagates under Kleene rules; no evaluation path SHALL coerce unknown to pass or to counterexample. An id literal naming no declared id of the evaluation corpus evaluates unknown with a labeled reason naming it — never a vacuous verdict — and the same rule applies to reachable’s target id.

Scenario: Honest unknown propagates

  • WHEN a composite claim contains an undischargable subclaim
  • THEN the composite status is unknown and no coercion to pass or counterexample occurs

Scenario: Verified and counterexample remain first-class

  • WHEN a claim is discharged or refuted over the finite instances
  • THEN the status is verified or counterexample respectively, persisted in run output

Requirement: Semantics grounded in proven machinery

Each v0 atomic SHALL name its grounding machinery — acyclic and reachable on graph traversal, unique and resolves on acset traversal, equality, comparisons, and bounded quantifiers on model_check bounded evaluation — and an atomic without a grounding entry SHALL NOT ship, so kernel semantics never outruns proven machinery.

Scenario: Per-atomic grounding holds

  • WHEN the v0 atomics evaluate against fixtures derived from their grounding machinery
  • THEN each atomic’s result agrees with the machinery’s result on the same instance

Scenario: Ungrounded atomic cannot ship

  • WHEN a proposed atomic has no grounding entry
  • THEN it is not part of the closed set and its use fails labeled

Requirement: Widening law with a decidability gate

A new atomic SHALL register only if it is decidable over finite instances, and pack-defined predicates SHALL register under the same gate; a predicate that fails the gate stays pack-side, checked by contract-TOML runners rather than by the kernel.

Scenario: Decidable addition widens purely

  • WHEN a new decidable atomic registers with a grounding entry
  • THEN every expression valid before the registration evaluates identically after it

Scenario: Undecidable predicate stays pack-side

  • WHEN a pack defines a predicate that is not decidable over finite instances
  • THEN it does not register in the closed set and remains checked by contract-TOML runners

Requirement: Opaque binding column

The per-constraint kernel.binding cell SHALL be an opaque claim carrier — extracted and surfaced verbatim, never interpreted by the toolchain — and external checkers SHALL claim constraints through contract-TOML flags without the format learning their language; no registry SHALL be built.

Scenario: Binding surfaces verbatim

  • WHEN a constraint carries an arbitrary kernel.binding text
  • THEN the contents surface verbatim; no parse, no interpretation, no validation of their internals

Scenario: External checkers claim through flags

  • WHEN an external checker claims a constraint
  • THEN the claim is carried by contract-TOML flags binding (node id, -k, or [[tests.shell]]) and the format learns nothing of the checker’s language

lint-findings — capability


id: lint.findings kind: intent statement: “THE linter SHALL make every finding self-describing by carrying its stable rule id and a one-line rule semantics string in both JSON and human output.”

lint-findings Specification

Purpose

Turn each lint finding into its own documentation: a stable linter.<name> rule id plus a one-line semantics string, present in the JSON envelope and the human-readable output, so agents and humans can act on a finding without repository access.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[lint.findings]]
self_describinginvariantevery finding carries rule_id linter.<name> and a non-empty one-line rule_semantics sourced from the rule table, in JSON and human output[[lint.findings]]

Model

States

  • found
  • emitted

Transitions

idfromtoguard
emitfoundemitted[[lint.findings.self_describing]]

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[lint.findings.process_lifecycle]]lifecycle_model_present()check(file) == passed
p_findingunit[[lint.findings.self_describing]]arbitrary_finding()finding.rule_id stable ∧ semantics non-empty in both output modes

Requirements

Requirement: Self-Describing Lint Findings

Every lint finding SHALL carry a rule_id (the stable linter.<name> identifier) and a one-line rule_semantics string stating what the rule requires, in both the JSON envelope and the human-readable output, so the finding is documentation for itself. Skipped-file notices (e.g. non-spec markdown without frontmatter) are emitted on the envelope’s warnings channel and are out of scope for this requirement.

Scenario: Agent reads a finding without repo access

  • WHEN spk lint bad-spec.md --format json runs on a file whose statement matches no EARS pattern
  • THEN the finding’s rule_id is linter.ears_syntax and rule_semantics is a non-empty one-line description of the EARS requirement

Scenario: Human output shows the rule id

  • WHEN spk lint bad-spec.md --human runs on an invalid file
  • THEN each printed finding includes its rule_id

model-check — capability


id: model.check kind: intent statement: “WHEN a compiled artifact carries guard citations or kernel expressions, THE model-check backend SHALL evaluate guard citations under the citation algebra with an explicit three-valued status, SHALL keep executable guard fragments rejected of record, and SHALL persist run reports naming backend, bound, and per-invariant status with unknown persisted honestly.”

model-check Specification

Purpose

Upgrade guard citations from inert TLA+ annotations to kernel-evaluated claims — slice 1, the one-green-where-today-is-red increment — while keeping the fragment_guard_rejected decision of record intact (executable guard fragments stay rejected; the deferral’s data-carrying-state-space condition is not met by instance-grounded expressions). Run reports persist backend, bound, and per-invariant three-valued status, with the backend-agreement property running as a CI property test over shared fixtures until the py backend lands.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[model.check]]
guard_citation_evaluatedinvariantan invariant-kind Constraint's guard citations resolve against same-run invariant outcomes and compose under the citation algebra — conjunction and negation with an explicit three-valued status — the evaluated citation is an annotation upgrade and never a sole verdict unless executed[[model.check]]
fragment_guard_rejected_standsinvarianta Transition's guard cell carrying a rust: fragment still fails labeled — the deferral of record (deferred to a future Revision alongside a data-carrying state space) is not met by instance-grounded expressions, so the decision of record stands unchanged[[model.check]]
run_report_statusinvarianta model-check run persists backend, bound, and per-invariant status — verified, counterexample, or unknown — unknown is persisted honestly and never coerced, and a run whose invariants were not executed remains exploration_only and explicitly not clean[[model.check]]
backend_agreement_ciinvariantthe same fixture corpus evaluates through every deployed backend with identical three-valued status per cell, asserted by a CI property test — the rust-only interim asserts rust status equals the fixture's expected status, and the cross-backend assertion activates with the py backend without being disabled[[model.check]]

| command_claims | invariant | every accepted kernel or citation invariant has one canonical status in CLI output and persisted reports over the explicit corpus | [[model.check]] |

Model

States

  • citation_inert
  • citation_evaluated
  • agreement_active

Transitions

idfromtoguard
upgradecitation_inertcitation_evaluatedcitation algebra lands per [[model.check.guard_citation_evaluated]]: citations resolve and compose with three-valued status
activatecitation_evaluatedagreement_activethe py backend lands (l8l): the cross-backend assertion activates per [[model.check.backend_agreement_ci]]

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[model.check.process_lifecycle]]lifecycle_model_present()check(file) == passed
citation_composesunit[[model.check.guard_citation_evaluated]]artifact_with_composite_citation()citation resolves and composes with an explicit three-valued status
undischargable_is_unknownunit[[model.check.guard_citation_evaluated]]artifact_with_undischargable_citation()citation reports unknown, never pass
guard_fragment_still_rejectedunit[[model.check.fragment_guard_rejected_stands]]transition_row_with_fragment_guard()compile fails labeled (fragment_extraction stage), decision of record intact
report_names_statusunit[[model.check.run_report_status]]run_with_mixed_invariant_status()report persists backend, bound, and per-invariant status with unknown honest
fixture_status_agreesunit[[model.check.backend_agreement_ci]]shared_fixture_corpus()every deployed backend yields identical status per cell on shared fixtures

| command_claims_checked | unit | [[model.check.command_claims]] | mixed_kernel_and_citation_cli_corpus() | reported claim IDs and statuses equal expected values in CLI and persisted JSON |

Requirements

Requirement: Guard citation semantics evaluated

Guard citations in invariant-kind Constraints SHALL resolve against same-run invariant outcomes and compose under the citation algebra (conjunction and negation) with an explicit three-valued status; the evaluated citation remains an annotation upgrade and never a sole verdict unless executed. Executable guard fragments SHALL remain rejected of record — the fragment_guard_rejected deferral’s condition (a data-carrying state space) is not met by instance-grounded expressions.

Scenario: Citation algebra evaluates

  • WHEN an artifact’s invariant Constraint cites [[a]] ∧ [[b]] or a negated citation
  • THEN the citation resolves against same-run invariant outcomes and composes with an explicit three-valued status

Scenario: Undischargable citation is honest

  • WHEN a citation cannot be discharged over the artifact’s instances
  • THEN it reports unknown, never pass

Scenario: Executable guard fragments stay rejected

  • WHEN a Transition’s guard cell carries a rust: fragment
  • THEN compile fails labeled (fragment_extraction stage) — the decision of record stands unchanged

Requirement: Backend agreement property

The same fixture corpus SHALL evaluate through every deployed backend with identical three-valued status per cell, asserted by a CI property test: the rust-only interim asserts rust status equals the fixture’s expected status, and the cross-backend assertion activates with the py backend without being disabled or commented out.

Scenario: Rust-only interim holds

  • WHEN the shared fixture corpus evaluates through the rust backend
  • THEN every cell’s status equals the fixture’s expected status

Scenario: Cross-backend agreement activates with the py backend

  • WHEN the py backend lands (l8l) and the shared fixtures evaluate through both backends
  • THEN the CI property asserts identical status per cell across backends

Requirement: Status-bearing run reports

A model-check run SHALL persist backend, bound, and per-invariant status — verified, counterexample, or unknown — with unknown persisted honestly and never coerced; a run whose invariants were not executed remains exploration_only and is explicitly not clean.

Scenario: Report names its status

  • WHEN a run evaluates invariants with mixed outcomes
  • THEN the report persists backend, bound, and per-invariant status, including honest unknown

Scenario: Unexecuted invariants are not clean

  • WHEN a run compiles invariants but executes none
  • THEN the outcome is exploration_only and explicitly not clean

Requirement: Complete command-path claim evaluation

The model-check command and orchestrator SHALL evaluate every accepted kernel invariant over the complete explicit input corpus and SHALL publish one status per opted-in kernel or citation invariant in both CLI output and persisted reports. This requirement supplies statuses; aggregate acceptance is specified by the separate verification-claims capability. Report freshness follows verification-claims.

Scenario: Mixed inputs cannot hide a false kernel claim

  • WHEN a two-state corpus contains a kernel claim asserting 999 states and a passing Rust invariant
  • THEN both claim IDs appear in CLI and persisted output and the kernel claim is counterexample

Scenario: Property execution is not invented

  • WHEN a citation targets a Property row without same-run invariant evidence
  • THEN its status is unknown and model-check does not invoke a property runner

Requirement: Citation resolution is file-scoped and dependency-ordered

Qualified citations SHALL resolve exact invariant IDs; bare citations SHALL resolve within the citing file. Citation chains SHALL resolve in dependency order. Cycles, missing targets, and property rows without same-run evidence SHALL report unknown with a reason. An incapable backend SHALL report labeled unsupported claims, never omit them. Single-file spec.row citations SHALL resolve locally; multi-file dual-format lint SHALL remain valid.

Scenario: Qualified and bare citations agree locally

  • WHEN a local passing invariant is cited by its local name and its qualified name
  • THEN both citations evaluate to verified, without confusing an identically named invariant in another file

Scenario: Scope and dependency order are explicit

  • WHEN the same multi-file corpus with a citation chain is supplied in either file order
  • THEN the same statuses result from the full corpus and a cycle or absent target remains unknown with a reason

Requirement: Dual-format files run under an isolated scope

Ordinary corpus intent IDs SHALL be unique; duplicates SHALL fail as duplicate_corpus_identity. Dual-format id: spec files SHALL retain local identity and SHALL run only as the sole parsed input to model-check, verify or orchestrate. Combined scopes SHALL fail as isolated_scope_required before compilation, evaluation or report writes, with a hint to run each file separately using separate artifact/report directories.

Scenario: File-local identities do not merge into a corpus

  • WHEN two parsed inputs claim the same intent id (the transitional pair: an active change’s delta and its deployed capability spec), or distinct real-id files compose
  • THEN the same-identity combined command evaluation refuses the scope as duplicate_corpus_identity before writes; files with distinct ids run independently with their own outcomes and multi-file lint keeps accepting them

Requirement: Model check runs a real backend against the compiled artifact

The system SHALL provide a spk model-check <files> step that runs a model-check backend — stateright (embedded, default) — against the compiled model artifact of each file, without re-compiling, and SHALL report the outcome over the envelope (data.outcome), where a missing compiled artifact is a labeled ERROR with a spk compile hint, never a silent success.

Scenario: Clean spec within bound

  • WHEN spk model-check <file> --json runs on a linted, covered, compiled spec whose model explores exhaustively within the stated bound, at least one executable invariant is checked, and none is violated
  • THEN the envelope reports .data.outcome == "no_counterexample" with the backend engine and version and the stated bound restated

Scenario: Missing compiled artifact is an error

  • WHEN spk model-check <file> runs on a spec with no compiled artifact present
  • THEN the command fails with a labeled error naming the missing artifact and a spk compile remediation hint, and never reports no_counterexample

Requirement: The run names its backend, bound, and checked invariants

The system SHALL include in every run report the backend engine and version, the applied bound (max depth, and optional state count and time budget), and the set of invariants actually checked — so a report where no user invariant was executable states invariants_checked as empty rather than implying a semantic check that never ran.

Scenario: Prose invariants are not fabricated

  • WHEN a spec’s Constraints table contains invariant rows whose expressions are prose with no executable opt-in
  • THEN a native-backend run reports exploration_only after exhaustive automaton exploration within the bound, with invariants_checked empty — never a fabricated counterexample or an implied semantic check

Scenario: Budget exhaustion is a distinct outcome

  • WHEN a run’s state/time budget expires before exhaustive exploration completes
  • THEN the report outcome is timed_out — never collapsed into no_counterexample or counterexample_found

Requirement: Run reports persist with artifact provenance

The system SHALL write each run’s report as <stem>.check.json next to the compiled artifacts, carrying the SHA-256 of the compiled .tla module the run consumed, so downstream verify can determine whether a stored clean result still applies to the current compiled artifact.

Scenario: Stale clean result is detectable

  • WHEN a stored clean report’s artifact hash differs from the hash of the current compiled .tla (the model changed since the run)
  • THEN the stored result no longer satisfies no_counterexample — the report is stale until a re-run against the current artifact

spec-integration — capability


id: spec.integration kind: intent statement: “WHEN a specodelic corpus lives under openspec, THE spec-integration capability SHALL keep change deltas plain openspec files with their specodelic layer in a sibling layer.md sidecar, SHALL keep deployed capability specs simultaneously openspec-valid and lint-clean with no delta sections and no mirror, and SHALL refuse a true same-id pair on command paths — so a repo needs exactly one spec vocabulary.”

spec-integration Specification

Purpose

Widen the dual-format mirror rules to ## MODIFIED Requirements so the repo’s first MODIFIED-carrying delta is gated exactly like an ADDED-carrying one — the widening is additive; no ADDED-side behavior changes.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[spec.integration]]
plain_deltas_carriedinvarianta change's delta file under openspec/changes/ is a plain openspec delta — openspec validate is its gate; it carries no frontmatter, no specodelic tables, and no ## Requirements mirror — with the specodelic layer in a sibling layer.md sidecar (Revision 19: a linted specodelic file whose id derives from the parent directory plus a .layer suffix)[[spec.integration]]
deployed_shape_closedinvarianta deployed capability spec carries no delta sections and no ## Requirements mirror — the retired dual shape is unwritable: openspec 1.x strict validation fails it and the companion's post-attach shape assertion refuses the deploy, so no per-file lint pairing check remains[[spec.integration]]
both_parsers_acceptinvariantevery deployed capability spec is simultaneously a valid openspec capability spec and a lint-clean specodelic spec file (frontmatter plus Constraints, Model, and Properties sections) carrying its real naming-law id — a spec.md file takes its id from its parent directory name (-⇔.)[[spec.integration]]
duplicate_corpus_identityinvariantthe intent ids of a command's parsed inputs are unique — command paths (model-check, verify, orchestrate) refuse a true same-id pair with duplicate_corpus_identity before any write; lint accepts files with distinct ids together (uniqueness is per-file)[[spec.integration]]

Model

States

  • plain_delta
  • deployed
  • gated

Transitions

idfromtoguard
deploy_pairplain_deltadeployed[[spec.integration.plain_deltas_carried]] ∧ [[spec.integration.both_parsers_accept]]
gatedeployedgated[[spec.integration.deployed_shape_closed]] ∧ [[spec.integration.duplicate_corpus_identity]]

Properties

| id | kind | derives_from | generator | predicate | |————————|——|———————————–|–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––| | process_lifecycle_checked | unit | [[spec.integration.process_lifecycle]] | lifecycle_model_present() | check(file) == passed | | plain_delta_gate_green | unit | [[spec.integration.plain_deltas_carried]] | plain_delta_with_sidecar_pair() | openspec validate passes the delta; spk lint passes the sidecar; the delta carries no frontmatter or tables | | deployed_shape_enforced | unit | [[spec.integration.deployed_shape_closed]]| assembly_with_delta_header() | openspec 1.x strict fails the retired shape; the companion refuses it pre-write | | both_parsers_green | unit | [[spec.integration.both_parsers_accept]] | deployed_capability_spec() | openspec validate --specs --strict and spk lint both exit 0 with zero issues | | same_id_pair_refused | unit | [[spec.integration.duplicate_corpus_identity]] | sidecar_and_deployed_pair() | command paths refuse a true same-id pair with duplicate_corpus_identity; lint accepts the distinct pair |

Requirements

Requirement: Dual-format delta

Every deployed capability spec under openspec/specs/<cap>/spec.md SHALL be simultaneously a valid openspec capability spec and a lint- clean specodelic spec file (frontmatter plus Constraints, Model, and Properties sections) carrying its real naming-law id — a spec.md file takes its id from its parent directory name — and SHALL carry no delta sections and no ## Requirements mirror: with change deltas plain (Revision 19), the mirror pairing rules retire by construction.

Scenario: Both parsers accept

  • WHEN openspec validate --specs --strict and spk lint <file> run on any deployed capability spec
  • THEN both exit 0 with zero issues

Scenario: No delta sections reach the deployed spec

  • WHEN the archive-companion deploys a change for capability c
  • THEN openspec/specs/c/spec.md carries no ## ADDED/MODIFIED/REMOVED Requirements headers and no ## Requirements mirror — only the single ## Requirements section openspec applied

Scenario: Modified delta is dual-format

  • WHEN a deployed capability file carries a delta section or a ## Requirements mirror (the retired dual shape)
  • THEN openspec 1.x strict validation fails and the companion’s post-attach shape assertion refuses the deploy — the shape is unwritable, so no per-file lint pairing check remains

Requirement: Change deltas are plain openspec deltas

A change’s delta file under openspec/changes/ SHALL be a plain openspec delta — openspec validate is its gate; it SHALL carry no frontmatter and no specodelic tables, and no ## Requirements mirror — with the specodelic layer carried by a sibling layer.md sidecar (Revision 19: a linted specodelic file whose id derives from the parent directory plus a .layer suffix), so a repo needs exactly one spec vocabulary.

Scenario: Coexisting identical ids

  • WHEN two specodelic files claiming the same intent id (the pair: an active change’s sidecar and its deployed capability spec — distinct via the .layer suffix) are linted together
  • THEN the lint reports no unique-id violation (uniqueness is per-file); command paths (model-check, verify, orchestrate) refuse a true same-id pair with duplicate_corpus_identity

Scenario: Sidecar rides with the delta

  • WHEN a change delta under openspec/changes/<id>/specs/<cap>/ is authored
  • THEN the delta carries ## ADDED/MODIFIED/REMOVED Requirements only and the sibling layer.md carries the frontmatter and tables; spk lint openspec lints the sidecar and skips the frontmatterless delta

verification-claims — capability


id: verification.claims kind: intent statement: “WHEN a verification or model-check verdict is reported, THE verifier SHALL name its trust base as two disjoint sets — unverified claims and assumed facts — and SHALL exclude run limits from both.”

Verification claims

Purpose

THE verifier SHALL accept only complete current evidence for every required invariant claim.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[verification.claims]]
required_setinvariantrequired claims come from explicit executable or kernel or citation invariant opt-ins[[verification.claims]]
aggregateinvariantnonempty required claims must all verify and property blocks must all pass[[verification.claims]]
freshnessinvariantreports bind a versioned claim set to current structured scope and artifacts[[verification.claims]]
visible_scopeinvariantall report views and release docs state the same assurance scope[[verification.claims]]
trust_base_partitionedinvariantevery verdict's trust base is partitioned into exactly two disjoint arrays — unverified_claims (kinds {prose_only_invariant, foreign_extension_point, advisory_constraint}) and assumed (kind {prose_only_guard}) — each entry naming its id, its kind, and its source file, and an entry appearing in at most one array[[verification.claims]]
trust_base_derivedinvariantthe trust base is recomputed from the current corpus and the current artifacts at report time and is never accepted from a stored report without that recomputation; a stored ledger that disagrees with the recomputation is refused with a rerun hint[[verification.claims]]
trust_base_versionedinvariantthe persisted report's trust base carries trust_base_schema_version 1, and a stored report whose trust base is absent or carries an unrecognized version is refused as stale — an absent trust base is never read as an empty one, and the claim schema version is left untouched[[verification.claims]]
run_limits_excludedinvariantthe model-check bound and the artifact digest are run metadata reported beside the verdict and appear in neither trust array — a ledger is a function of the corpus, never of the run's parameters[[verification.claims]]
trust_base_views_agreeinvariantCLI JSON, human output, and the persisted report name the same trust base members with the same kinds — no view reports an empty trust base while another names an entry[[verification.claims]]
empty_trust_base_meaninginvariantan empty trust base means the corpus declares no unchecked claim and no machine-uninterpreted guard, and it is always serialized — the emptiness says nothing about a claim's verification status, which the verdict reports separately as checked, unknown, or refuted[[verification.claims]]
trust_base_corpus_scopedinvariantthe trust base is corpus-scoped: a member may come from any file in the scope and names its source file — so a foreign extension point appearing or disappearing changes the ledger of the files that cite it[[verification.claims]]
trust_base_shared_derivationinvariantthe trust base is derived once from the corpus rows and carried by both the model-check report and the verify verdict — one derivation, two carriers, never two implementations[[verification.claims]]

Model

States

  • proposed
  • approved
  • implemented
  • deployed

Transitions

idfromtoguard
approveproposedapproved[[verification.claims.process_lifecycle]] ∧ maintainer approves this proposal
implementapprovedimplemented[[verification.claims.process_lifecycle]] ∧ every constraint has passing behavioral evidence
deployimplementeddeployed[[verification.claims.process_lifecycle]] ∧ required gates pass and the companion re-attachment preserves every requirement ∧ [[verification.claims.trust_base_derived]] ∧ [[verification.claims.trust_base_versioned]] ∧ [[verification.claims.trust_base_views_agree]]

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[verification.claims.process_lifecycle]]lifecycle_model_present()check(file) == passed
required_set_checkedunit[[verification.claims.required_set]]mixed_claim_corpus()required and unchecked sets equal the expected IDs
aggregate_checkedunit[[verification.claims.aggregate]]mixed_claim_statuses()false and unknown claims cannot yield verified
freshness_checkedunit[[verification.claims.freshness]]changed_scope_or_legacy_report()verify rejects stale or incomplete evidence with a rerun hint
visible_scope_checkedunit[[verification.claims.visible_scope]]report_and_docs_fixture()claim counts agree and pending features are not advertised as implemented
trust_base_partitioned_checkedunit[[verification.claims.trust_base_partitioned]]mixed_trust_base_corpus()every member appears in exactly one array with a kind from that array's closed set
trust_base_derived_checkedunit[[verification.claims.trust_base_derived]]changed_scope_ledger_fixture()a stored ledger that disagrees with the recomputation is refused with a rerun hint
trust_base_versioned_checkedunit[[verification.claims.trust_base_versioned]]ledger_less_report_fixture()a stored report without a trust base is stale, never an empty one, and the claim schema version is unchanged
run_limits_excluded_checkedunit[[verification.claims.run_limits_excluded]]bounded_run_fixture()the bound and the artifact digest appear in neither trust array
trust_base_views_agree_checkedunit[[verification.claims.trust_base_views_agree]]three_view_fixture()JSON, human, and persisted reports name the same members with the same kinds
empty_trust_base_meaning_checkedunit[[verification.claims.empty_trust_base_meaning]]fully_checked_corpus()an empty trust base ⇒ no unchecked claim and no machine-uninterpreted guard, the field is present, and the emptiness says nothing about a claim's verification status
trust_base_corpus_scoped_checkedunit[[verification.claims.trust_base_corpus_scoped]]cross_file_extension_point_corpus()a member from a foreign file appears with its source file, and the ledger follows the corpus
trust_base_shared_derivation_checkedunit[[verification.claims.trust_base_shared_derivation]]two_surface_fixture()the model-check report and the verify verdict carry the same members, kinds, and order

Requirements

Requirement: Explicit required claim set

The toolchain SHALL derive the required claim set from invariant Constraints opted into Rust, kernel, or citation evaluation. Prose-only invariant claims SHALL be listed as unchecked and SHALL NOT be counted as verified.

Scenario: Prose is not executable evidence

  • WHEN a file contains only prose invariant Constraints
  • THEN its required set is empty, its unchecked set lists those Constraints, and verify cannot report verified

Requirement: All required claims govern acceptance

A nonempty complete required set SHALL contain only verified claims before model-check reports no_counterexample. A refuted claim SHALL yield counterexample_found; absent refutation, exhausted bounds SHALL yield timed_out; otherwise unknown, unsupported, or missing evidence SHALL prevent clean acceptance. Verify SHALL also require every generated property block to complete and pass, and SHALL reject invalid or duplicate claim records.

Scenario: Passing Rust does not hide a false kernel invariant

  • WHEN one required Rust claim is verified and a kernel claim is counterexample
  • THEN the aggregate is counterexample_found and verify exits 1 with the false claim ID

Scenario: Unknown and false citations block success

  • WHEN a required citation is unknown or counterexample alongside a passing executable claim
  • THEN verify exits 1 with the citation ID and reason, never verified

Scenario: Complete evidence passes both gates

  • WHEN every required claim is verified within the bound and every generated property block passes
  • THEN verify reports verified with the exact required and unchecked claim sets

Requirement: Evidence is versioned and scope bound

A stored report SHALL declare claim schema version 1, canonical expected claim IDs, actual statuses, and a deterministic digest of the structured corpus and consumed artifacts. Verify SHALL recompute scope and expected claims from current inputs. The digest SHALL bind structured content, not filesystem paths, so opposite claims with identical names cannot reuse each other’s evidence.

Scenario: Cross-file changes invalidate a clean report

  • WHEN a referenced file changes structurally or is omitted from the supplied corpus after the report was produced
  • THEN verify rejects the report as stale or scope-mismatched and names the rerun command

Requirement: Stale evidence is refused with a rerun hint

Stale evidence SHALL be refused with a rerun hint: unsupported or old reports, omitted or duplicate records, changed contributing inputs, or artifact mismatch SHALL fail with a rerun hint. Reordering CLI paths or changing prose alone SHALL preserve scope.

Scenario: Old reports cannot acquire new evidence implicitly

  • WHEN a stored report has no claim schema version or required records
  • THEN verify rejects it with a model-check rerun hint without modifying the report

Requirement: Intent ids of parsed inputs are unique

The intent IDs of a command’s parsed inputs SHALL be unique: a combined invocation whose inputs claim the same intent id SHALL fail with duplicate_corpus_identity and a rename hint before compilation, evaluation or report writes (Revision 18: dual-format files carry real ids and compose like any corpus — the former id: spec isolated-scope rule retired with id: spec itself).

Scenario: A same-id pair is refused before any writes

  • WHEN two parsed inputs claim the same intent id (the transitional pair: an active change’s delta and its deployed capability spec)
  • THEN model-check, verify and orchestrate refuse the combined scope as duplicate_corpus_identity before writing artifacts or reports, with rename guidance; independent runs in separate directories retain each claim’s own status, produce different scope digests and reject swapped reports, while lint accepts files with distinct ids together

Requirement: Assurance scope is visible

CLI JSON, human output, and persisted reports SHALL agree on evaluated, unchecked, and blocking claims. Release documentation SHALL distinguish structural lint, bounded model exploration, verified declared claims, and external application-test binding, and SHALL identify pending capabilities without presenting them as implemented.

Scenario: Report views agree

  • WHEN a run contains a required unknown claim and a prose-only invariant
  • THEN JSON, human output, and the saved report identify the same blocker and unchecked claim

Scenario: Capability and release metadata stay current

  • WHEN the documentation is built for a release
  • THEN its version derives from Cargo metadata and its examples distinguish implemented behavior from pending proposals

Requirement: A verdict names its trust base

Every verification or model-check verdict SHALL carry a trust_base object partitioned into exactly two disjoint arrays: unverified_claims (asserted but unchecked) and assumed (relied upon but unchecked). Each entry SHALL name its id, its kind, and its source file, and SHALL appear in at most one array. The ledger SHALL be corpus-scoped: a member may come from any file in the scope and names its source file.

Scenario: The two kind sets are closed

  • WHEN a verdict’s trust base is read
  • THEN every unverified_claims entry’s kind is one of prose_only_invariant, foreign_extension_point, advisory_constraint, and every assumed entry’s kind is prose_only_guard

Scenario: Prose-only invariant is an unverified claim

  • WHEN a file declares a prose-only invariant Constraint
  • THEN the verdict’s unverified_claims lists that Constraint with kind prose_only_invariant, and it does not appear in assumed

Scenario: A prose-only guard is an assumption

  • WHEN a transition’s guard is prose and cites no evaluable constraint — no citation expression, no kernel binding, no executable invariant
  • THEN the verdict’s assumed lists that transition with kind prose_only_guard, and the guard’s condition is absent from the model report’s checked invariants, which name only the constraints actually checked

Scenario: A guard the citation algebra resolves is not an assumption

  • WHEN a transition’s guard cites an evaluable constraint, or is a State “has reached state X” progress marker
  • THEN that transition is absent from assumed — only a guard with no resolvable condition is relied upon without checking

Scenario: A foreign extension point is an unverified claim

  • WHEN a row claims conformance to a foreign extension_point
  • THEN the verdict’s unverified_claims lists that row with kind foreign_extension_point, never in assumed — nothing in the corpus checks the conformance, so it is asserted, not trusted

Scenario: An advisory constraint is an unverified claim

  • WHEN a file declares an advisory Constraint, which no gate enforces
  • THEN the verdict’s unverified_claims lists it with kind advisory_constraint

Scenario: Run limits are metadata, not trust

  • WHEN a model-check run used a depth cap, a state cap, or a timeout
  • THEN the bound and the artifact digest appear as run metadata and appear in neither trust array

Scenario: An empty trust base is a positive statement

  • WHEN both trust arrays are empty
  • THEN the corpus declares no unchecked claim and no machine-uninterpreted guard, and the empty ledger is still serialized — the emptiness says nothing about a claim’s verification status, which the verdict reports separately as checked, unknown, or refuted

Requirement: The trust base is derived, versioned, and scope-bound

The trust base SHALL be recomputed from the current corpus and artifacts at report time and SHALL never be accepted from a stored report without that recomputation. The persisted report SHALL carry trust_base_schema_version 1; a stored report whose trust base is absent or unrecognized SHALL be refused as stale, never read as an empty trust base. Membership and order SHALL be a pure function of the corpus rows, so the same corpus in a different file order yields an identical ledger.

Scenario: A report without a trust base is stale

  • WHEN a stored report carries no trust base, or carries a trust_base_schema_version the tool does not support
  • THEN verify refuses the report as stale and names the rerun command — an absent trust base is never an empty one, and the claim schema version is left untouched

Scenario: A stale ledger is refused

  • WHEN a stored report’s trust base disagrees with the recomputation
  • THEN verify refuses the report as a ledger mismatch, with the same rerun hint the unchecked-set comparison uses, and never silently re-scores the stored ledger

Scenario: Reordering does not change the ledger

  • WHEN the same corpus is presented in a different file order
  • THEN the recomputed trust base is identical member for member, and the persisted report is byte-identical

Scenario: The stored ledger is never the source of truth

  • WHEN a stored report carries a trust base that no recomputation could have produced
  • THEN the run fails with a rerun hint and the stored report is left unmodified

Requirement: Both report surfaces carry the same trust base

The model-check report and the verify verdict SHALL carry the same trust base, derived once from the same corpus rows. The two surfaces SHALL NOT derive the ledger independently, and the write-side seam that attaches the claim fields SHALL attach the trust base in the same place.

Scenario: The two surfaces agree

  • WHEN a model-check report and the verify verdict for the same corpus are compared
  • THEN their trust bases carry the same members with the same kinds and the same order

Requirement: The trust base is visible in every view

CLI JSON, human output, and the persisted report SHALL agree on the trust base’s membership and kinds: no view may report an empty trust base while another names an entry. The human view SHALL report the member count per kind and the first ten members in the ledger’s deterministic order, naming the file each member comes from. Release documentation SHALL describe the trust base as information about the corpus, never as a statement about application correctness.

Scenario: Views agree on the ledger

  • WHEN a run has one prose-only guard and one prose-only invariant
  • THEN CLI JSON, human output, and the saved report name the same two entries with the same kinds

Scenario: The human view counts and truncates by a stated rule

  • WHEN a run’s trust base holds more than ten members
  • THEN the human output names the count per kind and the first ten members in the deterministic order, and states that the list is truncated — the JSON keeps every member

Scenario: The ledger is not a verdict

  • WHEN the release documentation describes the trust base
  • THEN it states that a non-empty ledger reports what was not checked, that it never blocks or grants verified, and that neither an empty nor a non-empty ledger says anything about the implementation’s behaviour

error-contract — capability


id: error.contract kind: intent statement: “WHEN a specodelic tool stage fails, THE error-contract capability SHALL ensure the failure is reported as a single file-id-namespaced labeled error with a remediation hint, backed by an emitting failure state and a falsifying property asserting the exact label.”

error-contract Specification

Purpose

Make errors in the specodelic corpus typed, namespaced, and falsifiable facts instead of CHANGELOG lore and mute failed states: the cross-cutting output contract (envelope kind, exit codes, one labeled failure per stage, remediation hints) becomes a published extension_point contract, every tool file’s failure terminal emits a file-owned labeled error Constraint, and every label carries a unit property asserting the exact label — the same red→green discipline every other corpus fact already has.

Scope note: this capability spans two altitudes, kept distinct throughout — lint-time corpus rules (failure states, guards: about the content of specs/*.md files) and the runtime output contract (envelope, exit codes: about tool behavior). “Emits” names the format mechanism; runtime reporting is “reports”. Enforcement routing is itself specced: enforcement_routed below states which tier enforces each rule today, which waits for linter-failure_shape, and which rides the compile/verify pipeline.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[error.contract]]
error_expr_shapeinvariantevery error Constraint's expr is a file-id-namespaced variant head: <owning-file-id>.<variant_head>(field, …) — the label names its owning file, so label uniqueness is a per-file property and cross-file collisions are structurally impossible (pattern-checking the structured expr field follows the ears_statement precedent — expr is not rationale; prose_untouched is untouched)[[error.contract]]
failure_state_emitsinvariantevery failure terminal state in a tool file's Model carries an emits edge to an effect Constraint owned by that file, whose expr satisfies error_expr_shape — a failure state emits nothing is a malformed model (phase-2 terminals timed_out / exploration_only are excluded in v1)[[error.contract]]
failure_class_is_stateinvarianta state with ≥2 inbound failure transitions whose guard citation sets differ is malformed — each distinct failure class is its own failure state; decidable from the graph alone (compile.md's two-class prose argument is the rationale, never the check — prose is not read)[[error.contract]]
guard_negation_typedinvarianta failure transition whose guard cites ≥1 [[id]] must cite exactly the citation set of the success transition(s) it negates — a negated disjunction cites the union of its branches' citation sets; a failure transition citing no ids at all is either on the recorded carve-out list (orchestrate.md's stage pipeline, per its own Notes) or malformed — the carve-out is a checked list in linter-failure_shape.md, never a silent assumption[[error.contract]]
single_labeled_failureinvarianta failing tool stage reports exactly one labeled error naming the failing stage and class — never a silent partial result and never an unlabeled failure (restates compile_is_total at contract altitude)[[error.contract]]
envelope_error_kindinvarianta failing stage's report is an error-kind envelope with ok == false — the ok:false ↔ "error" correspondence is the published contract row, not CHANGELOG lore[[error.contract]]
exit_code_mappinginvariantthe output contract maps outcomes to exit codes: 0 for a clean run, 1 for findings-or-failure, 2 for invocation error — the mapping is part of the published contract, not per-tool convention[[error.contract]]
remediation_hint_presentinvariantevery error report carries a non-empty remediation hint (one row per concern: envelope kind, exit codes, and hint are separate rows, resolving design.md’s Open Question)[[error.contract]]
error_property_names_labelinvariantevery error Constraint has ≥1 unit property whose predicate asserts the exact label string — a label with no falsifying property is not specced, only named[[error.contract]]
contract_publishedinvariantthe output contract rows live in openspec/specs/errors/spec.md as kind == extension_point, and exist only there — this capability's constraints state requirements about them, never duplicate them; tool files point satisfies at the errors.md rows from their own files, per the extension_point mechanism[[error.contract]]
enforcement_routedinvariantevery rule in this capability states its enforcement tier and no scenario overclaims the present tool: tier 1 — enforced today by existing checkers (emits→effect typing via ref_kind_compatible, every_state_used, graph citation-set comparison); tier 2 — enforced by linter-failure_shape once implemented (label-shape pattern check, mute failure states, carve-out list, negation-set equality), its scenarios are normative for that checker, not claims about today's spk lint; tier 3 — runtime rows (single labeled failure, remediation hint, exit codes) enforced via the compile/verify pipeline fixtures[[error.contract]]

Model

States

  • proposed
  • approved
  • implemented
  • archived

Transitions

idfromtoguard
approveproposedapproved[[error.contract.process_lifecycle]] ∧ proposal reviewed and approved by the maintainer
implementapprovedimplemented[[error.contract.process_lifecycle]] ∧ all tasks.md items complete; spk lint and openspec validate --strict pass over the change
archiveimplementedarchived[[error.contract.process_lifecycle]] ∧ just archive-change id=add-error-contract ran with the dual-format recipe

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[error.contract.process_lifecycle]]lifecycle_model_present()check(file) == passed
unnamespaced_label_rejectedunit[[error.contract.error_expr_shape]]error_constraint_with_label_lacking_file_id_prefix()check(file) == failed — a bare extraction_failure(...) head is not a valid label (tier 2)
mute_failure_state_detectedunit[[error.contract.failure_state_emits]]tool_file_with_failure_terminal_and_no_emits_edge()check(file) == failed — the corpus’s current shape, asserting the red is real (tier 2; the emits-typing half is tier 1)
emits_wrong_kind_rejectedunit[[error.contract.failure_state_emits]]failure_state_emitting_an_invariant_constraint()check(file) == failed — existing ref_kind_compatible typing, restated as the contract’s edge (tier 1)
multiclass_single_state_detectedunit[[error.contract.failure_class_is_state]]failed_state_with_inbound_failure_transitions_citing_different_constraint_sets()check(file) == failed — compile.md’s pre-change shape, detected from the graph (tier 2)
untyped_negation_detectedunit[[error.contract.guard_negation_typed]]failure_transition_whose_citation_set_differs_from_its_success_transition()check(file) == failed — citation-set inequality is graph-decidable (tier 2)
zero_citation_failure_flaggedunit[[error.contract.guard_negation_typed]]failure_transition_citing_zero_intrafile_constraints_not_on_carveout_list()check(file) == failed — the carve-out is a checked list, not an escape hatch (tier 2)
carved_out_guard_not_flaggedunit[[error.contract.guard_negation_typed]]orchestrate_stage_fail_transition()check(file) == passed — the D2 carve-out is checked, not assumed (tier 2)
labeled_failure_is_singleunit[[error.contract.single_labeled_failure]]failing_stage_with_two_extractable_errors()report(stage) == one labeled error naming stage and class — never a partial bundle (tier 3)
envelope_kind_wrong_rejectedunit[[error.contract.envelope_error_kind]]failing_stage_reported_as_ok_envelope()check(report) == failed — a failure must never ride a success-shaped envelope (tier 3)
exit_code_mismatch_rejectedunit[[error.contract.exit_code_mapping]]failure_stage_with_wrong_exit_code()check(report) == failed — exit codes are contract, not convention (tier 3)
hint_missing_rejectedunit[[error.contract.remediation_hint_present]]error_report_with_empty_remediation_hint()check(report) == failed (tier 3)
label_property_asserts_exact_labelunit[[error.contract.error_property_names_label]]error_constraint_with_property_predicating_a_different_label()check(file) == failed — coverage alone cannot catch this; the property must name the label
routing_matches_realityunit[[error.contract.enforcement_routed]]each_rule_checked_against_its_stated_tier()every scenario's tool claim agrees with its tier — no scenario claims today's spk lint for a tier-2 rule
contract_satisfied_from_consumerunit[[error.contract.contract_published]]tool_file_with_satisfies_pointing_at_contract_row()extraction yields exactly one satisfies edge and lint passes — the satisfies precedent’s shape

Requirements

Requirement: Namespaced labeled errors

The system SHALL require every error Constraint in the corpus to carry a file-id-namespaced variant-head label (<owning-file-id>.<variant_head>(field, …)), and SHALL reject any error Constraint whose label lacks the owning file’s id prefix or whose variant head collides within one file.

Scenario: Bare label rejected

  • WHEN an error Constraint’s expr is extraction_failure(row_id) without the owning file’s id prefix
  • THEN the tier-2 check fails the file, naming the label and the expected <file-id>. prefix — until linter-failure_shape lands, enforcement is the property fixture plus review, never a claim about today’s spk lint

Scenario: Namespaced label accepted

  • WHEN an error Constraint in compile.md declares expr compile.extraction_failure(row_id, reason)
  • THEN the file lints clean and the label is unique corpus-wide by construction

Requirement: Failure states emit labeled errors

The system SHALL require every failure terminal state in a tool file’s Model to carry an emits edge to that file’s labeled error Constraint, and SHALL require a distinct failure state per distinct failure class, where classes are distinguished by differing guard citation sets.

Scenario: Mute failure state rejected

  • WHEN a tool file’s Model contains a failure terminal state with no emits edge
  • THEN the tier-2 check fails the file with a remediation hint pointing at the missing emits target; the emits-typing half (wrong target kind) is enforced today by ref_kind_compatible

Scenario: Split failure states carry distinct labels

  • WHEN compile.md’s Model distinguishes extraction and emission failure classes as extract_failed and emit_failed
  • THEN each state emits its own labeled error Constraint and every_state_used passes

Requirement: Typed failure guards

The system SHALL require a failure transition whose guard cites ≥1 [[id]] to cite exactly the citation set of the success transition(s) it negates — a negated disjunction cites the union of its branches’ sets — and SHALL require failure transitions citing no ids at all to be on a recorded carve-out list.

Scenario: Citation-set mismatch rejected

  • WHEN a failure transition’s guard cites a citation set different from the success transition(s) it negates — or cites nothing at all while absent from the carve-out list
  • THEN the tier-2 check fails the file, since the citation sets are graph-decidable and the carve-out is a checked list

Scenario: Carve-out file passes

  • WHEN orchestrate.md’s stage-fail transitions keep their prose guards per that file’s own Notes
  • THEN the tier-2 check passes — orchestrate.md is on the recorded carve-out list in linter-failure_shape.md, not silent

Requirement: Output contract published and satisfied

The system SHALL publish the cross-cutting output contract — envelope kind ok:false ↔ "error", exit codes 0/1/2, exactly one labeled failure per failing stage, and a non-empty remediation hint — as extension_point rows in openspec/specs/errors/spec.md, with each tool file pointing satisfies at them from its own file.

Scenario: Consumer satisfies the contract

  • WHEN a tool file carries a satisfies edge pointing at a contract row in openspec/specs/errors/spec.md
  • THEN extraction yields exactly one cross-file edge and lint passes — no edit to the contract file

Scenario: Property-less constraint rejected

  • WHEN an error Constraint has no unit property at all
  • THEN the tier-1 coverage check fails the file — coverage over every constraint is enforced today; a named-but-unfalsifiable label is not a specced error

Scenario: Mismatched label predicate rejected

  • WHEN an error Constraint’s unit property predicate asserts a different label string than the constraint’s own
  • THEN the tier-2 check fails the file — exact-label assertion waits for linter-failure_shape; today’s coverage cannot see the predicate text, so no tier-1 claim is made

observability — capability


id: observability kind: intent statement: “THE observability capability SHALL let Constraint rows declare observability of effect Constraints via a typed one-directional observes reference, SHALL report every unobserved effect as an advisory finding, and SHALL derive external-boundary classification from published extension_point rows alone.”

observability Specification

Purpose

Make declared observability and external-boundary structure checkable facts from the start of a system’s life: a spec author declares which behaviors must be observable via observes references, the linter reports every declared effect that nothing observes (advisory in v1, never a silent pass or a fabricated gate), and spk graph derives which files are external boundaries from published extension_point contracts alone — no hand-maintained tags that can drift from the edges.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[observability]]
observes_typinginvariantevery observes reference is a one-directional outbound pointer from a Constraint row to a Constraint row with kind == effect (intra-file or cross-file) — same shape as the satisfies precedent, per the Reference Typing row for observes in openspec/specs/specodelic/spec.md[[observability]]
acyclic_edge_set_stableinvariantthe acyclic invariant's edge set (openspec/specs/linter-graph_shape/spec.md) grows only under a new Revision of that file; observes is deliberately absent from it — an observation claim is not a dependency, so mutual observation across files is well-formed[[observability]]
unobserved_effect_reportedinvariantwithin the lint invocation's file set (corpus-wide lint via just lint-specs is the canonical run), every effect Constraint is either the target of ≥1 observes edge or is reported as an advisory warning on the lint output's warnings channel — exit 0, never counted as a lint failure (design D5) — naming the unobserved row; no waiver machinery exists in v1 (openspec/specs/linter-external_completeness/spec.md's covered/waived pattern is the candidate when the need is demonstrated)[[observability]]
no_gate_changeinvariantwhether linter.observability ever gates a lifecycle transition (openspec/specs/orchestrate/spec.md) is decided only after dogfooding produces real friction evidence — until then it is advisory by severity and the stage guards are untouched[[observability]]
boundary_derivedinvariantexternal-boundary classification is derived from published extension_point Constraints (a file hosting ≥1 is an external boundary); no authored boundary tag exists anywhere — hand-maintained tags drift from edges, against openspec/specs/graph/spec.md's graph_is_derived_not_authored philosophy[[observability]]

Model

States

  • proposed
  • approved
  • implemented
  • archived

Transitions

idfromtoguard
approveproposedapproved[[observability.process_lifecycle]] ∧ proposal reviewed and approved by the maintainer
implementapprovedimplemented[[observability.process_lifecycle]] ∧ all tasks.md items complete; spk lint and openspec validate --strict pass over the change
archiveimplementedarchived[[observability.process_lifecycle]] ∧ just archive-change id=add-observability-contracts ran with the dual-format recipe

Properties

| id | kind | derives_from | generator | predicate | |––––––––––––––––|——|–––––––––––––––––|–––––––––––––––––––––––––––––––––––––––––––––––| | process_lifecycle_checked | unit | [[observability.process_lifecycle]] | lifecycle_model_present() | check(file) == passed | | observes_wrong_target_rejected | unit | [[observability.observes_typing]] | observes_field_pointing_at_an_invariant_constraint() | check(file) == failed — same shape as emits_cannot_target_non_effect | | observes_cross_file_resolves | unit | [[observability.observes_typing]] | observes_from_consumer_file_to_published_effect() | extraction yields exactly one cross-file edge and lint passes | | observes_cycle_not_flagged | unit | [[observability.acyclic_edge_set_stable]] | two_files_mutually_observing_each_others_effects() | acyclic check passes — no cycle finding emitted | | unobserved_effect_finding | unit | [[observability.unobserved_effect_reported]] | effect_with_zero_observes_edges() | advisory finding linter.observability emitted naming the row id | | observed_effect_silent | unit | [[observability.unobserved_effect_reported]] | effect_with_at_least_one_observes_edge() | no linter.observability finding emitted | | gates_untouched | unit | [[observability.no_gate_change]] | corpus_with_unobserved_effects_through_full_pipeline() | linted/compiled/model_checked/verified outcomes identical to before | | boundary_from_extension_points | unit | [[observability.boundary_derived]] | file_hosting_extension_point_row() | graph classifies the file as an external boundary | | plain_file_not_boundary | unit | [[observability.boundary_derived]] | file_with_no_extension_point_rows() | graph does not classify the file as an external boundary | | stale_boundary_impossible | unit | [[observability.boundary_derived]] | file_whose_extension_points_are_all_removed() | boundary classification disappears — no authored tag left to clean |

Requirements

Requirement: Typed one-directional observes reference

The system SHALL accept an optional observes reference on Constraint rows, typed as a one-directional leaf pointer (the Reference Typing carve-out in specodelic.md) from any Constraint to a Constraint with kind == effect on any file — mirroring the satisfies precedent — and SHALL reject any observes pointing at a non-effect row.

Scenario: Cross-file observation resolves

  • WHEN a Constraint row in file A carries observes pointing at an effect Constraint in file B
  • THEN graph extraction yields exactly one cross-file edge and spk lint reports no typing violation

Scenario: Wrong target kind rejected

  • WHEN a Constraint row carries observes pointing at a Constraint with kind == invariant
  • THEN spk lint fails the file with a remediation hint naming the target’s actual kind

Scenario: Mutual observation is not a cycle violation

  • WHEN two files’ Constraint rows each observes an effect in the other file
  • THEN the acyclic check passes — observes is a claim, not a dependency edge

Requirement: Unobserved effects are reported, never silent

The system SHALL report, with rule id linter.observability, on the lint output’s warnings channel (advisory severity — exit 0, never counted as a lint failure; design D5), every effect Constraint within the lint invocation’s file set that is the target of no observes edge (corpus-wide lint is the canonical run) — and SHALL NOT gate any lifecycle transition on this finding in v1.

Scenario: Effect with no observer reported

  • WHEN a linted spec declares an effect Constraint that no observes reference targets
  • THEN the lint output carries an advisory linter.observability warning on the warnings channel, naming the unobserved row id, with exit 0

Scenario: Observed effect produces no finding

  • WHEN every effect Constraint in the corpus is targeted by at least one observes edge
  • THEN no linter.observability finding is emitted and the lifecycle gate outcomes are unchanged

Requirement: External boundaries are derived, not tagged

The system SHALL classify a file as an external boundary in spk graph output iff it hosts at least one extension_point Constraint, deriving the classification from existing reference structure — and SHALL NOT introduce any authored boundary tag.

Scenario: Boundary derived from published contract

  • WHEN spk graph --json runs on a corpus where file B hosts an extension_point Constraint
  • THEN B is classified as an external boundary without any authored tag

Scenario: No tag drift

  • WHEN a file’s extension_point rows are all removed in a revision
  • THEN the file’s external-boundary classification disappears — there is no stale tag to clean up

migrate — capability


id: migrate kind: intent statement: “WHEN an openspec delta file is migrated, THE migrate capability SHALL wrap it in place into the Revision 19 pair — leaving the plain delta byte-untouched and creating the sibling layer.md sidecar with generated frontmatter and wired scaffold layers — while refusing any file that is not a plain delta in need of a sidecar, supporting –rekey for id: spec legacy files, and upgrading a corpus across the known format revisions when –to-revision names a target revision.”

migrate Specification

Purpose

Give adopters a tool surface for the dual-format migration recipe: wrap an existing openspec delta in place — frontmatter, wired scaffold layers, and the byte-identical Requirements mirror — instead of hand-editing (sed one-liners on the mirror were the top onboarding cost, gh#6 item 1). The scaffold is a marked skeleton, never derived prose; finishing it is the author’s job.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[migrate]]
delta_text_preservedinvariant∀ migrated pair: the given delta file's text is preserved byte-for-byte — the plain delta stays untouched; the wrap creates the sibling layer.md sidecar rather than rewriting the delta (Revision 19: the dual-format wrap and its ## Requirements mirror are retired)[[migrate]]
sidecar_generatedinvariantthe wrap produces the pair — the byte-unchanged plain delta plus the generated sibling layer.md carrying frontmatter (the parent-directory-derived id with a .layer suffix, kind intent, an EARS scaffold statement) and the wired scaffold layers; no mirror exists to maintain[[migrate]]
refuse_already_migratedinvarianta file that is not a plain delta in need of a sidecar is refused (exit 2), never rewritten: a file carrying frontmatter (already a specodelic file), a file whose only Requirements heading is a deployed spec's ## Requirements section, and a file carrying no Requirements heading at all[[migrate]]
merge_adds_only_missinginvariantonly missing pieces are inserted when migrating a partially migrated pair — an existing sidecar passes through untouched and no scaffold statement is inserted; only missing sidecar pieces are generated (Revision 19: the mirror is no longer a piece that can be missing)[[migrate]]
scaffold_lints_cleaninvariantthe generated sidecar (frontmatter + wired scaffold_* placeholder rows + one-state model) exits spk lint 0 with zero findings as written — the author starts from a green baseline[[migrate]]
dry_run_writes_nothinginvariant--dry-run emits the resulting pair content as data and never writes a file; the on-disk bytes are unchanged[[migrate]]
rekey_derives_real_idinvariant--rekey derives the real id by the naming law — the parent directory name for a spec.md file (- ⇔ ., _ literal) — and replaces the frontmatter id: spec line with it; every [[spec]] ref re-keys to [[<derived-id>]] and every [[spec. prefix to [[<derived-id>.; every other byte stays untouched[[migrate]]
rekey_refusalsinvariant--rekey on a file without frontmatter is refused (a plain delta takes the wrap path); on a spec.md with no derivable id (bare, or parent dir named spec) it is refused; on a file whose id is already not spec it is an idempotent no-op with a warning, never rewritten[[migrate]]
upgrade_registry_core_ownedinvariantthe known format revisions resolve from a core-owned registry — each entry records the revision number, its date where the format corpus records one, a one-line change note, and an optional migration step; a revision whose change required no corpus rewrite carries no step and upgrades as a byte-stable no-op[[migrate]]
upgrade_steps_applied_in_orderinvariantthe upgrade applies the registered steps for the revisions between the corpus's source revision and the target revision in ascending revision order — each step is shape-guarded, so a file that does not carry that step's pre-shape is not rewritten by it[[migrate]]
upgrade_unknown_revision_refusedinvariantan unknown source or target revision is refused (exit 2) with a labeled message naming the known revision range and a remediation hint — a refused upgrade writes no file[[migrate]]
upgrade_no_downgradeinvarianta target revision below the corpus's current revision — the oldest revision still satisfied by a file in the supplied set — is refused (exit 2) with a labeled message naming the current revision and the file that still carries the older shape — a refused upgrade writes no file[[migrate]]
upgrade_no_op_byte_identicalinvarianta file that no registered step changes is never written — its bytes, its line endings and its final terminator are preserved exactly[[migrate]]
upgrade_atomic_no_partial_writeinvariantthe upgrade is all-or-nothing — when any file in the supplied set cannot be upgraded, every file in the set stays unchanged[[migrate]]
upgrade_scope_confinedinvariantthe upgrade reads and writes only the files under the supplied paths — it creates no file, so no sibling sidecar and no report file is ever written[[migrate]]
upgrade_conflicting_modes_refusedinvariantthe migrate verb's modes are exclusive — --to-revision together with --rekey, and --write together with --dry-run, are refused (exit 2) with a labeled message; neither flag is ever silently ignored[[migrate]]

Model

States

  • unwrapping
  • wrapping
  • written
  • refused
  • rekeyed
  • upgrading
  • upgraded

Transitions

idfromtoguard
begin_wrapunwrappingwrapping[[migrate.delta_text_preserved]]
write_resultwrappingwritten[[migrate.sidecar_generated]]
dry_run_passwrappingwrapping[[migrate.dry_run_writes_nothing]]
refuseunwrappingrefused[[migrate.refuse_already_migrated]]
merge_onlywrappingwritten[[migrate.merge_adds_only_missing]]
verify_greenwrittenwritten[[migrate.scaffold_lints_clean]]
rekey_resultunwrappingrekeyed[[migrate.rekey_derives_real_id]]
rekey_refuseunwrappingrefused[[migrate.rekey_refusals]]
upgrade_beginunwrappingupgrading[[migrate.upgrade_registry_core_owned]]
upgrade_appliedupgradingupgraded[[migrate.upgrade_steps_applied_in_order]]
upgrade_refuseunwrappingrefused[[migrate.upgrade_unknown_revision_refused]]

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[migrate.process_lifecycle]]lifecycle_model_present()check(file) == passed
p_delta_text_preservedunit[[migrate.delta_text_preserved]]delta_with(frontmatter: any)migrate(file).delta_body == original.delta_body
p_sidecar_generatedunit[[migrate.sidecar_generated]]delta_with(sections: any)result.sidecar present with .layer-derived frontmatter ∧ result.delta byte-unchanged
p_refuse_already_migratedunit[[migrate.refuse_already_migrated]]file_with_frontmatter_or_non_delta()migrate(file) == refused ∧ disk_unchanged
p_merge_adds_only_missingunit[[migrate.merge_adds_only_missing]]pair_with(partial_sidecar: any)existing_pieces(result) == existing_pieces(original)
p_scaffold_lints_cleanunit[[migrate.scaffold_lints_clean]]any_plain_delta()lint(migrate(file).sidecar) == zero_findings
p_dry_run_writes_nothingunit[[migrate.dry_run_writes_nothing]]any_plain_delta()dry_run(file).disk_bytes == original.disk_bytes
p_rekey_derives_real_idunit[[migrate.rekey_derives_real_id]]legacy_id_spec_dual_format_file()rekey(file).id == parent_dir_derived ∧ refs re-keyed ∧ rest byte-identical
p_rekey_refusalsunit[[migrate.rekey_refusals]]plain_delta_or_bare_spec_md()rekey(file) == refused ∧ disk_unchanged ∧ second_run_is_noop
p_upgrade_registry_core_ownedunit[[migrate.upgrade_registry_core_owned]]known_revision(n)∀ n ∈ registry: n.number is known ∧ (n.step absent ∨ n.step is shape-guarded)
p_upgrade_steps_applied_in_orderunit[[migrate.upgrade_steps_applied_in_order]]upgrade(corpus, target)applied_steps == the registry steps between the source revision and the target revision ∧ ascending
p_upgrade_unknown_revision_refusedunit[[migrate.upgrade_unknown_revision_refused]]unknown_revision_request()upgrade(corpus, target) == refused ∧ disk_unchanged
p_upgrade_no_downgradeunit[[migrate.upgrade_no_downgrade]]target_below_current_revision()upgrade(corpus, target) == refused ∧ disk_unchanged
p_upgrade_no_op_byte_identicalunit[[migrate.upgrade_no_op_byte_identical]]file_needing_no_step()upgrade(file).bytes == original.bytes ∧ line_endings_preserved ∧ terminator_preserved
p_upgrade_atomic_no_partial_writeunit[[migrate.upgrade_atomic_no_partial_write]]corpus_with_one_unupgradable_file()upgrade(corpus) == refused ∧ every file byte-unchanged
p_upgrade_scope_confinedunit[[migrate.upgrade_scope_confined]]corpus_under_supplied_paths()written_paths ⊆ supplied_paths ∧ no file created
p_upgrade_conflicting_modes_refusedunit[[migrate.upgrade_conflicting_modes_refused]]conflicting_mode_request()upgrade(corpus, target) == refused ∧ disk_unchanged

Requirements

Requirement: In-place wrap of a plain delta

The system SHALL rewrite the given delta file pair in place — leaving the plain delta untouched and creating the sibling layer.md sidecar with generated frontmatter (the parent-directory-derived id with a .layer suffix, kind intent, an EARS scaffold statement) and the wired scaffold layers — while preserving the delta text byte-for-byte (Revision 19: the dual-format wrap and its ## Requirements mirror are retired).

Scenario: Plain delta becomes dual-format

  • WHEN spk migrate delta.md runs on a file with an ADDED Requirements section and no frontmatter
  • THEN the delta file is byte-unchanged, a sibling layer.md is created with frontmatter and scaffold layers (the retired dual wrap is gone — the delta itself stays plain), and spk lint over the pair exits 0 with zero findings

Scenario: Plain delta gains a sidecar

  • WHEN the wrap completes on a plain delta
  • THEN the change directory holds the pair — the byte-unchanged delta plus the generated sidecar — and no mirror exists to maintain

Scenario: Scaffold lints clean

  • WHEN the migration completes
  • THEN spk lint <layer.md> exits 0 with zero findings as written — the author starts from a green baseline

Requirement: Merge adds only missing pieces

The system SHALL keep every already-present piece verbatim when migrating a partially migrated pair — an existing sidecar passes through untouched and no scaffold statement is inserted — generating only the missing sidecar pieces (Revision 19: the mirror is no longer a piece that can be missing).

Scenario: Frontmatter kept verbatim

  • WHEN the pair already carries a layer.md with frontmatter
  • THEN it appears unchanged in the result and no scaffold statement is inserted

Scenario: Existing sidecar kept verbatim

  • WHEN the merge runs over a partially migrated pair
  • THEN every already-present piece (delta text, sidecar tables) passes through verbatim and only missing sidecar pieces are generated

Requirement: Refuse already migrated or non-delta files

The system SHALL refuse (exit 2) any file that is not a plain delta in need of a sidecar — a file carrying frontmatter (already a specodelic file), a file whose only Requirements heading is a deployed spec’s ## Requirements section, and a file carrying no Requirements heading at all.

Scenario: Frontmatter-carrying file is a refusal

  • WHEN spk migrate runs on a file that already carries frontmatter
  • THEN the command fails with an already-migrated message and no file is changed

Scenario: Second run is a refusal

  • WHEN spk migrate runs twice over the same change directory
  • THEN the second run fails with an already-migrated message and both files are unchanged

Requirement: Rekey an id:spec dual-format file to its real id

The system SHALL support --rekey on the migrate command: a file carrying frontmatter with id: spec SHALL be rewritten in place with the real id derived by the naming law — the parent directory name for a spec.md file (- ⇔ ., _ literal) — every [[spec]] reference re-keyed to [[<derived-id>]] and every [[spec. prefix re-keyed to [[<derived-id>., and every other byte of the file left untouched.

Scenario: Legacy dual-format file rekeys

  • WHEN spk migrate openspec/specs/ge-cli/spec.md --rekey runs on a file declaring id: spec with [[spec.c1]] refs
  • THEN the file declares id: ge.cli, its refs read [[ge.cli]] / [[ge.cli.c1]], and everything else is byte-identical

Scenario: Dry-run rekey writes nothing

  • WHEN spk migrate <file> --rekey --dry-run runs
  • THEN the on-disk bytes are unchanged and the envelope data carries the would-be content

Requirement: Rekey refusals keep the sweep idempotent

A file without frontmatter SHALL be refused (it is a plain delta — the wrap path’s job); a bare spec.md with no parent directory SHALL be refused (no derivable id); a file whose id is already not spec SHALL be a no-op with a warning, never rewritten, so a directory-wide rekey sweep is idempotent.

Scenario: Refusals never rewrite

  • WHEN --rekey runs on a plain delta (no frontmatter) or a bare spec.md with no parent directory
  • THEN the command fails (exit 2) with a labeled refusal naming the right path (the wrap path, or an unguessable id) and the file is unchanged

Scenario: Rekey sweep is idempotent

  • WHEN --rekey runs twice, or on a file already carrying its real id
  • THEN the second run is a success with a no-op warning and the file is unchanged

Requirement: Dry-run writes nothing

The system SHALL support --dry-run, emitting the resulting content as data without writing the file.

Scenario: Dry-run leaves disk untouched

  • WHEN spk migrate --dry-run delta.md runs
  • THEN the on-disk bytes are unchanged and the envelope data carries the would-be content

Requirement: Upgrade a corpus across the known format revisions

The system SHALL support spk migrate --to-revision <N> [--from-revision <R>] [--write] <paths...>: the upgrade SHALL resolve the known format revisions from the core-owned registry, SHALL apply the registered migration steps for the revisions between the corpus’s source revision and the target revision in ascending revision order, and SHALL report the outcome as envelope data. The upgrade SHALL NOT rewrite a file that no registered step changes.

Scenario: Old-revision corpus upgrades to the target revision

  • WHEN spk migrate --to-revision 20 --write <corpus> runs on a corpus whose capability file still declares the pre-Revision-18 id: spec shape
  • THEN that file declares its parent-directory-derived id, its [[spec…]] refs read [[<derived-id>…]], the corpus lints with zero findings, and the files that needed no step are byte-identical

Scenario: The source revision is declared or detected

  • WHEN the upgrade runs over a corpus holding one file that still declares the pre-Revision-18 id: spec shape
  • THEN the corpus’s source revision resolves to the oldest revision the supplied files still satisfy, or to the revision declared by --from-revision, and the envelope data names the resolved source and target revisions

Scenario: Dry-run upgrade writes nothing

  • WHEN spk migrate --to-revision 20 <corpus> runs without --write
  • THEN the on-disk bytes are unchanged and the envelope data carries the would-be content of every file the upgrade would change

Scenario: The upgrade never touches files outside the supplied paths

  • WHEN the upgrade runs over one directory of a corpus
  • THEN no file outside that directory changes and no file is created beside the upgraded ones

Scenario: Conflicting modes are refused

  • WHEN the upgrade is asked for together with --rekey (a different mode of the verb), or with both --write and --dry-run
  • THEN the command fails (exit 2) with a labeled refusal, neither flag is silently ignored, and no file is changed

Requirement: The revision registry is core-owned and thin

The system SHALL resolve the known format revisions from a core-owned registry that records, for each known revision, its number, its date (where the format corpus records one), a one-line change note, and an OPTIONAL migration step — a revision whose change required no corpus rewrite SHALL carry no step and SHALL upgrade as a byte-stable no-op.

Scenario: Known revisions resolve from the registry

  • WHEN the upgrade resolves a target revision
  • THEN the registry names the known revision range and carries a date and a change note for every known revision it records

Requirement: Refusals label the unknown or impossible revision

An unknown source or target revision SHALL be refused (exit 2) with a labeled message naming the known revision range and a remediation hint; a target revision below the corpus’s current revision SHALL be refused (exit 2) with a labeled message naming the current revision and the file that still carries the older shape. No file SHALL be written by a refused upgrade.

Scenario: Unknown target revision is refused

  • WHEN the upgrade is asked for a target revision outside the known range
  • THEN the command fails (exit 2) with a labeled refusal naming the known revision range and a remediation hint, and no file is changed

Scenario: Unknown source revision is refused

  • WHEN the upgrade is given a --from-revision outside the known range
  • THEN the command fails (exit 2) with a labeled refusal naming the known revision range and a remediation hint, and no file is changed

Scenario: Target below the current revision is refused

  • WHEN the upgrade is asked for a target revision below the corpus’s current revision
  • THEN the command fails (exit 2) with a labeled refusal naming the current revision and the file that still carries the older shape, and no file is changed

Requirement: The upgrade is atomic, byte-stable and scope-confined

The upgrade SHALL write only the files whose content a registered step changed, SHALL leave every other file byte-identical (its line endings and final terminator preserved), SHALL create no file, and SHALL write nothing at all when any file in the supplied set cannot be upgraded.

Scenario: Unchanged files stay byte-identical

  • WHEN the upgrade runs over a corpus whose files need no step
  • THEN every file’s bytes are unchanged — CRLF line endings and the absence of a final terminator are preserved exactly

Scenario: A failed upgrade writes nothing

  • WHEN the upgrade runs over a set in which one file cannot be upgraded
  • THEN the command fails (exit 2) and every file in the set is unchanged

archive-companion — capability


id: archive.companion kind: intent statement: “WHEN an openspec change is archived, THE archive-companion capability SHALL invoke openspec’s own archiver with default spec application under a wall-clock bound, SHALL refuse any delta whose layer is unrestorable before the destructive archive, SHALL re-attach each archived sidecar’s dual-format layer onto the applied deployed spec so every deployed spec ends up frontmatter-plus-tables again while the archived delta stays plain, SHALL derive the deployed head prose from the archived delta’s Purpose exactly when the deployed Purpose is unwritten, and SHALL report every rollback it could not complete.”

archive-companion Specification

Purpose

Make the dual-format corpus survive the openspec archive round-trip at the tool level: openspec archive regenerates deployed specs from parsed deltas and drops frontmatter + the Constraints/Model/Properties tables; the companion performs the archive with spec application skipped and deploys the archived deltas verbatim, so the deployed spec and its archived delta are byte-identical dual-format files. Fail-closed on any delta lacking the layer — the tool must never be the thing that deploys a stripped spec.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[archive.companion]]
layer_preservedinvariantafter the command completes, every deployed openspec/specs/<cap>/spec.md touched by the change is the layer-preserving re-assembly of the archived pair — openspec's applied ## Requirements section plus the archived sidecar's frontmatter and Constraints/Model/Properties tables — while the archived delta stays byte-plain and the sidecar stays archived beside it[[archive.companion]]
openspec_not_forkedinvariantarchive semantics come from the openspec CLI itself (invoked with DEFAULT spec application — plain deltas are openspec's native merge); the companion never re-implements delta merging, requirement parsing, or directory moves — it only re-attaches the layer afterwards[[archive.companion]]
fail_closed_unverifiableinvarianta delta whose layer is unrestorable — no sibling layer.md sidecar, or a sidecar that fails parse or lacks one of the three layer tables — is refused BEFORE the destructive openspec archive; the whole command fails listing every refused delta with the spk migrate wrap remediation hint, and nothing moves and nothing is written[[archive.companion]]
attach_shape_assertedinvariantthe assembled deployed spec is asserted pre-write: no delta headers, frontmatter plus all three tables present — a shape openspec 1.x strict rejects is refused and reverted; when the run invoked openspec the change dir is moved back out of the archive; the deployed-corpus lint runs post-write and reverts on findings, labeled with a remediation hint[[archive.companion]]
converged_sidecarless_recognizedinvarianta sidecar-less ARCHIVED delta whose deployed target already carries the dual-format layer is recognized as converged and skipped, never refused — Stage-1-era archives stay idempotent under rerun; anything else without a sidecar is refused[[archive.companion]]
idempotent_reruninvariantre-running the command for an already-archived change skips the openspec invocation and re-executes the re-attachment from the newest archive; the result converges to identical deployed bytes[[archive.companion]]
newest_archive_winsinvariantwhen multiple archive directories match the change id, the lexicographically greatest name is used and is named in the envelope — ambiguity is observable, never silent[[archive.companion]]
dry_run_never_mutatesinvariant--dry-run resolves the restore plan (archive directory, delta list, sidecar verification) and emits the envelope without invoking openspec and without writing any file[[archive.companion]]
empty_restore_validinvarianta change with no spec deltas completes successfully with an empty restored list — nothing to restore is a stated outcome, not an error[[archive.companion]]
archiver_boundedinvariantthe openspec archive invocation runs under a wall-clock bound — 600s by default, SPK_ARCHIVE_TIMEOUT_SECS override read at invocation time with a zero, negative, or unparsable value falling back to the default — and expiry kills the archiver's process group, never reaches the attach stage, writes no deployed spec, and fails labeled naming the command openspec archive <id> --yes and the expired bound as timed out after <N>s[[archive.companion]]
rollback_reportedinvarianta revert that cannot restore its saved bytes is reported in the attach-violation detail as rollback failed: <path>: <io error>, appended after the primary violation text — never silently discarded, never displacing the primary violation — while a revert that restores every entry appends nothing[[archive.companion]]
head_prose_derivedinvariantthe deployed head prose comes from the deployed body except when its Purpose body is empty or opens with the archiver placeholder TBD - created by archiving — then the archived delta's Purpose section supplies it, and a head with no Purpose section adopts that section as the whole head; authored deployed prose is never displaced and a delta without Purpose changes nothing[[archive.companion]]

Model

States

  • resolved
  • archived
  • restored
  • refused
  • archiver_timed_out

Transitions

idfromtoguard
locateresolvedarchived[[archive.companion.openspec_not_forked]]
expireresolvedarchiver_timed_out¬[[archive.companion.archiver_bounded]]
deployarchivedrestored[[archive.companion.layer_preserved]] ∧ [[archive.companion.fail_closed_unverifiable]] ∧ [[archive.companion.attach_shape_asserted]] ∧ [[archive.companion.head_prose_derived]]
rejectarchivedrefused¬[[archive.companion.fail_closed_unverifiable]]

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[archive.companion.process_lifecycle]]lifecycle_model_present()check(file) == passed
deployed_assembly_matchesunit[[archive.companion.layer_preserved]]change_archived_then_compared()each deployed spec carries the applied Requirements section plus the sidecar's frontmatter and tables; the archived delta stays plain
no_bespoke_mergeunit[[archive.companion.openspec_not_forked]]module_inspected_for_merge_logic()the module contains no delta-merge code path; only the external invocation and the layer re-attachment remain
plain_delta_refusedunit[[archive.companion.fail_closed_unverifiable]]active_change_with_sidecarless_delta()command fails before the openspec invocation, lists the delta, writes nothing
shape_assertion_enforcedunit[[archive.companion.attach_shape_asserted]]assembly_with_delta_header()write refused and reverted; the run fails naming the capability; an openspec-invoking run moves the change dir back
converged_rerun_skippedunit[[archive.companion.converged_sidecarless_recognized]]sidecarless_archive_with_deployed_layer()rerun skips the pair as converged, not refused
rerun_byte_identicalunit[[archive.companion.idempotent_rerun]]companion_run_twice()second run's envelope matches the first's restored set; deployed files converge to identical bytes
ambiguous_dir_reportedunit[[archive.companion.newest_archive_wins]]two_archive_dirs_same_change_id()lexicographically greatest dir used and named in the envelope
dry_run_writes_nothingunit[[archive.companion.dry_run_never_mutates]]dry_run_over_populated_archive()envelope emitted; no file mtimes changed; openspec not invoked
docs_only_change_succeedsunit[[archive.companion.empty_restore_valid]]archived_change_without_spec_deltas()exit 0, restored: []
missing_openspec_labeledunit[[archive.companion.openspec_not_forked]]path_without_openspec_binary()labeled error with an install/PATH remediation hint
archiver_bound_enforcedunit[[archive.companion.archiver_bounded]]archiver_that_never_exits(SPK_ARCHIVE_TIMEOUT_SECS: 1)the run returns as a labeled timeout naming openspec archive <id> --yes and timed out after 1s ∧ no deployed spec is written
bound_fallback_defaultunit[[archive.companion.archiver_bounded]]SPK_ARCHIVE_TIMEOUT_SECS ∈ {unset, 0, negative, unparsable}the effective bound == the 600s default — never zero, never an unbounded wait
rollback_failure_surfacedunit[[archive.companion.rollback_reported]]revert_with(unrestorable_saved_bytes)the attach-violation detail carries rollback failed: <path>: <io error> after the primary violation text ∧ the run still fails as that violation
placeholder_repaired_on_rerununit[[archive.companion.head_prose_derived]]archived_delta_with_purpose_over(placeholder_head)the deployed Purpose == the delta's Purpose section ∧ the archiver placeholder survives nowhere
authored_head_preservedunit[[archive.companion.head_prose_derived]]archived_delta_with_purpose_over(authored_head)the deployed head is byte-identical to the pre-rerun head ∧ the delta's Purpose prose is absent

Requirements

Requirement: Archive with dual-format preservation

The system SHALL provide spk archive-companion <CHANGE_ID> that archives the named openspec change via the openspec CLI with spec application ON (plain deltas are openspec’s native merge — Revision 19), then re-attaches the dual-format layer from the change’s archived layer.md sidecar, so every deployed openspec/specs/<cap>/spec.md ends up frontmatter-plus-tables again: the archived delta stays plain and the deployed spec is the layer-preserving re-assembly of the two.

Scenario: Dual-format delta survives archiving

  • WHEN an active change carries a plain delta plus a layer.md sidecar for capability c
  • THEN after spk archive-companion <id>, the archived delta remains a plain openspec file, the sidecar is archived beside it, and openspec/specs/c/spec.md is the dual-format re-assembly of the two

Scenario: Plain delta deploys a dual-format spec

  • WHEN an active change carries a plain delta plus a layer.md sidecar for capability c
  • THEN after spk archive-companion <id>, openspec/specs/c/spec.md carries the applied ## Requirements section plus the sidecar’s frontmatter and Constraints/Model/Properties tables, and the archived delta remains a plain openspec file

Scenario: Already-archived change re-runs cleanly

  • WHEN the change directory no longer exists but its archive does
  • THEN the openspec invocation is skipped and the layer re-attachment re-runs to a byte-identical deployed result

Requirement: Observable resolution and preview

The system SHALL emit an envelope naming the archive directory used, whether the openspec invocation ran, and the restored paths — and SHALL support --dry-run producing that same resolution without invoking openspec or writing any file.

Scenario: Dry-run reports the plan

  • WHEN spk archive-companion <id> --dry-run runs over a resolvable change
  • THEN the envelope lists the planned restores and no file is written and no openspec invocation occurs

Requirement: Fail closed on sidecar-less deltas

The system SHALL refuse to archive any change whose delta lacks a sidecar capable of restoring the deployed dual-format layer — no layer.md beside the delta, or a sidecar that fails parse or spk lint — failing the whole command before the destructive openspec archive runs, with a listing of every refused delta and a remediation hint naming the spk migrate wrap path, and writing no deployed spec.

Scenario: Sidecar-less delta is refused

  • WHEN an active change carries a delta with no sibling layer.md
  • THEN the command fails before openspec archive is invoked, the delta is listed, and no openspec/specs/<cap>/spec.md is modified

Scenario: Frontmatterless delta is refused

  • WHEN an active change carries a delta with no sibling layer.md
  • THEN the command fails, the delta is listed, and no openspec/specs/<cap>/spec.md is modified

Scenario: Unlintable sidecar is refused

  • WHEN an active change carries a layer.md sidecar that fails spk lint
  • THEN the command fails before openspec archive is invoked, the delta is listed with the lint findings, and no deployed spec is written

Scenario: Post-attach shape assertion

  • WHEN the layer re-attachment would write a deployed spec carrying a delta header, or lacking frontmatter or any of the three tables
  • THEN the write is refused and reverted and the command fails naming the capability — the deployed tree never gains a shape 1.x strict rejects

Scenario: New capability deploys from scratch

  • WHEN a change introduces capability c with no existing deployed openspec/specs/c/spec.md
  • THEN the companion assembles the first deployed spec from the delta’s applied requirements plus the sidecar’s frontmatter and tables — same shape assertion, same fail-closed refusal

Requirement: Bounded archiver invocation

The companion SHALL run openspec archive <CHANGE_ID> --yes under a wall-clock bound — 600 seconds by default (DEFAULT_ARCHIVE_TIMEOUT_SECS), overridable through SPK_ARCHIVE_TIMEOUT_SECS, whose zero, negative, or unparsable value falls back to the default — and on expiry SHALL kill the archiver’s whole process group, SHALL fail with a labeled timeout naming the command and the expired bound, and SHALL write no deployed spec, draining both child streams concurrently.

Scenario: Hung archiver is killed at the bound

  • WHEN the invoked archiver does not exit within the effective bound
  • THEN the companion kills it, the run fails labeled with timed out after <N>s while naming openspec archive <id> --yes, and no deployed spec is written

Requirement: Rollback failure reporting

When the post-attach assertion or the deployed-corpus lint fails and the companion reverts its writes, every revert that could not restore its saved bytes SHALL be reported in the attach-violation detail as rollback failed: <path>: <io error>, appended after the primary violation text — never silently discarded and never displacing the primary violation. A revert that restores every saved entry appends nothing, and the run still fails as the same attach violation.

Scenario: An unrestorable target is reported

  • WHEN a revert cannot restore a saved file’s prior bytes, or cannot remove a file the run itself created
  • THEN the failure detail carries rollback failed: <path>: <io error> for that path after the primary violation text, and the run exits as the attach violation

Requirement: Deployed head prose derivation

On attach, the deployed spec’s head prose SHALL come from the deployed body, except when its ## Purpose body is empty or opens with openspec’s archiver placeholder TBD - created by archiving — then the archived delta’s ## Purpose section SHALL supply it, and a head with no ## Purpose section adopts the delta’s section as its whole head. Authored deployed prose SHALL never be displaced, and a delta carrying no Purpose prose SHALL leave the deployed head byte-for-byte unchanged.

Scenario: Placeholder replaced on rerun

  • WHEN the deployed head’s Purpose is empty or starts with TBD - created by archiving, and the archived delta carries Purpose prose
  • THEN the deployed head carries the delta’s ## Purpose section and the archiver placeholder appears nowhere in the deployed spec

Scenario: Real deployed prose is preserved

  • WHEN the deployed head’s Purpose is authored prose and the archived delta also carries Purpose prose
  • THEN the deployed Purpose is byte-identical to the pre-rerun text and the delta’s prose is not written

Scenario: A delta without Purpose changes nothing

  • WHEN the archived delta carries no ## Purpose prose, or an empty one
  • THEN the deployed head is unchanged even when its Purpose is the archiver placeholder

parse — capability


id: parse kind: intent statement: “WHEN a user runs spk parse on one spec file THE parse capability SHALL emit the full parsed Spec IR as a json envelope, SHALL succeed independently of lint status, and SHALL fail with a labeled error envelope on unparseable input.”

structured parse export

The structured layer (Properties rows included) is fully modeled in the lib crate but unreachable from outside it: spk compile --json embeds generated artifact text and exposes no Properties rows as structure. Fleet consumers (espectacular’s ah sync) must not reimplement the markdown-table parser — they consume the typed IR through the versioned-binary boundary instead.

spk parse is the minimal exposure: same parse path as lint and compile, the Serialize-derived Spec emitted directly, envelope-conformant, syntax-only.

Constraints

idkindexprtraces_toobserves
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[parse]]
C-parse-irinvariantspk parse emits the full parsed Spec IR for a well-formed file — intent, constraints rows, states, transitions, properties rows, and structured links — with no structured field omitted[[parse]]
C-parse-lint-independentinvariantparse succeeds on a file that fails spk lint and the parse envelope embeds no lint status[[parse]]
C-parse-envelopeinvariantparse output conforms to the shared json envelope discipline — ok, envelope_version, cli_version, envelope_kind, data, warnings, hints, meta — with hints suggesting spk lint on the parsed file[[parse]]the failure output is an envelope too — P-error asserts it rides this discipline: [[parse.C-parse-error]]
C-parse-erroreffectspec.parse_failure(detail) — the file could not be parsed or located because detail; the error envelope satisfies the fleet error contract (error-kind envelope, labeled, remediation hint present, non-zero exit)[[parse]]
C-parse-single-fileadvisoryparse accepts exactly one file path argument per invocation, without globbing or bulk export[[parse]]

Model

States

  • reading
  • parsed
  • emitted
  • failed (emits: [[parse.C-parse-error]])

Transitions

idfromtoguard
t-parsereadingparsed[[parse.C-parse-ir]]
t-emitparsedemitted[[parse.C-parse-envelope]]
t-failreadingfailed¬([[parse.C-parse-ir]])

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[parse.process_lifecycle]]lifecycle_model_present()check(file) == passed
P-irunit[[parse.C-parse-ir]]well_formed_four_layer_file()data.carries(intent, constraints, states, transitions, properties, links) ∧ every_row_present
P-lintindepunit[[parse.C-parse-lint-independent]]a file that parses but fails spk lintparse exits zero with the full IR and no lint status anywhere in the envelope
P-envelopeunit[[parse.C-parse-envelope]]parse output inspected field by fieldevery shared envelope field is present and hints suggest spk lint
P-errorunit[[parse.C-parse-error]]unparseable_file() and nonexistent_path()envelope.has_label ∧ envelope.has_hint ∧ exit != 0 in both cases
P-singleunit[[parse.C-parse-single-file]]parse invoked with zero or two or more pathsthe invocation is rejected with usage guidance

Purpose

Expose the typed Spec IR through the CLI so external fleet tools consume the structured layer without reimplementing the format parser, keeping the versioned binary as the single integration boundary.

Requirements

Requirement: Structured Parse Export

spk parse <file> SHALL emit the parsed Spec IR — intent, constraints rows, states, transitions, properties rows, and structured links — as a --json-conformant envelope, SHALL succeed independently of lint status without embedding it, and SHALL fail with a labeled error envelope and non-zero exit on unparseable or missing input.

Scenario: Export full IR

  • GIVEN a well-formed four-layer spec file with three Properties rows
  • WHEN spk parse <file> --json runs
  • THEN the envelope is ok and data carries intent, constraints, states, transitions, all three property rows, and the structured links

Scenario: Lint-dirty file still parses

  • GIVEN a file that parses but fails spk lint
  • WHEN spk parse <file> --json runs
  • THEN it exits zero with the full IR and the envelope embeds no lint status

Scenario: Unparseable input errors with label

  • GIVEN a file that violates the format’s parse rules, and separately a nonexistent path
  • WHEN spk parse runs on each
  • THEN each yields a labeled error envelope with a remediation hint and non-zero exit

Scenario: Single file per invocation

  • GIVEN zero or two or more path arguments
  • WHEN spk parse runs
  • THEN the invocation is rejected with usage guidance

data-lineage-pack — capability


id: data.lineage.pack kind: intent statement: “WHEN a workspace enables the data/lineage standard pack, THE format SHALL provide the pack as a declared kind: profile artifact — a namespaced ## Data section, data.dataset/data.artifact/data.environment kinds, produced_by/consumed_by/produces lineage reference fields resolving to declared ## Data rows, and a binding column that bridges external data standards without absorbing them into any base closed set — while files not using the pack’s vocabulary lint byte-identically.”

data-lineage-pack Specification

Purpose

Ship the first standard pack on the pack mechanism: a data/lineage pack declaring a typed ## Data table, namespaced dataset/artifact/environment kinds, and lineage edges (produced_by/consumed_by/produces) whose external binding is typed but opaque. External data standards stay authoritative — the pack bridges, never absorbs. It is the mechanism’s first real instance and the prerequisite for the bioimage D6 pilot.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[data.lineage.pack]]
pack_file_declaredinvariantthe data/lineage standard pack is a kind: profile spec file at packs/data-lineage.md (id data.lineage) whose six manifest tables declare the ## Data section, the data.dataset/data.artifact/data.environment kinds, the produces/produced_by/consumed_by reference fields, the data.lineage.closure checker, the artifact provenance floor, and the Revision 14 base pin[[data.lineage.pack]]
data_section_row_shapeinvariant## Data rows carry exactly | name | kind | dtype | units | binding | with kind closed to dataset, artifact, environment — a per-pack closed set; no base closed set grows and no existing entry narrows[[data.lineage.pack]]
lineage_edges_outboundinvariantproduces, produced_by, and consumed_by are pack-added reference fields resolving to a ## Data row of the declaring file; they are outbound leaves per specodelic.md's Reference Typing carve-out; a dangling lineage reference is a labeled finding naming the row id and both remediations, never a generic dangling message[[data.lineage.pack]]
binding_stays_externalinvariantthe binding column carries a typed pointer to an external data standard and the format never parses it — no dtype enum, shape convention, or URI scheme joins a base closed set, and lint behavior is identical regardless of the binding target[[data.lineage.pack]]

Model

States

  • draft
  • published
  • deprecated

Transitions

idfromtoguard
publishdraftpublished[[data.lineage.pack.pack_file_declared]] ∧ [[data.lineage.pack.data_section_row_shape]] — pack_shape reports zero findings over the pack's declared vocabulary
deprecatepublisheddeprecated[[data.lineage.pack.pack_file_declared]] — maintainer marks the pack deprecated; findings name the deprecation, vocabulary still checks

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[data.lineage.pack.process_lifecycle]]lifecycle_model_present()check(file) == passed
discovery_finds_lineage_packunit[[data.lineage.pack.pack_file_declared]]lint_workspace_with_pack_present()the pack is discovered by corpus scan alone, no config file, no registry
pack_shape_clean_all_statesunit[[data.lineage.pack.pack_file_declared]]pack_parsed_in_every_lifecycle_state()pack_shape reports zero findings over the declared vocabulary in draft, published, and deprecated
consumer_activates_advisoryunit[[data.lineage.pack.data_section_row_shape]]corpus_spec_uses_data_dataset_vocabulary()the pack's checkers activate advisory-first naming the pack; findings attributed per pack
orphan_names_lineage_packunit[[data.lineage.pack.data_section_row_shape]]workspace_uses_data_vocabulary_without_pack()the orphan finding names the candidate pack data.lineage and both remediations, exit non-zero
lineage_reference_resolvesunit[[data.lineage.pack.lineage_edges_outbound]]constraint_row_produced_by_declared_data_row()the lineage reference resolves to the declared ## Data row; a dangling reference is a labeled finding naming the row id and both remediations
closure_honest_emptyunit[[data.lineage.pack.lineage_edges_outbound]]pack_active_without_data_rows()the closure checker reports an empty checked-set; no fabricated findings
no_base_set_absorptionunit[[data.lineage.pack.binding_stays_external]]guide_sets_compared_with_and_without_data_pack()INTENT_KINDS and Reference Typing sets identical with the pack discovered or not
binding_opaque_to_lintunit[[data.lineage.pack.binding_stays_external]]data_row_binds_to_ome_zarr_vs_parquet()lint findings byte-identical across different binding targets

Requirements

Requirement: The data/lineage standard pack is a declared profile file

The format SHALL ship the data/lineage standard pack as an in-repo kind: profile spec file (packs/data-lineage.md, id data.lineage) whose manifest declares the ## Data section, the data.dataset, data.artifact, and data.environment kinds, the produces, produced_by, and consumed_by reference fields, the data.lineage.closure checker, and the artifact provenance floor.

Scenario: Pack lints clean under pack_shape in every lifecycle state

  • WHEN the pack file is parsed in draft, published, or deprecated state
  • THEN pack_shape reports zero findings over the pack’s declared vocabulary

Requirement: The data/lineage pack is discovered by corpus scan with a pinned base

The pack’s manifest SHALL pin the specodelic.md Revision 14 base, and the pack SHALL be discovered by corpus scan alone — with no config file and no registry.

Scenario: Corpus scan discovers the pack

  • WHEN spk lint runs over any workspace subdirectory of a repository containing packs/data-lineage.md
  • THEN the pack is discovered without configuration and reported in the lint envelope
  • AND files using none of the pack’s vocabulary keep byte-identical lint findings

Requirement: Data vocabulary is namespaced and per-pack closed

The pack SHALL declare a ## Data section with row shape | name | kind | dtype | units | binding |, kind closed to dataset, artifact, environment, and namespaced kinds data.dataset, data.artifact, data.environment — pack-fiber-relative vocabulary that grows no base closed set and narrows no existing base set entry.

Scenario: Consumer activates the pack advisory-first

  • WHEN a corpus spec uses data.dataset vocabulary without a declared uses edge
  • THEN the pack’s declared checking activates advisory-first for that file, naming the pack

Scenario: Orphan vocabulary names the lineage pack

  • WHEN a workspace uses data.dataset vocabulary with no data/lineage pack discovered or declared
  • THEN the orphan finding names the candidate pack data.lineage and both remediations, with non-zero exit

Requirement: Lineage edges are typed reference fields resolving to declared rows

The pack SHALL add produces, produced_by, and consumed_by reference fields, each resolving to a ## Data row of the declaring file (see the Reference Typing carve-out in specodelic.md), and SHALL declare a data.lineage.closure checker that reports an empty checked-set honestly when no ## Data rows exist.

Scenario: Dangling lineage reference is labeled

  • WHEN a constraint row references a ## Data row id via produced_by that no ## Data row in the file declares
  • THEN the finding is labeled, names the row id and both remediations, and is never a generic dangling message

Scenario: Honest-empty closure with no data rows

  • WHEN the pack is active in a workspace whose specs declare no ## Data rows
  • THEN the closure checker reports an empty checked-set with no fabricated findings

Requirement: External binding stays external

The pack SHALL bridge, never absorb, external data standards: the binding column carries a typed pointer to a schema, URI, or standard reference that the format never parses, and no dtype enum, shape convention, or URI scheme ever joins a base closed set — lint behavior is identical regardless of the binding target.

Scenario: Any external standard binds without lint change

  • WHEN a ## Data row binds to OME-Zarr, Parquet, or any other external standard
  • THEN lint findings are byte-identical across the different binding targets

numeric-predicates-pack — capability


id: numeric.predicates.pack kind: intent statement: “WHEN a workspace enables the numeric-predicates standard pack, THE format SHALL provide a namespaced ## Quantities section whose rows carry name, kind, unit, and domain; numeric.quantity, numeric.bound, and numeric.tolerance kinds; a measured_by reference field resolving to declared ## Quantities rows of the same file; and a tolerance case-label floor — while unit and domain columns stay opaque and files using none of this vocabulary lint byte-identically.”

numeric-predicates-pack Specification

Purpose

Ship the numeric-predicates standard pack: a typed ## Quantities table, namespaced numeric kinds, tolerance laws with their own case-label floor, and a measured_by reference field. Unit systems stay authoritative outside the format — the pack bridges, never absorbs. It is the second standard pack and, with the empirical-registry pack, completes what the bioimage D6 pilot consumes.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[numeric.predicates.pack]]
pack_file_declaredinvariantthe numeric-predicates standard pack is a kind: profile spec file at packs/numeric-predicates.md (id numeric.predicates) whose six manifest tables declare the ## Quantities section, the numeric.quantity/numeric.bound/numeric.tolerance kinds, the measured_by reference field, the numeric.quantity_closed and numeric.tolerance_labels checkers, the tolerance case-label floor, and the Revision 14 base pin[[numeric.predicates.pack]]
quantity_section_shapeinvariant## Quantities rows carry exactly | name | kind | unit | domain | with kind closed to quantity, bound, tolerance — a per-pack closed set; no base closed set grows and no existing entry narrows[[numeric.predicates.pack]]
measured_by_outboundinvariantmeasured_by is a pack-added reference field resolving to a ## Quantities row of the declaring file; it is an outbound leaf per specodelic.md's Reference Typing carve-out; a dangling reference is a labeled finding naming the row id and both remediations, never a generic dangling message[[numeric.predicates.pack]]
units_stay_opaqueinvariantthe unit and domain columns carry typed prose pointers (unit systems, domains of validity) that the format never parses — no unit system, conversion rule, or domain vocabulary joins a base closed set, and lint behavior is identical regardless of the unit system named[[numeric.predicates.pack]]
vocabulary_prose_safeinvariantno pack vocabulary token is a bare English word that appears in corpus prose — the within/bound/against/unit/domain audit excluded them from vocabulary-carrying facets; bound and against survive only as floor case labels, which the mechanism never scans[[numeric.predicates.pack]]

Model

States

  • draft
  • published
  • deprecated

Transitions

idfromtoguard
publishdraftpublished[[numeric.predicates.pack.pack_file_declared]] ∧ [[numeric.predicates.pack.quantity_section_shape]] — pack_shape reports zero findings over the pack's declared vocabulary
deprecatepublisheddeprecated[[numeric.predicates.pack.pack_file_declared]] — maintainer marks the pack deprecated; findings name the deprecation, vocabulary still checks

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[numeric.predicates.pack.process_lifecycle]]lifecycle_model_present()check(file) == passed
discovery_finds_numeric_packunit[[numeric.predicates.pack.pack_file_declared]]lint_workspace_with_numeric_pack_present()the pack is discovered by corpus scan alone, no config file, no registry
pack_shape_clean_all_statesunit[[numeric.predicates.pack.pack_file_declared]]pack_parsed_in_every_lifecycle_state()pack_shape reports zero findings over the declared vocabulary in draft, published, and deprecated
consumer_activates_advisoryunit[[numeric.predicates.pack.quantity_section_shape]]corpus_spec_uses_numeric_quantity_vocabulary()the pack's checkers activate advisory-first naming the pack; findings attributed per pack
orphan_names_numeric_packunit[[numeric.predicates.pack.quantity_section_shape]]workspace_uses_numeric_vocabulary_without_pack()the orphan finding names the candidate pack numeric.predicates and both remediations, exit non-zero
measured_by_resolvesunit[[numeric.predicates.pack.measured_by_outbound]]constraint_row_measured_by_declared_quantity_row()the measured_by reference resolves to the declared ## Quantities row; a dangling reference is a labeled finding naming the row id and both remediations
closure_honest_emptyunit[[numeric.predicates.pack.measured_by_outbound]]pack_active_without_quantity_rows()the closure checkers report an empty checked-set; no fabricated findings
no_base_set_absorptionunit[[numeric.predicates.pack.units_stay_opaque]]guide_sets_compared_with_and_without_numeric_pack()INTENT_KINDS and Reference Typing sets identical with the pack discovered or not
units_opaque_to_lintunit[[numeric.predicates.pack.units_stay_opaque]]quantity_row_names_ucum_vs_iso4217()lint findings byte-identical across different unit systems
no_bare_word_vocabularyunit[[numeric.predicates.pack.vocabulary_prose_safe]]corpus_linted_with_and_without_numeric_pack()lint warnings byte-identical for every corpus file — no vocabulary-match activations from prose words
tolerance_floor_labelsunit[[numeric.predicates.pack.vocabulary_prose_safe]]tolerance_law_missing_case_label()a numeric.tolerance law owes **bound:** and **against:** case labels per the floor declaration

Requirements

Requirement: The numeric-predicates standard pack is a declared profile file

The format SHALL ship the numeric-predicates standard pack as an in-repo kind: profile spec file (packs/numeric-predicates.md, id numeric.predicates) whose manifest declares the ## Quantities section, the numeric.quantity, numeric.bound, and numeric.tolerance kinds, the measured_by reference field, the numeric.quantity_closed and numeric.tolerance_labels checkers, and the tolerance case-label floor.

Scenario: Pack lints clean under pack_shape in every lifecycle state

  • WHEN the pack file is parsed in draft, published, or deprecated state
  • THEN pack_shape reports zero findings over the pack’s declared vocabulary

Requirement: The numeric-predicates pack is discovered by corpus scan with a pinned base

The pack’s manifest SHALL pin the specodelic.md Revision 14 base, and the pack SHALL be discovered by corpus scan alone — with no config file and no registry.

Scenario: Corpus scan discovers the pack

  • WHEN spk lint runs over any workspace subdirectory of a repository containing packs/numeric-predicates.md
  • THEN the pack is discovered without configuration and reported in the lint envelope
  • AND files using none of the pack’s vocabulary keep byte-identical lint findings

Requirement: Quantity vocabulary is namespaced and per-pack closed

The pack SHALL declare a ## Quantities section with row shape | name | kind | unit | domain |, kind closed to quantity, bound, tolerance, and namespaced kinds numeric.quantity, numeric.bound, numeric.tolerance — pack-fiber-relative vocabulary that grows no base closed set and narrows no existing base set entry.

Scenario: Consumer activates the pack advisory-first

  • WHEN a corpus spec uses numeric.quantity vocabulary without a declared uses edge
  • THEN the pack’s declared checking activates advisory-first for that file, naming the pack

Scenario: Orphan vocabulary names the numeric pack

  • WHEN a workspace uses numeric.quantity vocabulary with no numeric-predicates pack discovered or declared
  • THEN the orphan finding names the candidate pack numeric.predicates and both remediations, with non-zero exit

Requirement: measured_by is a typed reference field resolving to declared rows

The pack SHALL add the measured_by reference field, resolving to a ## Quantities row of the declaring file (see the Reference Typing carve-out in specodelic.md), and SHALL declare the numeric.quantity_closed checker that reports an empty checked-set honestly when no ## Quantities rows exist.

Scenario: Dangling measured_by reference is labeled

  • WHEN a constraint row references a ## Quantities row id via measured_by that no ## Quantities row in the file declares
  • THEN the finding is labeled, names the row id and both remediations, and is never a generic dangling message

Scenario: Honest-empty closure with no quantity rows

  • WHEN the pack is active in a workspace whose specs declare no ## Quantities rows
  • THEN the closure checker reports an empty checked-set with no fabricated findings

Requirement: Unit systems stay external

The pack SHALL bridge, never absorb, unit systems: the unit and domain columns carry typed prose pointers (UCUM codes, ISO4217 currencies, domains of validity) that the format never parses, and no unit system or conversion rule ever joins a base closed set — lint behavior is identical regardless of the unit system named.

Scenario: Any unit system binds without lint change

  • WHEN a ## Quantities row names UCUM units, ISO4217 currencies, or any other unit system
  • THEN lint findings are byte-identical across the different unit systems

Requirement: Pack vocabulary is prose-safe

The pack SHALL NOT declare any vocabulary token that is a bare English word appearing in corpus prose: the within, bound, against, unit, and domain audit excludes them from the Sections, Kinds, and References facets, and bound/against survive only as the tolerance floor’s case labels, which the activation scanner never reads — corpus lint warnings stay byte-identical with the pack discovered.

Scenario: Corpus prose does not falsely activate the pack

  • WHEN the corpus lints with the pack discovered and again with it removed
  • THEN issues and warnings are byte-identical — no vocabulary-match activations from prose words

Scenario: Tolerance floor names its case labels

  • WHEN a numeric.tolerance law property is checked against the pack’s floor declaration
  • THEN the floor names bound and against as the required case labels

empirical-registry-pack — capability


id: empirical.registry.pack kind: intent statement: “WHEN a workspace enables the empirical-registry standard pack, THE format SHALL provide a namespaced ## StatTests section whose rows carry name, metric, alpha, and window; an empirical.statistic property kind; a tested_by reference field resolving to declared ## StatTests rows of the same file; and a per-kind case-label floor enumerating alpha and window on statistic properties — while the base law floor stays untouched and files using none of this vocabulary lint byte-identically.”

empirical-registry-pack Specification

Purpose

Ship the empirical-registry standard pack: the Floors facet’s first real consumer — a namespaced ## StatTests registry table, the empirical.statistic property kind, and a per-kind case-label floor (alpha + window) reusing the **name:** enumeration machinery with a different required label set than the base law floor. Statistical tests stay authoritative outside the format — the pack declares the registry, the mechanism interprets it. It is the third standard pack and, with data/lineage and numeric predicates, completes what the bioimage D6 pilot consumes.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[empirical.registry.pack]]
pack_file_declaredinvariantthe empirical-registry standard pack is a kind: profile spec file at packs/empirical-registry.md (id empirical.registry) whose six manifest tables declare the ## StatTests section, the empirical.statistic kind, the tested_by reference field, the empirical.statistic_labels and empirical.stat_test_closed checkers, the statistic case-label floor, and the Revision 14 base pin[[empirical.registry.pack]]
stat_test_section_shapeinvariant## StatTests rows carry exactly | name | metric | alpha | window | — the registry of the workspace's statistical tests; alpha and window columns are opaque prose the format never parses, and no base closed set grows and no existing entry narrows[[empirical.registry.pack]]
tested_by_outboundinvarianttested_by is a pack-added reference field resolving to a ## StatTests row of the declaring file; it is an outbound leaf per specodelic.md's Reference Typing carve-out; a dangling reference is a labeled finding naming the row id and both remediations, never a generic dangling message[[empirical.registry.pack]]
floors_are_additiveinvariantthe per-kind floor requires statistic properties to enumerate their alpha and window case labels; the base law floor (identity/associativity) is byte-identical with the pack discovered, a kind with no declared floor inherits none, the base floor is a floor not a ceiling (a law-kind row using the pack's vocabulary may carry the labels additively), and floor labels are never activation vocabulary[[empirical.registry.pack]]
fiber_kinds_typeableinvariantwhen the pack is active, base-table kind columns accept its pack-qualified fiber kinds — property_kind_closed's effective set is base ∪ active-pack-fiber, never narrower; without the pack active the token stays outside the closed set and the labeled finding fires — never a silent pass[[empirical.registry.pack]]
vocabulary_prose_safeinvariantno pack vocabulary token is a bare English word that appears in corpus prose — window appears in corpus prose and is excluded from every vocabulary-carrying facet, surviving only as a floor case label and a table column; the kind is dotted; StatTests and tested_by are verified absent from the corpus[[empirical.registry.pack]]

Model

States

  • draft
  • published
  • deprecated

Transitions

idfromtoguard
publishdraftpublished[[empirical.registry.pack.pack_file_declared]] ∧ [[empirical.registry.pack.stat_test_section_shape]] — pack_shape reports zero findings over the pack's declared vocabulary
deprecatepublisheddeprecated[[empirical.registry.pack.pack_file_declared]] — maintainer marks the pack deprecated; findings name the deprecation, vocabulary still checks

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[empirical.registry.pack.process_lifecycle]]lifecycle_model_present()check(file) == passed
discovery_finds_empirical_packunit[[empirical.registry.pack.pack_file_declared]]lint_workspace_with_empirical_pack_present()the pack is discovered by corpus scan alone, no config file, no registry
pack_shape_clean_all_statesunit[[empirical.registry.pack.pack_file_declared]]pack_parsed_in_every_lifecycle_state()pack_shape reports zero findings over the declared vocabulary in draft, published, and deprecated
consumer_activates_advisoryunit[[empirical.registry.pack.stat_test_section_shape]]corpus_spec_uses_empirical_statistic_vocabulary()the pack's checkers activate advisory-first naming the pack; findings attributed per pack
orphan_names_empirical_packunit[[empirical.registry.pack.stat_test_section_shape]]workspace_uses_empirical_vocabulary_without_pack()the orphan finding names the candidate pack empirical.registry and both remediations, exit non-zero
tested_by_resolvesunit[[empirical.registry.pack.tested_by_outbound]]property_row_tested_by_declared_stat_test_row()the tested_by reference resolves to the declared ## StatTests row; a dangling reference is a labeled finding naming the row id and both remediations
closure_honest_emptyunit[[empirical.registry.pack.tested_by_outbound]]pack_active_without_stat_test_rows()the closure checkers report an empty checked-set; no fabricated findings
law_floor_unchangedunit[[empirical.registry.pack.floors_are_additive]]law_property_linted_with_and_without_pack()law floor findings byte-identical with the pack discovered; a kind with no floor inherits none
statistic_floor_labelsunit[[empirical.registry.pack.floors_are_additive]]statistic_property_missing_case_label()an empirical.statistic property owes **alpha:** and **window:** case labels per the floor declaration
kind_column_accepts_fiber_kindsunit[[empirical.registry.pack.fiber_kinds_typeable]]property_row_typed_empirical_statistic_with_pack_active()property_kind_closed accepts the fiber kind when the pack is active; the same row without the pack fires the labeled finding
no_bare_word_vocabularyunit[[empirical.registry.pack.vocabulary_prose_safe]]corpus_linted_with_and_without_empirical_pack()lint warnings byte-identical for every corpus file — no vocabulary-match activations from prose words

Requirements

Requirement: The empirical-registry standard pack is a declared profile file

The format SHALL ship the empirical-registry standard pack as an in-repo kind: profile spec file (packs/empirical-registry.md, id empirical.registry) whose manifest declares the ## StatTests section, the empirical.statistic kind, the tested_by reference field, the empirical.statistic_labels and empirical.stat_test_closed checkers, the statistic case-label floor, and the specodelic.md Revision 14 base pin — discovered by corpus scan alone, with no config file and no registry.

Scenario: Corpus scan discovers the pack

  • WHEN spk lint runs over any workspace subdirectory of a repository containing packs/empirical-registry.md
  • THEN the pack is discovered without configuration and reported in the lint envelope
  • AND files using none of the pack’s vocabulary keep byte-identical lint findings

Scenario: Pack lints clean under pack_shape in every lifecycle state

  • WHEN the pack file is parsed in draft, published, or deprecated state
  • THEN pack_shape reports zero findings over the pack’s declared vocabulary

Requirement: The StatTests registry is namespaced and per-pack closed

The pack SHALL declare a ## StatTests section with row shape | name | metric | alpha | window | — the workspace’s declared statistical tests — and the namespaced kind empirical.statistic, pack-fiber-relative vocabulary that grows no base closed set and narrows no existing base set entry; the alpha and window columns stay opaque prose the format never parses.

Scenario: Consumer activates the pack advisory-first

  • WHEN a corpus spec uses empirical.statistic vocabulary without a declared uses edge
  • THEN the pack’s declared checking activates advisory-first for that file, naming the pack

Scenario: Orphan vocabulary names the empirical pack

  • WHEN a workspace uses empirical.statistic vocabulary with no empirical-registry pack discovered or declared
  • THEN the orphan finding names the candidate pack empirical.registry and both remediations, with non-zero exit

Requirement: tested_by is a typed reference field resolving to declared rows

The pack SHALL add the tested_by reference field, resolving to a ## StatTests row of the declaring file (see the Reference Typing carve-out in specodelic.md), and SHALL declare the empirical.stat_test_closed checker that reports an empty checked-set honestly when no ## StatTests rows exist.

Scenario: Dangling tested_by reference is labeled

  • WHEN a property row references a ## StatTests row id via tested_by that no ## StatTests row in the file declares
  • THEN the finding is labeled, names the row id and both remediations, and is never a generic dangling message

Scenario: Honest-empty closure with no stat-test rows

  • WHEN the pack is active in a workspace whose specs declare no ## StatTests rows
  • THEN the closure checker reports an empty checked-set with no fabricated findings

Requirement: The per-kind floor is additive enumeration

The pack SHALL declare the floor requiring empirical.statistic properties to enumerate their **alpha:** and **window:** case labels, reusing the **name:** enumeration machinery with a different required label set — while the base law floor stays byte-identical with the pack discovered and a kind with no declared floor inherits none; floor labels never join the activation vocabulary.

Scenario: Law properties keep their base floor

  • WHEN a base law property is linted with the empirical-registry pack discovered
  • THEN its floor findings are byte-identical to the lint without the pack

Scenario: Statistic floor names its case labels

  • WHEN an empirical.statistic property is checked against the pack’s floor declaration
  • THEN the floor names alpha and window as the required case labels

Requirement: Pack-fiber kinds are typeable in base-table kind columns

When the pack is active, the format SHALL accept its pack-qualified fiber kinds in base-table kind columns — property_kind_closed‘s effective set is the base set extended with active packs’ fiber vocabulary, never narrower than the base set — and without the pack active the token stays outside the closed set, firing the labeled finding, never passing silently.

Scenario: Active pack makes the fiber kind typeable

  • WHEN a Properties row carries kind = empirical.statistic and the empirical-registry pack is discovered/declared
  • THEN property_kind_closed accepts the row — no finding

Scenario: Inactive pack keeps the closed set closed

  • WHEN a Properties row carries kind = empirical.statistic with no empirical-registry pack discovered or declared
  • THEN the labeled property_kind_closed finding fires naming the closed set

Requirement: Pack vocabulary is prose-safe

The pack SHALL NOT declare any vocabulary token that is a bare English word appearing in corpus prose: window appears in corpus prose and is excluded from the Sections, Kinds, and References facets, surviving only as the statistic floor’s case label and a table column, which the activation scanner never reads; the kind is dotted (empirical.statistic); StatTests and tested_by are verified absent from the corpus — corpus lint warnings stay byte-identical with the pack discovered.

Scenario: Corpus prose does not falsely activate the pack

  • WHEN the corpus lints with the pack discovered and again with it removed
  • THEN issues and warnings are byte-identical — no vocabulary-match activations from prose words

Scenario: Prose window mentions stay inert

  • WHEN a corpus spec’s prose contains the English word window (the rate-limit window pattern)
  • THEN the pack is not activated by that word — no warning, no finding

bioimage-data-pack — capability


id: bioimage.data.pack kind: intent statement: “WHEN a workspace enables the bioimage-data domain pack, THE format SHALL provide a namespaced ## Axes section whose rows carry name, axis, scale, and unit; a bioimage.transform property kind typeable in base-table kind columns when the pack is active; a same_shape_as reference field resolving to a ## Data row of the declaring file; the R2 data-shaped predicate grammar declared as named pack-qualified checkers (bioimage.dtype_is, bioimage.shape_eq, bioimage.units_convertible) resolving against declared ## Data rows; and a kind-dependent transform floor enumerating preserves and dtype — while OME/NGFF and BioImage.IO stay authoritative external standards, no base closed set grows, and files using none of this vocabulary lint byte-identically.”

bioimage-data-pack Specification

Purpose

Ship the bioimage-data domain pack — the D6 pilot for the domain-pack mechanism: the thin instance that stress-tests what the three standard packs could not exercise alone. It consumes the data/lineage pack’s ## Data section (same_shape_as resolution, the dtype_is predicate class), the numeric-predicates pack’s opaque unit domain (units_convertible bridging), and the empirical-registry pack’s stat-test rows (empirically held transform claims) via the mechanism’s first cross-pack ## Requires table. OME/NGFF and BioImage.IO stay authoritative external standards — the pack bridges them through opaque scale/unit columns, it never absorbs them. Checkers ship as declarations (honest-empty): this pack declares vocabulary, the mechanism (packs.md) interprets it.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[bioimage.data.pack]]
pack_file_declaredinvariantthe bioimage-data domain pack is a kind: profile spec file at packs/bioimage-data.md (id bioimage.data) whose six manifest tables declare the ## Axes section, the bioimage.transform kind, the same_shape_as reference field, the bioimage.dtype_is, bioimage.shape_eq, and bioimage.units_convertible checkers, the transform case-label floor, and the Requires table pinning base specodelic.md Revision 14 plus the data.lineage, numeric.predicates, and empirical.registry pack deps[[bioimage.data.pack]]
axes_section_shapeinvariant## Axes rows carry exactly | name | axis | scale | unit | — the workspace's declared image axes (OME-NGFF-style semantics); the scale and unit columns are opaque prose the format never parses, and no base closed set grows and no existing entry narrows[[bioimage.data.pack]]
same_shape_as_cross_packinvariantsame_shape_as is a pack-added reference field resolving to a ## Data row of the declaring file — the data-lineage pack's section, the pack's cross-pack-ness living in its Requires pack deps while the resolution stays intra-file; it is an outbound leaf per specodelic.md's Reference Typing carve-out; a dangling reference is a labeled finding naming the row id and both remediations, never a generic dangling message[[bioimage.data.pack]]
predicates_closed_namedinvariantthe R2 data-shaped predicate grammar is declared as the named pack-qualified checkers bioimage.dtype_is, bioimage.shape_eq, and bioimage.units_convertible — a closed set over declared ## Data rows, declaration-only (the mechanism names them, never executes them), honest-empty with no ## Data rows, and the bare predicate tokens are never activation vocabulary[[bioimage.data.pack]]
transform_floor_kind_dependentinvariantthe per-kind floor requires bioimage.transform properties to enumerate their preserves and dtype case labels — the kind-dependent floor the base law floor's non-universality critique motivated; the base law floor is byte-identical with the pack discovered, a kind with no declared floor inherits none, the floor is a floor not a ceiling (labels from consumed packs ride along additively), and floor labels are never activation vocabulary[[bioimage.data.pack]]
kind_column_typeableinvariantwhen the pack is active, base-table kind columns accept its pack-qualified fiber kinds — property_kind_closed's effective set is base ∪ active-pack-fiber, never narrower; without the pack active the token stays outside the closed set and the labeled finding fires — never a silent pass[[bioimage.data.pack]]
requires_declares_pack_depsinvariantthe pack-authored ## Requires table pins the base format_revision and names the data.lineage, numeric.predicates, and empirical.registry pack deps with the base corpus revision each was verified against — the mechanism's first cross-pack Requires consumer; a dep with no discovered pack is a labeled advisory, never silent[[bioimage.data.pack]]
vocabulary_prose_safeinvariantno pack vocabulary token is a bare English word that appears in corpus prose — bare bioimage appears in corpus prose as documented asymmetry (dotted tokens cannot match prose words), pipeline is prose-heavy and rejected, the predicate names ride pack-qualified checker rule names, Axes and same_shape_as and preserves are verified absent from the corpus, and dtype survives only as an opaque column header and floor case label — corpus lint warnings stay byte-identical with the pack discovered[[bioimage.data.pack]]

Model

States

  • draft
  • published
  • deprecated

Transitions

idfromtoguard
publishdraftpublished[[bioimage.data.pack.pack_file_declared]] ∧ [[bioimage.data.pack.axes_section_shape]] — pack_shape reports zero findings over the pack's declared vocabulary
deprecatepublisheddeprecated[[bioimage.data.pack.pack_file_declared]] — maintainer marks the pack deprecated; findings name the deprecation, vocabulary still checks

Properties

idkindderives_fromgeneratorpredicate
process_lifecycle_checkedunit[[bioimage.data.pack.process_lifecycle]]lifecycle_model_present()check(file) == passed
discovery_finds_bioimage_packunit[[bioimage.data.pack.pack_file_declared]]lint_workspace_with_bioimage_pack_present()the pack is discovered by corpus scan alone, no config file, no registry
pack_shape_clean_all_statesunit[[bioimage.data.pack.pack_file_declared]]pack_parsed_in_every_lifecycle_state()pack_shape reports zero findings over the declared vocabulary in draft, published, and deprecated
consumer_activates_advisoryunit[[bioimage.data.pack.axes_section_shape]]corpus_spec_uses_bioimage_vocabulary()the pack's checkers activate advisory-first naming the pack; findings attributed per pack
orphan_names_bioimage_packunit[[bioimage.data.pack.axes_section_shape]]workspace_uses_bioimage_vocabulary_without_pack()the orphan finding names the candidate pack bioimage.data and both remediations, exit non-zero
same_shape_as_resolvesunit[[bioimage.data.pack.same_shape_as_cross_pack]]constraint_row_same_shape_as_declared_data_row()the same_shape_as reference resolves to the declared ## Data row of the same file; a dangling reference is a labeled finding naming the row id and both remediations
requires_deps_resolveunit[[bioimage.data.pack.requires_declares_pack_deps]]bioimage_pack_requires_table_parsed_with_deps()the pack deps resolve to discovered pack ids; a dep with no discovered pack is a labeled advisory naming it, never silent
predicates_honest_emptyunit[[bioimage.data.pack.predicates_closed_named]]pack_active_without_data_rows()the predicate checkers report an empty checked-set with no ## Data rows; no fabricated findings; the bare predicate tokens are never declared
transform_floor_labelsunit[[bioimage.data.pack.transform_floor_kind_dependent]]transform_property_missing_case_label()a bioimage.transform property owes **preserves:** and **dtype:** case labels per the floor declaration
law_floor_unchangedunit[[bioimage.data.pack.transform_floor_kind_dependent]]law_property_linted_with_and_without_pack()law floor findings byte-identical with the pack discovered; a kind with no floor inherits none
kind_column_accepts_fiber_kindsunit[[bioimage.data.pack.kind_column_typeable]]property_row_typed_bioimage_transform_with_pack_active()property_kind_closed accepts the fiber kind when the pack is active; the same row without the pack fires the labeled finding
no_bare_word_vocabularyunit[[bioimage.data.pack.vocabulary_prose_safe]]corpus_linted_with_and_without_bioimage_pack()lint warnings byte-identical for every corpus file — no vocabulary-match activations from prose words

Requirements

Requirement: The bioimage-data domain pack is a declared profile file

The format SHALL ship the bioimage-data domain pack as an in-repo kind: profile spec file (packs/bioimage-data.md, id bioimage.data) whose manifest declares the ## Axes section, the bioimage.transform kind, the same_shape_as reference field, the bioimage.dtype_is, bioimage.shape_eq, and bioimage.units_convertible checkers, and the transform case-label floor.

Scenario: Pack lints clean under pack_shape in every lifecycle state

  • WHEN the pack file is parsed in draft, published, or deprecated state
  • THEN pack_shape reports zero findings over the pack’s declared vocabulary

Requirement: The bioimage-data pack is discovered by corpus scan with a pinned Requires table

The pack’s manifest SHALL declare a ## Requires table pinning the specodelic.md Revision 14 base plus the data.lineage, numeric.predicates, and empirical.registry pack deps, and the pack SHALL be discovered by corpus scan alone — with no config file and no registry.

Scenario: Corpus scan discovers the pack

  • WHEN spk lint runs over any workspace subdirectory of a repository containing packs/bioimage-data.md
  • THEN the pack is discovered without configuration and reported in the lint envelope
  • AND files using none of the pack’s vocabulary keep byte-identical lint findings

Requirement: The Axes registry is namespaced with opaque scale and unit

The pack SHALL declare a ## Axes section with row shape | name | axis | scale | unit | — the workspace’s declared image axes with OME-NGFF-style semantics — and the namespaced kind bioimage.transform, pack-fiber-relative vocabulary that grows no base closed set and narrows no existing base set entry; the scale and unit columns stay opaque prose the format never parses, keeping OME/NGFF and BioImage.IO authoritative as external standards.

Scenario: Consumer activates the pack advisory-first

  • WHEN a corpus spec uses bioimage.transform or ## Axes vocabulary without a declared uses edge
  • THEN the pack’s declared checking activates advisory-first for that file, naming the pack

Scenario: Orphan vocabulary names the bioimage pack

  • WHEN a workspace uses bioimage.transform vocabulary with no bioimage-data pack discovered or declared
  • THEN the orphan finding names the candidate pack bioimage.data and both remediations, with non-zero exit

Requirement: same_shape_as is a typed reference field resolving cross-pack, file-locally

The pack SHALL add the same_shape_as reference field, resolving to a ## Data row of the declaring file — the data-lineage pack’s section — with the pack dependency living in the pack’s ## Requires table while the resolution itself stays intra-file (see the Reference Typing carve-out in specodelic.md); a dangling reference is a labeled finding naming the row id and both remediations.

Scenario: Cross-pack section resolution stays file-local

  • WHEN a constraint row declares same_shape_as pointing at a ## Data row declared in the same file, with the data-lineage pack active for the file
  • THEN the reference resolves with no corpus-wide pass and no reachability join

Scenario: Dangling same_shape_as reference is labeled

  • WHEN a row references a ## Data row id via same_shape_as that no ## Data row in the file declares
  • THEN the finding is labeled, names the row id and both remediations, and is never a generic dangling message

Requirement: The R2 predicate grammar is a declared closed set of named checkers

The pack SHALL declare the data-shaped predicate grammar as the named pack-qualified checkers bioimage.dtype_is, bioimage.shape_eq, and bioimage.units_convertible — a closed set resolving against declared ## Data rows — declaration-only, with the bare predicate tokens never declared as activation vocabulary and the checkers reporting an empty checked-set honestly when no ## Data rows exist.

Scenario: Predicates resolve against declared Data rows

  • WHEN a law predicate uses a declared predicate name over ## Data rows in a file with the pack active
  • THEN the corresponding named checker covers the predicate occurrence against the declared ## Data rows

Scenario: Honest-empty predicates with no data rows

  • WHEN the pack is active in a workspace whose specs declare no ## Data rows
  • THEN the predicate checkers report an empty checked-set with no fabricated findings

Requirement: The transform floor is kind-dependent and additive

The pack SHALL declare the floor requiring bioimage.transform properties to enumerate their **preserves:** and **dtype:** case labels — the kind-dependent floor making the base law floor’s non-universality critique concrete — while the base law floor stays byte-identical with the pack discovered, a kind with no declared floor inherits none, case labels from the consumed packs ride along additively, and floor labels never join the activation vocabulary.

Scenario: Law properties keep their base floor

  • WHEN a base law property is linted with the bioimage-data pack discovered
  • THEN its floor findings are byte-identical to the lint without the pack

Scenario: Transform floor names its case labels

  • WHEN a bioimage.transform property is checked against the pack’s floor declaration
  • THEN the floor names preserves and dtype as the required case labels

Requirement: Pack-fiber kinds are typeable in base-table kind columns

When the pack is active, the format SHALL accept its pack-qualified fiber kinds in base-table kind columns — property_kind_closed‘s effective set is the base set extended with active packs’ fiber vocabulary, never narrower than the base set — and without the pack active the token stays outside the closed set, firing the labeled finding, never passing silently.

Scenario: Active pack makes the fiber kind typeable

  • WHEN a Properties row carries kind = bioimage.transform and the bioimage-data pack is discovered/declared
  • THEN property_kind_closed accepts the row — no finding

Scenario: Inactive pack keeps the closed set closed

  • WHEN a Properties row carries kind = bioimage.transform with no bioimage-data pack discovered or declared
  • THEN the labeled property_kind_closed finding fires naming the closed set

Requirement: The Requires table names its pack dependencies

The pack SHALL author a ## Requires table pinning the specodelic.md Revision 14 base and naming the data.lineage, numeric.predicates, and empirical.registry pack deps with the base corpus revision each was verified against — the mechanism’s first cross-pack ## Requires consumer — where a dep naming no discovered pack is a labeled advisory, never silent.

Scenario: Pack deps resolve to discovered packs

  • WHEN the bioimage-data pack is discovered in a workspace that also carries the three standard packs
  • THEN each ## Requires dep row resolves to a discovered pack id with its verified-at revision recorded

Scenario: Missing pack dep is a labeled advisory

  • WHEN a ## Requires dep row names a pack id that no discovered pack in the workspace declares
  • THEN the advisory names the missing dep on the warnings channel and lint does not fail silently

Requirement: Pack vocabulary is prose-safe

The pack SHALL NOT declare any vocabulary token that is a bare English word appearing in corpus prose: bare bioimage appears in corpus prose as documented asymmetry (dotted tokens cannot match prose words), pipeline is prose-heavy and rejected from this release, and Axes, same_shape_as, and preserves are verified absent from the corpus — corpus lint warnings stay byte-identical with the pack discovered.

Scenario: Prose bioimage mentions stay inert

  • WHEN a corpus doc’s prose mentions the word bioimage (the packs paragraph in USAGE)
  • THEN the pack is not activated by that word — no warning, no finding

Requirement: Pack-only vocabulary rides opaque scanner-invisible positions

The pack’s remaining vocabulary SHALL survive only in positions the activation scanner never reads: the predicate names ride pack-qualified checker rule names, and dtype survives only as the ## Axes row’s opaque column header and the transform floor’s case label.

Scenario: Corpus prose does not falsely activate the pack

  • WHEN the corpus lints with the pack discovered and again with it removed
  • THEN issues and warnings are byte-identical — no vocabulary-match activations from prose words

quant-finance-pack — capability


id: quant.finance.pack kind: intent statement: “WHEN a workspace enables the quant-finance standard pack, THE format SHALL provide a namespaced ## Limits section whose rows carry name, kind, unit, and bound; quant.risk and quant.pricing kinds; a capped_by reference field resolving to declared ## Limits rows of the same file; the limit-closure and risk-label pack-qualified checkers (quant.limit_closed, quant.risk_labels); and a kind-dependent case-label floor enumerating horizon and confidence on risk laws — while ISO4217 and market-data conventions stay authoritative external standards, no base closed set grows, and files using none of this vocabulary lint byte-identically.”

quant-finance-pack Specification

Purpose

Ship the quant-finance standard pack: a typed ## Limits section for bounded risk measures and pricing invariants, namespaced quant kinds, a kind-dependent risk case-label floor, and a capped_by reference field. Most of the vendor convergence already ships in the standard packs — this pack declares only the vocabulary no standard pack carries, and requires numeric.predicates + data.lineage for the rest. It is the D6 second domain pack.

Constraints

idkindexprtraces_to
pack_file_declaredinvariantthe quant-finance standard pack is a kind: profile spec file at packs/quant-finance.md (id quant.finance) whose six manifest tables declare the ## Limits section, the quant.risk and quant.pricing kinds, the capped_by reference field, the quant.limit_closed and quant.risk_labels checkers, the risk case-label floor, and the Revision 18 base pin plus the numeric.predicates and data.lineage pack deps[[quant.finance.pack]]
limits_section_shapeinvariant## Limits rows carry exactly | name | kind | unit | bound | with kind closed to risk, pricing — a per-pack closed set; no base closed set grows and no existing entry narrows[[quant.finance.pack]]
capped_by_outboundinvariantcapped_by is a pack-added reference field resolving to a ## Limits row of the declaring file; it is an outbound leaf per specodelic.md's Reference Typing carve-out; a dangling reference is a labeled finding naming the row id and both remediations, never a generic dangling message[[quant.finance.pack]]
fixtures_stay_datainvariantbacktest fixtures and datasets are data.lineage ## Data rows — the pack declares no fixtures section and no second dataset vocabulary; the vendor Fixtures demand is satisfied by the required data.lineage pack[[quant.finance.pack]]
vocabulary_prose_safeinvariantno pack vocabulary token is a bare English word that appears in corpus prose — the limit/confidence/Fixtures audit excluded them from vocabulary-carrying facets; horizon and confidence survive only as floor case labels, which the mechanism never scans[[quant.finance.pack]]

Model

States

  • draft
  • published
  • deprecated

Transitions

idfromtoguard
publishdraftpublished[[quant.finance.pack.pack_file_declared]] ∧ [[quant.finance.pack.limits_section_shape]] — pack_shape reports zero findings over the pack's declared vocabulary
deprecatepublisheddeprecated[[quant.finance.pack.pack_file_declared]] — maintainer marks the pack deprecated; findings name the deprecation, vocabulary still checks

Properties

idkindderives_fromgeneratorpredicate
discovery_finds_quant_packunit[[quant.finance.pack.pack_file_declared]]lint_workspace_with_quant_pack_present()the pack is discovered by corpus scan alone, no config file, no registry
no_pack_no_changeunit[[quant.finance.pack.pack_file_declared]]corpus_linted_before_and_after_quant_pack()lint findings byte-identical for a corpus using no quant vocabulary
honest_emptyunit[[quant.finance.pack.capped_by_outbound]]quant_pack_active_with_no_limits_rows()quant.limit_closed reports an empty checked-set with no fabricated findings
limits_rows_namespacedunit[[quant.finance.pack.limits_section_shape]]limits_row_shape_checked_by_pack_shape()## Limits rows carry exactly | name | kind | unit | bound |; the row-kind labels stay closed to risk, pricing — a per-pack closed set that never grows a base set
fixtures_are_data_rowsunit[[quant.finance.pack.fixtures_stay_data]]corpus_declares_no_fixtures_section()the pack declares no Fixtures section; backtest fixtures and datasets are data.lineage ## Data rows via the required data.lineage pack dep
vocabulary_prose_safe_verifiedunit[[quant.finance.pack.vocabulary_prose_safe]]vocabulary_surface_equals_declared_tokens()the pack's vocabulary() is exactly [quant.risk, quant.pricing, Limits, capped_by]; floor case labels never join it; corpus prose using none of it lints byte-identically

Requirements

Requirement: The quant-finance standard pack is a declared profile file

The format SHALL ship the quant-finance standard pack as an in-repo kind: profile spec file (packs/quant-finance.md, id quant.finance) whose manifest declares the ## Limits section, the quant.risk and quant.pricing kinds, the capped_by reference field, the quant.limit_closed and quant.risk_labels checkers, and the risk case-label floor.

Scenario: Pack lints clean under pack_shape in every lifecycle state

  • WHEN the pack file is parsed in draft, published, or deprecated state
  • THEN pack_shape reports zero findings over the pack’s declared vocabulary

Requirement: The quant-finance pack is discovered by corpus scan with pinned deps

The pack’s manifest SHALL pin the specodelic.md Revision 18 base plus the numeric.predicates and data.lineage pack deps in a ## Requires table, and the pack SHALL be discovered by corpus scan alone — with no config file and no registry.

Scenario: Corpus scan discovers the pack

  • WHEN spk lint runs over any workspace subdirectory of a repository containing packs/quant-finance.md
  • THEN the pack is discovered without configuration and reported in the lint envelope
  • AND files using none of the pack’s vocabulary keep byte-identical lint findings

Requirement: Limits vocabulary is namespaced and per-pack closed

The pack SHALL declare a ## Limits section with row shape | name | kind | unit | bound |, kind closed to risk, pricing, and namespaced kinds quant.risk, quant.pricing — pack-fiber-relative vocabulary that grows no base closed set and narrows no existing base set entry.

Scenario: Consumer activates the pack advisory-first

  • WHEN a corpus spec uses quant.risk vocabulary without a declared uses edge
  • THEN the pack’s declared checking activates advisory-first for that file, naming the pack

Scenario: Orphan vocabulary names the quant pack

  • WHEN a workspace uses quant.risk vocabulary with no quant-finance pack discovered or declared
  • THEN the orphan finding names the candidate pack quant.finance and both remediations, with non-zero exit

Requirement: capped_by is a typed reference field resolving to declared rows

The pack SHALL add the capped_by reference field, resolving to a ## Limits row of the declaring file (see the Reference Typing carve-out in specodelic.md), and SHALL declare the quant.limit_closed checker that reports an empty checked-set honestly when no ## Limits rows exist.

Scenario: Dangling capped_by reference is labeled

  • WHEN a constraint row references a ## Limits row id via capped_by that no ## Limits row in the file declares
  • THEN the finding is labeled, names the row id and both remediations, and is never a generic dangling message

Scenario: Honest-empty closure with no limits rows

  • WHEN the pack is active in a workspace whose specs declare no ## Limits rows
  • THEN the closure checker reports an empty checked-set with no fabricated findings

Requirement: The risk floor names its case labels

The pack SHALL declare a kind-dependent floor: quant.risk laws and limits enumerate their **horizon:** and **confidence:** case labels per the floor declaration, reusing the machine-findable **name:** case-label enumeration mechanism with a different required label set — and SHALL NOT re-declare a second tolerance kind (the numeric pack’s numeric.tolerance and its bound, against floor remain the tolerance vocabulary).

Scenario: Risk floor names its case labels

  • WHEN a quant.risk law property is checked against the pack’s floor declaration
  • THEN the floor names horizon and confidence as the required case labels

Scenario: Tolerance semantics reuse the numeric pack

  • WHEN a quant spec file states a tolerance claim on a quantity
  • THEN the claim is declared as a numeric.tolerance row under the required numeric.predicates pack, with no second tolerance kind from this pack

Requirement: Fixtures stay in the data-lineage pack

The pack SHALL NOT declare a fixtures section: backtest fixtures and datasets are the required data.lineage pack’s ## Data rows, and the Fixtures audit excludes them from the pack’s Sections, Kinds, and References facets.

Scenario: Backtest fixtures are Data rows

  • WHEN a quant spec file declares a backtest fixture or dataset
  • THEN it is a data.dataset or data.artifact row of the declaring file’s ## Data table under the required data.lineage pack

Requirement: Pack vocabulary is prose-safe

The pack SHALL NOT declare any vocabulary token that is a bare English word appearing in corpus prose: limit and confidence are prose-heavy and excluded from the Kinds and References facets, while horizon and confidence survive only as the risk floor’s case labels, which the activation scanner never reads — corpus lint warnings stay byte-identical with the pack discovered.

Scenario: Corpus prose does not falsely activate the pack

  • WHEN the corpus lints with the pack discovered and again with it removed
  • THEN issues and warnings are byte-identical — no vocabulary-match activations from prose words

skill-pack — capability


id: skill.pack kind: intent statement: “WHEN the specodelic binary ships its first-party design skill, THE format SHALL generate the specodelic-design skill pack from single tracked sources embedded via include_str! — membership-testing every explain topic, lint rule, and EARS pattern mention against the in-binary tables, embedding the worked example verbatim and linting it clean with the shipped linter, marking every installed file as managed with the regenerate command, refusing to overwrite non-marker files while writing the pack and its content hash under the requested target directory, and flagging stale installs in spk doctor without failing the run — while the docs point at the procedure without duplicating it.”

skill-pack Specification

Purpose

Ship the specodelic-design skill from this repo so the skill and the binary evolve in the same commit: the pack is generated from single tracked sources (include_str!), rendered through the same tables that serve spk explain, installed by a fail-closed verb, and staleness- checked by the doctor. Distribution is the verb (design D7) — no zip in git, and the docs stay thin pointers to the single authoring surfaces.

Constraints

idkindexprtraces_to
embedded_single_sourceinvariantthe pack is generated from content compiled in via include_str! over tracked repo files — skill-packs/specodelic-design/SKILL.md for the protocol prose and docs/src/examples/reservation-order.md for the worked example — with the format reference rendered through the same machinery that serves spk explain; no hand-copied explain table, rule list, or worked example exists in the pack, and two generations without an intervening source change are byte-identical[[skill.pack]]
mentions_membership_testedinvariantevery spk explain topic name, lint rule id, and EARS pattern name mentioned in a generated pack file resolves against the in-binary table that serves it, enforced by an in-binary test that fails the build naming the unresolvable identifier — a hand-maintained list may be stale, a generated one cannot[[skill.pack]]
example_lints_cleaninvariantreferences/example.md embeds docs/src/examples/reservation-order.md verbatim and passes spk lint with zero findings and zero warnings through the same entry point the corpus gate runs, so a corpus change that would make the embedded example lint-dirty fails the test before release[[skill.pack]]
marker_marks_every_installinvariantevery file spk skill install writes begins with a managed marker block naming the owning tool and the exact regenerate command (Regenerate: spk skill install), and the marker is present even when that file is a verbatim embedding of a repo source that lacks it[[skill.pack]]
install_writes_and_reportsinvariantspk skill install writes the generated pack files under the given directory (default ~/.claude/skills, creating parent directories), refuses to overwrite pre-existing non-marker-bearing files at a target path instead of silently replacing them, emits a JSON envelope (human-readable on TTYs) listing the written paths and a deterministic pack_content_hash computed as SHA-256 over the pack files sorted by relative path each hashed as path + NUL + content, and exits 0 installed, 1 write failure, 2 invalid invocation or overwrite refusal[[skill.pack]]
doctor_flags_stalenessinvariantspk doctor includes a managed-skill-pack check that recomputes the generated pack hash and compares it against the on-disk installation under each configured target directory — pass when the hashes match, stale when they differ (naming the differing hash pair and the regenerate command), missing when no pack is installed — and the check is optional: a missing pack is reported with a regenerate hint and never fails the doctor run[[skill.pack]]
docs_stay_thin_pointersinvariantthe repository docs reference the skill pack by pointer only — a thin book page linking the conversation procedure to its tracked source and the install command, the README command surface and SUMMARY.md and llms.txt naming the verb, and no page duplicating the protocol prose, the self-check list, or the worked example beyond the thin page's quoted one-line summary[[skill.pack]]

Model

States

  • tracked
  • generated
  • installed
  • stale
  • refused

Transitions

idfromtoguard
generatetrackedgenerated[[skill.pack.embedded_single_source]] ∧ [[skill.pack.mentions_membership_tested]] ∧ [[skill.pack.example_lints_clean]]
installgeneratedinstalled[[skill.pack.marker_marks_every_install]] ∧ [[skill.pack.install_writes_and_reports]]
refusegeneratedrefuseda target path holds a file without the managed marker — [[skill.pack.install_writes_and_reports]] refuses before writing anything
driftinstalledstalethe installed pack hash differs from the regenerated pack hash — [[skill.pack.doctor_flags_staleness]] names both hashes and the regenerate command
refreshstaleinstalled[[skill.pack.install_writes_and_reports]]

Properties

idkindderives_fromgeneratorpredicate
generation_is_deterministicunit[[skill.pack.embedded_single_source]]generate_pack_called_twice()two generations are byte-identical, including the embedded example and the rendered topic and rule-name lists
dangling_mention_failsunit[[skill.pack.mentions_membership_tested]]dangling_mention_in_fixture()the in-binary membership test fails naming the unresolvable identifier, and the binary cannot ship with the dangling mention
example_lints_zerounit[[skill.pack.example_lints_clean]]generated_example_over_shipped_linter()zero issues and zero warnings over the generated example, and a dirtying corpus change fails the test
marker_survives_embeddingunit[[skill.pack.marker_marks_every_install]]installed_example_checked_for_marker()the installed verbatim embedding starts with the managed marker while the repository source remains marker-free
fresh_install_envelopedunit[[skill.pack.install_writes_and_reports]]install_into_an_empty_directory()the pack files are written, the envelope lists exactly those paths with their hashes, and the exit code is 0
foreign_file_refusedunit[[skill.pack.install_writes_and_reports]]install_over_a_non_marker_file()the verb refuses with exit 2 and a remediation hint naming the conflicting path, leaving the file untouched
stale_install_flaggedunit[[skill.pack.doctor_flags_staleness]]doctor_over_an_older_binary_install()the report contains a stale entry naming the target directory, the installed hash, the expected hash, and the regenerate command spk skill install
absent_pack_hintedunit[[skill.pack.doctor_flags_staleness]]doctor_without_any_install()the report contains a missing entry with the install hint, and the doctor exit code is unchanged by the check's absence
book_stays_thinunit[[skill.pack.docs_stay_thin_pointers]]docs_capability_checks_over_the_book()no book page contains a copy of the pack's protocol prose or worked example beyond the thin-pointer page's quoted one-line summary

Requirements

Requirement: Pack content is embedded from single tracked sources

The specodelic-design skill pack SHALL be generated from binary-embedded include_str! content over tracked files in this repository (skill-packs/specodelic-design/SKILL.md for the protocol prose, docs/src/examples/reservation-order.md for the worked-example reference), with the format reference rendered by the same in-binary machinery that serves the spk explain topics it summarizes. It SHALL NOT contain a hand-copied copy of any explain table, lint rule list, or worked example.

Scenario: No drift class in the pack

  • WHEN the served spk explain topic list or lint rule catalog changes in the binary
  • THEN the next generated pack reflects the new list without any edit to the skill source, because the list is rendered from the served tables rather than restated in them

Requirement: Pack generation is deterministic

Pack generation SHALL be deterministic: two generations without an intervening source change produce byte-identical files.

Scenario: Deterministic regeneration

  • WHEN the pack generator runs twice without an intervening source or binary change
  • THEN the two generated file sets are byte-identical, including the embedded example and the rendered topic and rule-name lists

Requirement: Mentioned identifiers are membership-tested

Every identifier mentioned in a generated pack file SHALL resolve against the in-binary tables the spk explain command serves: every spk explain topic name, lint rule id, and EARS pattern name (topic list, lint rule catalog, EARS grammar). This SHALL be enforced by an in-binary test that fails the build when a generated mention does not resolve — a hand-maintained list may be stale, a generated one cannot.

Scenario: Unresolvable rule mention fails the build

  • WHEN the skill source names a lint rule id that is not present in the linter rule catalog table
  • THEN the in-binary membership test fails, naming the unresolvable identifier, and the binary cannot ship with the dangling mention

Requirement: The embedded example lints clean

The references/example.md file of a generated pack SHALL embed the worked example from docs/src/examples/reservation-order.md verbatim and SHALL pass spk lint over that example with zero findings and zero warnings. This SHALL be enforced by an in-binary test that lints the generated example file with the shipped linter.

Scenario: Generated example passes the shipped linter

  • WHEN the in-binary lint test runs over the generated references/example.md
  • THEN the linter reports zero issues and zero warnings, and any corpus change that would make the embedded example lint-dirty fails the test before release

Requirement: Installed files carry the managed marker

Every file written by spk skill install SHALL begin with a managed marker block that names the owning tool and the exact regenerate command (<!-- MANAGED BY specodelic — DO NOT EDIT MANUALLY. Regenerate: spk skill install -->), and the marker SHALL be present on every generated file even when that file is a verbatim embedding of a repo source that lacks it.

Scenario: Marker survives verbatim embedding

  • WHEN the generator writes the example reference that is a verbatim copy of a repository source file
  • THEN the installed file starts with the managed marker block while the repository source remains marker-free

Requirement: Install verb writes the pack and refuses overwrites

spk skill install [--dir <dir>] SHALL write the generated pack files under the given directory (default ~/.claude/skills, creating parent directories), and SHALL refuse to overwrite pre-existing non-marker-bearing files at a target path instead of silently replacing them. Exit codes follow the error contract: 0 installed, 1 write failure, 2 invalid invocation or overwrite refusal.

Scenario: Overwrite refusal

  • WHEN a target path already holds a file without the managed marker
  • THEN the verb refuses with exit 2 and a remediation hint naming the conflicting path, leaving the file untouched

Requirement: Install reports a deterministic pack hash

The install SHALL emit a JSON envelope (human-readable on TTYs) listing the written paths and a deterministic pack_content_hash computed as SHA-256 over the pack files sorted by relative path, each hashed as path + NUL + content.

Scenario: Install into an empty directory

  • WHEN spk skill install --dir <dir> runs against a directory that does not exist or contains no conflicting files
  • THEN the pack files are written, the envelope lists exactly those paths with the managed marker files’ hashes, and the exit code is 0

Requirement: Doctor reports managed-pack staleness

spk doctor SHALL include a managed-skill-pack check that recomputes the generated pack hash and compares it against the on-disk installation under each configured target directory: pass when the hashes match, stale when an installed pack’s hash differs from the generated one, and missing when no pack is installed.

Scenario: Stale installed pack is flagged

  • WHEN a pack installed from an older binary is checked by the current binary’s doctor
  • THEN the report contains a stale entry naming the target directory, the installed hash, the expected hash, and the regenerate command spk skill install

Requirement: Managed-pack staleness is advisory

The managed-skill-pack check SHALL be optional: a missing pack is reported missing with a regenerate hint and SHALL NOT fail the doctor run, while a stale pack SHALL be reported with the regenerate command and the differing hash pair.

Scenario: Absent pack is not a failure

  • WHEN no managed pack exists at any target directory
  • THEN the doctor report contains a missing entry with the install hint and the doctor exit code is unchanged by the check’s absence

Requirement: Docs wire the pack as a thin pointer

The repository docs SHALL reference the skill pack by pointer only: a thin book page (docs/src/design-conversations.md) links the conversation procedure to its tracked source and the install command, and the README command surface, docs/src/SUMMARY.md, and llms.txt SHALL name the spk skill install verb — none of these pages SHALL duplicate the protocol prose, the self-check list, or the example.

Scenario: No duplicate protocol in the book

  • WHEN the docs-site capability checks run over the book
  • THEN no book page contains a copy of the pack’s protocol prose or worked example beyond the thin-pointer page’s quoted one-line summary, keeping a single authoring surface for the procedure

svc-contracts-pack — capability


id: svc.contracts.pack kind: intent statement: “WHEN a workspace enables the svc-contracts standard pack, THE format SHALL provide a namespaced ## Interfaces section whose rows carry name, kind, repo, binding, and evolution; a svc.compat kind with a compatibility case-label floor; and a published_as reference field resolving to declared ## Interfaces rows of the same file — adding no cross-file edge and no consumer-listing field, with the binding and repo columns staying opaque and files using none of this vocabulary linting byte-identically.”

svc-contracts-pack Specification

Purpose

Ship the svc-contracts standard pack (proposed, draft): vocabulary for services whose published contracts live in different repositories. The base format already carries the cross-file edges (extension_point + satisfies, effect + observes), so this pack adds none; it declares only a typed ## Interfaces registry row (name, kind, repo, opaque binding to the authoritative external artifact, evolution mode), a svc.compat law kind whose floor forces the added and removed cases, and the published_as reference field tying a contract row to its registry row. Checkers ship as declarations (honest-empty), as in the existing standard packs.

Constraints

idkindexprtraces_to
pack_file_declaredinvariantthe svc-contracts standard pack is a kind: profile spec file at packs/svc-contracts.md (id svc.contracts) whose six manifest tables declare the Interfaces section, the svc.compat kind, the published_as reference field, two declaration-only checkers, the compat floor, and the specodelic.md Revision 18 base pin — discovered by corpus scan alone, no config file, no registry[[svc.contracts.pack]]
interfaces_section_shapeinvariantInterfaces rows carry exactly name, kind, repo, binding, evolution; kind is closed per-pack to request, event, schema and evolution to additive, versioned, frozen — per-pack closed sets the mechanism does not check; repo and binding are opaque strings never parsed; no base closed set grows and no existing entry narrows[[svc.contracts.pack]]
published_as_outboundinvariantpublished_as is a pack-added reference field resolving to an Interfaces row of the declaring file; it is an outbound leaf per specodelic.md's Reference Typing carve-out; its closure checker is declared, and reports an empty checked-set honestly when no Interfaces rows exist[[svc.contracts.pack]]
compat_floor_declaredinvariantsvc.compat laws enumerate the added and removed case labels per the pack floor, reusing the machine-findable bold-name case-label mechanism with a different required label set; the floor is a declaration the mechanism names and never executes[[svc.contracts.pack]]
no_new_cross_repo_edgeinvariantthe pack declares no cross-file edge field and no field or section listing a contract's consumers: cross-repo edges stay the base satisfies and observes fields, and the provider-to-consumer direction stays derived from the graph, never authored (USAGE.md section 2.6)[[svc.contracts.pack]]
vocabulary_prose_safeinvariantno pack vocabulary token is a bare word that appears with exact case in the corpus prose of specs/ or openspec/specs/ — the token audit is recorded in the change design and re-run at landing[[svc.contracts.pack]]

Model

States

  • draft
  • published
  • deprecated

Transitions

idfromtoguard
publishdraftpublished[[svc.contracts.pack.pack_file_declared]] ∧ [[svc.contracts.pack.interfaces_section_shape]] — pack_shape reports zero findings over the pack's declared vocabulary
deprecatepublisheddeprecated[[svc.contracts.pack.pack_file_declared]] — maintainer marks the pack deprecated; findings name the deprecation, vocabulary still checks

Properties

idkindderives_fromgeneratorpredicate
discovery_finds_svc_packunit[[svc.contracts.pack.pack_file_declared]]lint_workspace_with_svc_pack_present()the pack is discovered by corpus scan alone and the activation advisory names its draft status
no_pack_no_changeunit[[svc.contracts.pack.pack_file_declared]]corpus_linted_before_and_after_svc_pack()lint output byte-identical for a corpus using no svc vocabulary
interfaces_shape_lints_cleanunit[[svc.contracts.pack.interfaces_section_shape]]pack_file_linted_alone()pack_shape reports zero findings
honest_emptyunit[[svc.contracts.pack.published_as_outbound]]svc_pack_active_with_no_interfaces_rows()the closure checker reports an empty checked-set with no fabricated findings
floor_names_casesunit[[svc.contracts.pack.compat_floor_declared]]read_floor_row_for_svc_compat()the floor names added and removed as the required case labels
no_consumer_field_declaredunit[[svc.contracts.pack.no_new_cross_repo_edge]]scan_manifest_for_consumer_listing_fields()no declared section, kind, or reference field lists consumers or adds a cross-file edge
vocabulary_audit_holdsunit[[svc.contracts.pack.vocabulary_prose_safe]]audit_pack_tokens_against_corpus_prose()zero exact-case hits for every vocabulary token in specs/ and openspec/specs/

Requirements

Requirement: The svc-contracts standard pack is a declared profile file

The format SHALL ship the svc-contracts standard pack as an in-repo kind: profile spec file (packs/svc-contracts.md, id svc.contracts) whose manifest declares the ## Interfaces section, the svc.compat kind, the published_as reference field, the svc.interface_closed and svc.compat_cases checkers, the compatibility floor, and the specodelic.md Revision 18 base pin — discovered by corpus scan alone, with no config file and no registry.

Scenario: Corpus scan discovers the pack

  • WHEN spk lint runs over a workspace subdirectory of a repository containing packs/svc-contracts.md
  • THEN the pack is discovered without configuration
  • AND files using none of the pack’s vocabulary keep byte-identical lint findings

Scenario: Pack lints clean under pack_shape

  • WHEN the pack file is parsed in its landing lifecycle state
  • THEN pack_shape reports zero findings over the pack’s declared vocabulary

Requirement: Interfaces vocabulary is namespaced and per-pack closed

The pack SHALL declare an ## Interfaces section with row shape | name | kind | repo | binding | evolution |, kind closed per-pack to request, event, schema, evolution closed per-pack to additive, versioned, frozen, and the namespaced kind svc.compat — pack-fiber- relative vocabulary that grows no base closed set and narrows no existing base set entry. The repo and binding columns SHALL stay opaque strings that the pack never parses.

Scenario: Consumer activates the pack advisory-first

  • WHEN a corpus spec uses svc.compat, Interfaces, or published_as without a declared uses edge
  • THEN the pack’s declared checking activates advisory-first for that file, naming the pack and its draft status

Scenario: Orphan vocabulary names the svc pack

  • WHEN a workspace uses svc.compat with no svc-contracts pack discovered or declared
  • THEN the orphan finding names the candidate namespace svc and both remediations, with non-zero exit

Requirement: published_as is a typed reference field resolving to declared rows

The pack SHALL add the published_as reference field, resolving to an ## Interfaces row of the declaring file (see the Reference Typing carve-out in specodelic.md), and SHALL declare the svc.interface_closed checker that reports an empty checked-set honestly when no ## Interfaces rows exist.

Scenario: Honest-empty closure with no interfaces rows

  • WHEN the pack is active in a workspace whose specs declare no ## Interfaces rows
  • THEN the closure checker reports an empty checked-set with no fabricated findings

Scenario: Closure is a declaration, not an executed check

  • WHEN a constraint row names an ## Interfaces row id via published_as that no row in the file declares
  • THEN the pack’s Checkers facet names the closure rule and the mechanism reports its checked-set honestly — the pack never claims an executed check the mechanism does not run

Requirement: The compatibility floor names its case labels

The pack SHALL declare a kind-dependent floor: svc.compat laws enumerate their **added:** and **removed:** case labels per the floor declaration, reusing the machine-findable **name:** case-label enumeration mechanism with a different required label set, and SHALL NOT re-declare any base or other-pack kind.

Scenario: Compat floor names its case labels

  • WHEN a svc.compat property is read against the pack’s floor declaration
  • THEN the floor names added and removed as the required case labels

Scenario: Floor is declaration-only

  • WHEN a svc.compat property omits the floor’s case labels
  • THEN the pack’s declared floor is the contract and the mechanism does not fabricate a finding the checker declaration does not execute

Requirement: The pack adds no cross-file edge and no consumer listing

The pack SHALL NOT declare any section, kind, or reference field that lists a contract’s consumers or that adds a cross-file edge: cross-repo edges SHALL remain the base satisfies (to an extension_point) and observes (to an effect) fields, and the provider-to-consumer direction SHALL stay derived from the reference graph.

Scenario: Cross-repo contract uses only base edges

  • WHEN a consumer repo’s constraint row cites a provider repo’s extension_point through satisfies and an effect through observes
  • THEN both resolve corpus-wide with no pack involved, and the provider’s file names no consumer

Scenario: Manifest declares no consumer field

  • WHEN the pack’s ## Sections, ## Kinds, and ## References facets are read
  • THEN none declares a consumers or consumed-by listing or a second cross-file edge

graph-views — capability


id: graph.views kind: intent statement: “WHEN the graph artifact is derived, THE scenario card view SHALL render, for one binding-row slug, ONE parse-level projection joining the owning file’s folded machine (citations highlighted, dangling citations annotated with no edges and no phantom nodes), the binding row’s confidence tier (unconfirmed hatched, confirmed, attested over oracle records), the contract TOML’s archetype and test bindings under the hh64 join, and the conform verdict records — each absent layer its labeled no_* element, byte-identical on re-runs, and never a view cleaner than the artifacts it reads.”

graph-views Specification

Purpose

Make the typed reference graph of any specodelic-compliant corpus thinkable-with rather than merely machine-readable: a deterministic, pipeline-friendly edge list as the single projection boundary, and human-readable views (per-file state machines, file-level traceability, the schema’s own shape) rendered from that boundary at build time. Views are derived facts — never authored, never committed, never cleaner than the artifact they came from.

Constraints

idkindexprtraces_to
process_lifecycleinvariantthe capability advances through its declared lifecycle states under the repo's change process — each stage transition fires only when its stage gate holds[[graph.views]]
card_is_parse_levelinvariantthe scenario card consumes the parsed Spec and the derived graph report alone — requires parsed, not linted — so a binding row renders while its file is lint-red mid-change; the value-set and target-kind contracts of binding cells stay the linter's beat, and the card never re-reports them[[graph.views]]
card_join_key_ambiguity_refusedinvariantthe binding-row id IS the slug and the join key; a slug bound by zero rows renders the labeled no_projection element at exit 0, and a slug bound by more than one row refuses with a labeled error naming every binding file — a silent first-pick would render a claim the corpus never picked[[graph.views]]
card_citations_highlightinvariantevery resolved given/asserts citation highlights its cited state with a dotted claim edge from the binding node, every resolved on citation bolds its transition’s folded edge (the states view’s folding conventions reused), and every verifies citation renders one labeled precondition frame on the binding node (constraint_guards_are_frames precedent) — never a machine node[[graph.views]]
card_dangling_no_phantominvariantevery unresolved binding-cell citation renders as a red-dashed element naming the unresolved target and draws no edge and no node — no phantom elements ever (the specodelic-szen contract class); the card exits 0 over it, parse-level[[graph.views]]
card_confidence_tiersinvariantevery binding row grades into exactly one pinned tier — unconfirmed (status absent or draft: hatched gray dash + an unconfirmed badge), confirmed (status confirmed, no oracle evidence: plain, its own middle tier), attested (status confirmed AND ≥1 conform verdict record for the slug: the strongest tier with the verdict breakdown in the badge) — and the tier rides both the edges TSV annotation and the binding node’s label/class[[graph.views]]
card_contract_layers_hh64invariantthe archetype and test-binding layers join by exact contract id == slug over the hh64 contract walk (every *.toml beneath the contracts dir, the dir-root config.toml alone excluded, tests entries keyed by runner carrying a non-empty command or flags, active-only contribution, DISTINCT pairs) — an absent layer renders no_archetype or no_test_bindings, the layers stay independent, and an inactive matching contract annotates without contributing; a contracts dir that is missing, empty, or malformed refuses with a labeled hint before any output[[graph.views]]
card_verdict_layer_labeledinvariantthe conform verdict layer grades attestation off the –oracle corpus classified parse-level against the binding’s own file (conform::classify_traces — no lint gate, no compiled artifacts); with no records for the slug it renders the labeled no_conform_records element[[graph.views]]
card_view_shapeinvariantan unbound slug renders the labeled no_projection element and exits 0 in every format; re-running over an unchanged corpus is byte-identical (sorted machines, claims, dangles, contract rows, verdict counts); exit codes otherwise inherit the projection exit_code_mapping — typing violations exit 1 riding annotation rows, refusals exit 2 — and nothing is ever written to the worktree[[graph.views]]

Model

States

  • proposed
  • approved
  • implemented
  • archived

Transitions

idfromtoguard
approveproposedapproved[[graph.views.process_lifecycle]] ∧ proposal reviewed and approved by the maintainer
implementapprovedimplemented[[graph.views.process_lifecycle]] ∧ all tasks.md items complete; spk lint, view tests, and openspec validate --strict pass
archiveimplementedarchived[[graph.views.process_lifecycle]] ∧ just archive-change id=add-scenario-card ran with the dual-format recipe

Properties

idkindderives_fromgeneratorpredicate
card_parse_level_checkedunit[[graph.views.card_is_parse_level]]lint_dirty_fixture_rendered()the card renders exit 0 over a binding row whose status column the row-shape rule would flag — the card is parse-level
card_join_key_checkedunit[[graph.views.card_join_key_ambiguity_refused]]unbound_and_ambiguous_slugs()unbound slug renders no_projection at exit 0 ∧ ambiguous slug exits 2 naming every binding file
card_citations_checkedunit[[graph.views.card_citations_highlight]]two_exercised_transitions_plus_one_constraint()exactly the 2 exercised transitions and 2 cited states highlight ∧ exactly 1 verifies frame renders
card_dangling_checkedunit[[graph.views.card_dangling_no_phantom]]phantom_on_citation()a red-dashed element names f1.ghost ∧ zero edge lines and zero node declarations for f1.ghost, exit 0
card_tiers_checkedunit[[graph.views.card_confidence_tiers]]draft_confirmed_and_attested_rows()draft renders hatched [unconfirmed] ∧ confirmed renders plain [confirmed] ∧ attested renders [attested: permitted 1] with --oracle
card_contract_layers_checkedunit[[graph.views.card_contract_layers_hh64]]contracts_bound_and_unbound_to_the_slug()unbound slug renders no_archetype + no_test_bindings ∧ tests render under no_archetype when the archetype cell is absent ∧ root config.toml is excluded
card_verdict_layer_checkedunit[[graph.views.card_verdict_layer_labeled]]no_oracle_invocation()the verdict layer renders the labeled no_conform_records element without --oracle
card_determinism_checkedunit[[graph.views.card_view_shape]]card_rendered_twice_in_three_formats()render_1 == render_2 in edges, dot, and mermaid
process_lifecycle_checkedunit[[graph.views.process_lifecycle]]lifecycle_model_present()check(file) == passed

Requirements

Requirement: Deterministic edge-list projection

The system SHALL provide spk graph --format edges emitting a sorted TSV edge list (source id, source kind, typed reference field, target kind, target id, annotation) with exactly one row per recorded edge — plus annotation rows per the violations requirement below — using canonical node IDs (intent IDs and qualified row IDs), byte-identical across re-runs on an unchanged corpus. When --format edges is given, raw TSV goes to stdout, overriding envelope formatting.

Scenario: Projection over a compliant corpus

  • WHEN spk graph --format edges runs over a corpus with ≥1 lint-clean intent
  • THEN the output is a sorted TSV whose every endpoint is a canonical node ID (intent ID or qualified row ID)

Scenario: Re-run determinism

  • WHEN the projection runs twice over an unchanged corpus
  • THEN both outputs are byte-identical

Scenario: Display labels excluded

  • WHEN the corpus contains label-qualified pseudo-nodes in the raw graph output
  • THEN the projection contains only canonical ids — no label-qualified endpoints

Requirement: Violations never silently hidden

The edge-list projection SHALL include one annotation row per violation in the graph artifact, and views SHALL render violations as annotated (not omitted, not silently clean) elements.

Scenario: Violation-bearing corpus projects annotated rows

  • WHEN the graph artifact reports N typing violations
  • THEN the edge list contains exactly N annotation rows

Scenario: Views annotate rather than omit

  • WHEN a view is rendered from an artifact carrying violations
  • THEN each violation appears rendered as a dashed/annotated element

Requirement: Derived per-file state-machine view

The system SHALL derive, per corpus file whose artifact contains transition edges, a state-machine view from transitions.from, transitions.to, and transitions.guard edges alone — no re-walking of markdown.

Scenario: State machine from edges only

  • WHEN a file’s spec defines states and guarded transitions
  • THEN the derived view shows the same states, transitions, and guard annotations as the file’s Model tables

Scenario: File without transitions skipped cleanly

  • WHEN a file has no transition edges
  • THEN no state-machine view is emitted for it and the build succeeds

Requirement: Derived file-level traceability view

The system SHALL derive a corpus-level view collapsing all edges to intent (file) granularity, annotating fan-in per intent, from the edge list alone.

Scenario: Collapse to intents

  • WHEN the projection is derived from the specodelic corpus
  • THEN the view’s node set equals the corpus’s intent set and edges connect only intents

Scenario: Fan-in annotation

  • WHEN an intent is the target of edges from k distinct intents
  • THEN the view annotates that intent with fan-in k

Requirement: Derived revision-labeled schema view

The system SHALL derive the schema view (kinds as nodes, typed reference fields as typed edges with allowed targets) from the acset Schema value (acset::schema::canonical() — the Reference Typing table as data, lint-gated against openspec/specs/specodelic/spec.md by schema_matches_typing_table) and the format revision marker, labeled with the revision it was derived from.

Scenario: Schema from the Schema value

  • WHEN the schema view is rendered
  • THEN its nodes and typed edges match the Schema value’s objects and morphisms, and the format revision is named in the output

Requirement: The schema export is a typed genesis envelope

spk guide --schema --json SHALL provide the schema view through a genesis envelope whose data contains schema_version 1, format_revision, sorted object names, and morphisms sorted by source/name. Each morphism SHALL carry name, column, source, target, refinements (side/kind pairs sorted by side/kind), source_rule (unchecked, appears_on or same_kind), and endo_acyclic (boolean or null).

Scenario: Schema export connects producer and renderer

  • WHEN the production exporter serializes canonical Schema and two valid constructed schemas differing in one morphism
  • THEN its canonical payload matches the source rows and rendering the two constructed exports changes the corresponding edge without a renderer edit

Requirement: The schema renderer validates the export

The schema renderer SHALL consume the serialized export, display refinement labels and reject unsuccessful envelopes, missing fields, unknown versions, duplicate identities and absent endpoints with schema_export_invalid and a regeneration hint before writing output. It SHALL neither parse Rust source nor reconstruct schema structure from corpus edges.

Scenario: Invalid schema export is refused

  • WHEN the renderer receives an unsuccessful envelope or schema data with a missing field, unknown version, duplicate identity or absent endpoint
  • THEN it fails as schema_export_invalid with a regeneration hint before writing a diagram

Requirement: The schema export derives from canonical Schema alone

The export SHALL derive directly from canonical Schema; guide typing constants SHALL NOT supply its rows. Ordinary guide –json SHALL expose kinds, row shapes and revision independently.

Scenario: Revision bump changes the view

  • WHEN a new Revision adds a Reference Typing field (Schema + corpus doc updated together under the lint gate)
  • THEN the regenerated schema view includes the new field without any renderer change

Requirement: Build-time generation, never committed

Rendered views SHALL be generated into the docs build at build time via a just docs-graphs recipe and SHALL NOT be committed to version control; no hand-edit path exists.

Scenario: Build leaves the worktree clean

  • WHEN just docs-graphs runs and the docs build completes
  • THEN git status reports no new or modified tracked files from view generation

Scenario: Empty corpus is refused at the transform, clean at the projection

  • WHEN views are generated over a directory with zero spec files
  • THEN the scope gate exits non-zero with a remediation hint (out_of_scope_refused), while the tool-level projection itself exits 0 with empty output (empty_corpus_valid)

Requirement: Row identity survives raw projection

Raw edge projection SHALL retain canonical intent IDs and qualified row IDs without collapsing rows to their file. File-level traceability and wiring views MAY collapse rows to their owning intent; state-machine views SHALL retain distinct state and transition identities.

Scenario: Two states in one file remain distinct

  • WHEN one file defines transition order.t from order.s1 to order.s2
  • THEN raw projection retains both distinct state IDs and both edges, and the state-machine view renders two states

Requirement: Folded per-file state-machine view

spk graph --view states SHALL render per owning file one state-machine subgraph in which each transition’s transitions.from, transitions.to, and transitions.guard edge rows collapse onto ONE solid labeled edge (transition id (guard citations)), with canonical node ids throughout and no raw field edges exposed.

Scenario: Transitions fold to labeled edges

  • WHEN the corpus carries a transition f1.t1 from f1.s1 to f1.s2 guarded by [[f1.c1]]
  • THEN the view renders one solid edge f1.s1 -->|"f1.t1 (f1.c1)"| f1.s2 and no transitions.from field edge

Scenario: One subgraph per owning file

  • WHEN two files each carry transitions
  • THEN the view renders two subgraphs, each grouping its own file’s transitions, with cross-file state references still resolving to the same node

Requirement: Distinct-source fan-in

A state’s (fan-in N) node suffix SHALL count DISTINCT source transitions (specodelic-3xc): a transition whose from- and to-edges land on the same state counts once.

Scenario: Self-loop counts once

  • WHEN one transition’s from- and to-edges both target the same state, and a second transition also enters it
  • THEN the state renders (fan-in 2), not 3

Requirement: Violations and dangling references annotate, never silently clean

Typing violations SHALL render as red-dashed annotated elements; dangling references (an unresolvable guard or from/to cell) SHALL render as red-dashed dangling elements naming the unresolved target, and a half-folded transition SHALL draw no solid edge and no phantom state node (specodelic-szen).

Scenario: Slice render annotates the dangling guard

  • WHEN the view runs over a slice where a transition’s guard citation does not resolve
  • THEN the output carries a red-dashed dangling element naming the unresolved target, and the folded edge draws no unguarded arrow

Scenario: Undeclared target state draws no phantom

  • WHEN a transition’s to cell names a state the file never declares
  • THEN the machine renders no blank-named state node and no pass-through edge; the dangling element carries the event

Requirement: Empty and deterministic projection

A corpus with no transition edges SHALL render the labeled no_states element and exit 0; re-running over an unchanged corpus SHALL be byte-identical; exit codes otherwise inherit the projection mapping (openspec/specs/errors/spec.md exit_code_mapping).

Scenario: Transition-free corpus

  • WHEN the view runs over a corpus whose artifact carries no transition edges
  • THEN the output is the labeled no_states element and the command exits 0

Scenario: Byte-stable re-runs

  • WHEN the view runs twice over an unchanged corpus
  • THEN both outputs are byte-identical

Requirement: Cross-machine precedence view

spk graph --view precedence SHALL render every cross-file guard edge whose target is a State as one precedence arrow from the target state’s owning file to the guarded transition’s owning file, labeled with the target state id and the guarded transition id, derived from the graph artifact alone.

Scenario: State guards render as precedence arrows

  • WHEN the corpus carries orchestrate.start_lint guarded by [[specodelic.parsed]] and refactor.analyze guarded by [[graph.queryable]]
  • THEN the view renders lifelines for specodelic, orchestrate, graph, and refactor, with an arrow specodelic→orchestrate labeled reaches parsed — start_lint may fire and an arrow graph→refactor labeled reaches queryable — analyze may fire

Scenario: Raw edge flip is auditable

  • WHEN the precedence view is rendered next to --format edges
  • THEN every arrow’s label names the guarded transition id and the target state id of exactly one recorded transitions.guard edge row

Requirement: Constraint-target guards render as frames, never arrows

A cross-file guard whose target is a Constraint SHALL render as a labeled precondition frame on the guarded file’s lifeline, never as a precedence arrow — a Constraint citation asserts an invariant holds, which has no position in time.

Scenario: Rename’s checker citations are frames

  • WHEN the view renders over the live corpus (rename’s accept/reject transitions guard on linter.graph_shape.acyclic and linter.referential_integrity.ref_resolves)
  • THEN rename’s lifeline carries two precondition frames naming the checker constraints, and no arrow between rename and either linter file

Requirement: Dangling guards annotate, never silently clean

A cross-file guard whose target does not resolve in the rendered corpus SHALL render as a red-dashed annotation element naming the unresolved target (specodelic-szen contract class) — a slice render never reads as if a guard were absent.

Scenario: Slice render annotates the missing target

  • WHEN the view runs over a slice containing refactor but not graph
  • THEN the output carries a red-dashed dangling element naming graph.queryable, and refactor’s lifeline shows no precedence arrow for the unresolvable guard

Requirement: Deterministic precedence projection

A corpus with zero cross-file guards SHALL render the labeled no_precedence element and exit 0; re-running over an unchanged corpus SHALL be byte-identical. The view otherwise inherits the projection exit-code mapping (openspec/specs/errors/spec.md exit_code_mapping): typing violations are findings (exit 1) riding along as annotation rows, a nonexistent path is an invocation error (exit 2).

Scenario: Guard-free corpus

  • WHEN the view runs over a corpus whose guard edges are all same-file
  • THEN the output is the labeled no_precedence element and the command exits 0

Scenario: Precedence byte-stable re-runs

  • WHEN the view runs twice over an unchanged corpus
  • THEN both outputs are byte-identical

Requirement: The scenario card view

spk graph --view scenario <slug> SHALL render ONE parse-level projection joining the folded machine with citations highlighted, the binding’s confidence tier, the contract TOML’s archetype and test bindings, and the conform verdict records — derived from the parsed Spec and graph artifact alone. A slug bound by more than one row SHALL refuse with a labeled ambiguity error naming every binding file; an unbound slug SHALL render the labeled no_projection element and exit 0.

Scenario: One projection per binding row

  • WHEN the view runs over a corpus whose ### Scenario bindings table binds renders-card to a machine with states s1/s2/s3, transitions t1/t2/t3, and constraint c1 — the row claims given s1, on t1 and t2, asserts s3, verifies c1
  • THEN exactly the two exercised transitions and exactly the two cited states render highlighted, t3 and s2 stay unhighlighted, and exactly one precondition frame renders for c1

Scenario: An unbound slug is labeled, not clean

  • WHEN the view runs for a slug no binding row carries
  • THEN the output is the labeled no_projection element and the command exits 0 — in every format, and regardless of the contracts dir (the join key fires before any other input loads)

Scenario: An ambiguous slug refuses

  • WHEN two files each carry a binding row with the same slug
  • THEN the command exits 2 with a labeled refusal naming every binding file — the card projects exactly one binding row, and a silent first-pick would lie about which claim rendered

Requirement: Binding citations highlight the machine; dangling citations draw nothing

A resolved binding cell (given/on/asserts) SHALL highlight its cited machine element — cited states bold with a dotted claim edge, exercised transitions’ folded edges bold — reusing the states view’s folding conventions. A verifies cell SHALL render each cited constraint as one labeled precondition frame attached to the binding node, never a machine node. An unresolvable citation SHALL render as a red-dashed dangling element and SHALL draw no edge and no node.

Scenario: A phantom transition id draws no phantom

  • WHEN a binding row’s on cell cites [[f1.ghost]], which resolves in no file (the fixture may be lint-dirty — the card is parse-level)
  • THEN the output carries a red-dashed dangling element naming f1.ghost in all three formats, the command exits 0, and no edge line and no node declaration exist for f1.ghost

Requirement: Confidence tiers grade every binding row

Each binding row’s confidence SHALL grade into one of three pinned tiers: unconfirmed (status absent or draft), confirmed (status confirmed with no conform evidence for the slug), or attested (status confirmed AND at least one conform verdict record for the slug). The tier SHALL ride the binding row’s annotation column in the edges TSV and the binding node’s label and class in dot/mermaid.

Scenario: Draft, confirmed, and attested rows grade apart

  • WHEN one file binds three slugs — one with status = draft, one with status = confirmed, one with status = confirmed plus an oracle record whose trace walks the declared machine — and the view runs with --oracle naming that corpus
  • THEN the draft row renders hatched [unconfirmed], the confirmed row renders plain [confirmed], and the attested row renders the strongest tier [attested: permitted 1]

Requirement: The contract and verdict layers render or render their labeled absence

The card’s contract layers SHALL join by exact contract id == slug over the hh64 contract walk (every *.toml under the contracts dir, root config.toml excluded): active contracts contribute the archetype cell and their DISTINCT [[tests.<runner>]] entries; an absent layer SHALL render the labeled no_archetype or no_test_bindings element. The conform verdict layer SHALL grade attestation off --oracle, rendering the labeled no_conform_records element absent oracle records.

Scenario: Absent layers stay labeled

  • WHEN the view runs for a slug whose contracts dir binds other scenarios only
  • THEN the output carries the labeled no_archetype and no_test_bindings elements; a matching contract with tests but no archetype cell renders the test rows under a no_archetype element; and with no --oracle the verdict layer is the labeled no_conform_records element

Scenario: Broken contract input refuses before output

  • WHEN --contracts names a path that is not a directory, a directory with zero contract TOMLs, or a directory holding a contract with no id
  • THEN the command exits 2 with a labeled refusal and remediation hint, and no card bytes are written

Requirement: Deterministic scenario card projection

Re-running the view over an unchanged corpus SHALL be byte-identical — sorted everywhere (machines, claims, dangles, contract rows, verdict counts), no timestamps, no iteration-order leakage — and nothing is ever written to the worktree. Exit codes inherit the projection exit_code_mapping (openspec/specs/errors/spec.md): typing violations are findings (exit 1) riding along as annotation rows, invocation and refusal errors are exit 2, and no_projection is exit 0.

Scenario: Card byte-stable re-runs

  • WHEN the view runs twice over an unchanged corpus, in each of the three formats
  • THEN both outputs are byte-identical

Scenario bindings

idstatusgivenonassertsverifies
transitions-fold-to-labeled-edgesconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.process_lifecycle]]
one-subgraph-per-owning-fileconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.process_lifecycle]]
byte-stable-re-runsconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.process_lifecycle]]
state-guards-render-as-precedence-arrowsconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.process_lifecycle]]
raw-edge-flip-is-auditableconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.process_lifecycle]]
rename-s-checker-citations-are-framesconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.process_lifecycle]]
precedence-byte-stable-re-runsconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.process_lifecycle]]
violation-bearing-corpus-projects-annotated-rowsconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.process_lifecycle]]
one-projection-per-binding-rowconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.card_citations_highlight]]
an-unbound-slug-is-labeled-not-cleanconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.card_join_key_ambiguity_refused]]
an-ambiguous-slug-refusesconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.card_join_key_ambiguity_refused]]
a-phantom-transition-id-draws-no-phantomconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.card_dangling_no_phantom]]
draft-confirmed-and-attested-rows-grade-apartconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.card_confidence_tiers]]
absent-layers-stay-labeledconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.card_contract_layers_hh64]]
broken-contract-input-refuses-before-outputconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.card_contract_layers_hh64]]
card-byte-stable-re-runsconfirmed[[graph.views.approved]][[graph.views.implement]][[graph.views.implemented]][[graph.views.card_view_shape]]