Documentation
Koi brings together tools for coding agents. They share context through files in your repository. Start with How Koi works or choose a guide below.
Guides
System overview
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
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/
.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
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
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
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
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
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
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
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
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
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
Start an effort. Junji creates .koi/run/, copies its templates, and records what the repository already has, without deciding anything.
research
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
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
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
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
Split the plan into phases you can implement and verify one at a time. Junji writes them as ordered cards on the board.