First run
Plan a change in an existing repository with Junji, run the first phase, and optionally hand the rest to Yokai.
This page assumes you have installed the Junji skill. Starting from an empty repository? Follow the walkthrough instead.
Plan and run with Junji
Open your coding agent at the repository root and run these verbs in order. They are messages to the agent, not shell commands.
/junji begin
/junji plan Add CSV export to the orders page. Done when a user can download every order, including later pages, and the file opens in a spreadsheet.
/junji refine
/junji next
begincreates.koi/run/and records what it finds: languages, build and test commands, skills. It decides nothing.planasks you questions until the change is pinned down, then writesPLAN.mdand the verification bar inCONTEXT.md: the commands every phase must pass.refinesplits the plan into phases, saved as cards in.koi/run/BOARD.json, and marks irreversible ones as gated.nextruns the first phase: it writes the phase plan, implements it, runs every command in the bar and commits.
Check the result before you continue:
git log -1 --stat
cat .koi/run/BOARD.json
The first card should show "status": "done" with a short outcome, and nextAction should be /junji next. If the first phase looks right, let the rest run on its own with /junji goal. It runs each remaining phase in a fresh subagent and stops at a red check, a gated phase, or the end of the board. You can also keep running /junji next one phase at a time. See Run on its own.
When every phase is done, try the change yourself. To add more work, use /junji iterate <request>. When you accept the result, /junji consolidate writes the final document to your repository and removes .koi/run/.
Hand the remaining phases to Yokai
With Yokai installed and the agent signed in, run this from the same repository:
yokai setup --once
Setup opens a wizard with five steps:
- Configuration. Choose One model or Use tiers, then the agent, the model and the environment (host or sandbox).
- Environment. Yokai checks the host or sandbox. A sandbox that needs a new image waits for you to approve the build.
- Checks. Yokai proposes sensor scripts from your verification bar, or opens existing ones. Read them, then choose Approve and test. It saves the checks only if every one passes.
- Phases. Yokai proposes a model tier and a reason for each unfinished phase. Choose Approve and continue.
- Review and start. Choose Start run. Save and exit keeps the settings without starting a phase.
--once runs a single phase and stops, so you can inspect the first commit. Once you trust it, a bare yokai reuses the saved settings and runs the remaining phases on its own until a gated phase, a halt, or the end of the board. yokai --headless does the same without the cockpit.
yokai # run the remaining phases with saved settings
yokai setup # reopen the wizard
yokai doctor --probe # check tools and the agent's login
The machine running Yokai does not need the Junji skill. Yokai reads the files Junji wrote.
What can go wrong
plankeeps asking questions. That is the point: it stops when no open question could change the implementation. Answer them, or say which ones to defer.- A command in the bar fails during
next. The phase staysbuildingand nothing is committed. Fix the cause in the same chat, or runnextagain. Junji never weakens the bar to pass. - Setup reports a missing check, such as "no test command". Add the real check to the project, often as its own phase with
/junji next, then return to setup. Yokai will not invent a passing script. - Yokai halts at a gated phase. That is the default. Review the phase, then relaunch with
--allow-gatedif you approve it.