# karajan-code - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for karajan-code. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **AI researchers or builders of research-oriented Agents**: The README clearly centers on research, experiment, or paper workflows. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0003` supported 0.86

## What It Can Do

- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `README.md` Claim: `clm_0001` supported 0.86

## How to Start

- `npm install -g karajan-code` Evidence: `README.md` Claim: `clm_0004` supported 0.86
- `curl -L https://github.com/manufosela/karajan-code/releases/latest/download/kj-darwin-arm64 -o kj && chmod +x kj` Evidence: `README.md` Claim: `clm_0005` supported 0.86
- `curl -L https://github.com/manufosela/karajan-code/releases/latest/download/kj-linux-x64 -o kj && chmod +x kj` Evidence: `README.md` Claim: `clm_0006` supported 0.86
- `curl -L https://github.com/manufosela/karajan-code/releases/latest/download/kj-win-x64.exe -o kj.exe` Evidence: `README.md` Claim: `clm_0007` supported 0.86
- `curl -fsSL https://raw.githubusercontent.com/manufosela/karajan-code/main/scripts/install-binary.sh | sh` Evidence: `README.md` Claim: `clm_0008` supported 0.86
- `curl -fsSL https://raw.githubusercontent.com/manufosela/karajan-code/main/scripts/install-kj.sh | sh` Evidence: `README.md` Claim: `clm_0009` supported 0.86
- `pip install karajan-code` Evidence: `README.md` Claim: `clm_0010` supported 0.86
- `git clone https://github.com/manufosela/karajan-code.git` Evidence: `README.md` Claim: `clm_0011` supported 0.86
- `pip install .` Evidence: `README.md` Claim: `clm_0010` supported 0.86, `clm_0012` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Needs admin / security approval
- **Why**: Continuing may involve secrets, accounts, external services, or sensitive context; get admin or security approval first.

### 30-Second Read

- **What to do now**: Needs admin / security approval
- **Minimum safe next step**: Run Prompt Preview first; if credentials or an enterprise environment are involved, get approval before trialing
- **Do not trust yet**: Role quality and task fit cannot be trusted directly.
- **Continuing will touch**: Role selection bias, Command execution, Host AI configuration

### What You Can Trust Now

- **Target-audience signal: AI researchers or builders of research-oriented Agents** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0003` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `README.md` Claim: `clm_0001` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0004` supported 0.86

### What You Cannot Trust Yet

- **Role quality and task fit cannot be trusted directly.** (unverified): A role library proves there are many roles; it does not prove each one fits your specific task or that a role produces high-quality results.
- **Do not treat role copy as real execution capability.** (unverified): Before install you can only judge whether the role description and task profile match; you cannot prove it can complete the task inside the host AI.
- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `AGENTS.md`, `CLAUDE.md`
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.

### What Continuing Will Touch

- **Role selection bias**: The user's judgment about which expert role should handle the task. Why: Picking the wrong role makes the AI answer from the wrong expert perspective, wasting time or misleading decisions.
- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `AGENTS.md`, `CLAUDE.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `README.md`
- **Environment variables / API keys**: Project entry docs explicitly showing API key, token, secret, or account credential configuration. Why: If a real install needs credentials, use test credentials first and go through a permission/compliance review. Evidence: `CHANGELOG.md`, `README.md`
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use an interactive trial to verify the task profile and role match first; do not import the whole role library up front. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **Do not use real production credentials**: Once an environment variable / API key enters the host or toolchain, it can create account and compliance risk. (applies when: When environment signals like API, TOKEN, KEY, or SECRET appear.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Keep a record of the original role selection**: If output goes off-topic, you can return to the task-profiling stage and reselect a role instead of pushing on with the wrong one.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **Be ready to revoke test API keys or tokens**: If test credentials leak or are misused, you can cut losses quickly.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0013` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `README.md` Claim: `clm_0014` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `README.md` Claim: `clm_0001` supported 0.86

### Context Scale

- Total files: 879
- Important-file coverage: 40/879
- Evidence index entries: 80
- Role / Skill entries: 73

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for karajan-code, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat karajan-code as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for karajan-code, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 73 role / Skill / project-doc entries.

