Skip to main content
Version: MVP

Prompt compiler

3 min readReferenceUpdated 2026-05-19

What you'll find here

craik prompt compile turns existing Craik runtime state into a deterministic, runner-ready prompt. It does not invoke a runner — it prepares the prompt boundary for adapter previews.

Makes policy visible without granting authority.

Runners still need explicit grants for side effects. Unsupported capabilities are not requested. Omitted context, assumptions, and stale risks are surfaced so a runner can stop or ask, not infer.

Command

craik prompt compile <task-id> --runner <runner-id>
Option
Type
Purpose
--runner <runner-id>
required
Runner id from craik runners matrix.
--expected-output-schema <schema>
repeatable
Output schema to request.

The command persists and prints a craik.compiled_prompt contract.

Inputs

craik.task_request

Latest craik.case_file

craik.policy_envelope

Or deterministic strict fallback.

Task-scoped grants

Selected craik.runner_capability_matrix

Context-budget omissions

And discovery exclusions.

Case-file signals

Assumptions · stale risks · contradictions · docs · immutable docs.

Governing distillations

Approved instruction distillations with provenance annotations and stale-exclusion warnings.

Expected output schemas

Output

craik.compiled_prompt includes:

Task · case file · policy · runner ids

Runner mode

Capability grant ids

Expected output schemas

Context omissions

Stop conditions

Active instruction constraints

Typed ordered distillation items rendered in a separate authoritative section.

Distillation warnings

Typed warnings for stale governing items excluded from prompt context.

Named prompt sections

Rendered prompt text

Stable section order.

The rendered prompt has stable section order so fixture tests can compare output across runs.

The Active instruction constraints section is present even when no governing distillations exist. Items are grouped by deterministic category order, then source ID, then statement, and render as (category) statement [source_id @ path:line-range]. Only governing distillations are included; stale governing items are excluded and recorded in distillation_warnings.

What's next