System invariants

INV-add-no-clobber

Adding a chapter refuses to overwrite an existing file.

INV-archive-site-bytes

The reader zip is byte-for-byte the verified site directory.

INV-archive-source-policy (critical)

The source zip holds exactly what the publication policy admits: tracked files only, symlinks never dereferenced, secret files abort, no member escapes its prefix.

INV-art-key-never-stored

The image-model key is read from the environment on demand and its absence is refused, never stored.

INV-artifact-state-by-digest

Artifact state derives from content digests, not mtimes: touching a file without changing it stays verified.

INV-authorities-claims

Every authorities claim appears in the manuscript exactly once in its declared file; malformed, duplicate, missing, moved, and ambiguous entries are each named.

INV-authorities-printsafe

Researched source text is print-safe and TeX-safe.

INV-catalog-route-parity

Every CLI route is a catalog command and every catalog command is dispatchable.

INV-check-source-fails-closed

The source checker exits nonzero on a malformed authorities ledger and its figure/print variants.

INV-cli-exit-code

A failing tool’s exit code passes through the console, never a traceback.

INV-commerce-config

The print-order CTA is generated only for an enabled, valid config; verification refuses a non-HTTPS storefront or policy link, an unnamed seller of record, an embedded secret, or an unknown key. A policy link the publisher omits is generated as an honest page on the site that discloses the seller of record; the rendered landing page carries the CTA exactly when ordering is enabled, every generated policy page exists, and no page leaks a secret.

INV-commerce-release-gate

A book that advertises print ordering may not ship a release unless its config is valid and its exact edition passed a physical qualification; a missing, invalid, or unqualified edition fails the release gate closed, while a book that sells nothing ships freely.

INV-config-locatable

Config defects are collected and reported with file and key; YAML errors are located; a non-mapping config file is refused.

INV-config-registrations

ISBN and ISSN check digits are computed, never trusted; retail mode fails on a pending number.

INV-config-release-witness

Release builds refuse vacuous witnesses (fewer than two sentinels, page floor under twenty-four) when PRESS_RELEASE is set.

INV-config-schema-shape

Config validation returns problems for a wrong-shaped file, and enforcement fails closed.

INV-config-slug (critical)

A slug is strict lowercase kebab, safe as an artifact basename.

INV-config-store-never-guess

Config coercion never guesses a collection type: a collection field requires explicit JSON.

INV-config-trim

Trim comes from the selected design profile, never a hand-entered number; a metadata trim that disagrees with the profile is refused.

INV-contract-mirror

AGENTS.md is a byte-for-byte mirror of CLAUDE.md below the heading.

INV-cover-baked-guard

A baked cover style fills every placeholder and carries the exact-text guardrail.

INV-coverwrap-barcode

The barcode panel has its white card, enough bar transitions, and clean quiet zones.

INV-coverwrap-composer-geometry

The cover-wrap geometry composer reproduces the sealed v1 perfect-bound geometry exactly.

INV-coverwrap-geometry

The wrap is one page at exactly trim plus bleed plus spine, the spine recomputed from the built interior, never restated.

INV-design-layout-stable

A valid v1 book renders at the committed house geometry – page count, embedded fonts, and per-page trim and ink bounds within tolerance – so the house typography and layout cannot change within a major without a deliberate, reasoned baseline decision.

INV-desk-blocks-unrunnable

The operator desk grays out a blocked command so it cannot launch into a guaranteed failure.

INV-desk-model-blocks-build

Build commands are blocked when the required toolchain is missing, while toolchain-free commands stay runnable.

INV-docs-no-drift

Usage and README name every target, REFERENCE.md and INVARIANTS.md equal their generated text, and the aesthetics skill documents every consumed key.

INV-doctor-denies-broken

A missing required tool denies the machine; the verdict derives from the findings.

INV-dropcap-opening