- **Karajan Code — Agent-Facing Index** (project_doc): This directory is the AI-agent entry point for the Karajan Code repository. Humans look at the top-level README.md ../../README.md . Agents Cursor, Cline, Aider, generic Claude / Codex sessions come here. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/README.md`
- **Karajan Code — Demo recordings** (project_doc): Scripts for recording reproducible asciinema demos of Karajan Code, plus the published .cast files when available. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/demos/README.md`
- **Task file templates** (project_doc): Plantillas y guía para los .md que pasas a los comandos de Karajan via --task-file . Sin estas, escribir un task file requiere ensayo y error caro cada kj plan generate cuesta $0.30–0.80 en LLM y 2–5 minutos . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/task-templates/README.md`
- **What is Karajan?** (project_doc): Local multi-agent coding orchestrator. TDD-first, MCP-based, vanilla JavaScript. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **Karajan Code Examples** (project_doc): express-notes-api ./express-notes-api/ Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `examples/README.md`
- **DNI Validator — Generated by Karajan Code** (project_doc): DNI Validator — Generated by Karajan Code Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `examples/dni-validator/README.md`
- **Express Notes API — Generated by Karajan Code** (project_doc): Express Notes API — Generated by Karajan Code Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `examples/express-notes-api/README.md`
- **@karajan/ai-trash** (project_doc): AI-proof trash: intercept destructive operations from an AI-driven shell rm -rf , truncation via , mv overwriting, destructive git ops, … and snapshot the affected paths to a bin the AI cannot reach before the command runs. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/ai-trash/README.md`
- **karajan-core** (project_doc): Shared modules for the Karajan Code CLI and @karajan/hu-board . Private workspace package — not published to npm. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/core/README.md`
- **Karajan HU Board** (project_doc): A web dashboard that visualizes all HU User Story stories managed by Karajan Code. Reads from ~/.karajan/hu-stories/ and ~/.karajan/sessions/ , groups by project, and provides a read-only kanban board with quality metrics and session timelines. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/hu-board/README.md`
- **karajan-code Python wrapper** (project_doc): Python wrapper for Karajan Code https://karajancode.com -- local multi-agent coding orchestrator. This package is not a reimplementation; it locates and delegates to the real Karajan Code binary. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `wrappers/python/README.md`
- **KJ Default Workflow Codex** (project_doc): Objective Use Karajan Code KJ as the default orchestrator for implementing tasks and fixing bugs. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `AGENTS.md`
- **KJ Default Workflow Claude Code** (project_doc): Objective Use Karajan Code KJ as the default orchestrator for implementing tasks and fixing bugs in this project. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CLAUDE.md`
- **Karajan Code vs AI Frameworks** (project_doc): While Genkit, Mastra, LangChain and Vercel AI SDK call /v1/messages , Karajan orchestrates the AI CLIs your developers already use in their terminals. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/COMPARISON.md`
- **Getting Started with Karajan Code** (project_doc): - Node.js ≥ 22.22 Karajan v3.0.0 dropped Node 20 — see CHANGELOG for migration notes - Git - At least one AI CLI installed: claude , codex , gemini , aider , or opencode - Optional Docker for local SonarQube - RTK + Squeezr token efficiency — kj init installs both automatically. Opt out with --no-rtk / --no-squeezr if you don't want them. - QMD per-project semantic wiki — kj init registers docs/ , .reviews/ and .kar… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/GETTING-STARTED.md`
- **Primeros pasos con Karajan Code** (project_doc): - Node.js ≥ 22.22 Karajan v3.0.0 elimina soporte de Node 20 — ver CHANGELOG para notas de migración - Git - Al menos una CLI de IA instalada: claude , codex , gemini , aider u opencode - Opcional Docker para SonarQube local - RTK + Squeezr eficiencia de tokens — kj init los instala automáticamente. Para no usarlos, --no-rtk / --no-squeezr . - QMD wiki semántica por proyecto — kj init registra docs/ , .reviews/ y .ka… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/es/GETTING-STARTED.md`
- **Contributing** (project_doc): Open an issue with the exact command you ran, the output you got, and the output you expected. Without those three things the bug cannot be reproduced and the issue will be closed. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CONTRIBUTING.md`
- **Karajan Code — Architecture** (project_doc): Karajan is a local multi-agent coding orchestrator . It coordinates a pipeline of AI agents Claude, Codex, Gemini, Aider, OpenCode through specialized roles to plan, implement, test, and review code. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/ARCHITECTURE.md`
- **Karajan cleanup — kj clean** (project_doc): kj clean is a read-only by default garbage collector that surfaces stale state accumulated by Karajan so the user can decide what to drop. It never executes destructive commands on its own — every layer prints a copy-paste command you can run if you want to actually delete. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/CLEANUP.md`
- **Karajan Code - Docker** (project_doc): Run Karajan Code without installing Node.js or npm on your host machine. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/DOCKER.md`
- **Hardening Your Dev Environment Against AI Tools** (project_doc): Hardening Your Dev Environment Against AI Tools Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/HARDENING-AGAINST-AI.md`
- **RAG — Retrieval-Augmented Generation** (project_doc): RAG — Retrieval-Augmented Generation Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/RAG.md`
- **Que es Karajan?** (project_doc): Orquestador local multi-agente. TDD-first, basado en MCP, JavaScript vanilla. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/README.es.md`
- **ai-trash — Fase 1 KJC-TSK-0386** (project_doc): Stack Node 22 ESM compilado a Single Executable App node --experimental-sea-config . Reutiliza release-binaries.yml . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/ai-trash-fase1-report.md`
- **ai-trash — Fase 2 plan KJC-TSK-0387** (project_doc): ai-trash — Fase 2 plan KJC-TSK-0387 Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/ai-trash-fase2-plan.md`
- **Audit false positives — verified non-removable dependencies** (project_doc): Audit false positives — verified non-removable dependencies Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/audit-false-positives.md`
- **Brain decisor** (project_doc): Karajan's Brain is now the pipeline's decisor: it reads the triage output plus the task text, classifies intent, and decides which roles should run for the current task. The existing flag-based stage execution continues to drive runFlow — Brain just tells it which flags should be on. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/brain-decisor.md`
- **Custom Roles & Agents** (project_doc): How to customize and extend Karajan Code with your own roles and agents. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/custom-roles.md`
- **Design decisions — things Karajan deliberately does NOT do** (project_doc): Design decisions — things Karajan deliberately does NOT do Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/design-decisions.md`
- **Karajan Code — Plan de testing por niveles dogfooding** (project_doc): Karajan Code — Plan de testing por niveles dogfooding Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/dogfooding-levels.md`
- **Golden tasks regression suite** (project_doc): Status : Active introduced in v2.12.0 — KJC-TSK-0374 Implementation : src/golden/{schema,loader,asserter,runner}.js · fixtures in tests/golden/tasks/ · baseline in tests/golden/baseline.json Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/golden-tasks.md`
- **Instalar Karajan con 2 Instancias personal y profesional** (project_doc): Instalar Karajan con 2 Instancias personal y profesional Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/install-two-instances.md`
- **Loop engineering** (project_doc): "Loop engineering is replacing yourself as the person who prompts the agent. You design the system that does it instead." Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/loop-engineering.md`
- **Karajan Multi-Instancia Guia Paso a Paso** (project_doc): Karajan Multi-Instancia Guia Paso a Paso Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/multi-instance.md`
- **Parallel HU execution worktree lanes** (project_doc): Parallel HU execution worktree lanes Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/parallel-hus.md`
- **Phase 1 — Cache propio: análisis técnico** (project_doc): Phase 1 — Cache propio: análisis técnico Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/phase-1-cache-propio.md`
- **Plan adherence metric** (project_doc): Status : Active introduced in v2.12.0 — KJC-TSK-0376 Implementation : src/audit/plan-adherence.js · integration in src/orchestrator/drivers/post-loop.js · rendering in src/session/journal/summary-writer.js Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/plan-adherence.md`
- **Extra providers via OpenCode Kimi, DeepSeek, local models…** (project_doc): Extra providers via OpenCode Kimi, DeepSeek, local models… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/providers-via-opencode.md`
- **Simulating provider quota exhaustion KJ SIMULATE QUOTA** (project_doc): Simulating provider quota exhaustion KJ SIMULATE QUOTA Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/quota-simulation.md`
- **OpenSkills integration** (project_doc): Karajan auto-injects domain-specific skills into role prompts so each AI agent has the right context for the task at hand. This page documents how detection works, how skills are routed to roles, how the cache behaves, and how to customize the behavior. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/skills.md`
- **Spec Reviewer** (project_doc): The spec-reviewer runs BEFORE every other role in the Karajan pipeline. It audits whatever the user passed to kj run or kj plan — a prompt string, the contents of --task-file foo.md , a piped spec — and surfaces deficiencies that would otherwise cause the pipeline to spend tokens on the wrong work. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/spec-reviewer.md`
- **Troubleshooting Guide** (project_doc): Common issues and solutions when using Karajan Code. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/troubleshooting.md`
- **Version Update Checklist** (project_doc): Checklist of files and locations to review and update when releasing a new version of Karajan Code. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/version-update-checklist.md`
- **Por qué JavaScript vanilla: la versión larga** (project_doc): Por qué JavaScript vanilla: la versión larga Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/why-vanilla-js.md`
- **ADR-001: Role-Based AI Architecture** (project_doc): ADR-001: Role-Based AI Architecture Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/adr/001-role-based-ai-architecture.md`
- **ADR: MCP Progress Notifications** (project_doc): Karajan Code runs long-running tool calls kj run, kj code, kj review, kj plan that can take several minutes. During this time, the MCP host Claude Code, Codex CLI shows no feedback to the user unless the server actively sends progress updates. This ADR documents the available mechanisms, what the codebase already implements, and what hosts actually display. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/adr/mcp-progress-notifications.md`
- **SKILL: kj audit** (project_doc): Read-only analysis of a codebase. Surfaces god-functions, missing imports the bug class that took down a real demo on 2026-04-27 , oversized modules, structure smells, and planned, see issue 542 agent-readiness. Does NOT modify any file in the audited repo. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/SKILL.kj-audit.md`
- **SKILL: kj board** (project_doc): Manages the HU Board — a local web dashboard Express + SQLite that visualises plans, HU statuses, sessions and the run timeline. It auto-starts when kj plan produces a batch and can be used standalone. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/SKILL.kj-board.md`
- **SKILL: kj clean** (project_doc): Garbage-collects stale plans, sessions, HU batches and audit/review outputs under ~/.karajan/ . Honors per-category retention windows configured in ~/.karajan/kj.config.yml . Defaults are conservative 7 days for sessions, 30 days for plans . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/SKILL.kj-clean.md`
- **SKILL: kj doctor** (project_doc): Runs a battery of environment checks Node version, AI CLIs detected, ports free, SonarQube reachable, RTK installed, MCP servers healthy, config file shape, secrets/tokens and auto-remediates what it safely can: starting Docker SonarQube containers, creating missing ~/.karajan/ directories, installing optional skill catalogs, etc. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/SKILL.kj-doctor.md`
- **SKILL: kj init** (project_doc): One-time bootstrap for a project that wants to use Karajan: writes ~/.karajan/kj.config.yml global config , seeds /.karajan/ with role rule templates coder-rules, review-rules , brings up SonarQube via Docker and auto-generates the analysis token via the Sonar REST API , and walks the user through a wizard that covers all the meaningful runtime knobs: Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/SKILL.kj-init.md`
- **SKILL: kj plan** (project_doc): Manages plans — versioned JSON files that decompose a task into HUs atomic user stories with dependencies and acceptance tests. Plans live under ~/.kj/plans/ /plan- .json . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/SKILL.kj-plan.md`
- **SKILL: kj resume** (project_doc): Resumes a paused, stopped or failed Karajan session by id. Sessions are persisted under ~/.karajan/sessions/ / ; each one carries a config snapshot so resumption preserves the original flags --no-sonar , --coder , etc. — no need to remember what the original kj run command looked like. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/SKILL.kj-resume.md`
- **SKILL: kj review** (project_doc): Runs the reviewer role only against the current diff uncommitted changes by default; against a base ref if requested . Useful for \"second-opinion\" passes when you wrote code by hand and want Karajan's reviewer to weigh in without going through the full coder/iterate cycle. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/SKILL.kj-review.md`
- **SKILL: kj run** (project_doc): Executes the full Karajan pipeline against a task: triage → researcher → architect → coder → reviewer → tester → SonarQube quality gate. Either against a one-shot task description or against a pre-generated plan multiple HUs . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/agents/SKILL.kj-run.md`
- **Karajan v2: Native API Proxy — Implementation Plan** (project_doc): Karajan v2: Native API Proxy — Implementation Plan Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/archive/v2-proxy-plan.md`
- **Karajan Code v2 — Proxy Layer Release Notes** (project_doc): Karajan Code v2 — Proxy Layer Release Notes Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/archive/v2-release-notes.md`
- **Karajan Code — Arquitectura** (project_doc): Karajan es un orquestador local multi-agente de código . Coordina un pipeline de agentes IA Claude, Codex, Gemini, Aider, OpenCode a través de roles especializados para planificar, implementar, testear y revisar código. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/es/ARCHITECTURE.md`
- **Karajan Code - Docker** (project_doc): Ejecuta Karajan Code sin instalar Node.js ni npm en tu maquina. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/es/DOCKER.md`
- **RAG — Retrieval-Augmented Generation** (project_doc): RAG — Retrieval-Augmented Generation Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/es/RAG.md`
- **Karajan Code — Skills** (project_doc): Los skills son cápsulas de conocimiento que los agentes cargan para mejorar sus capacidades. Se instalan globalmente vía OpenSkills https://github.com/openskills-project . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/es/SKILLS.md`
- **Autonomous Delivery — de spec a software funcionando, sin intervención humana** (project_doc): Autonomous Delivery — de spec a software funcionando, sin intervención humana Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/specs/autonomous-delivery.md`
- **kj start — entrada del squad autónomo análisis técnico** (project_doc): kj start — entrada del squad autónomo análisis técnico Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/specs/kj-start.md`
- **Quality Harness — kj harden + kj check análisis técnico** (project_doc): Quality Harness — kj harden + kj check análisis técnico Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/specs/quality-harness.md`
- **Spike: Rediseño de kj doctor — separar sistema vs proyecto** (project_doc): Spike: Rediseño de kj doctor — separar sistema vs proyecto Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/spikes/kj-doctor-redesign.md`
- **Template — kj architect** (project_doc): Tienes una feature que requiere decisiones arquitectónicas antes de codear: estructura de capas, contratos entre módulos, patterns, schema de DB, integración con sistemas existentes. El architect devuelve un diseño con ADRs ligeros. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/task-templates/architect.md`
- **Template — kj discover** (project_doc): Tienes una tarea/feature en la cabeza pero no estás seguro de si está bien definida . El discover detecta: Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/task-templates/discover.md`
- **Template — kj plan generate** (project_doc): 📘 Antes de leer esta plantilla , lee spec-conventions.md spec-conventions.md . Cubre las 6 convenciones clave que el planner v2.14.1+ entiende EPICA prefix, scope exclusions, deps transversales, reuse, async observers, deps explícitas y los antipatrones detectados en dogfooding. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/task-templates/plan-generate.md`
- **Template — kj refactorer** (project_doc): Tienes código que funciona pero está mal estructurado y quieres mejorarlo sin cambiar el comportamiento externo. El refactorer: Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/task-templates/refactorer.md`
- **Template — kj researcher** (project_doc): Necesitas que Karajan explore el codebase local antes de codear o de planificar. El researcher devuelve un JSON con: Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/task-templates/researcher.md`
- **Template — kj run** (project_doc): Tienes una tarea concreta un bug fix, una mejora pequeña, una HU suelta que el coder puede atacar directamente. No uses esto para features grandes que necesitan descomposición — para eso usa kj plan generate y luego kj run --plan . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/task-templates/run.md`
- **SPEC conventions for Karajan task files** (project_doc): SPEC conventions for Karajan task files Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/task-templates/spec-conventions.md`
- **Karajan Code — Test Suite Overview** (project_doc): Snapshot as of v2.10.0 : 4 358 tests across 373 files +53 in the agent-readiness cycle . All green on Node 20.x and 22.x. CI matrix dropped Node 18 in v2.8.0 engines.node bumped to =20.10.0; Node 18 LTS hit EOL on 2025-04-30 — see .github/workflows/ci.yml . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/TESTS.md`

