Outcome
Create one machine-readable architecture-ownership declaration consumed by layering and depgraph tooling. Remove duplicated logical-module and snapshot-policy roots without changing production imports or runtime behavior.
Why
The authority-overlay plan currently names vocabulary, capability, live-state-shape, live-state-authority, and executable-policy, but it does not declare the exact roots/exports that make vocabulary and capability non-heuristic. This prerequisite establishes that evidence source before the graph is extended.
Scope
- Add
scripts/layering/architecture-ownership.ts.
- Move or re-export
LOGICAL_MODULE_POLICIES roots from scripts/layering/daemon-modularity.ts.
- Declare
src/snapshot/ as the executable-policy owner with its existing forbidden daemon target.
- Declare exact initial vocabulary roots/subpaths and capability roots/exports used by the follow-up graph issue. Every entry must point to an existing enforced owner or public capability; no filename guessing.
- Update existing layering tests to consume the shared declarations.
- Delete superseded duplicate tables/constants.
Out of scope: production imports, depgraph JSON changes, numerical thresholds, moving snapshot/replay/handler code.
Size constraint
This is a consolidation. Aim for net production/tooling LOC at or below zero after deleting duplicate declarations. Any net growth must be itemized and justified in the PR.
Proof
- Plant a snapshot-policy import of
src/daemon/types.ts; pnpm check:layering must fail naming the existing boundary.
- Plant one invalid logical-module edge; it must fail through the shared declaration.
- Add exact unit coverage showing every declared classification root resolves and similarly named undeclared files do not classify.
- Run focused layering tests and
pnpm check:affected --run.
Done criteria
- One declaration owns logical roots, snapshot-policy ownership, and the initial exact vocabulary/capability evidence.
- Existing gates retain their semantics and positive controls.
- Duplicate declarations are deleted.
- No production behavior or import changes.
- Planted-red evidence, touched-file count, and net LOC are reported in the PR.
Stop conditions
- A proposed capability has no existing production owner or real consumer.
- Sharing declarations would require a second parser or loosen an existing gate.
- The change grows into the depgraph payload work.
Outcome
Create one machine-readable architecture-ownership declaration consumed by layering and depgraph tooling. Remove duplicated logical-module and snapshot-policy roots without changing production imports or runtime behavior.
Why
The authority-overlay plan currently names
vocabulary,capability,live-state-shape,live-state-authority, andexecutable-policy, but it does not declare the exact roots/exports that makevocabularyandcapabilitynon-heuristic. This prerequisite establishes that evidence source before the graph is extended.Scope
scripts/layering/architecture-ownership.ts.LOGICAL_MODULE_POLICIESroots fromscripts/layering/daemon-modularity.ts.src/snapshot/as the executable-policy owner with its existing forbidden daemon target.Out of scope: production imports, depgraph JSON changes, numerical thresholds, moving snapshot/replay/handler code.
Size constraint
This is a consolidation. Aim for net production/tooling LOC at or below zero after deleting duplicate declarations. Any net growth must be itemized and justified in the PR.
Proof
src/daemon/types.ts;pnpm check:layeringmust fail naming the existing boundary.pnpm check:affected --run.Done criteria
Stop conditions