Karajan Code logo

Karajan Code

Governed AI coding workflow with codebase RAG, test-first tasks, cross-AI review, and enforced git gates.

Install Karajan Code

Run the project’s own setup commands, in order.

Setup steps from the project

Karajan Code installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    curl -fsSL https://karajancode.com/install.sh | sh   # full product (npm-first; --standalone for CLI-only)
    
  2. 2. Run
    kj doctor && kj install-tools                        # complete the stack
    
  3. 3. Install
    kj init && kj env install && kj harden && kj review --install-gate
    
  4. 4. Install
    npm install -g @karajan-family/code
    

Overview

Karajan Code adds a governance workflow for AI-driven software development and exposes indexed codebase retrieval through the `kj_rag_query` MCP tool. Its `kj` CLI coordinates work cards, ADRs, test-first changes, cross-AI review, git hooks, worktrees, security checks, and privacy scans. Install it in a project when coding agents need enforced process controls rather than relying on prompts alone. The workflow supports local Ollama or a built-in ONNX embedder for codebase indexing, with cloud embedders requiring an explicit sensitivity declaration.

Use cases

  • Query a repository’s indexed codebase before planning a change
  • Enforce test-first implementation for AI-generated work
  • Require independent AI review before commits enter git
  • Isolate parallel coding tasks in separate worktree lanes
  • Scan changes and build outputs for sensitive data

Key features

  • Codebase RAG exposed through the kj_rag_query MCP tool
  • Test-first workflow with work cards and ADRs
  • Cross-AI review with diff-bound verdicts
  • Git hooks and commit enforcement gates
  • Parallel worktree lanes
  • Security and privacy scanning

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

11/11 checks healthy over the last 41d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10/25/2026 via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars43Stargazers on the source repository.
Last commitTodayMost recent push to the default branch.

How Karajan Code works

What Karajan Code does

Karajan Code governs how AI coding agents carry out work in a repository. It combines a codebase retrieval system with a task method that requires work to be declared, tests to lead implementation, and changes to pass review before entering the repository.

The codebase RAG answers questions about the project and is available to the agent through the native kj_rag_query MCP tool. A library mode can also return engineering pattern cards, including when a pattern applies, when it should not be used, and its canonical citation.

Work is tracked on a Karajan HU Board, through the Planning Game, or on an existing project board such as Linear, Trello, Jira, or GitHub Issues through the agent’s own tools. ADRs are stored in git. Parallel tasks can use isolated worktree lanes.

How it works

Installation activates enforcement rather than only adding instructions to an agent’s context. The setup can install git hooks, the verdict gate, and the tool gate, then place the method into the conversation that performed the installation. A pre-commit gate checks the staged change and requires an approved review verdict tied to the exact diff’s SHA-256 hash and workspace.

kj review --staged runs SonarQube checks on changed files before requesting an AI review. BLOCKER and CRITICAL findings reject the change. A different AI supplies the review verdict, while kj solomon can arbitrate disagreements. Security findings cannot be overridden through arbitration.

A deterministic Sentinel records method state during tool use and can block an agent from ending its turn with open violations. The Steward checks whether declared guarantees are still fresh and reports each invariant as ok, broken, unknown, or not observable.

Setup and configuration

Karajan requires git and at least one AI agent CLI. Cross-AI review needs two agent CLIs, and arbitration needs three. Node.js 22 or newer is supported for the npm installation route. The package can be installed globally with npm install -g @karajan-family/code; the project also provides an install script, standalone binaries, Homebrew, and a Python wrapper.

A manual setup uses the following sequence:

sh
kj doctor && kj install-tools
kj init
kj env install
kj harden
kj review --install-gate
git config core.hooksPath .karajan/hooks

The install asks for personal-data exclusions and writes them to ~/.karajan/privacy.yml. Codebase indexing works with local Ollama or the built-in ONNX embedder when no external embedder can be installed. Cloud embedders require an explicit sensitivity declaration and redact PII from chunks.

Tools and capabilities

  • Query the indexed codebase through kj_rag_query.
  • Track work with kj hu add, kj hu move, and kj hu list.
  • Create and list repository ADRs with kj adr add and kj adr list.
  • Review staged changes with deterministic analysis and cross-AI verdicts.
  • Create, list, and complete isolated worktree lanes.
  • Scan for sensitive data, dependency issues, prompt injection, and exposed MCP reachability.

Limitations and notes

Karajan’s enforcement depends on activating its environment and git hooks. It will not run without a declared and verified board. At least one supported agent CLI is needed, and additional agents are required for cross-AI review or arbitration. Agent subprocesses receive an allowlisted environment so credentials such as cloud keys and registry tokens are not passed to them.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Karajan Code

Karajan Code is an MCP server that connects an AI coding agent to a project's indexed codebase and exposes the `kj_rag_query` tool. Its surrounding `kj` workflow manages work cards, ADRs, tests, reviews, git gates, worktrees, security checks, and governance state for agent-driven development.

Install it with `npm install -g @karajan-family/code`, or use the project’s install script and then run `kj doctor`, `kj install-tools`, `kj init`, and `kj env install`. Complete activation with `kj harden`, `kj review --install-gate`, and the configured git hooks.

The `kj_rag_query` tool queries the project’s indexed codebase so an agent can retrieve information about what the repository does before making assumptions. `kj rag query --library` additionally serves engineering pattern cards when applicable.

Yes. Cursor is named as a supported AI assistant for installing and using Karajan Code. The project also names Claude Code, Codex, and VS Code, and its workflow can use the agent’s own tools for external boards such as Linear, Trello, Jira, or GitHub Issues.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewKarajan Code AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/karajan-code?style=directory)](https://allmcps.com/mcp/karajan-code)
HTML Embed
<a href="https://allmcps.com/mcp/karajan-code"><img src="https://allmcps.com/api/badge/karajan-code?style=directory" alt="Karajan Code on AllMCPs" /></a>