## Evidence Index

- Indexed 80 evidence entries.

- **Karajan Code — Agent-Facing Index** (documentation): This directory is the AI-agent entry point for the Karajan Code repository. Humans look at the top-level README.md ../../README.md . Agents Cursor, Cline, Aider, generic Claude / Codex sessions come here. Evidence: `docs/agents/README.md`
- **Karajan Code — Demo recordings** (documentation): Scripts for recording reproducible asciinema demos of Karajan Code, plus the published .cast files when available. Evidence: `docs/demos/README.md`
- **Task file templates** (documentation): Plantillas y guía para los .md que pasas a los comandos de Karajan via --task-file . Sin estas, escribir un task file requiere ensayo y error caro cada kj plan generate cuesta $0.30–0.80 en LLM y 2–5 minutos . Evidence: `docs/task-templates/README.md`
- **What is Karajan?** (documentation): Local multi-agent coding orchestrator. TDD-first, MCP-based, vanilla JavaScript. Evidence: `README.md`
- **Karajan Code Examples** (documentation): express-notes-api ./express-notes-api/ Evidence: `examples/README.md`
- **DNI Validator — Generated by Karajan Code** (documentation): DNI Validator — Generated by Karajan Code Evidence: `examples/dni-validator/README.md`
- **Express Notes API — Generated by Karajan Code** (documentation): Express Notes API — Generated by Karajan Code Evidence: `examples/express-notes-api/README.md`
- **@karajan/ai-trash** (documentation): AI-proof trash: intercept destructive operations from an AI-driven shell rm -rf , truncation via , mv overwriting, destructive git ops, … and snapshot the affected paths to a bin the AI cannot reach before the command runs. Evidence: `packages/ai-trash/README.md`
- **karajan-core** (documentation): Shared modules for the Karajan Code CLI and @karajan/hu-board . Private workspace package — not published to npm. Evidence: `packages/core/README.md`
- **Karajan HU Board** (documentation): A web dashboard that visualizes all HU User Story stories managed by Karajan Code. Reads from ~/.karajan/hu-stories/ and ~/.karajan/sessions/ , groups by project, and provides a read-only kanban board with quality metrics and session timelines. Evidence: `packages/hu-board/README.md`
- **karajan-code Python wrapper** (documentation): Python wrapper for Karajan Code https://karajancode.com -- local multi-agent coding orchestrator. This package is not a reimplementation; it locates and delegates to the real Karajan Code binary. Evidence: `wrappers/python/README.md`
- **Package** (package_manifest): { "name": "karajan-code", "version": "3.15.2", "description": "Local multi-agent coding orchestrator with TDD, SonarQube, and code review pipeline", "type": "module", "license": "AGPL-3.0", "author": "manufosela https://github.com/manufosela ", "homepage": "https://github.com/manufosela/karajan-code readme", "repository": { "type": "git", "url": "git+https://github.com/manufosela/karajan-code.git" }, "bugs": { "url": "https://github.com/manufosela/karajan-code/issues" }, "keywords": "ai", "orchestrator", "code-review", "tdd", "sonarqube", "multi-agent", "mcp", "cli" , "engines": { "node": " =22.12.0" }, "kj": { "harden": { "exclude": "wrappers", "packages" } }, "workspaces": "packages/ai-tr… Evidence: `package.json`
- **Package** (package_manifest): { "name": "kj-demo", "version": "1.0.0", "type": "module", "scripts": { "test": "vitest run" }, "devDependencies": { "vitest": "^4.0.0" } } Evidence: `examples/dni-validator/package.json`
- **Package** (package_manifest): { "name": "kj-demo-notes-api", "version": "1.0.0", "type": "module", "description": "Karajan Code demo — Express REST API built with AI pipeline", "scripts": { "test": "vitest run", "start": "node src/index.js" }, "dependencies": { "express": "^5.1.0" }, "devDependencies": { "vitest": "^4.0.0", "supertest": "^7.1.0" } } Evidence: `examples/express-notes-api/package.json`
- **Package** (package_manifest): { "name": "@karajan/ai-trash", "version": "0.0.0", "description": "AI-proof trash: intercept destructive ops from an AI shell and snapshot them to an unreachable bin before execution", "type": "module", "license": "AGPL-3.0", "author": "Manu Fosela", "homepage": "https://github.com/manufosela/karajan-code/tree/main/packages/ai-trash readme", "repository": { "type": "git", "url": "git+https://github.com/manufosela/karajan-code.git", "directory": "packages/ai-trash" }, "bugs": { "url": "https://github.com/manufosela/karajan-code/issues" }, "keywords": "ai", "trash", "undo", "snapshot", "safety", "claude-code", "cursor", "aider" , "engines": { "node": " =22.12.0" }, "bin": { "kj-trash": "bin/k… Evidence: `packages/ai-trash/package.json`
- **Package** (package_manifest): { "name": "karajan-core", "version": "1.3.1", "description": "Shared modules for Karajan Code CLI and @karajan/hu-board atomic-write, paths, RAG store, plan ops, process runner .", "type": "module", "license": "AGPL-3.0", "author": "manufosela", "repository": { "type": "git", "url": "git+https://github.com/manufosela/karajan-code.git", "directory": "packages/core" }, "files": "src/" , "engines": { "node": " =22.12.0" }, "exports": { "./atomic-write": "./src/atomic-write.js", "./db": "./src/db.js", "./worktree": "./src/worktree.js", "./slot-registry": "./src/slot-registry.js", "./rag/ ": "./src/rag/ .js", "./shared-paths": "./src/shared-paths.js", "./port-check": "./src/port-check.js", "./pa… Evidence: `packages/core/package.json`
- **Package** (package_manifest): { "name": "@karajan/hu-board", "version": "1.0.0", "description": "HU Story Board dashboard for Karajan Code", "type": "module", "private": true, "engines": { "node": " =22.12.0" }, "scripts": { "start": "node src/server.js", "dev": "node --watch src/server.js", "test": "vitest run" }, "dependencies": { "karajan-core": " ", "better-sqlite3": "^12.10.0", "chokidar": "^5.0.0", "express": "^5.1.0", "express-rate-limit": "^8.5.0", "helmet": "^8.1.0", "js-yaml": "^4.2.0" }, "devDependencies": { "supertest": "^7.1.0", "vitest": "^4.0.0" } } Evidence: `packages/hu-board/package.json`
- **KJ Default Workflow Codex** (documentation): Objective Use Karajan Code KJ as the default orchestrator for implementing tasks and fixing bugs. Evidence: `AGENTS.md`
- **KJ Default Workflow Claude Code** (documentation): Objective Use Karajan Code KJ as the default orchestrator for implementing tasks and fixing bugs in this project. Evidence: `CLAUDE.md`
- **Karajan Code vs AI Frameworks** (documentation): While Genkit, Mastra, LangChain and Vercel AI SDK call /v1/messages , Karajan orchestrates the AI CLIs your developers already use in their terminals. Evidence: `docs/COMPARISON.md`
- **Getting Started with Karajan Code** (documentation): - Node.js ≥ 22.22 Karajan v3.0.0 dropped Node 20 — see CHANGELOG for migration notes - Git - At least one AI CLI installed: claude , codex , gemini , aider , or opencode - Optional Docker for local SonarQube - RTK + Squeezr token efficiency — kj init installs both automatically. Opt out with --no-rtk / --no-squeezr if you don't want them. - QMD per-project semantic wiki — kj init registers docs/ , .reviews/ and .karajan/plans/ as searchable collections, and kj qmd query "..." runs against the active project. The RAG index serves the agent ; QMD serves you . Opt out with --no-qmd . Evidence: `docs/GETTING-STARTED.md`
- **Primeros pasos con Karajan Code** (documentation): - Node.js ≥ 22.22 Karajan v3.0.0 elimina soporte de Node 20 — ver CHANGELOG para notas de migración - Git - Al menos una CLI de IA instalada: claude , codex , gemini , aider u opencode - Opcional Docker para SonarQube local - RTK + Squeezr eficiencia de tokens — kj init los instala automáticamente. Para no usarlos, --no-rtk / --no-squeezr . - QMD wiki semántica por proyecto — kj init registra docs/ , .reviews/ y .karajan/plans/ como colecciones indexadas, y kj qmd query "..." consulta contra el proyecto activo. El índice RAG sirve al agente ; QMD te sirve a ti . Para no usarlo, --no-qmd . Evidence: `docs/es/GETTING-STARTED.md`
- **Contributing** (documentation): Open an issue with the exact command you ran, the output you got, and the output you expected. Without those three things the bug cannot be reproduced and the issue will be closed. Evidence: `CONTRIBUTING.md`
- **License** (source_file): GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Evidence: `LICENSE`
- **Karajan Code — Architecture** (documentation): Karajan is a local multi-agent coding orchestrator . It coordinates a pipeline of AI agents Claude, Codex, Gemini, Aider, OpenCode through specialized roles to plan, implement, test, and review code. Evidence: `docs/ARCHITECTURE.md`
- **Karajan cleanup — kj clean** (documentation): kj clean is a read-only by default garbage collector that surfaces stale state accumulated by Karajan so the user can decide what to drop. It never executes destructive commands on its own — every layer prints a copy-paste command you can run if you want to actually delete. Evidence: `docs/CLEANUP.md`
- **Karajan Code - Docker** (documentation): Run Karajan Code without installing Node.js or npm on your host machine. Evidence: `docs/DOCKER.md`
- **Hardening Your Dev Environment Against AI Tools** (documentation): Hardening Your Dev Environment Against AI Tools Evidence: `docs/HARDENING-AGAINST-AI.md`
- **RAG — Retrieval-Augmented Generation** (documentation): RAG — Retrieval-Augmented Generation Evidence: `docs/RAG.md`
- **Que es Karajan?** (documentation): Orquestador local multi-agente. TDD-first, basado en MCP, JavaScript vanilla. Evidence: `docs/README.es.md`
- **ai-trash — Fase 1 KJC-TSK-0386** (documentation): Stack Node 22 ESM compilado a Single Executable App node --experimental-sea-config . Reutiliza release-binaries.yml . Evidence: `docs/ai-trash-fase1-report.md`
- **ai-trash — Fase 2 plan KJC-TSK-0387** (documentation): ai-trash — Fase 2 plan KJC-TSK-0387 Evidence: `docs/ai-trash-fase2-plan.md`
- **Audit false positives — verified non-removable dependencies** (documentation): Audit false positives — verified non-removable dependencies Evidence: `docs/audit-false-positives.md`
- **Brain decisor** (documentation): Karajan's Brain is now the pipeline's decisor: it reads the triage output plus the task text, classifies intent, and decides which roles should run for the current task. The existing flag-based stage execution continues to drive runFlow — Brain just tells it which flags should be on. Evidence: `docs/brain-decisor.md`
- **Custom Roles & Agents** (documentation): How to customize and extend Karajan Code with your own roles and agents. Evidence: `docs/custom-roles.md`
- **Design decisions — things Karajan deliberately does NOT do** (documentation): Design decisions — things Karajan deliberately does NOT do Evidence: `docs/design-decisions.md`
- **Karajan Code — Plan de testing por niveles dogfooding** (documentation): Karajan Code — Plan de testing por niveles dogfooding Evidence: `docs/dogfooding-levels.md`
- **Golden tasks regression suite** (documentation): Status : Active introduced in v2.12.0 — KJC-TSK-0374 Implementation : src/golden/{schema,loader,asserter,runner}.js · fixtures in tests/golden/tasks/ · baseline in tests/golden/baseline.json Evidence: `docs/golden-tasks.md`
- **Instalar Karajan con 2 Instancias personal y profesional** (documentation): Instalar Karajan con 2 Instancias personal y profesional Evidence: `docs/install-two-instances.md`
- **Loop engineering** (documentation): "Loop engineering is replacing yourself as the person who prompts the agent. You design the system that does it instead." Evidence: `docs/loop-engineering.md`
- **Karajan Multi-Instancia Guia Paso a Paso** (documentation): Karajan Multi-Instancia Guia Paso a Paso Evidence: `docs/multi-instance.md`
- **Parallel HU execution worktree lanes** (documentation): Parallel HU execution worktree lanes Evidence: `docs/parallel-hus.md`
- **Phase 1 — Cache propio: análisis técnico** (documentation): Phase 1 — Cache propio: análisis técnico Evidence: `docs/phase-1-cache-propio.md`
- **Plan adherence metric** (documentation): Status : Active introduced in v2.12.0 — KJC-TSK-0376 Implementation : src/audit/plan-adherence.js · integration in src/orchestrator/drivers/post-loop.js · rendering in src/session/journal/summary-writer.js Evidence: `docs/plan-adherence.md`
- **Extra providers via OpenCode Kimi, DeepSeek, local models…** (documentation): Extra providers via OpenCode Kimi, DeepSeek, local models… Evidence: `docs/providers-via-opencode.md`
- **Simulating provider quota exhaustion KJ SIMULATE QUOTA** (documentation): Simulating provider quota exhaustion KJ SIMULATE QUOTA Evidence: `docs/quota-simulation.md`
- **OpenSkills integration** (documentation): Karajan auto-injects domain-specific skills into role prompts so each AI agent has the right context for the task at hand. This page documents how detection works, how skills are routed to roles, how the cache behaves, and how to customize the behavior. Evidence: `docs/skills.md`
- **Spec Reviewer** (documentation): The spec-reviewer runs BEFORE every other role in the Karajan pipeline. It audits whatever the user passed to kj run or kj plan — a prompt string, the contents of --task-file foo.md , a piped spec — and surfaces deficiencies that would otherwise cause the pipeline to spend tokens on the wrong work. Evidence: `docs/spec-reviewer.md`
- **Troubleshooting Guide** (documentation): Common issues and solutions when using Karajan Code. Evidence: `docs/troubleshooting.md`
- **Version Update Checklist** (documentation): Checklist of files and locations to review and update when releasing a new version of Karajan Code. Evidence: `docs/version-update-checklist.md`
- **Por qué JavaScript vanilla: la versión larga** (documentation): Por qué JavaScript vanilla: la versión larga Evidence: `docs/why-vanilla-js.md`
- **ADR-001: Role-Based AI Architecture** (documentation): ADR-001: Role-Based AI Architecture Evidence: `docs/adr/001-role-based-ai-architecture.md`
- **ADR: MCP Progress Notifications** (documentation): Karajan Code runs long-running tool calls kj run, kj code, kj review, kj plan that can take several minutes. During this time, the MCP host Claude Code, Codex CLI shows no feedback to the user unless the server actively sends progress updates. This ADR documents the available mechanisms, what the codebase already implements, and what hosts actually display. Evidence: `docs/adr/mcp-progress-notifications.md`
- **SKILL: kj audit** (documentation): Read-only analysis of a codebase. Surfaces god-functions, missing imports the bug class that took down a real demo on 2026-04-27 , oversized modules, structure smells, and planned, see issue 542 agent-readiness. Does NOT modify any file in the audited repo. Evidence: `docs/agents/SKILL.kj-audit.md`
- **SKILL: kj board** (documentation): Manages the HU Board — a local web dashboard Express + SQLite that visualises plans, HU statuses, sessions and the run timeline. It auto-starts when kj plan produces a batch and can be used standalone. Evidence: `docs/agents/SKILL.kj-board.md`
- **SKILL: kj clean** (documentation): Garbage-collects stale plans, sessions, HU batches and audit/review outputs under ~/.karajan/ . Honors per-category retention windows configured in ~/.karajan/kj.config.yml . Defaults are conservative 7 days for sessions, 30 days for plans . Evidence: `docs/agents/SKILL.kj-clean.md`
- **SKILL: kj doctor** (documentation): Runs a battery of environment checks Node version, AI CLIs detected, ports free, SonarQube reachable, RTK installed, MCP servers healthy, config file shape, secrets/tokens and auto-remediates what it safely can: starting Docker SonarQube containers, creating missing ~/.karajan/ directories, installing optional skill catalogs, etc. Evidence: `docs/agents/SKILL.kj-doctor.md`
- **SKILL: kj init** (documentation): One-time bootstrap for a project that wants to use Karajan: writes ~/.karajan/kj.config.yml global config , seeds /.karajan/ with role rule templates coder-rules, review-rules , brings up SonarQube via Docker and auto-generates the analysis token via the Sonar REST API , and walks the user through a wizard that covers all the meaningful runtime knobs: Evidence: `docs/agents/SKILL.kj-init.md`
- **SKILL: kj plan** (documentation): Manages plans — versioned JSON files that decompose a task into HUs atomic user stories with dependencies and acceptance tests. Plans live under ~/.kj/plans/ /plan- .json . Evidence: `docs/agents/SKILL.kj-plan.md`
- **SKILL: kj resume** (documentation): Resumes a paused, stopped or failed Karajan session by id. Sessions are persisted under ~/.karajan/sessions/ / ; each one carries a config snapshot so resumption preserves the original flags --no-sonar , --coder , etc. — no need to remember what the original kj run command looked like. Evidence: `docs/agents/SKILL.kj-resume.md`
- The remaining 20 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `docs/agents/README.md`, `docs/demos/README.md`, `docs/task-templates/README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `docs/agents/README.md`, `docs/demos/README.md`, `docs/task-templates/README.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Introduction and Quick Start**: importance `high`
  - source_paths: README.md, bin/kj.js, bin/karajan-mcp.js, bin/kj-tail, docs/GETTING-STARTED.md
- **Pipeline Architecture, Roles, and Agent Orchestration**: importance `high`
  - source_paths: src/orchestrator.js, src/orchestrator/drivers/iteration-loop.js, src/orchestrator/drivers/pre-loop.js, src/orchestrator/stages/stage-classes.js, src/roles/index.js
- **Core Capabilities: Plans, HUs, Parallel Lanes, Step Mode, RAG and the HU Board**: importance `high`
  - source_paths: src/orchestrator/parallel-limiter.js, src/orchestrator/hu-scheduler.js, src/orchestrator/iteration-gate.js, src/hu/parallel-executor.js, src/hu/worktree-bootstrap.js
- **Installation, Hardening, and Common Failure Modes**: importance `high`
  - source_paths: scripts/install-binary.sh, scripts/install-binary.ps1, scripts/install-kj.sh, scripts/postinstall.js, scripts/build-sea.mjs

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `2edaee8e546d1877c3cdbb7d30cdf5f31f5e80c8`
- inspected_files: `Dockerfile`, `README.md`, `docker-compose.yml`, `package.json`, `docs/ARCHITECTURE.md`, `docs/CLEANUP.md`, `docs/COMPARISON.md`, `docs/DOCKER.md`, `docs/GETTING-STARTED.md`, `docs/HARDENING-AGAINST-AI.md`, `docs/RAG.md`, `docs/README.es.md`, `docs/TESTS.md`, `docs/adr/001-role-based-ai-architecture.md`, `docs/adr/mcp-progress-notifications.md`, `docs/agents/README.md`, `docs/agents/SKILL.kj-audit.md`, `docs/agents/SKILL.kj-board.md`, `docs/agents/SKILL.kj-clean.md`, `docs/agents/SKILL.kj-doctor.md`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: [nightly-drift] Drift detected by nightly CI
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: [nightly-drift] Drift detected by nightly CI. Context: Observed when using node, windows
- Why it matters: Developers may fail before the first successful local run: [nightly-drift] Drift detected by nightly CI
- Evidence: failure_mode_cluster:github_issue | https://github.com/manufosela/karajan-code/issues/994
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v3.12.2
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v3.12.2. Context: Observed when using node
- Why it matters: Upgrade or migration may change expected behavior: v3.12.2
- Evidence: failure_mode_cluster:github_release | https://github.com/manufosela/karajan-code/releases/tag/v3.12.2
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v3.12.3
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v3.12.3. Context: Observed when using node, python
- Why it matters: Upgrade or migration may change expected behavior: v3.12.3
- Evidence: failure_mode_cluster:github_release | https://github.com/manufosela/karajan-code/releases/tag/v3.12.3
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v3.13.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v3.13.0. Context: Observed when using node
- Why it matters: Upgrade or migration may change expected behavior: v3.13.0
- Evidence: failure_mode_cluster:github_release | https://github.com/manufosela/karajan-code/releases/tag/v3.13.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v3.14.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v3.14.0. Context: Observed when using python
- Why it matters: Upgrade or migration may change expected behavior: v3.14.0
- Evidence: failure_mode_cluster:github_release | https://github.com/manufosela/karajan-code/releases/tag/v3.14.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 6: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v3.15.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v3.15.0. Context: Observed when using node, docker
- Why it matters: Upgrade or migration may change expected behavior: v3.15.0
- Evidence: failure_mode_cluster:github_release | https://github.com/manufosela/karajan-code/releases/tag/v3.15.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 7: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v3.15.1
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v3.15.1. Context: Observed when using node
- Why it matters: Upgrade or migration may change expected behavior: v3.15.1
- Evidence: failure_mode_cluster:github_release | https://github.com/manufosela/karajan-code/releases/tag/v3.15.1
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 8: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v3.15.2
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v3.15.2. Context: Observed when using node
- Why it matters: Upgrade or migration may change expected behavior: v3.15.2
- Evidence: failure_mode_cluster:github_release | https://github.com/manufosela/karajan-code/releases/tag/v3.15.2
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 9: Configuration risk requires verification

- Trigger: Developers should check this configuration risk before relying on the project: v3.14.1
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v3.14.1. Context: Observed when using python
- Why it matters: Upgrade or migration may change expected behavior: v3.14.1
- Evidence: failure_mode_cluster:github_release | https://github.com/manufosela/karajan-code/releases/tag/v3.14.1
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
