Karajan Code

Orchestrate multiple AI agents through one automated pipeline. Code, review, test, secure — in a single command.

GitHub npm Docs
$ npm install -g karajan-code click to copy

The Pipeline

11 roles chained with quality gates. The loop runs until code is approved or the iteration limit is reached.

triage researcher planner coder refactorer sonar reviewer tester security commiter

Multi-Agent Pipeline

Chain coder, reviewer, tester, security auditor and more. Each role has its own AI agent and instructions. The orchestrator manages the loop.

TDD Enforcement

When source files change, test changes are required. The coder writes tests first — or the pipeline rejects the iteration.

SonarQube Integration

Static analysis with quality gates. Blocker and critical issues fail the build. Runs locally via Docker — no external services needed.

MCP Server

11 tools exposed via MCP. Use kj from Claude, Codex, or any MCP-compatible host without leaving your agent.

Review Profiles

Standard, strict, relaxed, or paranoid. Configure how tough the reviewer should be. Solomon role resolves deadlocks.

Session Management

Pause and resume sessions. Fail-fast detection stops wasted iterations. Budget tracking monitors tokens and costs per session.

4 AI Agents Supported

Mix and match. Use Claude as coder, Codex as reviewer — or any combination you prefer.

Claude
claude
Codex
codex
Gemini
gemini
Aider
aider

One Command

That's all it takes. The pipeline does the rest.

$ kj run "Fix SQL injection in search endpoint"

[triage] Complexity: medium — enabling coder, sonar, reviewer, tester
[coder] Writing parameterized queries and tests...
[sonar] Quality gate passed — 0 blockers, 0 critical
[reviewer] APPROVED — no issues found
[tester] 14 tests passed, coverage 92%

✔ Pipeline completed in 2m 34s (iteration 1/5)

MCP Server Included

Use kj as a tool inside your AI agent. Send tasks, get real-time progress, receive structured results.

After npm install -g karajan-code, the MCP server auto-registers in Claude and Codex. Or add it manually:

{
  "mcpServers": {
    "karajan-mcp": {
      "command": "karajan-mcp"
    }
  }
}
kj_run kj_code kj_review kj_plan kj_scan kj_report kj_resume kj_doctor kj_config kj_init kj_roles