loki-mode 5.49.2 → 5.49.4
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 +48 -27
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/loki +91 -1
- package/bin/postinstall.js +63 -57
- package/dashboard/__init__.py +1 -1
- package/docs/COMPETITIVE-ANALYSIS.md +1 -1
- package/docs/INSTALLATION.md +69 -166
- package/docs/alternative-installations.md +27 -43
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/references/quality-control.md +10 -0
- package/skills/quality-gates.md +18 -0
- package/skills/testing.md +15 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
[]()
|
|
12
12
|
[](benchmarks/)
|
|
13
13
|
|
|
14
|
-
**Current Version: v5.49.
|
|
14
|
+
**Current Version: v5.49.4**
|
|
15
15
|
|
|
16
16
|
**[Autonomi](https://www.autonomi.dev/)** | **[Documentation](https://www.autonomi.dev/docs)** | **[GitHub](https://github.com/asklokesh/loki-mode)**
|
|
17
17
|
|
|
@@ -41,56 +41,67 @@
|
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
43
43
|
|
|
44
|
+
### npm (Recommended)
|
|
45
|
+
|
|
44
46
|
```bash
|
|
45
|
-
|
|
47
|
+
npm install -g loki-mode
|
|
46
48
|
```
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
Installs the `loki` CLI and automatically sets up the skill for Claude Code, Codex CLI, and Gemini CLI.
|
|
49
51
|
|
|
50
|
-
###
|
|
52
|
+
### Homebrew
|
|
51
53
|
|
|
52
54
|
```bash
|
|
53
|
-
|
|
54
|
-
# Then say: "Loki Mode with PRD at ./my-prd.md"
|
|
55
|
+
brew tap asklokesh/tap && brew install loki-mode
|
|
55
56
|
```
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
Installs the `loki` CLI. To also install the skill for interactive use:
|
|
58
59
|
|
|
59
60
|
```bash
|
|
60
|
-
|
|
61
|
+
loki setup-skill
|
|
61
62
|
```
|
|
62
63
|
|
|
63
|
-
###
|
|
64
|
+
### Quick Start
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
```bash
|
|
67
|
+
# CLI mode (works with any provider)
|
|
68
|
+
loki start ./prd.md
|
|
69
|
+
loki start ./prd.md --provider codex
|
|
70
|
+
loki start ./prd.md --provider gemini
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
# Interactive mode (inside your coding agent)
|
|
73
|
+
claude --dangerously-skip-permissions
|
|
74
|
+
# Then say: "Loki Mode with PRD at ./my-prd.md"
|
|
72
75
|
|
|
73
|
-
|
|
76
|
+
# Or in Codex CLI:
|
|
77
|
+
codex
|
|
78
|
+
# Then say: "Use Loki Mode with PRD at ./my-prd.md"
|
|
74
79
|
|
|
75
|
-
|
|
80
|
+
# Or in Gemini CLI:
|
|
81
|
+
gemini
|
|
82
|
+
# Then say: "Use Loki Mode with PRD at ./my-prd.md"
|
|
83
|
+
```
|
|
76
84
|
|
|
77
|
-
|
|
85
|
+
### Verify Installation
|
|
78
86
|
|
|
79
87
|
```bash
|
|
80
|
-
#
|
|
81
|
-
loki
|
|
88
|
+
loki --version # Should print 5.49.4
|
|
89
|
+
loki doctor # Check skill symlinks and provider availability
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Other Methods
|
|
82
93
|
|
|
83
|
-
|
|
84
|
-
loki start --provider codex ./my-prd.md
|
|
94
|
+
Git clone, Docker, GitHub Action, and VS Code Extension are also available. See [docs/alternative-installations.md](docs/alternative-installations.md).
|
|
85
95
|
|
|
86
|
-
|
|
87
|
-
loki start --provider gemini ./my-prd.md
|
|
96
|
+
### Update
|
|
88
97
|
|
|
89
|
-
|
|
90
|
-
|
|
98
|
+
```bash
|
|
99
|
+
npm update -g loki-mode # npm
|
|
100
|
+
brew upgrade loki-mode # Homebrew
|
|
91
101
|
```
|
|
92
102
|
|
|
93
|
-
|
|
103
|
+
### Multi-Provider Support (v5.0.0)
|
|
104
|
+
|
|
94
105
|
| Provider | Features | Parallel Agents | Task Tool |
|
|
95
106
|
|----------|----------|-----------------|-----------|
|
|
96
107
|
| Claude | Full | Yes (10+) | Yes |
|
|
@@ -150,6 +161,16 @@ Loki Mode is powerful but not magic. Be aware of these honest limitations:
|
|
|
150
161
|
- Human oversight is expected for: deployment credentials, domain setup, API keys, and critical business decisions
|
|
151
162
|
- The system is as good as the underlying AI model -- it can make mistakes, especially on novel or complex problems
|
|
152
163
|
|
|
164
|
+
## What To Expect
|
|
165
|
+
|
|
166
|
+
| Project Type | Examples | Autonomy Level | Typical Experience |
|
|
167
|
+
|---|---|---|---|
|
|
168
|
+
| Simple | Landing page, todo app, static site, single API | High | Completes with minimal retries. Human reviews output. |
|
|
169
|
+
| Standard | CRUD app with auth, REST API + React frontend | Medium | Completes most features. Complex components may need guidance. |
|
|
170
|
+
| Complex | Microservices, real-time systems, ML pipelines | Guided | Use as accelerator. Human reviews between phases. |
|
|
171
|
+
|
|
172
|
+
"Autonomous" means the system runs RARV cycles without prompting. It does NOT mean zero oversight.
|
|
173
|
+
|
|
153
174
|
---
|
|
154
175
|
|
|
155
176
|
## Why Loki Mode?
|
package/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: loki-mode
|
|
|
3
3
|
description: Multi-agent autonomous startup system. Triggers on "Loki Mode". Takes PRD to deployed product with minimal human intervention. Requires --dangerously-skip-permissions flag.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Loki Mode v5.49.
|
|
6
|
+
# Loki Mode v5.49.4
|
|
7
7
|
|
|
8
8
|
**You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
|
|
9
9
|
|
|
@@ -263,4 +263,4 @@ The following features are documented in skill modules but not yet fully automat
|
|
|
263
263
|
| Quality gates 3-reviewer system | Implemented (v5.35.0) | 5 specialist reviewers in `skills/quality-gates.md`; execution in run.sh |
|
|
264
264
|
| Benchmarks (HumanEval, SWE-bench) | Infrastructure only | Runner scripts and datasets exist in `benchmarks/`; no published results |
|
|
265
265
|
|
|
266
|
-
**v5.49.
|
|
266
|
+
**v5.49.4 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.49.
|
|
1
|
+
5.49.4
|
package/autonomy/loki
CHANGED
|
@@ -340,7 +340,8 @@ show_help() {
|
|
|
340
340
|
echo " dogfood Show self-development statistics"
|
|
341
341
|
echo " secrets [cmd] API key status and validation (status|validate)"
|
|
342
342
|
echo " reset [target] Reset session state (all|retries|failed)"
|
|
343
|
-
echo " doctor [--json] Check system prerequisites"
|
|
343
|
+
echo " doctor [--json] Check system prerequisites and skill symlinks"
|
|
344
|
+
echo " setup-skill Create skill symlinks for all providers"
|
|
344
345
|
echo " watchdog [cmd] Process health monitoring (status|help)"
|
|
345
346
|
echo " version Show version"
|
|
346
347
|
echo " help Show this help"
|
|
@@ -2860,6 +2861,69 @@ cmd_config_path() {
|
|
|
2860
2861
|
echo "Create a config file with: loki config init"
|
|
2861
2862
|
}
|
|
2862
2863
|
|
|
2864
|
+
# Set up skill symlinks for all providers
|
|
2865
|
+
cmd_setup_skill() {
|
|
2866
|
+
echo -e "${BOLD}Loki Mode Skill Setup${NC}"
|
|
2867
|
+
echo ""
|
|
2868
|
+
|
|
2869
|
+
local skill_targets=(
|
|
2870
|
+
"$HOME/.claude/skills/loki-mode:Claude Code"
|
|
2871
|
+
"$HOME/.codex/skills/loki-mode:Codex CLI"
|
|
2872
|
+
"$HOME/.gemini/skills/loki-mode:Gemini CLI"
|
|
2873
|
+
)
|
|
2874
|
+
|
|
2875
|
+
local created=0
|
|
2876
|
+
local skipped=0
|
|
2877
|
+
local failed=0
|
|
2878
|
+
|
|
2879
|
+
for entry in "${skill_targets[@]}"; do
|
|
2880
|
+
local target_dir="${entry%%:*}"
|
|
2881
|
+
local target_name="${entry#*:}"
|
|
2882
|
+
local parent_dir
|
|
2883
|
+
parent_dir=$(dirname "$target_dir")
|
|
2884
|
+
local short_path="${target_dir/#$HOME/\~}"
|
|
2885
|
+
|
|
2886
|
+
# Already exists and valid
|
|
2887
|
+
if [ -f "$target_dir/SKILL.md" ]; then
|
|
2888
|
+
echo -e " ${GREEN}OK${NC} $target_name ${DIM}($short_path)${NC}"
|
|
2889
|
+
skipped=$((skipped + 1))
|
|
2890
|
+
continue
|
|
2891
|
+
fi
|
|
2892
|
+
|
|
2893
|
+
# Remove broken symlink
|
|
2894
|
+
if [ -L "$target_dir" ]; then
|
|
2895
|
+
rm -f "$target_dir"
|
|
2896
|
+
fi
|
|
2897
|
+
|
|
2898
|
+
# Create parent directory
|
|
2899
|
+
if [ ! -d "$parent_dir" ]; then
|
|
2900
|
+
mkdir -p "$parent_dir" 2>/dev/null || true
|
|
2901
|
+
fi
|
|
2902
|
+
|
|
2903
|
+
# Create symlink to skill dir
|
|
2904
|
+
if ln -sf "$SKILL_DIR" "$target_dir" 2>/dev/null; then
|
|
2905
|
+
echo -e " ${GREEN}NEW${NC} $target_name ${DIM}($short_path)${NC}"
|
|
2906
|
+
created=$((created + 1))
|
|
2907
|
+
else
|
|
2908
|
+
echo -e " ${RED}FAIL${NC} $target_name ${DIM}($short_path)${NC}"
|
|
2909
|
+
failed=$((failed + 1))
|
|
2910
|
+
fi
|
|
2911
|
+
done
|
|
2912
|
+
|
|
2913
|
+
echo ""
|
|
2914
|
+
if [ "$created" -gt 0 ]; then
|
|
2915
|
+
echo -e "${GREEN}Created $created new skill symlink(s).${NC}"
|
|
2916
|
+
fi
|
|
2917
|
+
if [ "$skipped" -gt 0 ]; then
|
|
2918
|
+
echo -e "${DIM}$skipped already installed.${NC}"
|
|
2919
|
+
fi
|
|
2920
|
+
if [ "$failed" -gt 0 ]; then
|
|
2921
|
+
echo -e "${RED}$failed failed (check permissions).${NC}"
|
|
2922
|
+
return 1
|
|
2923
|
+
fi
|
|
2924
|
+
return 0
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2863
2927
|
# Check system prerequisites
|
|
2864
2928
|
cmd_doctor() {
|
|
2865
2929
|
local json_output=false
|
|
@@ -3001,6 +3065,29 @@ cmd_doctor() {
|
|
|
3001
3065
|
doctor_check "Gemini CLI" gemini optional
|
|
3002
3066
|
echo ""
|
|
3003
3067
|
|
|
3068
|
+
echo -e "${CYAN}Skills:${NC}"
|
|
3069
|
+
local skill_dirs=(
|
|
3070
|
+
"$HOME/.claude/skills/loki-mode:Claude Code"
|
|
3071
|
+
"$HOME/.codex/skills/loki-mode:Codex CLI"
|
|
3072
|
+
"$HOME/.gemini/skills/loki-mode:Gemini CLI"
|
|
3073
|
+
)
|
|
3074
|
+
for entry in "${skill_dirs[@]}"; do
|
|
3075
|
+
local sdir="${entry%%:*}"
|
|
3076
|
+
local sname="${entry#*:}"
|
|
3077
|
+
local short_path="${sdir/$HOME/~}"
|
|
3078
|
+
if [ -f "$sdir/SKILL.md" ]; then
|
|
3079
|
+
echo -e " ${GREEN}PASS${NC} $sname ${DIM}$short_path${NC}"
|
|
3080
|
+
pass_count=$((pass_count + 1))
|
|
3081
|
+
elif [ -L "$sdir" ]; then
|
|
3082
|
+
echo -e " ${RED}FAIL${NC} $sname ${DIM}(broken symlink at $short_path)${NC}"
|
|
3083
|
+
fail_count=$((fail_count + 1))
|
|
3084
|
+
else
|
|
3085
|
+
echo -e " ${YELLOW}WARN${NC} $sname ${DIM}(not found - run 'loki setup-skill')${NC}"
|
|
3086
|
+
warn_count=$((warn_count + 1))
|
|
3087
|
+
fi
|
|
3088
|
+
done
|
|
3089
|
+
echo ""
|
|
3090
|
+
|
|
3004
3091
|
echo -e "${CYAN}System:${NC}"
|
|
3005
3092
|
doctor_check "bash (>= 4.0)" bash recommended 4.0
|
|
3006
3093
|
|
|
@@ -4679,6 +4766,9 @@ main() {
|
|
|
4679
4766
|
doctor)
|
|
4680
4767
|
cmd_doctor "$@"
|
|
4681
4768
|
;;
|
|
4769
|
+
setup-skill)
|
|
4770
|
+
cmd_setup_skill "$@"
|
|
4771
|
+
;;
|
|
4682
4772
|
watchdog)
|
|
4683
4773
|
cmd_watchdog "$@"
|
|
4684
4774
|
;;
|
package/bin/postinstall.js
CHANGED
|
@@ -9,7 +9,6 @@ const path = require('path');
|
|
|
9
9
|
const os = require('os');
|
|
10
10
|
|
|
11
11
|
const homeDir = os.homedir();
|
|
12
|
-
const skillDir = path.join(homeDir, '.claude', 'skills', 'loki-mode');
|
|
13
12
|
const packageDir = path.join(__dirname, '..');
|
|
14
13
|
|
|
15
14
|
const version = (() => {
|
|
@@ -21,73 +20,79 @@ console.log('');
|
|
|
21
20
|
console.log(`Loki Mode v${version} installed!`);
|
|
22
21
|
console.log('');
|
|
23
22
|
|
|
24
|
-
//
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
// Multi-provider skill targets
|
|
24
|
+
const skillTargets = [
|
|
25
|
+
{ dir: path.join(homeDir, '.claude', 'skills', 'loki-mode'), name: 'Claude Code' },
|
|
26
|
+
{ dir: path.join(homeDir, '.codex', 'skills', 'loki-mode'), name: 'Codex CLI' },
|
|
27
|
+
{ dir: path.join(homeDir, '.gemini', 'skills', 'loki-mode'), name: 'Gemini CLI' },
|
|
28
|
+
];
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const results = [];
|
|
31
|
+
|
|
32
|
+
for (const target of skillTargets) {
|
|
33
|
+
try {
|
|
34
|
+
const skillParent = path.dirname(target.dir);
|
|
31
35
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
console.log(`Could not back up existing installation: ${backupErr.message}`);
|
|
54
|
-
console.log('');
|
|
55
|
-
console.log('To fix manually, remove the existing directory and reinstall:');
|
|
56
|
-
console.log(` rm -rf "${skillDir}"`);
|
|
57
|
-
console.log(' npm install -g loki-mode');
|
|
58
|
-
console.log('');
|
|
36
|
+
if (!fs.existsSync(skillParent)) {
|
|
37
|
+
fs.mkdirSync(skillParent, { recursive: true });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Remove existing symlink/directory
|
|
41
|
+
if (fs.existsSync(target.dir)) {
|
|
42
|
+
const stats = fs.lstatSync(target.dir);
|
|
43
|
+
if (stats.isSymbolicLink()) {
|
|
44
|
+
fs.unlinkSync(target.dir);
|
|
45
|
+
} else {
|
|
46
|
+
// Existing real directory (not a symlink) - back it up and replace
|
|
47
|
+
const backupDir = target.dir + '.backup.' + Date.now();
|
|
48
|
+
console.log(`[WARNING] Existing non-symlink installation found at ${target.dir}`);
|
|
49
|
+
console.log(` Backing up to: ${backupDir}`);
|
|
50
|
+
try {
|
|
51
|
+
fs.renameSync(target.dir, backupDir);
|
|
52
|
+
} catch (backupErr) {
|
|
53
|
+
console.log(` Could not back up: ${backupErr.message}`);
|
|
54
|
+
results.push({ name: target.name, path: target.dir, ok: false });
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
59
57
|
}
|
|
60
58
|
}
|
|
59
|
+
|
|
60
|
+
// Create symlink
|
|
61
|
+
if (!fs.existsSync(target.dir)) {
|
|
62
|
+
fs.symlinkSync(packageDir, target.dir);
|
|
63
|
+
}
|
|
64
|
+
results.push({ name: target.name, path: target.dir, ok: true });
|
|
65
|
+
} catch (err) {
|
|
66
|
+
results.push({ name: target.name, path: target.dir, ok: false, error: err.message });
|
|
61
67
|
}
|
|
68
|
+
}
|
|
62
69
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
// Print summary
|
|
71
|
+
console.log('Skills installed:');
|
|
72
|
+
for (const r of results) {
|
|
73
|
+
const icon = r.ok ? 'OK' : 'SKIP';
|
|
74
|
+
const shortPath = r.path.replace(homeDir, '~');
|
|
75
|
+
if (r.ok) {
|
|
76
|
+
console.log(` [${icon}] ${r.name.padEnd(12)} (${shortPath})`);
|
|
77
|
+
} else {
|
|
78
|
+
console.log(` [${icon}] ${r.name.padEnd(12)} (${shortPath}) - ${r.error || 'backup failed'}`);
|
|
67
79
|
}
|
|
68
|
-
}
|
|
69
|
-
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (results.some(r => !r.ok)) {
|
|
70
83
|
console.log('');
|
|
71
|
-
console.log('
|
|
72
|
-
console.log(`
|
|
84
|
+
console.log('To fix missing symlinks:');
|
|
85
|
+
console.log(` loki setup-skill`);
|
|
73
86
|
}
|
|
74
87
|
|
|
75
88
|
console.log('');
|
|
76
|
-
console.log('
|
|
77
|
-
console.log(' loki start
|
|
78
|
-
console.log(' loki start --provider codex
|
|
79
|
-
console.log(' loki start --provider gemini
|
|
80
|
-
console.log(' loki status
|
|
81
|
-
console.log(' loki
|
|
82
|
-
console.log('');
|
|
83
|
-
console.log('Providers:');
|
|
84
|
-
console.log(' claude - Full features (parallel agents, Task tool, MCP)');
|
|
85
|
-
console.log(' codex - Degraded mode (sequential only)');
|
|
86
|
-
console.log(' gemini - Degraded mode (sequential only)');
|
|
87
|
-
console.log('');
|
|
88
|
-
console.log('Or in Claude Code:');
|
|
89
|
-
console.log(' claude --dangerously-skip-permissions');
|
|
90
|
-
console.log(' Then say: "Loki Mode"');
|
|
89
|
+
console.log('CLI commands:');
|
|
90
|
+
console.log(' loki start ./prd.md Start with Claude (default)');
|
|
91
|
+
console.log(' loki start --provider codex Start with OpenAI Codex');
|
|
92
|
+
console.log(' loki start --provider gemini Start with Google Gemini');
|
|
93
|
+
console.log(' loki status Check status');
|
|
94
|
+
console.log(' loki doctor Verify installation');
|
|
95
|
+
console.log(' loki --help Show all commands');
|
|
91
96
|
console.log('');
|
|
92
97
|
|
|
93
98
|
// Anonymous install telemetry (fire-and-forget, silent)
|
|
@@ -113,6 +118,7 @@ try {
|
|
|
113
118
|
version: version,
|
|
114
119
|
channel: 'npm',
|
|
115
120
|
node_version: process.version,
|
|
121
|
+
providers_installed: results.filter(r => r.ok).map(r => r.name).join(','),
|
|
116
122
|
},
|
|
117
123
|
});
|
|
118
124
|
const req = https.request({
|
package/dashboard/__init__.py
CHANGED
|
@@ -85,7 +85,7 @@ GSD is the closest competitor -- a context engineering system that spawns fresh
|
|
|
85
85
|
|
|
86
86
|
**Strengths:**
|
|
87
87
|
- 85.9-87.7% Pass@1 on HumanEval
|
|
88
|
-
-
|
|
88
|
+
- High task completion rate in evaluations (100% reported by MetaGPT authors; not independently verified)
|
|
89
89
|
- Standard Operating Procedures (SOPs) reduce hallucinations
|
|
90
90
|
- Assembly line paradigm with role specialization
|
|
91
91
|
- Low cost: ~$1.09 per project completion
|
package/docs/INSTALLATION.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The flagship product of [Autonomi](https://www.autonomi.dev/). Complete installation instructions for all platforms and use cases.
|
|
4
4
|
|
|
5
|
-
**Version:** v5.49.
|
|
5
|
+
**Version:** v5.49.4
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -34,42 +34,95 @@ The flagship product of [Autonomi](https://www.autonomi.dev/). Complete installa
|
|
|
34
34
|
|
|
35
35
|
## Table of Contents
|
|
36
36
|
|
|
37
|
-
- [
|
|
37
|
+
- [npm (Recommended)](#npm-recommended)
|
|
38
|
+
- [Homebrew](#homebrew)
|
|
39
|
+
- [Quick Start](#quick-start)
|
|
40
|
+
- [Verify Installation](#verify-installation)
|
|
41
|
+
- [Other Methods](#other-methods)
|
|
38
42
|
- [VS Code Extension](#vs-code-extension)
|
|
39
|
-
- [npm (Node.js)](#npm-nodejs)
|
|
40
|
-
- [Homebrew (macOS/Linux)](#homebrew-macoslinux)
|
|
41
|
-
- [Docker](#docker)
|
|
42
43
|
- [Sandbox Mode](#sandbox-mode)
|
|
43
44
|
- [Multi-Provider Support](#multi-provider-support)
|
|
44
45
|
- [Claude Code (CLI)](#claude-code-cli)
|
|
45
46
|
- [Claude.ai (Web)](#claudeai-web)
|
|
46
47
|
- [Anthropic API Console](#anthropic-api-console)
|
|
47
|
-
- [Verify Installation](#verify-installation)
|
|
48
48
|
- [Ports](#ports)
|
|
49
49
|
- [Shell Completions](#shell-completions)
|
|
50
50
|
- [Troubleshooting](#troubleshooting)
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
54
|
-
##
|
|
55
|
-
|
|
56
|
-
Choose your preferred method:
|
|
54
|
+
## npm (Recommended)
|
|
57
55
|
|
|
58
56
|
```bash
|
|
59
|
-
# Option A: npm (easiest)
|
|
60
57
|
npm install -g loki-mode
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Installs the `loki` CLI and automatically sets up the skill for Claude Code, Codex CLI, and Gemini CLI via the postinstall script.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
**Prerequisites:** Node.js 16+
|
|
63
|
+
|
|
64
|
+
**What it does:**
|
|
65
|
+
- Installs the `loki` CLI binary to your PATH
|
|
66
|
+
- Creates skill symlinks at `~/.claude/skills/loki-mode`, `~/.codex/skills/loki-mode`, and `~/.gemini/skills/loki-mode`
|
|
67
|
+
- Each provider auto-discovers skills in its respective directory
|
|
68
|
+
|
|
69
|
+
**Opt out of anonymous install telemetry:**
|
|
70
|
+
```bash
|
|
71
|
+
LOKI_TELEMETRY_DISABLED=true npm install -g loki-mode
|
|
72
|
+
# Or set DO_NOT_TRACK=1
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Update:** `npm update -g loki-mode`
|
|
76
|
+
|
|
77
|
+
**Uninstall:** `npm uninstall -g loki-mode`
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Homebrew
|
|
82
|
+
|
|
83
|
+
```bash
|
|
63
84
|
brew tap asklokesh/tap && brew install loki-mode
|
|
85
|
+
```
|
|
64
86
|
|
|
65
|
-
|
|
66
|
-
docker pull asklokesh/loki-mode:latest
|
|
87
|
+
Installs the `loki` CLI. To also install the skill for interactive use with all providers:
|
|
67
88
|
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
```bash
|
|
90
|
+
loki setup-skill
|
|
70
91
|
```
|
|
71
92
|
|
|
72
|
-
**
|
|
93
|
+
**Update:** `brew upgrade loki-mode`
|
|
94
|
+
|
|
95
|
+
**Uninstall:** `brew uninstall loki-mode`
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Quick Start
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# CLI mode (works with any provider)
|
|
103
|
+
loki start ./prd.md
|
|
104
|
+
loki start ./prd.md --provider codex
|
|
105
|
+
loki start ./prd.md --provider gemini
|
|
106
|
+
|
|
107
|
+
# Interactive mode (inside your coding agent)
|
|
108
|
+
claude --dangerously-skip-permissions
|
|
109
|
+
# Then say: "Loki Mode with PRD at ./my-prd.md"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Verify Installation
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
loki --version # Should print the current version
|
|
118
|
+
loki doctor # Check skill symlinks, providers, and system prerequisites
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Other Methods
|
|
124
|
+
|
|
125
|
+
Git clone, Docker, GitHub Action, and VS Code Extension are also available. See [alternative-installations.md](alternative-installations.md) for details and trade-offs.
|
|
73
126
|
|
|
74
127
|
---
|
|
75
128
|
|
|
@@ -145,156 +198,6 @@ The extension will automatically connect when it detects the server is running a
|
|
|
145
198
|
|
|
146
199
|
---
|
|
147
200
|
|
|
148
|
-
## npm (Node.js)
|
|
149
|
-
|
|
150
|
-
Install via npm for the easiest setup with automatic PATH configuration.
|
|
151
|
-
|
|
152
|
-
### Prerequisites
|
|
153
|
-
|
|
154
|
-
- Node.js 16.0.0 or later
|
|
155
|
-
|
|
156
|
-
### Installation
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
# Global installation
|
|
160
|
-
npm install -g loki-mode
|
|
161
|
-
|
|
162
|
-
# The skill is automatically installed to ~/.claude/skills/loki-mode
|
|
163
|
-
|
|
164
|
-
# Opt out of anonymous install telemetry:
|
|
165
|
-
# LOKI_TELEMETRY_DISABLED=true npm install -g loki-mode
|
|
166
|
-
# Or set DO_NOT_TRACK=1
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Usage
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
# Use the CLI
|
|
173
|
-
loki start ./my-prd.md
|
|
174
|
-
loki status
|
|
175
|
-
loki dashboard
|
|
176
|
-
|
|
177
|
-
# Or invoke in Claude Code
|
|
178
|
-
claude --dangerously-skip-permissions
|
|
179
|
-
> Loki Mode with PRD at ./my-prd.md
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Updating
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
npm update -g loki-mode
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### Uninstalling
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
npm uninstall -g loki-mode
|
|
192
|
-
rm -rf ~/.claude/skills/loki-mode
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## Homebrew (macOS/Linux)
|
|
198
|
-
|
|
199
|
-
Install via Homebrew with automatic dependency management.
|
|
200
|
-
|
|
201
|
-
### Prerequisites
|
|
202
|
-
|
|
203
|
-
- Homebrew (https://brew.sh)
|
|
204
|
-
|
|
205
|
-
### Installation
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
# Add the tap
|
|
209
|
-
brew tap asklokesh/tap
|
|
210
|
-
|
|
211
|
-
# Install Loki Mode
|
|
212
|
-
brew install loki-mode
|
|
213
|
-
|
|
214
|
-
# Set up Claude Code skill integration (manual symlink required)
|
|
215
|
-
ln -sf "$(brew --prefix)/opt/loki-mode/libexec" ~/.claude/skills/loki-mode
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Dependencies
|
|
219
|
-
|
|
220
|
-
Homebrew automatically installs:
|
|
221
|
-
- bash 4.0+ (for associative arrays)
|
|
222
|
-
- jq (JSON processing)
|
|
223
|
-
- gh (GitHub CLI for integration)
|
|
224
|
-
|
|
225
|
-
### Usage
|
|
226
|
-
|
|
227
|
-
```bash
|
|
228
|
-
# Use the CLI
|
|
229
|
-
loki start ./my-prd.md
|
|
230
|
-
loki status
|
|
231
|
-
loki --help
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
### Updating
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
brew upgrade loki-mode
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### Uninstalling
|
|
241
|
-
|
|
242
|
-
```bash
|
|
243
|
-
brew uninstall loki-mode
|
|
244
|
-
rm -rf ~/.claude/skills/loki-mode
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Docker
|
|
250
|
-
|
|
251
|
-
Run Loki Mode in a container for isolated execution.
|
|
252
|
-
|
|
253
|
-
### Prerequisites
|
|
254
|
-
|
|
255
|
-
- Docker installed and running
|
|
256
|
-
|
|
257
|
-
### Installation
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
# Pull the image
|
|
261
|
-
docker pull asklokesh/loki-mode:latest
|
|
262
|
-
|
|
263
|
-
# Or use docker-compose
|
|
264
|
-
curl -o docker-compose.yml https://raw.githubusercontent.com/asklokesh/loki-mode/main/docker-compose.yml
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
### Usage
|
|
268
|
-
|
|
269
|
-
```bash
|
|
270
|
-
# Run with a PRD file
|
|
271
|
-
docker run -v $(pwd):/workspace -w /workspace asklokesh/loki-mode:latest start ./my-prd.md
|
|
272
|
-
|
|
273
|
-
# Interactive mode
|
|
274
|
-
docker run -it -v $(pwd):/workspace -w /workspace asklokesh/loki-mode:latest
|
|
275
|
-
|
|
276
|
-
# Using docker-compose
|
|
277
|
-
docker-compose run loki start ./my-prd.md
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
### Environment Variables
|
|
281
|
-
|
|
282
|
-
Pass your configuration via environment variables:
|
|
283
|
-
|
|
284
|
-
```bash
|
|
285
|
-
docker run -e LOKI_MAX_RETRIES=100 -e LOKI_BASE_WAIT=120 \
|
|
286
|
-
-v $(pwd):/workspace -w /workspace \
|
|
287
|
-
asklokesh/loki-mode:latest start ./my-prd.md
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### Updating
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
docker pull asklokesh/loki-mode:latest
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
---
|
|
297
|
-
|
|
298
201
|
## Sandbox Mode
|
|
299
202
|
|
|
300
203
|
Run Loki Mode in an isolated Docker container for enhanced security.
|
|
@@ -1,70 +1,54 @@
|
|
|
1
1
|
# Alternative Installation Methods
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The recommended installation is via npm or Homebrew (see [README](../README.md#installation)). These alternatives serve specific use cases.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Git Clone (Manual)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Best for: contributors, development, or environments without npm/brew.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
**Limitation**: Installs to `node_modules`, not `~/.claude/skills/`. To use as a Claude Code skill, you must symlink:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install -g loki-mode
|
|
19
|
-
ln -sf "$(npm root -g)/loki-mode" ~/.claude/skills/loki-mode
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
**Best for**: CI/CD pipelines, programmatic access via `loki` CLI.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Homebrew (Secondary)
|
|
12
|
+
# Clone to Claude Code skills directory
|
|
13
|
+
git clone https://github.com/asklokesh/loki-mode.git ~/.claude/skills/loki-mode
|
|
27
14
|
|
|
28
|
-
|
|
15
|
+
# Optionally symlink for other providers:
|
|
16
|
+
ln -sf ~/.claude/skills/loki-mode ~/.codex/skills/loki-mode
|
|
17
|
+
ln -sf ~/.claude/skills/loki-mode ~/.gemini/skills/loki-mode
|
|
29
18
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
brew install loki-mode
|
|
19
|
+
# Optionally add CLI to PATH:
|
|
20
|
+
ln -sf ~/.claude/skills/loki-mode/autonomy/loki /usr/local/bin/loki
|
|
33
21
|
```
|
|
34
22
|
|
|
35
|
-
**
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
git clone https://github.com/asklokesh/loki-mode.git ~/.claude/skills/loki-mode
|
|
39
|
-
```
|
|
23
|
+
**Update:** `cd ~/.claude/skills/loki-mode && git pull`
|
|
40
24
|
|
|
41
|
-
**
|
|
25
|
+
**Limitation:** Does not install the `loki` CLI to PATH automatically. You must symlink or add to PATH manually.
|
|
42
26
|
|
|
43
27
|
---
|
|
44
28
|
|
|
45
|
-
## Docker
|
|
29
|
+
## Docker
|
|
46
30
|
|
|
47
|
-
**Status
|
|
31
|
+
**Status:** Image exists on Docker Hub. Tags: `latest`, version-specific (e.g., `5.49.4`).
|
|
48
32
|
|
|
49
33
|
```bash
|
|
50
34
|
docker pull asklokesh/loki-mode:latest
|
|
51
35
|
```
|
|
52
36
|
|
|
53
|
-
**Limitation
|
|
37
|
+
**Limitation:** Claude Code is an interactive CLI that requires API keys and terminal access. Running it inside a Docker container is not the standard workflow. Docker is useful for:
|
|
54
38
|
|
|
55
39
|
- CI/CD sandbox execution (running `loki` in isolated environments)
|
|
56
40
|
- Testing Loki Mode without modifying your local system
|
|
57
41
|
- Air-gapped environments with pre-built images
|
|
58
42
|
|
|
59
|
-
**Not recommended for
|
|
43
|
+
**Not recommended for:** Interactive Claude Code sessions. Use npm or Homebrew instead.
|
|
60
44
|
|
|
61
45
|
See [DOCKER_README.md](../DOCKER_README.md) for Docker-specific usage instructions.
|
|
62
46
|
|
|
63
47
|
---
|
|
64
48
|
|
|
65
|
-
## GitHub Action
|
|
49
|
+
## GitHub Action
|
|
66
50
|
|
|
67
|
-
**Status
|
|
51
|
+
**Status:** Working. Adds automated AI code review to pull requests.
|
|
68
52
|
|
|
69
53
|
```yaml
|
|
70
54
|
# .github/workflows/loki-review.yml
|
|
@@ -114,27 +98,27 @@ jobs:
|
|
|
114
98
|
| `fix` | Automatically fix issues found in the codebase |
|
|
115
99
|
| `test` | Run autonomous test generation and validation |
|
|
116
100
|
|
|
117
|
-
**Best for
|
|
101
|
+
**Best for:** Automated PR review and CI/CD integration.
|
|
118
102
|
|
|
119
103
|
---
|
|
120
104
|
|
|
121
|
-
## GitHub Release Download
|
|
105
|
+
## GitHub Release Download
|
|
122
106
|
|
|
123
|
-
**Status
|
|
107
|
+
**Status:** Working. Release assets available for each version.
|
|
124
108
|
|
|
125
109
|
```bash
|
|
126
110
|
# Download and extract to skills directory
|
|
127
|
-
curl -sL https://github.com/asklokesh/loki-mode/archive/refs/tags/v5.49.
|
|
128
|
-
mv loki-mode-5.49.
|
|
111
|
+
curl -sL https://github.com/asklokesh/loki-mode/archive/refs/tags/v5.49.4.tar.gz | tar xz
|
|
112
|
+
mv loki-mode-5.49.4 ~/.claude/skills/loki-mode
|
|
129
113
|
```
|
|
130
114
|
|
|
131
|
-
**Best for
|
|
115
|
+
**Best for:** Offline or air-gapped environments, pinned version deployments.
|
|
132
116
|
|
|
133
117
|
---
|
|
134
118
|
|
|
135
|
-
## VS Code Extension
|
|
119
|
+
## VS Code Extension
|
|
136
120
|
|
|
137
|
-
**Status
|
|
121
|
+
**Status:** Available on VS Code Marketplace.
|
|
138
122
|
|
|
139
123
|
Search for "Loki Mode" in VS Code Extensions, or:
|
|
140
124
|
|
|
@@ -142,4 +126,4 @@ Search for "Loki Mode" in VS Code Extensions, or:
|
|
|
142
126
|
code --install-extension asklokesh.loki-mode
|
|
143
127
|
```
|
|
144
128
|
|
|
145
|
-
**Best for
|
|
129
|
+
**Best for:** VS Code users who want dashboard integration within their editor.
|
package/mcp/__init__.py
CHANGED
package/package.json
CHANGED
|
@@ -165,6 +165,16 @@ IMPLEMENT -> BLIND REVIEW (parallel) -> DEBATE (if disagreement) -> AGGREGATE ->
|
|
|
165
165
|
- NEVER dispatch reviewers sequentially (always parallel - 3x faster)
|
|
166
166
|
- NEVER aggregate before all 3 reviewers complete
|
|
167
167
|
|
|
168
|
+
### Test Quality Review (Apply to Every Review)
|
|
169
|
+
|
|
170
|
+
Before approving, verify:
|
|
171
|
+
- Are tests using real implementations or excessive mocks of internal code?
|
|
172
|
+
- Were any assertion expected values changed in the same commit as implementation? (This is the top sign an agent cheated.)
|
|
173
|
+
- Do tests verify meaningful behavior or just "runs without throwing"?
|
|
174
|
+
- Could all tests pass while the feature is completely broken?
|
|
175
|
+
|
|
176
|
+
Assertion manipulation in the same commit as implementation = CRITICAL finding = automatic REJECT.
|
|
177
|
+
|
|
168
178
|
### Anti-Sycophancy Protocol (CONSENSAGENT Research)
|
|
169
179
|
|
|
170
180
|
**Problem:** Reviewers may reinforce each other's findings instead of critically engaging.
|
package/skills/quality-gates.md
CHANGED
|
@@ -14,6 +14,24 @@
|
|
|
14
14
|
8. **Mock Detector** - Classifies internal vs external mocks; flags tests that never import source code, tautological assertions, and high internal mock ratios
|
|
15
15
|
9. **Test Mutation Detector** - Detects assertion value changes alongside implementation changes (test fitting), low assertion density, and missing pass/fail tracking
|
|
16
16
|
|
|
17
|
+
## Gate 8 and 9: Automated Test Integrity
|
|
18
|
+
|
|
19
|
+
Gates 8 (Mock Detector) and 9 (Test Mutation Detector) run during the VERIFY phase and are enabled by default.
|
|
20
|
+
|
|
21
|
+
**How they run:**
|
|
22
|
+
- Gate 8 runs `tests/detect-mock-problems.sh` against all test files in the project
|
|
23
|
+
- Gate 9 runs `tests/detect-test-mutations.sh` against recent commits (default: last 5, or use `--commit HASH` for targeted checks)
|
|
24
|
+
- Both produce findings at HIGH/MEDIUM/LOW severity levels
|
|
25
|
+
- HIGH findings = automatic FAIL (same as other blocking gates)
|
|
26
|
+
|
|
27
|
+
**Disabling (not recommended):**
|
|
28
|
+
```bash
|
|
29
|
+
LOKI_GATE_MOCK_DETECTOR=false # Disable gate 8
|
|
30
|
+
LOKI_GATE_MUTATION_DETECTOR=false # Disable gate 9
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
17
35
|
## Guardrails Execution Modes
|
|
18
36
|
|
|
19
37
|
- **Blocking**: Guardrail completes before agent starts (use for expensive operations)
|
package/skills/testing.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Testing
|
|
2
2
|
|
|
3
|
+
## Mandatory Testing Rules
|
|
4
|
+
|
|
5
|
+
1. Write tests FIRST. Commit the test before writing implementation.
|
|
6
|
+
2. Tests must call REAL functions with REAL inputs and assert REAL outputs.
|
|
7
|
+
3. Mock ONLY external dependencies: HTTP APIs, databases, file system, third-party services.
|
|
8
|
+
4. NEVER mock internal modules, utility functions, or any code that is part of this project.
|
|
9
|
+
5. NEVER change a test's expected value to make it pass. If a test fails, the implementation is wrong. Fix the code, not the test.
|
|
10
|
+
6. If you believe a test expectation is incorrect, document WHY and flag for council review. Do not silently change it.
|
|
11
|
+
7. Every test file must have at least one assertion per tested function.
|
|
12
|
+
|
|
13
|
+
Gate 8 (mock detector) and Gate 9 (mutation detector) enforce rules 3-5 automatically.
|
|
14
|
+
Violations result in automatic FAIL during VERIFY phase.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
3
18
|
## E2E Testing with Playwright MCP
|
|
4
19
|
|
|
5
20
|
**Use Playwright MCP for browser-based testing.**
|