When a design enables a chapter-opening drop cap, the initial is placed on the first eligible prose paragraph after each chapter heading and nowhere else: an epigraph or other non-prose opener is skipped to the real opening paragraph, only the first paragraph is capped, and the manuscript carries no renderer markup. Any leading punctuation a chapter opening on dialogue carries – an opening quote or a dash – is set beside the initial at its size (through lettrine’s ante, or its own floated span on the web), never scaled up into the initial and stranded above it. When the style is off, the filter changes nothing, so a book that does not opt in renders unchanged; and a book whose chapters open on ordinary words compiles to the same lettrine call whatever style it uses.

INV-edition-manifest (critical)

An edition manifest is immutable identity: any production-affecting fact mints a new edition_id, and verification refuses a forged identity, an interior or cover byte or page mismatch, an ill-formed or mutable reference, a forbidden price/secret/customer field, a manifest with no receipt chain or built from a dirty tree, and a provider qualification proven against a different edition.

INV-editorial-banned-regex

A malformed book-supplied banned regex is refused by name.

INV-editorial-battery

The universal prose battery refuses dashes, curly quotes, out-of-font glyphs, throat-clearing, bad headings, and long paragraphs.

INV-editorial-checkers (critical)

Every known-bad fixture trips its declared rule; known-good passes clean.

INV-editorial-jargon

Watchlist terms at rewrite severity fail the run.

INV-editorial-jargon-parity

The package jargon checker and the portable skill copy return equivalent findings and refusals for the same text and watchlist, and default to the same watchlist.

INV-events-protocol-failure

A malformed or unknown-version event line surfaces a ProtocolError with the raw output preserved.

INV-extension-conformance (critical)

An extension declaration is refused before execution when it collides with a core name, targets an extension-contract major this press does not implement, is structurally malformed, or names an unknown dependency. Discovery is declarative and deterministic; nothing runs on the strength of import order or an ambient entry point.

INV-extension-seal (critical)

An extension may depend on the mandatory verification, path containment, artifact graph, config validation, and release gate, but it may never declare that it provides or replaces one, and it may not carry an invariant it does not prove. A manifest that claims a sealed capability or an unproven obligation is refused.

INV-fakes-routing

The process fake answers by command name first, then from its queue, and records every invocation.

INV-figures-refuse-illegal

Figure validation refuses left/right placement with absolute width and a bad outset.

INV-format-agreement

Every chapter’s content appears in every built edition; an edition that silently drops a chapter (or most of it) disagrees with the editions that kept it and is refused, not passed.

INV-format-site-identity

Each chapter’s witness appears exactly once across the reader site.

INV-format-structure

A valid v1 book’s non-PDF editions keep their committed structural shape: the EPUB’s chapter-document count exactly, its spine and nav and the reader site’s pages and links no smaller than the reviewed baseline, and the DOCX still declaring every house style.

INV-format-witness (critical)

Title and a derived manuscript witness appear in every format; a book yielding no witness is refused, not passed.

INV-front-matter-golden

Generated front-matter TeX matches its golden byte-for-byte.

INV-gen-index-hits-and-zero-hit

Each curated index term resolves to the chapters it appears in, and a zero-hit term fails the build.

INV-graph-acyclic

The artifact graph is acyclic, outputs unique, every published artifact a concrete filename.

INV-graph-escaping

Metadata interpolated into HTML and TeX is escaped.

INV-graph-no-stale (critical)

Verify targets rebuild before verifying; a stale artifact cannot be blessed.

INV-http-transport-signals

The urllib transport translates a timeout to TransportTimeout and other network failures to TransportError, and bounds the read.

INV-idlookup-fails-closed

An LCCN record for a different number is a mismatch, and lookups fail closed on entities, size, and media.

INV-illustrate-subject

