081-coupling-sees-the-change-being-committed
The coupling gate can see the change being committed
`couple --base X --head HEAD` builds a `git diff X...HEAD`, so every path in the working tree and the index is invisible to it. The documented pre-commit coupling check therefore cannot see the change it is being run to judge: on a branch whose work is not yet committed it reports `0 path(s) checked, no drift` and exits 0, which reads as a pass. Spec 094 §4 placed the defect out of scope and said it "is filed separately"; spec 073 §4 placed it out of scope and pointed back at 090. Nothing filed it, and the phrase in 094 §4 has been untrue since it was written. This spec files it: `--include-uncommitted` unions the committed range with `git diff HEAD`, so the gate judges what a commit would contain. The library stays pure and still shells out to nothing; the CLI does the git work, as it already does for the range.
Read the full pinned specification ↗Relationships
depended on by
Claimed units
- extends
{ "nature": "additive", "spec": "005-coupling-gate", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/cmd_couple.rs" } } - extends
{ "nature": "additive", "spec": "005-coupling-gate", "unit": { "kind": "file", "path": "crates/spec-spine-cli/src/main.rs" } } - extends
{ "nature": "additive", "spec": "009-registry-query-projection-flags", "unit": { "kind": "file", "path": "crates/spec-spine-cli/tests/cli.rs" } }
Source headings
- 081: The coupling gate can see the change being committed
- 1. Purpose
- 1.1 A gate that reports on nothing reports a pass
- 1.2 Two out-of-scope clauses pointing at each other
- 1.3 Why the fix belongs in `couple` and not in the harness
- 2. Territory
- 3. Behavior
- 3.1 `--include-uncommitted` adds the working tree to the range
- 3.2 Untracked files are out, and that is not a gap
- 3.3 The flag is meaningful only against `HEAD`
- 3.4 The default does not move
- 3.5 What spec 094 §4 now says
- 3.6 The acceptance
- 4. Out of scope
- 5. Resolved decisions
- Verification
Frozen anchors
No frozen anchors declared.