Policy authoring and the catalog¶
Policy is authored as a document, checked before it can be published, and recorded in a catalog the control plane owns. Authoring is separate from enforcement: nothing about a bundle reaches a run until it is compiled, signed, published and attached.
Six authoring operations¶
| Operation | Answers |
|---|---|
| Create | Record a policy document |
| Render | What does this document look like in canonical form |
| Lint | Does it satisfy the schema and reduce to enforceable rules |
| Preview | What would this do, before it does it |
| Impact | What changes if this is applied |
| Merge | What does this become when combined with what is already in force |
Preview and impact are separate for a reason. Preview shows the resulting policy; impact shows the difference from what is in force now.
Lint is the gate before publication¶
Linting validates the schema, expands authoring shorthand, resolves
extends:, checks that every condition parses, that every effect matches its
required arguments, and that everything it refers to resolves to a known class.
It blocks any rule the kernel cannot mechanically enforce.
A lint failure blocks publication. A bundle that does not reduce to the canonical form cannot enter the system at all, which is what guarantees the kernel can always enforce what it is handed. See Bundle compilation, signing, and publication.
Shorthand compiles into the canonical shape¶
Authoring shorthand exists so that a common intent does not have to be written
as several rules by hand. It expands during lint into the same canonical
policy.rules shape, against the same six hooks and nine effects.
Shorthand is a way of writing the one model rather than a second system, and what is stored is the expanded form.
The catalog is a control-plane authority¶
The control plane owns the policy bundle registry and its versioning, the attachment graph, and the effective policy computation over both. A bundle in the catalog is content-addressed and immutable once published; an edit produces a new version.
That ownership is what allows a run's policy to be resolved at build time and shipped with the recipe, rather than resolved on a node at run time. See The CP recipe.
Authored where it belongs, not everywhere¶
The diagram below is an example. It shows one tenant with two bundles attached.
flowchart TB
subgraph CAT["CATALOG"]
direction TB
B1[("org.example.retention-baseline@2")]
B2[("org.example.determinism-controls@1")]
end
subgraph H["ATTACHMENT HIERARCHY"]
direction TB
L1["tenant"]
L2["workspace, empty"]
L3["project"]
L4["flow, empty"]
L5["capability, empty"]
L6["inline, empty"]
L1 --- L2 --- L3 --- L4 --- L5 --- L6
end
B1 -->|"attached"| L1
B2 -->|"attached"| L3
Two of the seven levels hold anything, and every workflow in the project is governed by both bundles without declaring either. A catalog entry has effect only where an edge like these two exists.
Most levels of the hierarchy are empty for most workflows. The hierarchy exists to put authoring at the right level rather than to require activity at every level. See Attachment resolution across the hierarchy.
What an author cannot do here¶
A bundle can add rules and tighten inherited ones. Loosening an inherited rule is not an authoring act at all: it requires a separate signed artifact, scoped and time-bounded. See Exemptions.