Build with Craik
This section is task-oriented. Every page either gets you to a running Craik surface or documents a contract you implement against. Topics are grouped by what you are trying to build, and each group lists the guides and reference in the order most teams reach for them.
If you've never seen Craik before, do these three things first:
Implementation paths
Hands-on · 01
Quickstart
A 10-minute narrative tutorial: sandbox the Craik home, register a project, create a task, build a case file, run the policy gate, emit a handoff, and inspect what landed on disk. Uses the fixture-backed provider path — zero credentials, zero network.
- sandboxed home
- case file + policy gate
- handoff
- stigmem demo
What you'll do
Install Craik, point it at a Git repository, build a case file, run policy tests, and emit a handoff — without making a single live provider call. Every output we discuss is real and persists on disk.
— Quickstart · §What you'll do
02 · Front door
Installation
Prerequisites, three install paths (
pipx/pip/ source), verification commands, home initialization, optional auth, and a troubleshooting matrix for the most common first-run issues.Craik is a Python CLI. You need a recent Python interpreter and a way to put the CLI on your PATH. Installation · §Prerequisites
- python 3.12+
- pipx / pip
- verification
- troubleshooting
03 · Wire it up
Setup wizard
craik setupinitializes the local home, the SQLite store, and a default gateway configuration. Writes inspectable, non-secret configuration only. Authentication and credentials are added separately after setup completes.The wizard writes inspectable, non-secret configuration only. It does not ask for API keys, channel tokens, webhook secrets, or bearer credentials. Setup · §Secrets-free
- home init
- local store
- gateway config
- secrets-free
04 · Where state lives
Configuring Craik home
The default
~/.craik/layout, overrides viaCRAIK_HOME, share patterns for CI runners and containerized runs, and the reset procedure. Read this before pointing Craik at a network share.Craik does NOT silently create project-local
.craik/directories inside your repositories. Configuring home · §Default location- home layout
- CRAIK_HOME
- CI runners
- reset
Entry point · 01
Project registry
Register a Git repository as a Craik project. Declares mutable docs paths, immutable evidence paths, and (optionally) a memory backend. Project records persist in the local SQLite store — Craik never writes into your repository.
- boundaries
- multi-project
- inspect via onboard
- local-only state
Where state lives
Registration writes only to Craik local state under
~/.craikor$CRAIK_HOME. It does not create project-local.craik/metadata inside the repository.— Project registry · §Where state lives
02 · Typed object
Project profile reference
The
craik.project_profileshape: stable id, repo paths, default branch, docs and immutable paths, memory backend and scope. Every case-file build and onboarding payload reads against this.Project profiles describe repositories Craik can reason about. Project profile · §Intro
- repo metadata
- docs boundaries
- memory backend
- git detection
03 · Pre-run brief
Using case files
Build, inspect, and refresh per-task case files. Discovery overrides, the 10 fields to review before authorizing a run, and how to handle open assumptions as first-class — not bugs.
Case files are only as good as the project they're built against. Using case files · §Tune discovery
- case build
- discovery overrides
- assumptions
- refresh procedure
04 · Continuity
Writing handoffs
Status semantics (
completed/incomplete/blocked/failed), the eight things every handoff should include, anti-patterns that hurt the next agent, and the six self-audit checks that keep incomplete runs honest.Incomplete handoffs are valid. Dishonest handoffs are not — they contaminate the next run's context. Writing handoffs · §Self-audit
- status semantics
- anti-patterns
- self-audit
- continuity
- 02Contract
Runner step contracts
Each phase (
Referenceplan / act / observe / evaluate / continue / stop) is a typed step request and step result — invoked by the loop, not the runner itself. - 03Contract
Runner metadata
Captured at adapter boundaries so receipts and handoffs can explain which runner produced work without adding provider-specific fields to the stable contract surface.
Reference - 04Adapter · preview
Codex runner adapter
Conservative v0.1 preview. Turns a compiled prompt into a normalized runner request and returns deterministic fixture results when live execution is unavailable.
Reference - 05Adapter · preview
Claude runner adapter
Focuses on prompt handoff and deterministic fixture output. Live external execution is a later milestone in the adapter roadmap.
Reference - 06Adapter · preview
Gemini runner adapter
Read/review-oriented in v0.1. Uses prompt handoff plus deterministic fixture output rather than direct external execution; full live adapter is post-MVP.
Reference - 07Workflow
Runner preview workflows
Threads the four pieces together: context discovery, policy-aware prompt compilation, runner fixture or prompt-handoff execution, and receipt-plus-handoff metadata capture.
Guide - 08Workflow
Single-agent fixture loop
Smoke-test the loop boundary without live runner credentials or external side effects. The pattern CI uses for every PR.
Guide - 09Reference · v0.3
Agent roles
Referencecraik.agent_roledefines the role boundary for v0.3 multi-agent coordination. Roles describe responsibility and authority; they do not grant new runtime permissions by themselves. - 10Reference
Adapter packages
The
Referencecraik.adapter_packagecontract records adapter identity, package version, implementation entrypoints, and the metadata plugin discovery uses. - 11Contract
Worker results
Referencecraik.worker_resultpreserves typed specialist output: findings, artifacts, assumptions, risks, contradiction ids, receipts. Conflicts stay conflicting — review decides later.
Contract · 01
Model providers
The craik.model_provider contract records model and
runtime metadata used for routing. Provider transport is selected per
call — fixture, local OAI-compatible, or hosted (OpenAI Responses /
Anthropic Messages). Design rationale lives in
ADR 0002.
- transport families
- routing metadata
- OAI-compatible servers
- ADR 0002
Routing input
craik.model_providerrecords model provider and runtime execution path metadata for provider routing.— Model providers · §Intro
- 02Guide
Provider routing & sandboxes
Routing chooses model/runtime metadata. Sandbox routing chooses an execution environment. Keep those decisions separate so policy, receipts, and redaction can audit each boundary independently.
Guide - 03CLI
Provider switching
Referencecraik providerexposes the operator-facing surface for model/provider routing — list, show, and switch the active provider within the bounds the policy envelope allows. - 04Policy
Provider failover
Failover is an explicit routing policy. Craik only falls back from one provider to another when a
ReferenceProviderFailoverPolicyrule matches — every fallback preserves the active policy envelope id. - 05MVP bar
Provider certification
OpenAI and Anthropic share one certification bar. Provider metadata alone is not enough; a provider is MVP-ready only when tests and receipts show the runtime can safely use it in a governed workflow.
Reference - 06Identity
Authentication & credentials
Operator identity (OIDC) is separate from credential identity (the provider account used for model calls). Every receipt records both — audit can answer "who authorized this" and "which credential carried it out" without inspecting secret material.
Guide - 07Tool
Prompt compiler
Referencecraik prompt compileturns Craik runtime state into a deterministic runner-ready prompt. It does not invoke a runner — it prepares the prompt boundary for adapter previews.
- 02Demo
Stigmem docs demo
The first runnable demo. Reconciles Stigmem documentation and observed runtime state without editing files. CI exercises the same command on every PR —
Guidecraik demo stigmem-docs --repo-path . --no-github. - 03Contract
Memory backends
The proposal-first interface every memory backend implements: create reviewable proposals, list by task or status, approve or reject with audit, and refuse direct durable writes without a matching grant.
Reference - 04Compatibility
Stigmem compatibility
The minimum endpoint matrix for v0.1: health, capability discovery, fact read, fact provenance. Future endpoints (direct write, federation hooks) remain explicitly post-MVP.
Reference - 05Persistence
Local store
SQLite at
Reference$CRAIK_HOME/state/craik.sqlite3. Holds projects, tasks, case files, intent locks, receipts, handoffs, memory proposals, contradictions, run state, and work-graph projections. - 06On-disk layout
Local state layout
The full
Reference~/.craik/directory map:config/,secrets/,state/,cache/,logs/,receipts/,handoffs/,case-files/,projects/.
- 02Config
Config reference
Craik v0.1 is configured primarily through environment variables and local state under
ReferenceCRAIK_HOME. The reference enumerates every recognized variable and its purpose. - 03Adapter
GitHub config
The GitHub adapter is read-only in v0.1: issues, PRs, comments, review state, and CI checks flow in as case-file evidence. Direct writes are explicitly post-MVP.
Reference - 04Gates
CI/CD gates
Craik CI is split by surface so failures point at the area that regressed: unit, contract, integration, quickstart smoke, policy gate, lint, type, security, and CodeQL.
Reference
- 02Posture
Failure modes
The fail-closed MVP posture. Prompt-injection containment, secret rejection at persistence, denied-capability handling, fail-open visibility, automation stops, and the explicit list of paths the MVP does not claim.
Reference - 03Continuity
Recovery mode
Bounded continuity view for a resuming agent. Summarizes the latest handoff, case files, receipts, open contradictions, and active instruction constraints. It does not resolve contradictions or replace policy checks.
Reference - 04Provenance
Public boundary & provenance
Public docs must not expose private paths, raw credentials, or internal task labels.
Referencecraik.runtime.projects.public_docsprovides the machine-checkable MVP boundary. - 05Honesty
Self-audit
Every structured handoff includes a
Referenceself_auditobject — the six honesty checks (schema, redaction, receipts, assumptions, validation, policy exceptions) that keep incomplete runs from masking as complete. - 06Post-MVP
Post-MVP scope
The 0.x MVP is not a 1.0 compatibility promise. Scope explicitly excludes hosted gateway dispatch, operator dashboards, additional live runners, marketplace workflows, and visual companion surfaces.
Reference
- 02Guide · plugins
Community plugins
Plugins package executable extensions. Treat them as untrusted until their descriptor, provenance, review state, grants, and receipts have been inspected. Marketplace workflows are post-MVP.
Guide - 03Contract · skill
Skill packages
Referencecraik.skill_packagerecords reusable instructions, entrypoints, docs, and assets. Packages do not carry plugin runtime authority — they are pure operating guidance. - 04Contract · skill
Skill registries
Referencecraik.skill_registryrecords project-local and global skill entries and where each came from — so a reviewer can audit which skills a project can use at a given point in time. - 05Contract · skill
Skill invocation contexts
Referencecraik.skill_invocation_contextlinks a skill run to its task, skill package, policy envelope, and optional handoff — the auditable boundary for one skill invocation. - 06Contract · skill
Skill telemetry
ReferenceSkillPerformanceTelemetryrecords how one invocation behaved without allowing the agent to silently rewrite reusable guidance. - 07Contract · skill
Skill proposals
ReferenceSkillChangeProposallets agents draft changes to reusable operating guidance without silently changing their own authority. Reviewer approval gates promotion. - 08Contract · skill
Skill replay
ReferenceSkillReplayFixturecompares current skill behavior against redacted, reproducible fixtures before learning-loop changes are promoted. - 09Contract · skill
Skill promotion gates
ReferenceSkillPromotionRequestprevents reviewed skill proposals from becoming promoted guidance without explicit approval — every promotion is named and dated. - 10Contract · skill
Skill rollbacks
ReferenceSkillRollbackTargetprovides a reviewable path for reverting promoted skill updates when a promoted version causes regressions or violates policy. - 11Contract · plugin
Plugin descriptors
Referencecraik.plugin_descriptorrecords governed plugin metadata without granting runtime authority. Authority comes from grants and receipts — never the descriptor alone. - 12Contract · plugin
Plugin probation
Referencecraik.plugin_probationkeeps new or changed plugins out of durable trust until review criteria are satisfied. Probation is the gate between "available" and "trusted". - 13Contract · plugin
Plugin receipts
Referencecraik.plugin_receiptrecords plugin actions and outputs under policy — joinable to the task, actor, and the plugin descriptor that authorized the call. - 14Contract · plugin
Plugin capability grants
The grant shape that authorizes a plugin to act under policy. Like regular capability grants but with plugin-descriptor binding so the authority can be retracted at the plugin boundary.
Reference
9 · Integrations & migrations
GitHub, MCP, adjacent runtimes, and migration paths from existing tools.
- GitHub adapter
- MCP ecosystem compatibility
- MCP client
- MCP export boundary
- Reference integrations
- Adjacent runtime bridge
- Adjacent tool migration assessment
- Multi-agent workflow bridge
- Multi-agent workflow migration assessment
- Import dry-run reports
- Migration maps