005-coupling-gate
The coupling gate: join the two views and refuse drift
Lifecycle approvedImplementation completeVerification unknownQualification unknown
The PR-time coupling gate (spec-spine.md guardrail 2): cross-reference every changed code path against the authority graph and refuse the merge when code drifts from the spec that owns it. A pure function of (config, registry, index, diff, waiver); the CLI parses `git diff --no-color -U0 --no-renames base...head` (quotepath off, end-of-options) into a typed DiffInput so git stays out of core. Matches a diff hunk to its owning unit at file, section, and symbol granularity; is amends-aware with the FR-005 strict-expansion guard; transfers authority across supersedes; honors PR-body waivers and an additive bypass list. Establishes the couple engine and the `spec-spine couple` subcommand.
Read the full pinned specification ↗Relationships
depended on by
- 008-coupling-floor-claim-precedence
- 018-structured-partial-supersedes
- 020-keypath-section-anchors
- 021-ledger-seal
- 022-index-sharding
- 023-unresolved-unit-severity
- 027-cargo-workflow-dependency-waiver
- 029-ownership-coverage
- 031-references-non-owning-paths
- 033-configured-corpus-root
- 034-machine-readable-verdicts
- 036-declared-state-dir
- 037-amendment-authoring
- 045-couple-names-the-crossing
- 047-effective-config-is-a-governed-read
- 060-a-workflow-bump-is-not-a-governed-change
- 069-the-committed-index-is-compared-not-trusted
- 071-a-change-is-classified-under-the-bases-rules
- 073-a-mode-only-or-binary-change-is-a-change
- 078-governed-scope-is-declared-not-inferred
- 081-coupling-sees-the-change-being-committed
- 093-the-harness-this-repository-runs
- 094-one-gate-and-the-boundaries-it-holds
- 100-a-deleted-path-is-judged-where-it-lived
- 113-a-waiver-has-a-declared-lifecycle
Claimed units
- establishes
{ "kind": "file", "path": "crates/spec-spine-core/src/couple.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-core/src/dep_only.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-cli/src/cmd_couple.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-core/tests/couple.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-cli/tests/couple.rs" } - extends
{ "nature": "additive", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/lib.rs" } } - extends
{ "nature": "additive", "spec": "001-compile-registry", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/main.rs" } }
Source headings
- 005: The coupling gate
- 1. Purpose
- 2. Territory
- 3. Behavior
- 3.1 The boundary: git stays out of core
- 3.2 Owner derivation: three granularities
- 3.3 Amends-awareness and the strict-expansion guard (FR-005)
- 3.4 Supersedes: authority transfer
- 3.5 Clearance, waivers, and bypass
- 3.6 Granularity reconciliation (the crate-spec vs file-establishes question)
- 3.7 Exit codes
- 3.8 Determinism
- 4. Out of scope
Frozen anchors
No frozen anchors declared.