loki-mode

Automates spec-to-product builds using a RARV-C loop with quality gates and verified completion receipts.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/CYRUS-pinto/pi-bot --skill loki-mode-cyrus-pinto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loki-mode
Source: https://github.com/CYRUS-pinto/pi-bot/tree/main/.agents/skills/loki-mode
Command: npx skills add https://github.com/CYRUS-pinto/pi-bot --skill loki-mode-cyrus-pinto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Turning a PRD, GitHub issue, or one-line brief into a verified, deployable product normally requires constant human supervision of coding agents, and agents often claim work is done when it is not. Loki Mode runs an autonomous RARV-C (Reason, Act, Reflect, Verify, Close) loop that refuses to declare completion until deterministic evidence supports it. ## Core Features & Use Cases - Autonomous spec-to-product execution: Accepts a PRD file, GitHub issue (owner/repo#123), OpenAPI/JSON/YAML spec, or one-line brief and drives it through planning, implementation, review, and delivery with minimal intervention. - Verified completion with Evidence Receipts: Eight quality gates, a blind 3-reviewer council, and an evidence gate compute a VERIFIED / VERIFIED WITH GAPS / NOT VERIFIED headline from deterministic facts (diff SHAs, test exit codes, gate verdicts), not model claims. - Provider-agnostic operation: Runs on Claude Code, OpenAI Codex CLI, Cline, Aider, and opencode with automatic failover and graceful feature degradation by provider tier. - Use Case: Point it at a GitHub issue with loki start owner/repo#123 --pr and it imports the issue, builds the fix autonomously, and publishes a pull request only after the proof reaches a verified verdict. ## Quick Start Ask the agent to run Loki Mode on your PRD file, for example by saying: start Loki Mode with the PRD at ./prd.md and build the product autonomously.

Frequently Asked Questions about loki-mode

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an autonomous build from a PRD file?

Run `loki start ./prd.md` from the CLI, or launch Claude Code and invoke Loki Mode with the PRD path. The orchestrator detects project complexity, selects a model tier, and iterates through the RARV loop until the completion council and evidence gate confirm the work is done.

How do I turn a GitHub issue into a pull request automatically?

Use `loki start owner/repo#123 --pr` with a GitHub token configured. Loki imports the bounded issue content, runs the autonomous engine, and publishes a pull request only after the generated proof reaches a verified verdict.

Which AI coding providers does Loki Mode support?

Loki Mode supports Claude Code as the full-featured Tier 1 provider, Cline at Tier 2, and OpenAI Codex CLI, Aider, and opencode in degraded sequential modes. Provider failover is automatic, and you select one with `LOKI_PROVIDER` or the `--provider` flag.

How does Loki Mode verify that a build is actually complete?

Completion requires a non-empty git diff against the run-start commit, recorded test commands that exited zero, and no skipped gates. An Evidence Receipt separates deterministic facts from council assessments and derives a VERIFIED, VERIFIED WITH GAPS, or NOT VERIFIED headline from facts alone.

Can Loki Mode resume a build after a crash?

Yes. All coordination state lives in .loki/ filesystem files including checkpoints, session state, and findings, so a killed run resumes from its last checkpoint. Durable-state mode extends this to run-to-completion Kubernetes jobs with crash-resume.

What are the limitations of the legacy Bash route versus the Bun runner?

The Bun/TypeScript runner is the default and receives new features first, while the Bash engine (autonomy/run.sh) is a verified-parity fallback. A parity matrix and CI workflow enforce byte-identical behavior, but some newer capabilities are gated to the Bun route only.