033-configured-corpus-root
The coupling gate honors `layout.specs_dir`
`layout.specs_dir` is configuration, and every other consumer reads it: `compile` scans it, `index` builds each spec's `spec.md` path from it, and `init` scaffolds into it. The coupling gate did not. Two functions in `couple.rs` hardcoded the literal `specs/`, and both are load-bearing. The primary-owner heuristic asked whether `specs/<id>/spec.md` was in the diff, so for an adopter whose corpus lives anywhere else the answer was permanently no: no edit to an owning spec could clear `C-001`, and every governed change was refused with the owner named and no reachable way to satisfy it, short of a waiver on every PR. The amends-awareness parser had the same literal, so amendment expansion silently never fired. Both now take the configured root, and the builder is shared with the indexer (`spec_md_rel`, promoted to `pub(crate)`) so a path constructor and its parser cannot drift apart again. A trailing slash on the configured value is trimmed, making `specs` and `specs/` name one corpus root instead of the second yielding `specs//<id>/spec.md`. No DTO, schema, or config shape changes; a default-layout repo is byte-identical.
Read the full pinned specification ↗Relationships
depends on
amends
Claimed units
- extends
{ "nature": "additive", "spec": "005-coupling-gate", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/couple.rs" } } - extends
{ "nature": "additive", "spec": "005-coupling-gate", "unit": { "kind": "file", "path": "crates/spec-spine-core/tests/couple.rs" } } - extends
{ "nature": "additive", "spec": "004-codebase-index", "unit": { "kind": "file", "path": "crates/spec-spine-core/src/index.rs" } }
Source headings
- 033: The coupling gate honors `layout.specs_dir`
- 1. Purpose
- 2. Territory
- 3. Behavior
- 3.1 One constructor, one parser, one root
- 3.2 Prefix matching is separator-aware
- 3.3 A trailing slash names the same root
- 3.4 No change under the default layout
- 3.5 Tests (minimum)
- 4. Out of scope
Frozen anchors
No frozen anchors declared.