koi
Documentation / koi

How Koi works

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.

You plan, Koi runs

Say you ask an agent to migrate an API route. Without Koi, you sit beside the chat. The agent finishes a step, you read it, you tell it to go on. Most of that time is waiting.

With Koi, your time goes into the start. You and the agent agree on what changes and how to prove it works: a plan, a list of phases, and the commands that must pass for each one. Then Koi runs the phases on its own. Each phase reads the repository, does its work, runs the checks and commits. The next phase starts only when the checks pass.

Who does what
  1. You decideThe change, the phases, and the checks that prove each one works.
  2. Koi runsEach phase plans, edits the code, runs the checks and commits. Then the next one starts.
  3. Koi calls youWhen a phase needs your approval, when it cannot go on, or when the delivery is ready to try.

When Koi calls you

Koi sends no notifications. When it needs a person, it stops and shows why:

  • A phase is gated. You marked it as needing your approval, so the run waits for you.
  • A phase cannot pass. The checks stay red, or a cost ceiling is reached. The run halts with the reason on screen: HALT in the Yokai cockpit, or exit code 2 in headless mode.
  • No phase is left. The delivery is ready for you to try. Closing the run with /junji consolidate always needs a person.

In headless mode you can wire exit code 2 to an alert of your own. Run on its own has the recipes.

Why it can run alone

Every phase starts with an empty context window. What it needs is in .koi/run/, committed with your code: the plan, the board, the decisions, and the outcome of each phase. So a run does not depend on one long chat. It can span many sessions, switch agents, or continue on another machine from the same branch. If a run stops halfway, the next launch continues from the card status. See When a run stops.

Two tools, one folder

Junji is a skill for your coding agent. It surveys the repository, plans the change with you, and splits it into phases on the board. /junji next runs one phase while you watch. /junji goal runs the phases one after another, on its own, in your agent's chat. Each phase ends with your project's checks passing and a commit.

Yokai is an optional program that runs those phases in a terminal, on a server or in CI. It reads the same board, drives an agent through each phase, has a second agent turn review the change, and decides whether the phase passed by running reviewed scripts and checking Git. It never takes the agent's word for it.

Start with Junji alone. Add Yokai when you want a judge, recovery and a cost ceiling, or a run that does not need your agent's chat open. You stay in charge of the risky parts: mark a phase as gated and neither tool runs it without your explicit approval.

System overview shows how the parts connect.

Start

  1. Install the Junji skill, and Yokai if you want it.
  2. Follow First run in an existing repository, or the walkthrough to build a small app from an empty one.
  3. Let the rest run on its own.

If you just want to try it, the first-run prompt is a single message you paste into your agent.