Runner preview workflows
What you'll do
Walk through Craik's v0.1.0 runner-preview surface: context discovery and case files · policy-aware prompt compilation · fixture or prompt-handoff execution · receipt and handoff metadata capture. The preview validates the runner boundary before live side effects are trusted.
Preview adapters do not grant authority.
Fixture mode, prompt handoff, and governed provider execution are the expected paths. Side effects still require explicit capability grants.
Workflow
- Register or select a project.
- Create a task with explicit scope, constraints, and expected outputs.
- Build the task case file.
- Compile a runner-targeted prompt.
- Build a runner adapter request from the compiled prompt.
- Run the preview adapter in fixture or prompt-handoff mode.
- Persist receipts and handoffs from the normalized result when appropriate.
- Review runner metadata, policy boundaries, omitted context, and diagnostics before treating output as evidence.
Context and overrides
Case files decide what context reaches the prompt. Configure project docs, immutable paths, discovery includes, and discovery excludes before building the case file.
Omissions are stop-or-ask conditions.
Compiled prompts surface omitted or excluded context in
context_omissions. Runners must treat omissions as stop-or-ask
conditions — not as evidence that omitted material is irrelevant.
Compile a prompt
Use the runner capability matrix to choose the runner:
craik runners matrix
craik runners matrix --runner codex
Compile the prompt:
craik prompt compile <task-id> --runner codex
craik prompt compile <task-id> --runner claude
craik prompt compile <task-id> --runner gemini
The compiler persists a craik.compiled_prompt and includes:
Task and policy boundaries
Capability grants
Runner trust profile
Unsupported / prompt-handoff capabilities
Context omissions
Governing distillations
Rendered as their own authoritative section with provenance annotations.
Expected output schemas
Stop conditions
Run a preview adapter
Each preview adapter implements the same runtime shape:
from craik.runtime.codex_adapter import CodexRunnerAdapter, request_from_compiled_prompt
adapter = CodexRunnerAdapter()
request = request_from_compiled_prompt(compiled_prompt, adapter=adapter)
result = adapter.run(request)
craik.runtime.codex_adapter
craik.runtime.claude_adapter
craik.runtime.gemini_adapter
Fixture outcomes are controlled through request context:
request = request_from_compiled_prompt(
compiled_prompt,
context={
"fixture_status": "blocked",
"blocked_reason": "missing approval for shell.execute",
},
)
Supported fixture statuses: completed · blocked · failed · partial.
Result shape
Adapters return craik.runner_adapter_result.
outputs.prompt_handoffoutputs.receipt_inputsoutputs.handoff_inputoutputs.runner_metadatadiagnosticsReceipts and handoffs preserve stable runner metadata so future agents can see which adapter, version, execution mode, trust profile, and capability profile were involved. Runner-specific fields remain nested and redacted.
Policy boundary
Preview adapters do not grant authority.
Side effects require explicit capability grants. Unsupported capabilities are blocked. Prompt-handoff side effects must return through Craik review. Fixture results are deterministic test outputs, not proof of live execution. Receipt metadata describes runner context but does not replace concrete side-effect receipts.
Smoke-test checklist
- Run
craik runners matrix --runner <id>and confirm the trust profile. - Run
craik prompt compile <task-id> --runner <id>. - Build a request with the matching adapter module.
- Run one
completed, oneblocked, and onefailedfixture path. - Confirm
outputs.runner_metadata,outputs.receipt_inputs, andoutputs.handoff_inputare present. - Confirm secrets in runner-specific metadata are redacted.
- Run the project validation command from Development checks.