Documentation / junjirefine
Split the plan into phases you can implement and verify one at a time. Junji writes them as ordered cards on the board.
When to use it
Run it after plan, once the behaviour and the checks are clear. Run it again while phases remain to split, merge or reorder unfinished work. After every phase is done, use iterate instead.
How it works
- Junji reads
PLAN.mdandCONTEXT.mdand breaks the work into phases that each make sense and can be verified alone, dependencies first. - Each phase becomes a card in
.koi/run/BOARD.jsonwith anid(P0,P1, ...), atitle,"status": "todo"and adescriptionholding the goal, the source files anddepends_onwhere it is not obvious. - Irreversible, destructive or human-decision phases get
"gated": true. - It sets
nextActionto/junji next.
When reshaping, completed cards and your edits are preserved, and existing IDs are not renumbered silently, because Yokai's per-card settings refer to them.
Example
/junji refine
For the export fix you might get: P0, a failing test with 250 orders; P1, follow the pagination cursor; P2, gated, switch the production export job to the new code.
Open BOARD.json and read the first card. It should say what the phase delivers and how to check it.
What can go wrong
- A phase is too large to verify alone. Ask Junji to split it.
- A dangerous step is not gated. Ask for
"gated": trueon it. Importing or refining a plan never approves gated work. - Everything is already done.
refinepoints you toiterate.