Problem
A rulebook reached only through a guidance-hook binding has no way to declare that. delivery: accepts ambient and skill; its array branch carries no minimum, so delivery: [] parses, deploys the rulebook nowhere, and still fills its bound hook, because the fill reads the body from the resolved closure independently of delivery. Hook-only delivery therefore works by accident and reads as an omission rather than a choice.
The gap also costs three checks. Nothing reports a rulebook a declaration binds while its delivery never claims the route, which is the state williamthorsen-code-layout-preferences and williamthorsen-typescript-preferences are in today. Nothing reports a rulebook that declares itself hook-reached but that no declaration binds. And nothing reports one that is both bound and ambient, which delivers the same text into a session twice.
Context
williamthorsen-code-layout-preferences and williamthorsen-typescript-preferences are bound to implementation-preferences and carry delivery: skill. That is inherited from before #1163, whose problem statement is that the consult- hop does not fire on its own; it is not a considered shape for a hook-bound rulebook. The consult- route still earns its place, because a hook reaches only the bodies that declare it and code is written in sessions that invoke none of them.
Proposed solution
Add hook to the delivery enum and reject an empty list. hook declares intent rather than instructing: unlike ambient and skill, a rulebook cannot cause its own transclusion, since the binding lives in codeassembly.yaml. That asymmetry is what makes the three checks above expressible.
Each check reports without failing the run. A rulebook's delivery is written by its author and a binding by its consumer, so a mismatch between the two is not always the consumer's to fix and must not take down their sync.
Acceptance criteria
Must have
Should have
Problem
A rulebook reached only through a guidance-hook binding has no way to declare that.
delivery:acceptsambientandskill; its array branch carries no minimum, sodelivery: []parses, deploys the rulebook nowhere, and still fills its bound hook, because the fill reads the body from the resolved closure independently ofdelivery. Hook-only delivery therefore works by accident and reads as an omission rather than a choice.The gap also costs three checks. Nothing reports a rulebook a declaration binds while its
deliverynever claims the route, which is the statewilliamthorsen-code-layout-preferencesandwilliamthorsen-typescript-preferencesare in today. Nothing reports a rulebook that declares itself hook-reached but that no declaration binds. And nothing reports one that is both bound andambient, which delivers the same text into a session twice.Context
williamthorsen-code-layout-preferencesandwilliamthorsen-typescript-preferencesare bound toimplementation-preferencesand carrydelivery: skill. That is inherited from before #1163, whose problem statement is that theconsult-hop does not fire on its own; it is not a considered shape for a hook-bound rulebook. Theconsult-route still earns its place, because a hook reaches only the bodies that declare it and code is written in sessions that invoke none of them.Proposed solution
Add
hookto the delivery enum and reject an empty list.hookdeclares intent rather than instructing: unlikeambientandskill, a rulebook cannot cause its own transclusion, since the binding lives incodeassembly.yaml. That asymmetry is what makes the three checks above expressible.Each check reports without failing the run. A rulebook's
deliveryis written by its author and a binding by its consumer, so a mismatch between the two is not always the consumer's to fix and must not take down their sync.Acceptance criteria
Must have
delivery: hookis accepted, alone and combined with the other modes.deliverylist is rejected.deliveryomitshookis reported.hookand that no declaration binds is reported.williamthorsen-code-layout-preferencesandwilliamthorsen-typescript-preferencesdeclarehookalongsideskill.hookmode is documented whereambientandskillare specified.Should have
ambientis reported.