Skip to content

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)”
CommandDoes
kj initConfig + rules + quality tooling. Agent-safe: falls back to defaults without a TTY, --json summary.
kj env installWrites the method playbook into CLAUDE.md / AGENTS.md / GEMINI.md (--target) and builds the RAG index (--no-rag).
kj hardenGit hooks (lint, commit policy, gate runner), configs, CI workflows. Chains your previous global hooks.
kj review --install-gateEnables the pre-commit review gate (tracked marker).
CommandDoes
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 --stagedSonar 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.
kj review --checkIs 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.
CommandDoes
kj checkEnvironment health, 13 checks.
kj doctorDeeper diagnosis with fixes.
kj reportLast session’s summary, budget, iterations.
kj boardHU Board dashboard (when state_backend: hu-board).
kj gainToken savings analytics.
CommandDoes
kj run "<task>"The classic subprocess pipeline — see Headless mode. --non-interactive (or KJ_NON_INTERACTIVE=1) auto-answers safe gates; FAIL findings stop with exit 1.
kj autorun <spec>Spec → plan → run every story → outcome report, unattended.

Everything else (kj advanced lists ~30 more) belongs to the headless pipeline and power users — documented in the V3 historical archive (here, clearly marked as legacy).