Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xantorres/repokernel/llms.txt

Use this file to discover all available pages before exploring further.

RepoKernel is agent-agnostic. Every task and sprint runs inside an isolated Git worktree; the agent adapter is the bridge between that worktree and whatever AI coding tool you want to use. RepoKernel invokes the agent, waits for it to finish, parses a structured sentinel result from its output, and then runs the review gate — regardless of which adapter you chose. This page covers the built-in adapters and how to wire a custom one.

Adapter overview

AdapterNotes
claudeClaude Code CLI. Requires claude login or ANTHROPIC_API_KEY
codexOpenAI Codex CLI. Requires OPENAI_API_KEY
ollamaLocal model via Ollama. No API keys, no cloud
fakeDeterministic test agent. Perfect for demos and CI
manualPauses so you do the work yourself
customAny shell command configured in repokernel.config.yaml
fake is always safe for testing. It reads the context packet, writes a placeholder rk-fake-output.txt file in the worktree, commits it, and returns a completed sentinel — the full lifecycle without any LLM call or API key. Use it to verify your setup, smoke-test new sprints, and run CI pipelines before connecting a real agent.

Agent adapters

Install Claude Code

npm install -g @anthropic-ai/claude-code
Verify the install:
claude --version

Authenticate

For interactive use, log in once with the OAuth flow:
claude login
This writes a credential to ~/.claude/credentials.json. For CI or headless servers, set the environment variable instead:
export ANTHROPIC_API_KEY=your-key-here
The API key takes precedence over the stored credential.

Run a task

rk run -m "Add a /health endpoint that returns 200 OK" --agent claude

How RepoKernel invokes Claude Code

RepoKernel calls the Claude CLI in non-interactive mode, scoped to the sprint worktree:
claude --print --cwd <worktree> -p <packet_path>
Claude Code reads the packet, edits files, runs any checks you configured, and commits its changes inside the worktree. Each commit lands on the sprint branch:
feat(S-001): add /health endpoint returning 200 OK

Common failure modes

Auth not configured
Error: No API key found. Run `claude login` or set ANTHROPIC_API_KEY.
Fix: claude login for interactive use, or export ANTHROPIC_API_KEY=... for headless.Rate limit hitClaude Code exits non-zero; RepoKernel marks the sprint agent_failed:S-001. Retry after the rate limit window:
rk run T-001
Checks failThe sprint stays active. Inspect the diff, then retry or discard:
rk run inspect RUN-001
rk run T-001        # retry
rk discard T-001    # drop
Scope refusalIf Claude Code declines to write a file outside allowed_paths, or the review gate catches out-of-scope changes before rk close will merge:
Review blocked: changed files outside allowed_paths.
Widen allowed_paths in your sprint frontmatter or repokernel.config.yaml if the task legitimately needs broader access.

Configuring the review gate with checksCmd

The checksCmd runs inside the worktree after the agent finishes, before the run enters review state. Set it once in repokernel.config.yaml:
automation:
  checksCmd: pnpm lint && pnpm typecheck && pnpm test
If the command exits non-zero, the sprint stays active and the run does not enter review — rk close will refuse to merge until checks pass. Retry the agent in the same worktree or discard the task:
rk run T-001      # retry the agent
rk discard T-001  # drop the worktree
You can also run the full gate bundle manually for any sprint:
rk gates S-001
rk gates runs checksCmd, diff and path checks, rk validate --fail-on P1, and rk registry --check --explain in one pass, and appends command_evidence to the linked review if one exists.

Choosing an agent

SituationRecommended agent
Verifying setup or CI pipelinesfake
Manual coding with lifecycle trackingmanual
Claude CLI integrationclaude
OpenAI Codex CLI integrationcodex
Local model, no API keys, no cloudollama
Custom script or wrapperExternal agent via config

Build docs developers (and LLMs) love