# Koi > Koi is a family of tools for coding agents. Its tools reuse context saved in the repository’s .koi/ folder. Junji is the planning and execution skill. Yokai is an optional driver for prepared phases. Install Junji with `npx skills add getkoi/koi --skill junji`. Use /junji begin, /junji plan, /junji refine, then /junji next, or /junji goal to run the phases on their own. Read .koi/run/BOARD.json for the next action and NOTES.md for decisions. Run every check in CONTEXT.md and commit verified work. Human-gated actions require explicit authorization. The `koi` CLI installs and updates the Junji skill and Yokai (`koi setup`, `koi update`), checks the install (`koi doctor`), and moves board cards (`koi board status|move`); Junji needs it for board commands. After all phases pass, ask before consolidation removes .koi/run/. ## First phase - [Prompt](https://getkoi.vercel.app/read/en/start.md) - [Repository (Junji, Yokai and this site)](https://github.com/getkoi/koi) ## Documentation - [System overview](https://getkoi.vercel.app/read/en/architecture.md): Koi is a set of tools that keep a long engineering change in the repository instead of in a chat. This page names each part, says what it owns, and shows how the parts meet. - [Work across sessions](https://getkoi.vercel.app/read/en/architecture/sessions.md): Every Koi session starts with an empty context window. It finds the plan, the last result and the next step in .koi/run/, does one unit of work, and writes back what the next session needs. That is what lets a run go on unattended. - [What lives in .koi/](https://getkoi.vercel.app/read/en/architecture/files.md): .koi/ holds settings you reuse from one change to the next. .koi/run/ holds one change in progress and is deleted when you consolidate. This page lists every file, who writes it and when it goes away. - [How Yokai runs a phase](https://getkoi.vercel.app/read/en/architecture/phases.md): Yokai runs every phase in three acts: Plan, Build and Seal. Then it checks four facts on disk before it moves on. This page follows one phase from the board to the commit. - [The Build loop](https://getkoi.vercel.app/read/en/architecture/build-loop.md): Build is where the code gets written. Each iteration is one coder turn, then the sensors, then one judge turn if the sensors are green. It repeats until nothing blocks or the budget runs out. - [Verification on disk](https://getkoi.vercel.app/read/en/architecture/verification.md): An agent can say a phase is finished when it is not. Koi decides with commands that exit 0 or not, a commit that exists or not, and a board card that says done or not. - [Recovery](https://getkoi.vercel.app/read/en/architecture/recovery.md): When a phase misses its contract, Yokai does not stop at once. It repairs bookkeeping, or asks a read-only turn to diagnose the miss and pick the next action. Every path ends with the same contract check. - [Model tiers](https://getkoi.vercel.app/read/en/architecture/models.md): Yokai does not pin one model for the whole run. Each phase gets a capability tier, each tier lists agent and model candidates in order, and each turn takes the first candidate that opens. - [Sandbox mode](https://getkoi.vercel.app/read/en/architecture/sandbox.md): In sandbox mode the host yokai starts a Linux VM and runs a second yokai inside it. The agent and the sensors run in the VM, and your repository is mounted at the same path. - [Cockpit and headless](https://getkoi.vercel.app/read/en/architecture/interfaces.md): The same supervisor runs behind two front ends: a terminal cockpit you can watch and stop, and a plain text stream for CI or scripts. Neither changes what the supervisor does. - [Junji](https://getkoi.vercel.app/read/en/junji.md): Junji is a skill for your coding agent. It plans a change with you, splits it into phases, and runs one phase at a time until its checks pass and it is committed. The plan and progress live in your repository. - [Junji verbs](https://getkoi.vercel.app/read/en/junji/guide.md): Turn a card over for a short summary. Open the guide from the back, or use the link below the card to go straight there. - [begin](https://getkoi.vercel.app/read/en/junji/begin.md): Start an effort. Junji creates .koi/run/, copies its templates, and records what the repository already has, without deciding anything. - [research](https://getkoi.vercel.app/read/en/junji/research.md): Answer a factual question from primary sources before you plan. Junji writes one cited note per question and leaves the plan and the board alone. - [design](https://getkoi.vercel.app/read/en/junji/design.md): Agree on what a person will see and what happens when they act, before any interface code is written. Junji saves it as a binding contract in .koi/run/DESIGN.md. - [plan](https://getkoi.vercel.app/read/en/junji/plan.md): Describe the change and what done looks like. Junji reasons about it, questions you until nothing important is open, and writes the plan and the verification bar. - [grill](https://getkoi.vercel.app/read/en/junji/grill.md): Two people can read one requirement and build different things. grill finds those gaps while the change is still on paper and writes each answer to disk. - [refine](https://getkoi.vercel.app/read/en/junji/refine.md): Split the plan into phases you can implement and verify one at a time. Junji writes them as ordered cards on the board. - [next](https://getkoi.vercel.app/read/en/junji/next.md): One call runs one phase end to end: plan it, implement it, run every check, record the outcome and commit. It never starts the following phase. - [brief](https://getkoi.vercel.app/read/en/junji/brief.md): Get a plain-language summary of what works now, how to try it and what to watch. Junji reads the finished phases and answers in the chat. It writes nothing. - [goal](https://getkoi.vercel.app/read/en/junji/goal.md): Let the phases run on their own in your agent's chat. Your agent runs each phase in a fresh child and stops at the phase you name or at the first problem. - [review](https://getkoi.vercel.app/read/en/junji/review.md): Compare the whole branch with the plan and look for problems the tests missed. Required fixes become ordinary phases for next. - [iterate](https://getkoi.vercel.app/read/en/junji/iterate.md): Trying the finished change sometimes shows one more thing worth doing. iterate adds it to the same run as new, fully planned phases. - [consolidate](https://getkoi.vercel.app/read/en/junji/consolidate.md): Close the run. Junji turns the phase records into one document in your repository's spec folder and removes .koi/run/ in the same commit. - [How Koi works](https://getkoi.vercel.app/read/en/koi.md): You decide what changes and how to prove it works. Koi runs the phases on its own, checks each one, and only calls you in when it needs a decision or when the delivery is ready for you to try. - [Install](https://getkoi.vercel.app/read/en/koi/install.md): For Koi 1.0 alpha. Install the koi CLI with the shell installer, then run koi setup to add the Junji skill to your coding agent and, optionally, yokai. Check with koi doctor; update with koi update. - [First run](https://getkoi.vercel.app/read/en/koi/quickstart.md): Plan a change in an existing repository with Junji, run the first phase, and optionally hand the rest to Yokai. - [Run on its own](https://getkoi.vercel.app/read/en/koi/autonomous.md): Leave the phases running. /junji goal runs them in your agent's chat; yokai --headless runs them in a terminal, on a server or in CI. Either way, Koi stops and shows why when it needs you. - [When a run stops](https://getkoi.vercel.app/read/en/koi/resume.md): A run stops when it needs you, when you stop it, or when the machine does. The state is on disk, so it continues from the last verified phase in any session or agent. - [Walkthrough: a new project](https://getkoi.vercel.app/read/en/koi/greenfield.md): Build a small TypeScript task app from an empty repository. You configure Yokai, plan with Junji, bootstrap real checks in the first phase, let Yokai run the rest, and consolidate. - [Configure the project](https://getkoi.vercel.app/read/en/koi/configuration.md): Decide where each rule lives: in CONTEXT.md for this change, in your repository's agent instructions for every change, or in .koi/yokai.yml for how Yokai runs. - [Command cheatsheet](https://getkoi.vercel.app/read/en/koi/cheatsheet.md): Every koi, Junji and Yokai command on one page, with the file each one reads or writes. - [Glossary](https://getkoi.vercel.app/read/en/koi/glossary.md): The words Junji and Yokai use, what each one means, and the word it is often confused with. - [Setup problems](https://getkoi.vercel.app/read/en/koi/troubleshooting.md): Fix installation, agent login and first-run problems. For failures during a Yokai run, see Run troubleshooting. - [Migrate from the Koi CLI](https://getkoi.vercel.app/read/en/koi/cli.md): The old project-setup koi command is gone; today's koi installs and checks tools. Use Junji for method work and yokai for project setup, and run yokai migrate once to move old settings. - [Yokai](https://getkoi.vercel.app/read/en/yokai.md): Yokai runs the phases Junji prepared, one at a time, through a coding agent. It checks each result on disk and moves on only when the checks pass and the work is committed. - [Prepare a project](https://getkoi.vercel.app/read/en/yokai/preparation.md): yokai setup opens one wizard: choose an agent and model, check the environment, review the sensor scripts and the phase tiers, then start the run or save and exit. - [Agents and models](https://getkoi.vercel.app/read/en/yokai/models.md): Which models to start with, and example tier mappings for Claude Code, Codex, OpenCode and Cursor. Start with one model; add tiers once a phase shows you need them. - [Sensors](https://getkoi.vercel.app/read/en/yokai/sensors.md): A sensor is one shell script that runs one project check. Yokai runs them after every coder turn and after Seal, stops at the first failure, and names the script that failed. - [Run phases](https://getkoi.vercel.app/read/en/yokai/run.md): Start a run with yokai or yokai --once, set limits so it can run unattended, continue after a stop, and read the ledger to see what happened. - [Terminal dashboard](https://getkoi.vercel.app/read/en/yokai/tui.md): The cockpit's layout, its three views, every key, and what the gauge and the phase rail tell you during a run. - [Sandboxes](https://getkoi.vercel.app/read/en/yokai/sandbox.md): Run the agent and your checks in a Linux VM built from a Dockerfile in your repository. Step by step for Docker Sandboxes and Apple Container. - [Configure Yokai](https://getkoi.vercel.app/read/en/yokai/configuration.md): Every Yokai setting: where it lives, what it defaults to, and which value wins when the project file, the effort file and a launch flag disagree. - [Yokai commands](https://getkoi.vercel.app/read/en/yokai/cli.md): Every yokai subcommand and flag, the environment variables it reads, and how each supported agent signs in. - [Run troubleshooting](https://getkoi.vercel.app/read/en/yokai/troubleshooting.md): Look up a message or symptom from a Yokai run and find the cause and the fix: gate and contract misses, Build, recovery, timeouts and sandboxes. - [Driver vocabulary](https://getkoi.vercel.app/read/en/yokai/glossary.md): The terms specific to Yokai: supervisor, connector, turn, session, act, verdict, contract, recovery and the rest, with the words to avoid. - [Yokai decisions](https://getkoi.vercel.app/read/en/yokai/decisions.md): The architecture decision records behind Yokai and the shared .koi/ convention, with a one-line summary of each and which ones are now only history. ## Pricing Koi is free forever: no paid plan, no paywall, no account, MIT licensed. GitHub sponsorship (https://github.com/sponsors/matheusps) is welcome, never required, and unlocks nothing extra. ## Optional - [Full text](https://getkoi.vercel.app/llms-full.txt) - [Português](https://getkoi.vercel.app/llms-pt.txt) - [English](https://getkoi.vercel.app/llms.txt)