081-coupling-sees-the-change-being-committed

The coupling gate can see the change being committed

Lifecycle approvedImplementation completeVerification unknownQualification unknown

`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

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

  1. 081: The coupling gate can see the change being committed
  2. 1. Purpose
  3. 1.1 A gate that reports on nothing reports a pass
  4. 1.2 Two out-of-scope clauses pointing at each other
  5. 1.3 Why the fix belongs in `couple` and not in the harness
  6. 2. Territory
  7. 3. Behavior
  8. 3.1 `--include-uncommitted` adds the working tree to the range
  9. 3.2 Untracked files are out, and that is not a gap
  10. 3.3 The flag is meaningful only against `HEAD`
  11. 3.4 The default does not move
  12. 3.5 What spec 094 §4 now says
  13. 3.6 The acceptance
  14. 4. Out of scope
  15. 5. Resolved decisions
  16. Verification

Frozen anchors

No frozen anchors declared.