# Loki Mode: a spec-driven autonomous builder with a verification gate

> Loki Mode turns a PRD, a GitHub issue, an OpenAPI file or a one-line brief into a deployed app through a multi-agent loop with 8 quality gates. This review covers the CLI flow, the Docker and Claude Code plugin paths, and where the model dependency bites.

**asklokesh/loki-mode** — Multi-agent autonomous SDLC framework. Spec to deployed app. PRD, GitHub issue, OpenAPI/JSON/YAML, or one-line brief. 5 AI providers, 8 quality gates.

- Repository: https://github.com/asklokesh/loki-mode
- Website: https://www.autonomi.dev
- Stars: 1,076 · Forks: 208
- Language: Shell
- License: NOASSERTION
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/asklokesh-loki-mode

## The handoff problem Loki Mode tries to close

Most coding agents stop at a diff. Someone still has to decide whether the diff is finished, whether the tests pass, and whether the thing deploys. Loki Mode is built around the opposite assumption: the README states that it "does not accept 'done' on an empty diff or failing tests." That single sentence is the product thesis. The target user is a developer or small team that already produces specs, whether as a PRD file, a GitHub issue, an OpenAPI/JSON/YAML document, or a one-line brief, and wants the mechanical parts of turning that spec into a running application handled by an orchestrated set of agents rather than a chat session. The repository topics list spec-driven-development, multi-agent, ci-cd and pull-request-review, which maps to the same audience: people who treat the spec as the source of truth and the build as a repeatable pipeline stage rather than an interactive conversation.

## The RARV-C loop and the 8 quality gates

The package description names the mechanism directly: the RARV-C closure loop with 8 quality gates, provider-agnostic across Claude Code, OpenAI Codex, Cline, Aider and opencode. The loop is what closes the gap between generation and acceptance. An agent produces work, a gate evaluates it, and a failure re-enters the loop rather than terminating the run. The README frames the same idea as verified completion, and the shipped CLI exposes it through commands like `loki modernize heal ./your-repo --assess`, which the README describes as read-only. That read-only mode is the most interesting design choice in the repository, because it separates assessment from mutation. You can point the tool at an existing codebase and get an opinion without giving it write access. The provider list is deliberately broad. Claude is the default, since the Claude Agent SDK ships inside Loki and an `ANTHROPIC_API_KEY` alone is enough, but the framework does not lock you to one vendor. That matters for teams that already standardized on Aider or Cline and do not want a second agent runtime installed.

## Installing Loki Mode and running a first build

The README recommends bun for the global install, with npm, Homebrew and Docker as alternatives. The npm path works without Bun through a bash fallback, and the README notes you can migrate later with `loki self-update --to bun`.

```bash
bun install -g loki-mode
```

After installing, the README says to run `loki doctor`. It checks your setup and names any blocker, which is the fastest way to confirm a provider is reachable before spending anything.

```bash
export ANTHROPIC_API_KEY=sk-...
loki doctor
```

The guided first build is a single command. The README states that it asks for a one-line idea, picks a template, shows a cost and time estimate before spending anything, and then builds. Pressing Enter through every step produces a sample Todo app.

```bash
loki quickstart
```

For a shell without a terminal, both halves are required: an idea or a PRD path, plus an explicit `--yes`. The README says a missing half exits 2 and writes nothing, so a stray argument in CI cannot start a paid build on its own.

```bash
loki quickstart "a todo app with user accounts" --yes
```

If you want to see the plan without any writes or execution, `--dry-run` prints the deterministic template choice and the estimator-backed plan. To inspect it programmatically, `--json` requires `--dry-run` and emits one versioned object.

```bash
loki quickstart "a todo app with user accounts" --dry-run --json > preview.json
loki quickstart --verify-preview preview.json --json
```

Template discovery is available before any estimation or consent step, which is useful when the top-ranked match is not the starter you want.

```bash
loki quickstart --list-templates
loki quickstart "an internal reporting workspace" --template dashboard --yes
```

If you prefer not to install anything, the README documents `npx loki-mode tour`, which it says needs no install, no API key, no spend and no network, and prints a real Evidence Receipt from a past build.

## Docker and the Claude Code plugin path

The Docker image is multi-arch (amd64 and arm64) and based on ubuntu:24.04, with Node.js 24 LTS installed from NodeSource. The Dockerfile comment gives the run form directly, mounting the working directory at /workspace.

```bash
docker run -it -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" -v $(pwd):/workspace asklokesh/loki-mode start prd.md
```

The compose file is explicit that two ways of running are different products. `docker compose run loki start prd.md` performs one build in the current directory and nothing listens afterward. `docker compose --profile service up -d` starts a single-node build service with a webhook receiver, a worker and Redis between them. The compose comments state that the service profile needs `GITHUB_WEBHOOK_SECRET` and `ANTHROPIC_API_KEY` in `.env`, and that without the first the receiver starts but rejects every webhook with 503 rather than silently accepting unauthenticated builds. That is a deliberate failure mode and a good one. The `.env.example` file documents an alternative to an API key: Claude Code Max or Pro subscribers can mount host OAuth credentials instead, in which case nothing goes into the env file because the token is mounted as a file. Note that the image ships only the Claude Code CLI by default; Codex, Cline and Aider are bring-your-own-CLI inside Docker. There is also a Claude Code plugin that adds three slash commands (`/loki-grill`, `/loki-spec-status`, `/loki-verify`) and the Loki MCP server, but it calls the CLI rather than bundling it, so the global install has to come first.

