Claude runner adapter (preview)
What you'll find here
The Claude preview adapter — local setup, fixture behavior, smoke
testing, and current limitations. The adapter implements Craik's
shared RunnerAdapter protocol for Claude-compatible workflows.
Prompt handoff and fixture output, not direct execution.
In v0.1.0 the adapter focuses on prompt handoff and deterministic fixture output rather than direct external execution.
Local setup
craik prompt compile <task-id> --runner claude
Python callers:
from craik.runtime.claude_adapter import ClaudeRunnerAdapter, request_from_compiled_prompt
adapter = ClaudeRunnerAdapter()
request = request_from_compiled_prompt(compiled_prompt, adapter=adapter)
result = adapter.run(request)
ClaudeRunnerAdapter.metadata keeps runner identity, adapter version,
fixture status, live availability, and optional executable details
inside craik.runner_metadata.metadata.
Fixture behavior
Fixture mode is the default preview path. It produces a
craik.runner_adapter_result with:
status
completed · blocked · failed · partial.
outputs.prompt_handoff
Compiled prompt for Claude-compatible use.
outputs.handoff_input
Normalized fields for a later handoff.
outputs.receipt_inputs
Normalized receipt drafts.
outputs.runner_metadata
Adapter metadata used for the run.
diagnostics
Live-execution limits and caller-supplied diagnostics.
Tests can force a deterministic outcome:
request = request_from_compiled_prompt(
compiled_prompt,
context={"fixture_status": "failed", "failure_reason": "missing transcript"},
)
Smoke test
Use Runner preview workflows
to run completed, blocked, and failed fixture paths. Check
outputs.runner_metadata, outputs.receipt_inputs, and
outputs.handoff_input before promoting any adapter output into
receipts or handoffs.
Limitations
No external Claude invocation.
The preview adapter does not invoke an external Claude process or verify Claude tool authority. Side effects must be treated as proposed work until Craik can review and receipt them.
Live prompt handoff will need transcript capture, artifact capture, receipt finalization, and explicit process/tool policy before it should be used for side-effecting work.