chore(gates): daemon layer manifest + R81 daemon-layer rule (no moves)

Merged
TH
2mo ago
+758-1

Summary

Adds the daemon layer manifest and the R81 verifier; moves no files, changes no behavior. Every production file under src/daemon/ is claimed exactly once in scripts/layering/daemon-layer-manifest.json — 286 files as of the rebase onto 6e8073775 (daemon-core 62 / daemon-resources 26 / daemon-execution 82 / daemon-sessions 72 / daemon-server 44). scripts/layering/daemon-layers.ts rejects upward static value and type-only edges across core < resources < execution < sessions < server, reports dynamic cross-layer edges (4 today, all downward), and fails on omitted, duplicated, untracked, or empty-layer entries. Tests and fixtures carry no layer, matching the other daemon rules. Global spine rank stays 4 for all five. Planted-violation tests cover upward value/type edges, omission, duplicate, unknown path, unknown/missing/empty layer keys.

Deviations from the seed: managed-session-artifact-path.ts and platform-owner-lifecycle.ts → daemon-core (import only node:*/workspace types; path-guard and vocabulary contracts, and root platform-runtime-* already consumes the latter as contract vocabulary); handlers/human-control.ts → daemon-sessions (the seed's daemon-server left the one upward type edge: request-handler-chain.ts types typeof import() of it; its own imports reach only core/resources); daemon-stop.ts stays daemon-server. Post-seed arrivals from main: #3393's three http split files → daemon-server; #3400's dispatch-context.ts → daemon-core, interaction-response-data-transform.ts → daemon-execution. Residue: none.

Validation

Commits f680d705a + 1609f704a + 646d73df0 (head 646d73df0). pnpm install --frozen-lockfile, pnpm build, pnpm format, pnpm check:quick, pnpm check:layering (324 tests + guard, exit 0, zero upward edges at the new head), pnpm check:affected --run (all selected runnable checks pass). Earlier evidence (depgraph:test 43 pass; depgraph summary unchanged vs main) recorded at 0fcfd34ba. Docs-only reasoning: no runtime paths touched.