# Init Flow `baku init` establishes the owner-local runtime needed for recall. It binds the active project, reconciles lexical derived state, and records either a healthy keyword-only choice or an exact pinned-semantic choice. It does not configure optional remote consolidation, edit repository files, or change agent settings. The user-facing command catalog and availability guidance live in [README](../README.md). ## Phases Init follows one strict sequence: ```text Resolve -> Plan -> Review -> Apply -> Verify ``` ### Resolve Resolve validates the one effective config source, owner-XDG/private storage roots, current project identity and binding state, canonical corpus, database descriptor, model readiness, and incomplete operation inventory. It performs no write, download, schema bootstrap, index, or network request. ### Plan Plan produces a bounded immutable action list. It chooses only work required to reach the reviewed state: project binding, private directory creation, current PGlite baseline bootstrap when missing, complete lexical reconciliation, and either keyword-only or pinned-semantic activation. Keyword-only is a healthy explicit choice and requires no model access. A semantic plan contains the exact Transformers/runtime/model revision, quantization, artifact sizes and digests, approved transport hosts, storage floor, embedding contract, and current corpus/coverage postconditions. ### Review Review is effect-free. Interactive review displays the exact plan before any mutation. Model download consent is separate, digest-bound, and authorizes only the disclosed artifact acquisition; it never authorizes memory or query egress. In non-interactive mode init never prompts. It returns a stable result and next action when review or consent is required. ### Apply Apply reserves one private operation bundle and advances a monotonic per-effect journal. Each step validates its current precondition and records the exact postcondition needed for safe replay. Private directories and authoritative files are created with restrictive modes and atomic primitives. Canonical Markdown is never regenerated from the DB. Lexical reconciliation starts from the complete scanner manifest. Semantic activation occurs only after exact artifact qualification and only commits config after the complete eligible corpus has the pinned embedding-space coverage. An interrupted apply is recoverable. Re-running the same reviewed plan returns already-applied only when current postconditions still match; divergence is a stale/CAS conflict rather than an overwrite. ### Verify Verify rereads implemented state without repairing it. It checks the owner binding, private roots, current database baseline, complete lexical manifest, selected recall mode, and any incomplete operation/index recovery requirement. It does not download, index, bind, bootstrap, or call a remote provider. ## Health and Recovery `baku health` is the read-only inspection surface. Healthy keyword-only recall does not require a model or optional remote-consolidation configuration. Incomplete init/apply/undo work is reported with a stable recovery action. If canonical mutation succeeds but derived indexing fails, canonical Markdown remains authoritative and the operation is `index-pending`. Run the prescribed index/recovery action; do not restore the database as if it were fact authority. Optional remote consolidation is configured separately in owner-XDG config and authorized per attempt. It is not an init phase and its absence never degrades local recall.