Skip to content

Policy engine overview

The language a policy is written in. delta runs the compiler, so these pages are written for reading and reviewing a policy the policy-generation MCP produced, rather than for building one locally.

All four pages describe policy-engine v0.7.3, the compiler Orchestrator v0.10.0 runs — not the compiler’s newest tag. The version matters more here than the gap between them suggests: v0.7.4 re-encoded every policy and moved every policy id, so a policy written for one patch version is not interchangeable with the next.

Worked policies and the language reference are synced verbatim from {UPSTREAM_REPO}docs/EXAMPLES.md and docs/LANGUAGE.md — by scripts/sync-policy-docs.sh. LANGUAGE.md is the same text the compiler embeds as LANGUAGE_REFERENCE and the MCP serves, so a hand-written copy here would be a third version of one document. Do not edit those two pages; regenerate them.

The sync reads v0.7.3 rather than whatever the upstream checkout has at HEAD, because a page describing a compiler newer than the one delta runs will show a policy that does not compile. src/policy-engine.mjs holds the tag and the commit it resolved to. npm run check:policy-pin asserts both against the Cargo.lock of Orchestrator v0.10.0, and npm run check:policy-docs asserts that these pages are that tag’s text.

Reading a policy and value encoding are written here, because neither has an upstream counterpart: the first is orientation for the managed model, and the second documents a wire format the API schema leaves untyped.

Nothing on these pages is ported from the older delta-mandate-docs. Its policy-engine pages describe a language that no longer exists — intent {} and evidence {} blocks with intent.<field> references, where the current grammar has one parameters block, no evidence block, and parameters.<field>. Those examples would not compile.