Documentation / junjinext
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.
When to use it
Use it after refine, once there are cards on the board and a verification bar in CONTEXT.md. Run it once per phase, in a fresh chat each time if you like. Typing "do the next task" also runs it. To let the remaining phases run on their own, use goal or Yokai.
How it works
- Load state. Junji reads
CONTEXT.md,BOARD.json,NOTES.md,METHOD.mdandDESIGN.mdif present, and picks the phase in progress or the firsttodocard. A gated card stops here and asks you. - Phase research. It reads the source files the phase names.
- Phase plan. It writes
.koi/run/phases/phase-NN-<slug>.mdwith an "Explicitly out" list and numbered steps, and sets the card toplanning. An existing phase file is reused. - Implement. It sets the card to
buildingand changes only what the phase needs. Ideas outside the phase go into the plan as follow-ups. - Verify. It runs every command in the verification bar from its working directory. Every one must exit 0. A failure leaves the card at
building; the bar is never weakened. - Record. It sets
sealing, thendonewith a short outcome, moves facts later phases need intoNOTES.md, adds an Outcome to the phase file and updatesnextAction. - Commit. One conventional commit, honoring standing overrides such as "never push".
--subagent asks your agent for one isolated child to run the phase. The child rereads .koi/run/; your window only posts its report.
Example
/junji next
The report starts with the position: Phase 2 of 4 — Persist tasks, Next action: /junji next, then the result, such as "all four checks pass".
What can go wrong
- A check fails. The phase stays open and nothing is committed. Fix the cause and run
nextagain. - The phase is gated. Approve it in the chat if you mean to. Configuring Yokai does not count.
- Two cards are in flight.
nextasks you to leave only one. - The agent wants to fix something nearby. It should record it as a follow-up, not do it. Point at the "Explicitly out" list.