An illustration’s subject is the figure’s art description, never its caption (#225).

INV-invariant-marker-vocabulary

The invariant marker plugin validates every @pytest.mark.invariant citation against the one ledger; an id absent from it fails collection.

INV-lulu-timeout-unknown

A submit timeout is an UnknownOutcome that forces a lookup, never a retry or an assumed success.

INV-migration-preview

A migration dry run reports every change it would make and every design consequence to weigh, and writes nothing; a book learns exactly what moving majors does before a byte changes.

INV-migration-safe (critical)

Migrating a book between press majors moves only the pin, in requirements.txt and the CI workflow; the manuscript, config, and accepted art come out byte-for-byte identical, and rollback restores the exact pre-migration pin from a backup written before any file is changed.

INV-money-exact-cents

Money parses decimal strings as exact cents, never through binary float.

INV-mutation-deterministic

The mutation engine enumerates every mutable operator in a pure module exactly once and applies exactly one edit per mutant.

INV-operator-counsel-touches-nothing

A counsel-mode run (no –apply) leaves the manuscript and config byte-identical, aborting if anything changed.

INV-pages-refs

Every local reference and stylesheet url resolves; fragments resolve to real anchors.

INV-pdf-detector (critical)

The blank-page detector is proven against fixtures before it judges.

INV-pdf-ink

Every rendered page carries ink and keeps it off the edge.

INV-plate-alpha-preserved

Enhancing a plate master preserves its alpha (ink on transparency); it is never baked onto white.

INV-print-safe-flatten

Print sanitization flattens transparency onto white, caps resolution without upscaling, and preserves grayscale.

INV-process-cancel-not-success

A process that exits zero after cancellation is still not a success.

INV-profile-geometry

Selecting a design profile renders the interior at that profile’s declared trim, and an unknown profile is refused before any rendering. A profile’s design-affecting data has a stable digest, so a sealed value cannot change without the key that scopes its visual baseline moving too.

INV-profile-seal-refuses-drift

The print-profile seal gate refuses a drifted, unsealed, or missing profile.

INV-provider-contract (critical)

Every print-provider adapter maps its own vocabulary to the neutral contract: money is integer minor units parsed without binary float, an unrecognized status quarantines to UNKNOWN, a submission timeout is an unknown outcome that forces a lookup before any resubmission (never a hidden retry or a fabricated acceptance), an unsupported capability is a typed refusal rather than a simulation, and a webhook is authentic only when its signature matches the raw body.

INV-provider-legality

The provider legality gate refuses an uncut trim, illegal binding, out-of-range page count, or unsupported color.

INV-provider-qualification

The provider record declares every capability explicitly (an omitted capability is a forbidden implicit claim) and the full physical checklist; a provider is qualified for an edition only by a physical inspection with every checklist point passed, scoped to that edition’s identity, so a marketing claim, a failed point, a not-fit provider, and an inspection of a different edition are all refused.

INV-publish-rebuild-before-bless

Retail verification rebuilds each artifact through the registry before verifying, so a stale or corrupt file is never blessed, and a failing verifier yields a nonzero exit.

INV-reader-no-phantom-canonical

Without a configured site-url, the reader landing claims no canonical URL or image (#158).

INV-registrations-malformed-fails

A malformed ISBN/registration block surfaces as a check failure.

INV-release-contract

A three-part tag pins its own action ref and an existing immutable toolchain image, proven before the major floats.

INV-release-receipt-chain (critical)

A release chain refuses a missing, tampered, reordered, or input-mismatched prerequisite, a dirty-tree receipt, a terminal receipt whose package or toolchain does not match the built and pinned objects, an incomplete chain that skips any trust layer or breaks a layer’s extension of its predecessor, and, when assembled from per-job receipts, a missing CI tier (a job that did not run leaves no receipt) or receipts that disagree on the source commit.

INV-release-tag-grammar (critical)

A release tag is strict SemVer and the composite action refuses shell syntax in its command input.

INV-scaffold-neutral

No original-book identity leaks into a clean scaffold.

INV-scaffold-no-leak

A scaffolded book carries no identity from the press or any prior book.

INV-scenarios-cover-pairs

The pairwise generator’s selection covers every pair of parameter values.

INV-selftest-orchestrates-all

Every registered check is orchestrated by the one ordered CHECKS list the CLI and pytest both run.

INV-subprocess-git-isolation

The subprocess runner strips ambient GIT_* repo-binding vars for git commands so a nested repo observes only itself.

INV-transport-empty-body-and-signals

An empty response body parses as an empty mapping, and the transport’s timeout and error signals stay distinct types.

INV-webhook-authenticity

A valid webhook event is authentic and a tampered body is not.

INV-wizard-preview-only

The setup wizard writes only a clean preview; an invalid edit is previewed but never written.