These examples show how authoritative state changes application behavior at runtime.
Each example demonstrates a single enforcement point where premise and policy influence what a host allows, routes, retrieves, builds, or executes.
- The core authority contract is provided by
context-compiler. - Directive recognition can optionally be added with
context-compiler-directive-drafter. - These examples focus on where authoritative state changes application behavior.
Prompt reinjection influences model behavior.
Context Compiler influences runtime behavior.
- Checkpoint continuation: persisted confirmation and resume flows change host behavior across turns or requests
- Execution authorization: protected host actions execute only when authoritative state allows them
- Gateway middleware: the host allows, blocks, or routes requests before downstream work runs
- Prompt construction: the host builds different request or prompt payloads from authoritative state
- Retrieval filtering: the host changes which documents are eligible or relevant before returning results
- Schema selection: the host picks different workflow or response schemas from authoritative state
- Tool gating: the host changes which tools are visible or executable at runtime
Starter apps are available when a small runnable host makes the enforcement point easier to see:
- Node starter apps - execution authorization starter variants for a small Node HTTP server
- Next.js starter apps - request construction and context assembly starter variants for a minimal Next.js App Router app
Open a starter app when you want a minimal host runtime around the enforcement point instead of a generic example alone.
In these starters:
@rlippmann/context-compileris the authority layer@rlippmann/context-compiler-directive-drafteris optional help for recognizing directive-shaped input
Each starter app now comes in two variants:
basic= compiler-only baseline with no directive-drafter dependencywith_drafter= optional acquisition layer before the compiler
The compiler-only flow is always the baseline. If a starter includes directive-drafter, it is there to help acquisition, not to own state changes.
To explore or run an example, use a repository checkout:
- Clone
context-compiler-example-integrations. - Choose a generic example or a starter app.
- Open that example's README.
- Follow the example-specific setup, runtime, and validation instructions.