koi
Documentation / yokai

Yokai decisions

The architecture decision records behind Yokai and the shared .koi/ convention, with a one-line summary of each and which ones are now only history.

Decisions that change behaviour are recorded as numbered ADRs in the koi repository. Read them when you want to know why Yokai insists on something, such as reviewed sensors or one coder and one judge per Build. Later records amend or replace earlier ones; the table says which.

Framework decisions

These cover the .koi/ convention that Junji and Yokai share. They live in docs/adr/.

ADR Decision
0004 .koi/ is the project home; .koi/run/ is the working folder that consolidate removes
0005 One script per check in .koi/sensors/
0006 METHOD.md and BACKLOG.md file names
0007 Junji and Yokai are set up independently and meet only through repository files
0008 Sensors and phase assessments are reviewed by a human
0009 A saved phase assessment is authoritative
0010 Sensor approval is bound to the execution environment and shared by the wizard and the helper
0011 History: Junji lived in its own repository (replaced by 0014)
0012 A phase assessment is a tier and a reason, nothing else
0013 A run has one plan and one progress file; new runs use BOARD.json and NOTES.md
0014 koi is one repository with one version (its Node board script was replaced by 0015)
0015 The koi CLI installs the skills and Yokai at one version, updates and diagnoses them, and is the board tool Junji and Yokai share

Driver decisions

These live in crates/yokai/docs/adr/.

ADR Decision
0003 Native ACP connector only
0004 Autonomous pacing; human gates now halt by default (amended by ADR-0053)
0005 Split the driver into a workspace; extract tori as the shared port
0006 Tengu: a self-correction harness with an advisory judge
0007 Historical init wizard and begin reconnaissance; ownership and settings amended by ADR-0053
0008 The TUI attributes its stream by act; tachyonfx splash-only
0009 Per-session run records; the sessions view shows every turn
0010 Recovery: an intelligent last look before a halt becomes final (amended by 0044)
0013 Project name: koi
0015 Split setup into koi; yokai is a fail-fast runner
0016 Turn prompts live in harness crates
0017 Amabie is the recovery harness
0019 Deliverable view: read proving commits in the cockpit
0022 Repair restores a clean tree; gate side-effects are not contract dirt
0023 Four pastel hours (superseded by 0052)
0024 Apple Container as a second sandbox backend
0025 Bounded TUI agent-stream memory
0026 Apple sandbox VM memory and CPU sizing
0027 Repo-owned sandbox image
0028 Sandbox Dockerfile scaffold (primary agent path)
0029 Sensors folder: discover, fail-fast, N tengu sensors
0030 Ratatui configuration stepper; ownership amended by ADR-0053
0031 Tengu is the only implementation path
0032 Historical Koi setup ownership; superseded by ADR-0053
0033 ACP-discovered session options (Cursor reasoning/fast); effort is ThoughtLevel alias
0034 Adaptive cockpit FPS + soft agent/sensor timeouts
0035 Reuse green Build sensors at the gate when Seal left the product tree unchanged
0036 Un-mark BACKLOG when the gate is red after Seal (provisional [done])
0037 Cockpit phase rail: plan→coder→sensors→judge→seal→gate
0038 Multi-agent / multi-model role profiles
0039 yokai owns the Build loop and recovery (supersedes 0006, 0016, 0017, 0031)
0040 Backlog act status tags ([todo] [planning] [building] [sealing] [done]; [gated] prefix)
0041 TUI [r] after abort/disconnect; live-session ACP reattach
0042 terminal theme inherits the emulator palette (amends 0023)
0043 Judge (and thin coder/seal) read CONTEXT › Skills
0044 Recovery continue cycle and saves (amends 0010)
0045 History: optional fan-out inside one Build act (amended by 0047, 0048)
0046 History: a Cockpit roster during fan-out
0047 History: a per-phase build strategy
0048 History: fan-out on every Build iteration
0049 Model tiers: candidate lists, turn-open walk, skip rows
0050 Token savings: reusable implementation, review, and seal conversations per phase
0051 Two-session savings, session-aware context bars and recovery bookkeeping
0052 Two pastel hours (yoru / hiru); yoi and asa alias to yoru
0053 Yokai owns onboarding and a reviewed executable gate (replaces 0015 and 0032)
0054 Sensor preparation and phase assessment backed by the helper's policies
0055 Phase choices approved through the helper skill are accepted as is
0056 One terminal wizard owns interactive preparation
0057 Preparation asks for decisions one step at a time
0058 Flow pace is the happy path
0059 yokai setup shares the preparation engine with startup and the cockpit
0060 New and edited assessments need explicit approval
0061 Setup timeline, model style choice and a final review with Start run
0062 Every Build phase is one coder and one judge (replaces 0045 to 0048)
0063 Progress edits follow the run's board format; JSON boards are locked and replaced atomically

Junji's own packaging decisions are in docs/adr/junji/, outside the installed skill.