loki-mode 9.12.6 → 9.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -101
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/intent.sh +414 -0
- package/autonomy/issue-providers.sh +24 -0
- package/autonomy/lib/agent_readiness.py +280 -0
- package/autonomy/lib/claim_grounding.py +171 -0
- package/autonomy/lib/config-map.sh +10 -6
- package/autonomy/lib/decision_record.py +198 -0
- package/autonomy/lib/failure_memory.py +199 -0
- package/autonomy/lib/gate_policy.py +166 -0
- package/autonomy/lib/outcome_ledger.py +620 -0
- package/autonomy/lib/preedit_snapshot.py +216 -0
- package/autonomy/lib/proof-generator.py +71 -4
- package/autonomy/lib/verdict.py +204 -0
- package/autonomy/loki +430 -15
- package/autonomy/notify.sh +70 -1
- package/autonomy/provider-offer.sh +25 -1
- package/autonomy/queue-consumer.sh +290 -18
- package/autonomy/run.sh +527 -12
- package/autonomy/telemetry.sh +8 -1
- package/completions/_loki +5 -0
- package/completions/loki.bash +2 -1
- package/dashboard/__init__.py +1 -1
- package/dashboard/run.py +13 -2
- package/dashboard/scim.py +221 -0
- package/dashboard/server.py +190 -1
- package/dashboard/static/index.html +248 -55
- package/docs/GATE-FAILURE-TRIAGE.md +254 -0
- package/docs/LOOP-CANDIDATE-PROPOSAL-v1.md +167 -0
- package/docs/LOOP-HARNESS-AUDIT.md +53 -0
- package/docs/QUEUE-OPERATIONS.md +107 -0
- package/docs/VERIFICATION-COST.md +273 -0
- package/docs/WANG-PRINCIPLES-PLAN.md +1 -1
- package/loki-ts/dist/loki.js +414 -416
- package/mcp/__init__.py +1 -1
- package/mcp/_sdk_loader.py +25 -0
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
package/README.md
CHANGED
|
@@ -13,23 +13,68 @@ _The free, source-available autonomous coding agent by [Autonomi](https://www.au
|
|
|
13
13
|
[](https://hub.docker.com/r/asklokesh/loki-mode)
|
|
14
14
|
[](LICENSE)
|
|
15
15
|
|
|
16
|
-
[Website](https://www.autonomi.dev/) | [Documentation](wiki/Home.md) | [Installation](docs/INSTALLATION.md) | [Changelog](CHANGELOG.md)
|
|
16
|
+
[Website](https://www.autonomi.dev/) | [Documentation](wiki/Home.md) | [Installation](docs/INSTALLATION.md) | [Changelog](CHANGELOG.md)
|
|
17
17
|
|
|
18
|
-
**Current release: v9.
|
|
18
|
+
**Current release: v9.16.0**
|
|
19
19
|
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Install
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
```bash
|
|
27
|
+
bun install -g loki-mode # recommended (npm, Homebrew, Docker below)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
<details>
|
|
31
|
+
<summary>Other install methods</summary>
|
|
32
|
+
|
|
33
|
+
| Method | Command | Notes |
|
|
34
|
+
|--------|---------|-------|
|
|
35
|
+
| **Bun (recommended)** | `bun install -g loki-mode` | Fastest startup for CLI commands. |
|
|
36
|
+
| **npm** | `npm install -g loki-mode` | Works without Bun (bash fallback). Migrate any time with `loki self-update --to bun`. |
|
|
37
|
+
| **Homebrew** | `brew tap asklokesh/tap && brew install loki-mode` | Auto-installs Bun as a dep. |
|
|
38
|
+
| **Docker** | `docker pull asklokesh/loki-mode:latest` | Bun + Claude CLI pre-installed. See [DOCKER_README.md](DOCKER_README.md). |
|
|
39
|
+
|
|
40
|
+
Upgrade with `loki self-update`. Long form: [Installation Guide](docs/INSTALLATION.md).
|
|
41
|
+
|
|
42
|
+
</details>
|
|
43
|
+
|
|
44
|
+
## Use it
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
loki quickstart # guided first build: asks a few questions, quotes cost, builds
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
That is the whole happy path. It asks for a one-line idea, picks a template,
|
|
51
|
+
shows the real cost and time estimate before spending anything, then builds.
|
|
52
|
+
Press Enter through every step and you get a sample Todo app.
|
|
53
|
+
|
|
54
|
+
Or go straight at it:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
loki quick "build a landing page with a signup form" # one-shot task
|
|
58
|
+
loki start prd.md # build from a spec you wrote
|
|
59
|
+
loki modernize heal ./your-repo --assess # existing codebase, read-only
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Loki needs a model to drive.** An `ANTHROPIC_API_KEY` alone is enough (the
|
|
63
|
+
Claude Agent SDK ships inside Loki); or point it at Claude Code, aider, cline,
|
|
64
|
+
or an open model. Run `loki doctor` and it tells you exactly what is missing.
|
|
27
65
|
|
|
28
66
|
```bash
|
|
29
|
-
|
|
67
|
+
export ANTHROPIC_API_KEY=sk-...
|
|
68
|
+
loki doctor # checks your setup, names any blocker
|
|
30
69
|
```
|
|
31
70
|
|
|
32
|
-
|
|
71
|
+
## Try it first, without installing
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx loki-mode tour # no install, no API key, no spend, no network
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Prints a real Evidence Receipt from a past build, headline and all:
|
|
33
78
|
|
|
34
79
|
```
|
|
35
80
|
Headline: VERIFIED WITH GAPS
|
|
@@ -43,14 +88,18 @@ Headline: VERIFIED WITH GAPS
|
|
|
43
88
|
| Cost | $10.3218 |
|
|
44
89
|
```
|
|
45
90
|
|
|
46
|
-
**"WITH GAPS" is the point.** Build was not run
|
|
47
|
-
receipt says so on its own front page
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
91
|
+
**"WITH GAPS" is the point.** Build was not run, security has findings, and the
|
|
92
|
+
receipt says so on its own front page. Recompute the diff hash yourself and
|
|
93
|
+
check it matches -- you are not asked to trust the agent's self-report.
|
|
94
|
+
|
|
95
|
+
---
|
|
51
96
|
|
|
52
|
-
|
|
53
|
-
|
|
97
|
+
> **How it works:** Drop a spec -- a PRD, GitHub issue, OpenAPI/JSON/YAML, or one-line brief. Loki Mode classifies complexity (`run.sh:detect_complexity()`), assembles an agent team from 41 specialized agent roles across 8 domains - prompt-defined specifications the orchestrator adopts per phase, with parallel review (blind council) and optional worktree streams on Claude Code, sequential on other providers - and runs autonomous RARV cycles (Reason - Act - Reflect - Verify, see `run.sh:run_autonomous()`) with 8 quality gates (see `skills/quality-gates.md`). Code is not "done" until it passes automated verification. Output is a Git repo with source, tests, configs, and audit logs.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
<details>
|
|
102
|
+
<summary><b>Why verified completion matters</b> -- the failure this exists to fix</summary>
|
|
54
103
|
|
|
55
104
|
Self-reported completion is the failure users actually hit. A survey of the
|
|
56
105
|
open issue trackers of seven coding harnesses (OpenHands, Cline, Aider,
|
|
@@ -70,8 +119,7 @@ exposes a command that verifies the agent's own output. Rerun it yourself with
|
|
|
70
119
|
|
|
71
120
|
That is a measurement of the CLI surface, not of whole products: a web UI or an
|
|
72
121
|
API could expose something `--help` does not, and Devin and Replit Agent ship no
|
|
73
|
-
local CLI so they are not covered.
|
|
74
|
-
run the tour and check the hash.
|
|
122
|
+
local CLI so they are not covered.
|
|
75
123
|
|
|
76
124
|
**Evaluating this against something else?** [docs/EVALUATING.md](docs/EVALUATING.md)
|
|
77
125
|
puts a runnable command next to every claim we make, and states plainly what we
|
|
@@ -79,11 +127,7 @@ do not have (no enterprise case studies, no independent benchmark placement, and
|
|
|
79
127
|
generation is not air-gapped). It ends with the one question worth asking any
|
|
80
128
|
agent vendor, including us.
|
|
81
129
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
> **How it works:** Drop a spec -- a PRD, GitHub issue, OpenAPI/JSON/YAML, or one-line brief. Loki Mode classifies complexity (`run.sh:detect_complexity()`), assembles an agent team from 41 specialized agent roles across 8 domains - prompt-defined specifications the orchestrator adopts per phase, with parallel review (blind council) and optional worktree streams on Claude Code, sequential on other providers - and runs autonomous RARV cycles (Reason - Act - Reflect - Verify, see `run.sh:run_autonomous()`) with 8 quality gates (see `skills/quality-gates.md`). Code is not "done" until it passes automated verification. Output is a Git repo with source, tests, configs, and audit logs.
|
|
85
|
-
|
|
86
|
-
---
|
|
130
|
+
</details>
|
|
87
131
|
|
|
88
132
|
## Already have a codebase? Start read-only.
|
|
89
133
|
|
|
@@ -192,7 +236,7 @@ public key can verify offline. See [docs/SIGNED-RECEIPTS.md](docs/SIGNED-RECEIPT
|
|
|
192
236
|
- **Cross-project memory** -- Episodic/semantic/procedural memory with vector search; knowledge learned on one project surfaces on the next (v5.15.0+, see `memory/engine.py`)
|
|
193
237
|
- **Self-hosted and private** -- Your keys, your infrastructure, no data leaves your network
|
|
194
238
|
- **Legacy system healing** -- `loki modernize heal` archaeology/stabilize/isolate/modernize/validate phases (v6.67.0, see `skills/healing.md`)
|
|
195
|
-
- **MCP server** --
|
|
239
|
+
- **MCP server** -- 36 tools (including ChromaDB code search) plus 3 resources and 2 prompts (`mcp/server.py`, with magic tools registered from `mcp/magic_tools.py` and the managed-memory tool from `mcp/managed_tools.py`). Of the 36, 35 are always available; `loki_memory_redact` is registered but only succeeds when `LOKI_MANAGED_AGENTS=true` and `LOKI_MANAGED_MEMORY=true`. Launch with `loki mcp` (bootstraps the Python MCP SDK on first run).
|
|
196
240
|
- **Full-stack output** -- Source code, tests, Docker Compose stacks (multi-service with healthchecks), CI/CD pipelines, audit logs
|
|
197
241
|
- **Provider-agnostic** -- runs on Claude, Cline, Codex, Aider, or opencode with automatic failover (`loki-ts/src/runner/providers.ts`); no vendor lock-in. When `LOKI_PROVIDER` is unset, Loki auto-detects in that order; an explicit choice always wins and is never silently substituted. Gemini was removed as a provider in v7.5.18.
|
|
198
242
|
- **Source-available (BUSL-1.1)** -- Free for personal, internal, and academic use.
|
|
@@ -295,45 +339,19 @@ status check in your repository's branch-protection settings.
|
|
|
295
339
|
|
|
296
340
|
---
|
|
297
341
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
Zero install, zero key, zero spend. See a real Evidence Receipt right now:
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
npx loki-mode tour # replay a real sample receipt (no install, no key, no spend)
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
Ready to build? Install and run the guided first build:
|
|
307
|
-
|
|
308
|
-
```bash
|
|
309
|
-
bun install -g loki-mode # install (npm/brew/Docker also work, see below)
|
|
310
|
-
loki quickstart # one guided command: your first real build
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
`loki quickstart` is the recommended way to start. It asks a few quick questions
|
|
314
|
-
(setup check, one-line idea, template pick, plan review), quotes the real
|
|
315
|
-
cost/time estimate before anything is spent, and then runs the build. Pressing
|
|
316
|
-
Enter through every step builds the sample Todo app.
|
|
317
|
-
|
|
318
|
-
Want a taste with zero key and zero spend first? Run:
|
|
319
|
-
|
|
320
|
-
```bash
|
|
321
|
-
loki demo --offline # replay a real sample Evidence Receipt (no key, no spend)
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
It replays a real past build's Evidence Receipt so you can see Loki's honest
|
|
325
|
-
verdict (VERIFIED / VERIFIED WITH GAPS / NOT VERIFIED) in seconds, with no
|
|
326
|
-
provider, no API key, no spend, and no network. It is a sample (a replay), not a
|
|
327
|
-
verdict on your own code.
|
|
342
|
+
<details>
|
|
343
|
+
<summary><b>Setup details: providers, other models, what loki doctor checks</b></summary>
|
|
328
344
|
|
|
329
|
-
|
|
345
|
+
Other spec sources work the same way:
|
|
330
346
|
|
|
331
347
|
```bash
|
|
332
348
|
loki init my-app --template simple-todo-app # scaffold a starter PRD
|
|
333
|
-
|
|
349
|
+
loki start owner/repo#123 # a GitHub issue
|
|
350
|
+
loki start ./openapi.yaml # an OpenAPI/YAML spec
|
|
351
|
+
loki demo --offline # replay a sample receipt, no key, no spend
|
|
334
352
|
```
|
|
335
353
|
|
|
336
|
-
|
|
354
|
+
Loki needs a model to drive. There are two ways to give it one.
|
|
337
355
|
|
|
338
356
|
**Without a separate CLI (v8).** The Claude Agent SDK ships inside Loki, so an API key alone is enough:
|
|
339
357
|
|
|
@@ -401,12 +419,7 @@ which model produced the code. They check what was actually built.
|
|
|
401
419
|
|
|
402
420
|
Either way, run `loki doctor` any time and it tells you exactly what is present and what is missing, with a copy-pasteable install command for each gap.
|
|
403
421
|
|
|
404
|
-
|
|
405
|
-
loki doctor # check your setup before the first build
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
<details>
|
|
409
|
-
<summary><strong>What Loki needs (and what loki doctor checks)</strong></summary>
|
|
422
|
+
**What Loki needs (and what `loki doctor` checks)**
|
|
410
423
|
|
|
411
424
|
Required:
|
|
412
425
|
|
|
@@ -424,49 +437,24 @@ Recommended:
|
|
|
424
437
|
|
|
425
438
|
You also need credentials for whichever provider you use (for Claude Code, an authenticated `claude` login or `ANTHROPIC_API_KEY`). `loki doctor` flags a missing or unauthenticated provider as the first thing to fix.
|
|
426
439
|
|
|
427
|
-
</details>
|
|
428
|
-
|
|
429
440
|
If you do not have Bun yet:
|
|
430
441
|
|
|
431
442
|
```bash
|
|
432
443
|
curl -fsSL https://bun.sh/install | bash # macOS / Linux (or: brew install oven-sh/bun/bun)
|
|
433
444
|
```
|
|
434
445
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
loki start owner/repo#123 # a GitHub issue
|
|
439
|
-
loki start ./openapi.yaml # an OpenAPI/YAML spec
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
Or skip scaffolding and go straight to a quick task:
|
|
443
|
-
|
|
444
|
-
```bash
|
|
445
|
-
loki quick "build a landing page with a signup form"
|
|
446
|
-
```
|
|
446
|
+
Docker without installing loki locally: `loki docker start prd.md` runs it in the
|
|
447
|
+
published image with zero config, bind-mounting the current folder so `.loki`
|
|
448
|
+
state and resume work exactly like local. See [DOCKER_README.md](DOCKER_README.md).
|
|
447
449
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|--------|---------|-------|
|
|
452
|
-
| **Bun (recommended)** | `bun install -g loki-mode` | Fastest startup for CLI commands. |
|
|
453
|
-
| **Homebrew** | `brew tap asklokesh/tap && brew install loki-mode` | Auto-installs Bun as a dep |
|
|
454
|
-
| **Docker (easiest)** | `loki docker start prd.md` | Host wrapper: runs loki in the published image with zero config. Bind-mounts the current folder so `.loki` state, resume, and continuity work exactly like local. Auto-detects auth (`ANTHROPIC_API_KEY`, else your host Claude Code login). Needs loki + Docker on the host. See DOCKER_README.md |
|
|
455
|
-
| **Docker (raw)** | `docker pull asklokesh/loki-mode:latest && docker run --rm -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" asklokesh/loki-mode:latest start prd.md` | Bun + Claude CLI pre-installed; needs an API key, or use docker compose with a .env file, see DOCKER_README.md |
|
|
456
|
-
| **npm (compat)** | `npm install -g loki-mode` | Works without Bun (bash fallback). Migrate any time with `loki self-update --to bun`. |
|
|
457
|
-
|
|
458
|
-
**Upgrading:**
|
|
459
|
-
|
|
460
|
-
```bash
|
|
461
|
-
loki self-update # upgrade in place via current manager
|
|
462
|
-
loki self-update --to bun # switch from npm/brew to Bun
|
|
463
|
-
loki self-update --check # show current install path + manager
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
`loki self-update` auto-detects which package manager installed loki and runs the right upgrade. If you installed via npm and want to switch to Bun (recommended for v8.0.0 forward-compat), `loki self-update --to bun` does the migration in one command (installs via Bun first, then uninstalls the npm copy).
|
|
450
|
+
Upgrading: `loki self-update` auto-detects which package manager installed loki
|
|
451
|
+
and runs the right upgrade. `loki self-update --to bun` migrates an npm install
|
|
452
|
+
to Bun in one command. `loki self-update --check` shows the install path.
|
|
467
453
|
|
|
468
454
|
See the [Installation Guide](docs/INSTALLATION.md) for the long form.
|
|
469
455
|
|
|
456
|
+
</details>
|
|
457
|
+
|
|
470
458
|
---
|
|
471
459
|
|
|
472
460
|
<details>
|
|
@@ -643,14 +631,6 @@ env vars. See [Enterprise Identity Roadmap](docs/ENTERPRISE-IDENTITY-ROADMAP.md)
|
|
|
643
631
|
|
|
644
632
|
---
|
|
645
633
|
|
|
646
|
-
## Purple Lab
|
|
647
|
-
|
|
648
|
-
**[DEPRECATED in v7.44.0]** Purple Lab (`loki web`, port 57375) is deprecated. The local build monitor and project dashboard are now the dashboard (auto-launched by `loki start`, http://localhost:57374). For the hosted/commercial platform, see [Autonomi Cloud](https://www.autonomi.dev/).
|
|
649
|
-
|
|
650
|
-
The historical feature set (platform pages, Monaco IDE workspace, AI chat panel) lives on in the dashboard and in Autonomi Cloud. `loki web` still invokes the old binary for backward compatibility but will be removed in a future major version.
|
|
651
|
-
|
|
652
|
-
---
|
|
653
|
-
|
|
654
634
|
## Loki Mode vs. Alternatives
|
|
655
635
|
|
|
656
636
|
| Feature | Loki Mode | bolt.new | Replit | Lovable |
|
package/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: loki-mode
|
|
|
3
3
|
description: Autonomous spec-driven build system with a built-in trust layer. It does not call work done until it is verified (RARV-C closure loop, 8 quality gates, completion council, verified-completion evidence gate). Triggers on "Loki Mode". Takes a spec (PRD, GitHub issue, OpenAPI doc, etc.) to deployed product with minimal human intervention. Provider-agnostic. Requires --dangerously-skip-permissions flag.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Loki Mode v9.
|
|
6
|
+
# Loki Mode v9.17.0
|
|
7
7
|
|
|
8
8
|
**You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
|
|
9
9
|
|
|
@@ -470,4 +470,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
|
|
|
470
470
|
|
|
471
471
|
---
|
|
472
472
|
|
|
473
|
-
**v9.
|
|
473
|
+
**v9.17.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~410 lines core**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
9.
|
|
1
|
+
9.17.0
|