Command reference
The commands a v4 setup actually uses. Everything supports --help; agent-facing commands offer --json (stdout = exactly one JSON object).
Setup (once per project, run by a human or their agent)
Section titled “Setup (once per project, run by a human or their agent)”| Command | Does |
|---|---|
kj init |
Config + rules + quality tooling. Agent-safe: falls back to defaults without a TTY, --json summary. |
kj env install |
Writes the method playbook into CLAUDE.md / AGENTS.md / GEMINI.md (--target) and builds the RAG index (--no-rag). |
kj harden |
Git hooks (lint, commit policy, gate runner), configs, CI workflows. Chains your previous global hooks. |
kj review --install-gate |
Enables the pre-commit review gate (tracked marker). |
Daily (run by the agent)
Section titled “Daily (run by the agent)”| Command | Does |
|---|---|
kj rag query "<q>" |
Semantic search over the project (auto-refreshes on drift). |
kj brief <role> |
Mission + invariants + deliverable of a role. No role → list. |
kj review --staged |
Sonar pre-gate on the changed files (BLOCKER/CRITICAL reject deterministically), then cross-AI review; verdict bound to the diff’s sha256 and stamped with its workspace. Exit 0/1. |
kj worktree start|list|done <slug> |
Isolated task lanes: worktree + feat/<slug> branch + dependency bootstrap; done removes a merged lane. list --json gives each lane’s commits ahead of the base and the cards its branch names (by id or reference); --prs adds each lane’s PR (one gh call). The HU Board shows them on each card. |
kj review --check |
Is there an approved verdict for the exact staged diff? (What the hook runs.) |
kj solomon --position "<why>" |
Third-AI arbitration of a rejected verdict. Exit 0 approve / 1 reject. |
kj agent run <agent> "<task>" |
Delegate a task to another AI and print its output. |
kj report-issue --title "<t>" |
File a sanitized kj bug upstream. Never publishes without --publish. |
Inspect (human)
Section titled “Inspect (human)”| Command | Does |
|---|---|
kj check |
Environment health, 13 checks. |
kj doctor |
Deeper diagnosis with fixes. |
kj report |
Last session’s summary, budget, iterations. |
kj board |
HU Board dashboard (when state_backend: hu-board). |
kj gain |
Token savings analytics. |
Retired in 5.0
Section titled “Retired in 5.0”kj run, kj autorun, kj resume, kj standby, kj plan generate, kj status, kj undo, kj triage, kj researcher, kj architect and kj review "<task>" drove the old subprocess pipeline and were retired with it: they answer with a notice and start nothing. What replaces each one: Migrating to 5.0. For CI and scripts, see Unattended runs.
kj advanced lists the rest of the commands. The old pipeline is documented in the V3 historical archive (here).
Karajan Code™ · AGPL-3.0