Launch Loki Mode autonomous SDLC agent. Handles PRD-to-deployment with minimal human intervention. Invoke for multi-phase development tasks, bug fixing campaigns, or full product builds.
loki CLI installed on the host (via npm install -g loki-mode or Homebrew)Use the bash tool with background mode:
bash(command: "loki start <prd-path> --bg --yes --no-dashboard", pty: true, background: true, workdir: "<project-dir>")Key flags:
--bg: Background mode (session outlives the tool call)--yes: Skip confirmation prompts--no-dashboard: Avoid port conflicts in sandboxed environments--provider <claude|codex|gemini>: Select AI provider (default: claude)--budget <amount>: Set cost limit in USD (auto-pause when exceeded)Poll status every 30 seconds:
bash(command: "loki status --json", workdir: "<project-dir>")The JSON output contains:
version: Loki Mode version stringstatus: inactive, running, paused, stopped, completed, unknownphase: Current SDLC phase (e.g., BOOTSTRAP, DISCOVERY, ARCHITECTURE, DEVELOPMENT, QA, DEPLOYMENT)iteration: Current iteration numberprovider: Which AI provider is active (claude, codex, gemini)pid: Process ID of the running session (null if not running)elapsed_time: Seconds since session startdashboard_url: URL of the web dashboard (null if disabled)task_counts: Object with total, completed, failed, pending countsFor budget tracking (not in JSON output), read the budget file directly:
bash(command: "cat .loki/metrics/budget.json 2>/dev/null || echo '{}'", workdir: "<project-dir>")Budget JSON fields: budget_limit, budget_used
After each poll, summarize changes:
If budget tracking is active, include cost in updates:
bash(command: "loki pause", workdir: "<project-dir>")bash(command: "loki resume", workdir: "<project-dir>")bash(command: "loki stop", workdir: "<project-dir>")bash(command: "loki status", workdir: "<project-dir>")bash(command: "loki logs --tail 50", workdir: "<project-dir>")When status becomes "stopped" or "completed":
loki status --json for final summarygit log --oneline -20 to show commits madecat .loki/council/report.mdloki logs before restarting08a09b1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.