Kenshiki

L0 — Compilation

Prompt Compiler

Constrain what gets asked.

Turns a loose prompt into a disciplined query. Before any model sees the question, the Compiler narrows it to what can actually be answered from evidence. Prompts are rewritten using CFPO (Content–Format–Policy–Output) — a strict section-ordering convention that makes governance mechanically enforceable inside the prompt itself.

Without this: the model receives prompts that reward hallucination. Evidence gets buried by recency bias, authority signals are lost in unstructured context, and post-generation scoring catches failures too late to prevent them.

CFPO ordering model

Places content by function and relevance, matching known attention behavior instead of appending retrieval chunks as an undifferentiated block.

  • Content: domain framing and system context (early context)
  • Format: reference structures and definitions (mid context)
  • Policy: grounding and authority constraints (late context)
  • Output: response contract and output schema (final context)

Who this is for

Platform runtime

runs automatically on every inference request — no manual prompt engineering required.

The inference pipeline

every prompt passes through the Compiler before generation. Claim Ledger consumes compiler telemetry for attribution.