Initialize and validate Yarli orchestration in a repository. Use when the user asks to set up yarli.toml, bootstrap run/prompt/plan files, configure CLI backend and durability, enable optional Haake memory integration, or verify a new repo can execute `yarli run` safely.
Initialize a repository for reliable Yarli operation.
Produce a working setup with:
yarli.toml generated and tuned for the target CLI backendResolve repository root.
Run pwd and git rev-parse --show-toplevel (if Git exists).
Detect tools. Run:
command -v yarlicommand -v codex || command -v claude || command -v geminicommand -v haake (optional)yarli.tomlPROMPT.mdIMPLEMENTATION_PLAN.mdbin/yarli-sanitize-continuation.shbin/yarli-run-verification.shIf yarli is missing, stop and report prerequisite installation is required.
yarli.tomlcodex exists: use --backend codex.claude exists: use --backend claude.gemini exists: use --backend gemini.yarli init and require manual [cli] configuration.yarli init --backend <codex|claude|gemini> --path yarli.toml --force
Fallback:
yarli init --path yarli.toml --force
core.backend = "postgres"postgres.database_url = "postgres://USER:PASS@HOST:5432/yarli"For temporary local-only testing only:
core.backend = "in-memory"core.allow_in_memory_writes = true[execution].working_dir = "."[execution].runner = "native" (unless user requests overwatch)[ui].mode is set intentionally (auto|stream|tui)yarli.toml to .gitignore unless the repository explicitly treats it as a tracked canonical config.yarl/ to .gitignore.yarli/ to .gitignoreUse this authority model when repository uses the Yarli plan workflow:
yarli.toml controls runtime behavior.PROMPT.md is intent/objective context.IMPLEMENTATION_PLAN.md is tranche scope/state authority.If absent, create minimal bootstraps:
PROMPT.mdIMPLEMENTATION_PLAN.mdIf repository already has canonical equivalents, preserve existing files.
If user requests memory integration and haake is available:
yarli.toml:[memory.haake].enabled = true[memory.haake].command = "haake"[memory.haake].project_dir = "."haake --help
If repository provides helper scripts, wire/validate them:
bin/yarli-sanitize-continuation.sh exists, run it before first run.bin/yarli-run-verification.sh exists, keep or add:[run.paces.verification].cmds = ["./bin/yarli-run-verification.sh"]bin/, preserve wrapper flow as canonical entrypoint.Do not invent scripts that repository does not use.
Run non-destructive checks first:
yarli info
yarli run --help
yarli run list
Run initialization smoke:
yarli run start "yarli bootstrap smoke" --cmd "echo YARLI_INIT_OK"
Then inspect:
yarli run status <run-id>
yarli run explain-exit <run-id>
If repository has verification chain script:
./bin/yarli-run-verification.sh --print-commands
Return:
PROMPT.md intent-only when using plan workflow.yarli.toml, .yarl/, and .yarli/ out of version control unless the repository explicitly requires otherwise.yarli run smoke path.