## The model dependency is the real constraint

Loki Mode is not a self-contained tool. The README is direct about this: "Loki needs a model to drive." An `ANTHROPIC_API_KEY` alone is sufficient because the Claude Agent SDK ships inside the package, but if you have no key and no Claude Code, Aider, Cline or open-model endpoint, the CLI has nothing to run. `loki doctor` exists precisely because this is the first thing that breaks. The second constraint is cost. The quickstart flow quotes a cost and time estimate before spending, and the README calls that estimate honest, but the estimate is still an estimate produced by the project's own estimator. The `--from-preview` flag is described as using a saved plan as evidence rather than execution authority, and Loki recomputes and displays the current estimate before starting. That is a sensible guard, and it also tells you the saved number is not a promise. A third limitation is scope: the README positions the free edition as the same CLI, SDK and MCP for everyone, with commercial editions for teams and enterprises sold separately under the Autonomi brand. If your organization needs the team features, the open repository is not where they live.

## How it compares with Aider and Cline

Aider and Cline are both listed as providers Loki Mode can drive, which makes the comparison slightly unusual: they are alternatives to the underlying agent, not necessarily to the orchestration layer. Aider is an interactive pair-programming tool that edits files in response to chat turns. Cline is an editor-integrated agent. Loki Mode sits above that level. It takes a spec artifact and runs a closure loop with quality gates, and it can delegate to Aider or Cline as the model driver. The practical difference is where the acceptance decision lives. With Aider or Cline, you decide when the work is done. With Loki Mode, the README states the framework refuses to accept done on an empty diff or failing tests, and the 8 gates are what enforce that. If your workflow is conversational and you want tight control over each edit, an editor agent is the better fit. If your workflow starts from a written spec and you want a pipeline that keeps going until the gates pass, this is the layer that does that. The trade-off is visibility: a loop that runs unattended is harder to interrupt than a chat turn, which is why the dry-run and preview flags matter more here than they would in an interactive tool.

## Licence, upgrade path and maintenance signals

The package.json declares `BUSL-1.1`, the Business Source License 1.1, and the README badge matches. The repository metadata reports the licence as NOASSERTION, which is what you get when a scanner cannot map the file to a recognized identifier. Either way, this is not a permissive open source licence, and BUSL typically converts to an open licence after a change date. The LICENSE file is the only place that answers what the change date and the additional use grant are, and neither is stated in the README, so read that file before you plan a fork or a commercial redistribution. The README also mentions a CLA and there is a CLA.md at the repository root, which matters if you intend to contribute. On maintenance, the last push was on 2026-09-10 and the most recent release listed is v9.27.0 from the same day, with v9.26.3 and v9.26.1 earlier that day. The repository is not archived. Upgrades run through `loki self-update`, and the README documents `loki self-update --to bun` for migrating from the npm install to the Bun install. There is an UPGRADING.md at the repository root that the README does not summarize, so treat that file as the authority on version-to-version changes rather than assuming the self-update command handles every case.

## Conclusion

Adopt Loki Mode if you already write specs and want the build loop to refuse completion on an empty diff or failing tests, and if you are willing to run `loki doctor` before trusting an unattended run. Skip it if you need a permissive licence for a commercial fork, or if your team cannot supply a model provider at all, since the README states Loki needs a model to drive. Verify first that `loki quickstart --dry-run --json` produces a plan you agree with on your own repository, and read LICENSE in full before shipping a modified binary.

## FAQ

### What is Loki Mode?

Loki Mode is a source-available autonomous SDLC framework from Autonomi that takes a PRD, GitHub issue, OpenAPI/JSON/YAML file or one-line brief to a deployed app. It runs a multi-agent RARV-C closure loop with 8 quality gates and is provider-agnostic across Claude Code, OpenAI Codex, Cline, Aider and opencode.

### How do I install Loki Mode with npm?

The README lists `npm install -g loki-mode` as an alternative to the recommended Bun install, and notes it works without Bun through a bash fallback. You can migrate to Bun later with `loki self-update --to bun`.

### Does Loki Mode work with Claude Code?

Yes. The Claude Agent SDK ships inside Loki, so an ANTHROPIC_API_KEY alone is enough to drive it, and there is a Claude Code plugin that adds /loki-grill, /loki-spec-status and /loki-verify plus the Loki MCP server. The plugin calls the CLI rather than bundling it, so install loki-mode first.

### Can I run Loki Mode in CI without a terminal?

The README states that both an idea (or a PRD path) and an explicit `--yes` are required with no terminal. Missing either half exits 2 with the needs-a-terminal message and writes nothing.

### How does Loki Mode handle an existing codebase?

The README gives `loki modernize heal ./your-repo --assess` for an existing codebase and describes that mode as read-only. That lets you assess a repository without granting write access.

## Sources

- [asklokesh/loki-mode on GitHub](https://github.com/asklokesh/loki-mode)
- [Issues](https://github.com/asklokesh/loki-mode/issues)
- [Project website](https://www.autonomi.dev)
- [README](https://github.com/asklokesh/loki-mode/blob/main/README.md)
- [Releases](https://github.com/asklokesh/loki-mode/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/asklokesh-loki-mode
