loki-mode 7.45.1 → 7.46.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.
Files changed (44) hide show
  1. package/README.md +16 -12
  2. package/SKILL.md +5 -5
  3. package/VERSION +1 -1
  4. package/autonomy/CONSTITUTION.md +9 -2
  5. package/autonomy/lib/sentrux-gate.sh +1 -1
  6. package/autonomy/loki +2 -2
  7. package/autonomy/run.sh +355 -92
  8. package/dashboard/__init__.py +1 -1
  9. package/dashboard/server.py +9 -10
  10. package/docs/COMPARISON.md +10 -10
  11. package/docs/COMPETITIVE-ANALYSIS.md +1 -1
  12. package/docs/INSTALLATION.md +2 -2
  13. package/docs/P0-SWEEP-PLAN.md +163 -0
  14. package/docs/architecture/STATE-MACHINES.md +18 -19
  15. package/docs/architecture/bmad-loki-voice-agent-council-analysis.md +1 -1
  16. package/docs/auto-claude-comparison.md +14 -11
  17. package/docs/certification/01-core-concepts/lesson.md +12 -11
  18. package/docs/certification/01-core-concepts/quiz.md +6 -6
  19. package/docs/certification/05-troubleshooting/lesson.md +23 -13
  20. package/docs/certification/05-troubleshooting/quiz.md +3 -3
  21. package/docs/certification/answer-key.md +2 -2
  22. package/docs/certification/certification-exam.md +9 -9
  23. package/docs/competitive/bolt-new-analysis.md +1 -1
  24. package/docs/competitive/emergence-others-analysis.md +9 -9
  25. package/docs/competitive/replit-lovable-analysis.md +3 -3
  26. package/docs/cursor-comparison.md +15 -12
  27. package/docs/dashboard-guide.md +9 -7
  28. package/docs/prd-purple-lab-platform-v2.md +1 -1
  29. package/docs/prd-purple-lab-platform.md +3 -3
  30. package/docs/show-hn-post.md +2 -2
  31. package/loki-ts/dist/loki.js +2 -2
  32. package/mcp/__init__.py +1 -1
  33. package/package.json +2 -2
  34. package/plugins/loki-mode/.claude-plugin/plugin.json +2 -2
  35. package/plugins/loki-mode/README.md +1 -1
  36. package/references/magic-rarv-integration.md +1 -1
  37. package/references/quality-control.md +5 -5
  38. package/references/sdlc-phases.md +1 -2
  39. package/skills/00-index.md +1 -1
  40. package/skills/artifacts.md +1 -1
  41. package/skills/healing.md +1 -1
  42. package/skills/magic-modules.md +3 -3
  43. package/skills/quality-gates.md +52 -39
  44. package/skills/testing.md +1 -1
@@ -286,7 +286,7 @@ Developers who value open-source tooling, speed, and terminal-native workflows.
286
286
  | **Autonomous Iteration** | No (task-level) | No | Partial (/loop, /schedule) | No (requires prompting) | Yes (RARV loop + completion council) |
287
287
  | **SDLC Pipeline** | No | No | No | No | Yes (9 phases) |
288
288
  | **Code Review** | No | No | Yes (single-pass) | Yes (single-pass) | Yes (3-reviewer blind) |
289
- | **Quality Gates** | No | No | No | No | Yes (10 gates) |
289
+ | **Quality Gates** | No | No | No | No | Yes (8 gates) |
290
290
  | **Anti-Sycophancy** | No | No | No | No | Yes (devil's advocate) |
291
291
  | **Memory System** | Enterprise only | No | CLAUDE.md + auto-memory | Session resumption | Episodic/semantic/procedural |
292
292
  | **Self-Hosted** | Partial (Agent-E) | No | Partial (CLI local, but subscription or API required) | Yes (with API key) | Yes (fully, any provider API key) |
@@ -383,10 +383,10 @@ Claude Code and Codex CLI offer single-pass code review. Neither provides:
383
383
  - 3-reviewer blind parallel review
384
384
  - Anti-sycophancy checks (devil's advocate on unanimous approval)
385
385
  - Severity-based blocking gates
386
- - Test coverage enforcement (>80% unit, 100% pass)
386
+ - Test suite enforcement (100% pass; coverage % not measured this release)
387
387
  - Static analysis integration (CodeQL, ESLint)
388
388
 
389
- **Opportunity:** Loki Mode's 10-gate quality system provides enterprise-grade assurance that no competitor matches.
389
+ **Opportunity:** Loki Mode's 8-gate quality system provides enterprise-grade assurance that no competitor matches.
390
390
 
391
391
  ### Gap 4: No Persistent Cross-Project Learning
392
392
 
@@ -433,7 +433,7 @@ Rork generates mobile apps but cannot handle backends, APIs, or infrastructure.
433
433
  This positioning highlights three unique capabilities no competitor offers together:
434
434
  1. **Autonomous SDLC** (not just coding assistance)
435
435
  2. **Multi-provider** (not locked to one vendor)
436
- 3. **Quality-assured** (10-gate system, 3-reviewer blind review)
436
+ 3. **Quality-assured** (8-gate system, 3-reviewer blind review)
437
437
 
438
438
  ### Differentiation by Competitor
439
439
 
@@ -443,7 +443,7 @@ This positioning highlights three unique capabilities no competitor offers toget
443
443
  | Autonomy | Semi-autonomous (/loop, /schedule, but no SDLC orchestration) | Fully autonomous (RARV loop + completion council) |
444
444
  | Scope | Individual coding tasks, PR reviews | Full SDLC pipeline (9 phases) |
445
445
  | Providers | Claude models only (multi-cloud hosting) | 5 providers, 3+ model families |
446
- | Quality | Single-pass review, GitHub Action | 10-gate, 3-reviewer blind system, anti-sycophancy |
446
+ | Quality | Single-pass review, GitHub Action | 8-gate, 3-reviewer blind system, anti-sycophancy |
447
447
  | Memory | CLAUDE.md + auto-memory (session-scoped) | Episodic/semantic/procedural (cross-project) |
448
448
  | Cost model | Subscription with rate limits or API | Self-hosted, pay-per-token, any provider |
449
449
  | IDE/surface | Terminal, VS Code, JetBrains, Desktop, Web | Terminal, VS Code (via extension) |
@@ -458,7 +458,7 @@ This positioning highlights three unique capabilities no competitor offers toget
458
458
  | Speed | 240+ tokens/sec | Depends on provider |
459
459
  | Providers | OpenAI only | 5 providers |
460
460
  | Multi-agent | Experimental (isolated) | 41 agent types, 8 domains |
461
- | Quality | Single-pass review | 10-gate system |
461
+ | Quality | Single-pass review | 8-gate system |
462
462
  | **Loki Mode advantage:** | Autonomous pipeline, multi-provider, mature multi-agent |
463
463
 
464
464
  #### vs. Emergence AI
@@ -475,7 +475,7 @@ This positioning highlights three unique capabilities no competitor offers toget
475
475
  |-----------|------|-----------|
476
476
  | Focus | Mobile apps (no-code) | Full-stack software |
477
477
  | Target user | Non-technical | Developers + technical teams |
478
- | Quality | No testing/review | 10-gate quality system |
478
+ | Quality | No testing/review | 8-gate quality system |
479
479
  | Output | Mobile app only | Any software type |
480
480
  | **Loki Mode advantage:** | Developer-grade, full-stack, quality-assured |
481
481
 
@@ -485,7 +485,7 @@ This positioning highlights three unique capabilities no competitor offers toget
485
485
  "You already use AI for coding. Loki Mode makes it autonomous -- give it a PRD, and it handles planning, implementation, testing, code review, and deployment. Keep using Claude or Codex under the hood."
486
486
 
487
487
  **For engineering leaders evaluating AI tooling:**
488
- "Loki Mode is the only open-source system with enterprise-grade quality gates (10 gates, 3-reviewer blind review, anti-sycophancy checks) that runs autonomously on any AI provider. Self-hosted, no vendor lock-in."
488
+ "Loki Mode is the only open-source system with enterprise-grade quality gates (8 gates, 3-reviewer blind review, anti-sycophancy checks) that runs autonomously on any AI provider. Self-hosted, no vendor lock-in."
489
489
 
490
490
  **For startups and solo developers:**
491
491
  "Go from idea to deployed product overnight. Write a PRD, invoke Loki Mode, and let it build, test, and deploy while you sleep. Works with your existing Claude or OpenAI API key."
@@ -557,7 +557,7 @@ The most significant near-term competitive threat is Anthropic's Agent SDK (http
557
557
 
558
558
  **However, Loki Mode's structural advantages remain:**
559
559
  1. **Multi-provider:** Agent SDK is Claude-only. Loki Mode works with any provider.
560
- 2. **Battle-tested pipeline:** 10 quality gates, completion council, healing, memory -- these took months to build and validate. A new Agent SDK project starts from zero.
560
+ 2. **Battle-tested pipeline:** 8 quality gates, completion council, healing, memory -- these took months to build and validate. A new Agent SDK project starts from zero.
561
561
  3. **Open source and self-hosted:** No dependency on Anthropic's platform decisions.
562
562
  4. **Research foundation:** Built on patterns from OpenAI, DeepMind, Anthropic, and academic research. Not just engineering, but applied AI safety research (Constitutional AI, anti-sycophancy, alignment faking detection).
563
563
 
@@ -316,7 +316,7 @@ Replit Agent has evolved rapidly through four major versions:
316
316
  | Self-testing loop | Yes | No | Yes (RARV cycle) |
317
317
  | Code review | No | No | Yes (3-reviewer blind review) |
318
318
  | Anti-sycophancy | No | No | Yes (devil's advocate) |
319
- | Quality gates | No | Security scan only | 10 gates |
319
+ | Quality gates | No | Security scan only | 8 gates |
320
320
  | Memory system | No | Project knowledge | Episodic/semantic/procedural |
321
321
  | Model selection | Platform-chosen | Platform-chosen | Task-aware (Opus/Sonnet/Haiku) |
322
322
  | Multi-provider support | No (Replit only) | No (Lovable only) | Yes (Claude/Codex/Gemini/Cline/Aider) |
@@ -393,7 +393,7 @@ Loki Mode operates as a true autonomous engineering system, not a prompt-respons
393
393
 
394
394
  ### 2. Quality Assurance
395
395
 
396
- Loki Mode's 10-gate quality system (static analysis, 3-reviewer blind review, anti-sycophancy, severity-based blocking, test coverage, backward compatibility) has no equivalent in either platform. Replit and Lovable have zero code review, zero anti-sycophancy, and minimal quality gates. This is Loki Mode's strongest differentiator.
396
+ Loki Mode's 8-gate quality system (static analysis, test suite (pass/fail), blind 3-reviewer review with severity blocking, anti-sycophancy Devil's Advocate, mock-integrity, test-mutation, documentation coverage, Magic Modules debate; backward-compatibility is a conditional healing-mode auditor) has no equivalent in either platform. Replit and Lovable have zero code review, zero anti-sycophancy, and minimal quality gates. This is Loki Mode's strongest differentiator.
397
397
 
398
398
  ### 3. Multi-Provider and Multi-Model Intelligence
399
399
 
@@ -531,7 +531,7 @@ Replit now supports React Native/Expo with full backend and RevenueCat monetizat
531
531
  When positioning Loki Mode against Replit and Lovable, emphasize:
532
532
 
533
533
  1. **"No credit anxiety"** -- You pay your API provider directly. No surprise bills. No credits burned on AI mistakes.
534
- 2. **"Production quality, not prototype quality"** -- 10 quality gates, 3-reviewer blind review, anti-sycophancy. Your code ships to production, not to a rewrite backlog.
534
+ 2. **"Production quality, not prototype quality"** -- 8 quality gates, 3-reviewer blind review, anti-sycophancy. Your code ships to production, not to a rewrite backlog.
535
535
  3. **"No lock-in"** -- Your code. Your infrastructure. Your choice of AI provider. Export is not a feature -- it is the default.
536
536
  4. **"Autonomous, not assistive"** -- Loki Mode does not wait for your next prompt. It plans, builds, tests, reviews, and deploys. You review the output, not babysit the process.
537
537
  5. **"Works with your codebase"** -- Legacy systems, brownfield projects, enterprise code. Not just greenfield MVPs.
@@ -11,7 +11,7 @@
11
11
  |-----------|--------|-----------|--------|
12
12
  | **Proven Scale** | 1M+ LoC, large agent count | Benchmarks only | Cursor |
13
13
  | **Research Foundation** | Empirical iteration | 25+ academic citations | Loki Mode |
14
- | **Quality Assurance** | Workers self-manage | 11-gate system + anti-sycophancy | Loki Mode |
14
+ | **Quality Assurance** | Workers self-manage | 8-gate system + anti-sycophancy | Loki Mode |
15
15
  | **Anti-Sycophancy** | Not mentioned | CONSENSAGENT blind review | Loki Mode |
16
16
  | **Velocity-Quality Balance** | Not mentioned | arXiv-backed metrics | Loki Mode |
17
17
  | **Full SDLC Coverage** | Code generation focus | Spec (PRD/issue/YAML) to production + growth | Loki Mode |
@@ -57,7 +57,7 @@ velocity_quality_balance:
57
57
 
58
58
  thresholds:
59
59
  max_new_warnings: 0 # Zero tolerance
60
- min_coverage: 80%
60
+ coverage_target: 80% # Target only; coverage % not measured this release
61
61
  ```
62
62
 
63
63
  **Research Basis:** [arXiv 2511.04427v2](https://arxiv.org/abs/2511.04427) - Empirical study of 807 repositories
@@ -66,16 +66,19 @@ velocity_quality_balance:
66
66
 
67
67
  ---
68
68
 
69
- ### 3. 11-Gate Quality System
69
+ ### 3. 8-Gate Quality System
70
70
 
71
71
  **Loki Mode's Gates:**
72
- 1. Input Guardrails - Validate scope, detect injection (OpenAI SDK pattern)
73
- 2. Static Analysis - CodeQL, ESLint, type checking
74
- 3. Blind Review System - 3 parallel reviewers
75
- 4. Anti-Sycophancy Check - Devil's advocate on unanimous approval
76
- 5. Output Guardrails - Code quality, spec compliance, no secrets
77
- 6. Severity-Based Blocking - Critical/High/Medium = BLOCK
78
- 7. Test Coverage Gates - 100% pass, >80% coverage
72
+ 1. Static Analysis - CodeQL, ESLint, type checking
73
+ 2. Test Suite (pass/fail) - red blocks; coverage % not measured this release
74
+ 3. Blind Code Review - 3 parallel reviewers + severity blocking (Critical/High = BLOCK; Medium/Low advisory)
75
+ 4. Anti-Sycophancy / Devil's Advocate - on unanimous PASS
76
+ 5. Mock Integrity Detector - HIGH blocks
77
+ 6. Test Mutation Detector - HIGH blocks
78
+ 7. Documentation Coverage
79
+ 8. Magic Modules Debate - BLOCK severity
80
+
81
+ Conditional auditor (not numbered): backward-compatibility / legacy-healing-auditor (healing mode only).
79
82
 
80
83
  **Cursor:** Removed dedicated quality roles. Quote: "Dedicated integrator roles created more bottlenecks than they solved."
81
84
 
@@ -174,7 +177,7 @@ Cursor learned through failure:
174
177
  ### 3. Simplicity Principle
175
178
  > "A surprising amount of the system's behavior comes down to how we prompt the agents. The harness and models matter, but the prompts matter more."
176
179
 
177
- **Loki Mode:** More elaborate infrastructure (11 gates, 41 agent types, memory systems). May be over-engineered for some use cases.
180
+ **Loki Mode:** More elaborate infrastructure (8 gates, 41 agent types, memory systems). May be over-engineered for some use cases.
178
181
 
179
182
  ---
180
183
 
@@ -192,7 +195,7 @@ We incorporated Cursor's proven patterns:
192
195
  ## Conclusion
193
196
 
194
197
  **Loki Mode is scientifically better in:**
195
- - Quality assurance (research-backed 11-gate system)
198
+ - Quality assurance (research-backed 8-gate system)
196
199
  - Anti-sycophancy (CONSENSAGENT blind review)
197
200
  - Velocity-quality balance (arXiv metrics)
198
201
  - Full SDLC coverage (spec to growth -- PRD, GitHub issue, or YAML)
@@ -151,13 +151,15 @@ Progress bars for three memory types:
151
151
  Shows count and visual progress bar for each.
152
152
 
153
153
  #### Quality Gates
154
- 6 quality gates with status icons:
155
- - **Static Analysis**: CodeQL/ESLint checks
156
- - **3-Reviewer**: Parallel blind review system
157
- - **Anti-Sycophancy**: Devil's advocate validation
158
- - **Test Coverage**: Unit test requirements
159
- - **Security Scan**: OWASP vulnerability check
160
- - **Performance**: Performance regression tests
154
+ 8 quality gates with status icons:
155
+ - **Static Analysis**: CodeQL/ESLint/type-checker findings on the diff
156
+ - **Test Suite**: Project test runner pass/fail (red blocks)
157
+ - **Blind Code Review**: 3-reviewer council with severity blocking (Critical/High block, Medium/Low advisory)
158
+ - **Anti-Sycophancy**: Devil's Advocate re-review on unanimous PASS
159
+ - **Mock Integrity**: Tautological-assertion and mock-ratio detection
160
+ - **Test Mutation**: Assertion-churn (test-fitting) detection
161
+ - **Documentation Coverage**: README presence, docs freshness, API docs
162
+ - **Magic Modules Debate**: Spec-vs-implementation debate on generated modules
161
163
 
162
164
  Status icons:
163
165
  - Checkmark (green): Passed
@@ -86,7 +86,7 @@ Three review loops identified these critical gaps in v1 of this PRD:
86
86
  Tabbed panel below the editor (collapsible, resizable height):
87
87
  - **Build Log:** Real-time loki output (WebSocket, already works on HomePage)
88
88
  - **Agents:** Active agent cards with status (already built as AgentDashboard)
89
- - **Quality Gates:** 9-gate display (already built as QualityGatesPanel)
89
+ - **Quality Gates:** 8-gate display (already built as QualityGatesPanel)
90
90
  - **AI Chat:** NEW -- text input that sends prompts to iterate on the project
91
91
 
92
92
  **2b. AI Chat (key differentiator)**
@@ -97,7 +97,7 @@ Loki Mode already has 75+ commands and 120+ API endpoints. The platform doesn't
97
97
  - **Terminal tab:** Real-time loki session output (already streamed via WebSocket)
98
98
  - **Agent Log tab:** Shows which agents are active, what they're working on (uses `/api/agents` and `/api/session/agents`)
99
99
  - **Build Output tab:** Structured build phases -- RARV cycle visualization, iteration count, current phase
100
- - **Quality Gates tab:** 9-gate status display (uses existing checklist/quality endpoints)
100
+ - **Quality Gates tab:** 8-gate status display (uses existing checklist/quality endpoints)
101
101
  - **AI Chat tab:** Send messages to iterate on the project ("fix the login page", "add dark mode") -- triggers `loki start` with the prompt as PRD amendment
102
102
 
103
103
  **Header toolbar:**
@@ -182,12 +182,12 @@ This is the "Loki way" -- instead of just editing code, users can talk to the AI
182
182
 
183
183
  ### Quality Gates Panel
184
184
 
185
- Shows the 9 Loki quality gates in real-time:
185
+ Shows the Loki quality gates and checks in real-time:
186
186
  1. Static Analysis (CodeQL/ESLint)
187
187
  2. 3-Reviewer Blind Review
188
188
  3. Anti-Sycophancy Check
189
189
  4. Severity Blocking (Critical/High)
190
- 5. Test Coverage (>80%)
190
+ 5. Test Suite (pass/fail; coverage % not measured this release)
191
191
  6. Security Scan (OWASP)
192
192
  7. Performance Check
193
193
  8. Mock Detector
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Title
4
4
 
5
- Show HN: Loki Mode - PRD in, tested code out (41 agent roles, 9 quality gates, RARV self-verification)
5
+ Show HN: Loki Mode - PRD in, tested code out (41 agent roles, 8 quality gates, RARV self-verification)
6
6
 
7
7
  ## Body
8
8
 
@@ -40,7 +40,7 @@ Integrations: Jira, Slack, Teams, GitHub Actions.
40
40
 
41
41
  ## Feedback wanted
42
42
 
43
- - Is the 9-gate quality system overkill, or does it actually help for your use cases?
43
+ - Is the 8-gate quality system overkill, or does it actually help for your use cases?
44
44
  - How do you handle the tension between autonomous agent speed and code review thoroughness?
45
45
  - What PRD complexity level breaks this approach? I have hit walls with highly coupled distributed systems.
46
46
 
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var n6=Object.defineProperty;var a6=($)=>$;function s6($,Q){this[$]=a6.bind(null,Q)}var h=($,Q)=>{for(var Z in Q)n6($,Z,{get:Q[Z],enumerable:!0,configurable:!0,set:s6.bind(Q,Z)})};var L=($,Q)=>()=>($&&(Q=$($=0)),Q);var K$=import.meta.require;var S1={};h(S1,{lokiDir:()=>P,homeLokiDir:()=>o$,findRepoRootForVersion:()=>d$,REPO_ROOT:()=>m});import{resolve as n,dirname as l$}from"path";import{fileURLToPath as t6}from"url";import{existsSync as P$}from"fs";import{homedir as r6}from"os";function i6(){let $=N1;for(let Q=0;Q<6;Q++){if(P$(n($,"VERSION"))&&P$(n($,"autonomy/run.sh")))return $;let Z=l$($);if(Z===$)break;$=Z}return n(N1,"..","..","..")}function d$($){let Q=$;for(let Z=0;Z<6;Z++){if(P$(n(Q,"VERSION"))&&P$(n(Q,"autonomy/run.sh")))return Q;let z=l$(Q);if(z===Q)break;Q=z}return n($,"..","..","..")}function P(){return process.env.LOKI_DIR??n(process.cwd(),".loki")}function o$(){return n(r6(),".loki")}var N1,m;var C=L(()=>{N1=l$(t6(import.meta.url));m=i6()});import{readFileSync as e6}from"fs";import{resolve as $Q,dirname as QQ}from"path";import{fileURLToPath as ZQ}from"url";function F$(){if($$!==null)return $$;let $="7.45.1";if(typeof $==="string"&&$.length>0)return $$=$,$$;try{let Q=QQ(ZQ(import.meta.url)),Z=d$(Q);$$=e6($Q(Z,"VERSION"),"utf-8").trim()}catch{$$="unknown"}return $$}var $$=null;var n$=L(()=>{C()});var C1={};h(C1,{runOrThrow:()=>zQ,run:()=>j,commandVersion:()=>KQ,commandExists:()=>f,ShellError:()=>a$});async function j($,Q={}){let Z=Bun.spawn({cmd:[...$],stdout:"pipe",stderr:"pipe",env:Q.env?{...process.env,...Q.env}:process.env,cwd:Q.cwd}),z,X;if(Q.timeoutMs&&Q.timeoutMs>0)z=setTimeout(()=>{try{Z.kill("SIGTERM")}catch{}X=setTimeout(()=>{try{Z.kill("SIGKILL")}catch{}},2000)},Q.timeoutMs);try{let[W,K,U]=await Promise.all([new Response(Z.stdout).text(),new Response(Z.stderr).text(),Z.exited]);return{stdout:W,stderr:K,exitCode:U}}finally{if(z)clearTimeout(z);if(X)clearTimeout(X)}}async function zQ($,Q={}){let Z=await j($,Q);if(Z.exitCode!==0)throw new a$(`command failed (${Z.exitCode}): ${$.join(" ")}`,Z.exitCode,Z.stdout,Z.stderr);return Z}async function f($){let Q=XQ($),Z=await j(["sh","-c",`command -v ${Q}`],{timeoutMs:5000});if(Z.exitCode===0)return Z.stdout.trim()||null;return null}function XQ($){if(!/^[A-Za-z0-9._/-]+$/.test($))throw Error(`refused to shell-escape suspect token: ${$}`);return $}async function KQ($,Q="--version"){if(!await f($))return null;let z=await j([$,Q],{timeoutMs:5000});if(z.exitCode!==0)return null;return((z.stdout||z.stderr).split(/\r?\n/)[0]?.trim()??"")||null}var a$;var d=L(()=>{a$=class a$ extends Error{message;exitCode;stdout;stderr;constructor($,Q,Z,z){super($);this.message=$;this.exitCode=Q;this.stdout=Z;this.stderr=z;this.name="ShellError"}}});function a($){return WQ?"":$}var WQ,T,S,I,TZ,w,R,y,q;var c=L(()=>{WQ=(process.env.NO_COLOR??"").length>0;T=a("\x1B[0;31m"),S=a("\x1B[0;32m"),I=a("\x1B[1;33m"),TZ=a("\x1B[0;34m"),w=a("\x1B[0;36m"),R=a("\x1B[1m"),y=a("\x1B[2m"),q=a("\x1B[0m")});import{existsSync as TQ}from"fs";async function Q$(){if(B$!==void 0)return B$;let $="/opt/homebrew/bin/python3.12";if(TQ($))return B$=$,$;let Q=await f("python3.12");if(Q)return B$=Q,Q;let Z=await f("python3");return B$=Z,Z}async function Z$($,Q={}){let Z=await Q$();if(!Z)return{stdout:"",stderr:"python3 not found",exitCode:127};return j([Z,"-c",$],Q)}var B$;var W$=L(()=>{d()});var t1={};h(t1,{runStatus:()=>gQ});import{existsSync as v,readFileSync as U$,readdirSync as l1,statSync as d1}from"fs";import{resolve as D,basename as xQ}from"path";import{homedir as NQ}from"os";async function DQ(){if(await f("jq"))return!0;return process.stdout.write(`${T}Error: jq is required but not installed.${q}
2
+ var n6=Object.defineProperty;var a6=($)=>$;function s6($,Q){this[$]=a6.bind(null,Q)}var h=($,Q)=>{for(var Z in Q)n6($,Z,{get:Q[Z],enumerable:!0,configurable:!0,set:s6.bind(Q,Z)})};var L=($,Q)=>()=>($&&(Q=$($=0)),Q);var K$=import.meta.require;var S1={};h(S1,{lokiDir:()=>P,homeLokiDir:()=>o$,findRepoRootForVersion:()=>d$,REPO_ROOT:()=>m});import{resolve as n,dirname as l$}from"path";import{fileURLToPath as t6}from"url";import{existsSync as P$}from"fs";import{homedir as r6}from"os";function i6(){let $=N1;for(let Q=0;Q<6;Q++){if(P$(n($,"VERSION"))&&P$(n($,"autonomy/run.sh")))return $;let Z=l$($);if(Z===$)break;$=Z}return n(N1,"..","..","..")}function d$($){let Q=$;for(let Z=0;Z<6;Z++){if(P$(n(Q,"VERSION"))&&P$(n(Q,"autonomy/run.sh")))return Q;let z=l$(Q);if(z===Q)break;Q=z}return n($,"..","..","..")}function P(){return process.env.LOKI_DIR??n(process.cwd(),".loki")}function o$(){return n(r6(),".loki")}var N1,m;var C=L(()=>{N1=l$(t6(import.meta.url));m=i6()});import{readFileSync as e6}from"fs";import{resolve as $Q,dirname as QQ}from"path";import{fileURLToPath as ZQ}from"url";function F$(){if($$!==null)return $$;let $="7.46.0";if(typeof $==="string"&&$.length>0)return $$=$,$$;try{let Q=QQ(ZQ(import.meta.url)),Z=d$(Q);$$=e6($Q(Z,"VERSION"),"utf-8").trim()}catch{$$="unknown"}return $$}var $$=null;var n$=L(()=>{C()});var C1={};h(C1,{runOrThrow:()=>zQ,run:()=>j,commandVersion:()=>KQ,commandExists:()=>f,ShellError:()=>a$});async function j($,Q={}){let Z=Bun.spawn({cmd:[...$],stdout:"pipe",stderr:"pipe",env:Q.env?{...process.env,...Q.env}:process.env,cwd:Q.cwd}),z,X;if(Q.timeoutMs&&Q.timeoutMs>0)z=setTimeout(()=>{try{Z.kill("SIGTERM")}catch{}X=setTimeout(()=>{try{Z.kill("SIGKILL")}catch{}},2000)},Q.timeoutMs);try{let[W,K,U]=await Promise.all([new Response(Z.stdout).text(),new Response(Z.stderr).text(),Z.exited]);return{stdout:W,stderr:K,exitCode:U}}finally{if(z)clearTimeout(z);if(X)clearTimeout(X)}}async function zQ($,Q={}){let Z=await j($,Q);if(Z.exitCode!==0)throw new a$(`command failed (${Z.exitCode}): ${$.join(" ")}`,Z.exitCode,Z.stdout,Z.stderr);return Z}async function f($){let Q=XQ($),Z=await j(["sh","-c",`command -v ${Q}`],{timeoutMs:5000});if(Z.exitCode===0)return Z.stdout.trim()||null;return null}function XQ($){if(!/^[A-Za-z0-9._/-]+$/.test($))throw Error(`refused to shell-escape suspect token: ${$}`);return $}async function KQ($,Q="--version"){if(!await f($))return null;let z=await j([$,Q],{timeoutMs:5000});if(z.exitCode!==0)return null;return((z.stdout||z.stderr).split(/\r?\n/)[0]?.trim()??"")||null}var a$;var d=L(()=>{a$=class a$ extends Error{message;exitCode;stdout;stderr;constructor($,Q,Z,z){super($);this.message=$;this.exitCode=Q;this.stdout=Z;this.stderr=z;this.name="ShellError"}}});function a($){return WQ?"":$}var WQ,T,S,I,TZ,w,R,y,q;var c=L(()=>{WQ=(process.env.NO_COLOR??"").length>0;T=a("\x1B[0;31m"),S=a("\x1B[0;32m"),I=a("\x1B[1;33m"),TZ=a("\x1B[0;34m"),w=a("\x1B[0;36m"),R=a("\x1B[1m"),y=a("\x1B[2m"),q=a("\x1B[0m")});import{existsSync as TQ}from"fs";async function Q$(){if(B$!==void 0)return B$;let $="/opt/homebrew/bin/python3.12";if(TQ($))return B$=$,$;let Q=await f("python3.12");if(Q)return B$=Q,Q;let Z=await f("python3");return B$=Z,Z}async function Z$($,Q={}){let Z=await Q$();if(!Z)return{stdout:"",stderr:"python3 not found",exitCode:127};return j([Z,"-c",$],Q)}var B$;var W$=L(()=>{d()});var t1={};h(t1,{runStatus:()=>gQ});import{existsSync as v,readFileSync as U$,readdirSync as l1,statSync as d1}from"fs";import{resolve as D,basename as xQ}from"path";import{homedir as NQ}from"os";async function DQ(){if(await f("jq"))return!0;return process.stdout.write(`${T}Error: jq is required but not installed.${q}
3
3
  `),process.stdout.write(`Install with:
4
4
  `),process.stdout.write(` brew install jq (macOS)
5
5
  `),process.stdout.write(` apt install jq (Debian/Ubuntu)
@@ -789,4 +789,4 @@ Set LOKI_LEGACY_BASH=1 to force the bash CLI for every command.
789
789
  `),2}default:return process.stderr.write(`Unknown command: ${Q}
790
790
  `),process.stderr.write(o6),2}}p1();process.on("SIGINT",()=>process.exit(130));process.on("SIGTERM",()=>process.exit(143));var ZZ=await QZ(Bun.argv.slice(2));process.exit(ZZ);
791
791
 
792
- //# debugId=91DA611FDFEA183B64756E2164756E21
792
+ //# debugId=7B01911F8947B6CD64756E2164756E21
package/mcp/__init__.py CHANGED
@@ -57,4 +57,4 @@ try:
57
57
  except ImportError:
58
58
  __all__ = ['mcp']
59
59
 
60
- __version__ = '7.45.1'
60
+ __version__ = '7.46.0'
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "loki-mode",
3
3
  "mcpName": "io.github.asklokesh/loki-mode",
4
- "version": "7.45.1",
5
- "description": "Loki Mode by Autonomi. Autonomous spec-to-product system: takes a PRD, GitHub issue, OpenAPI/JSON/YAML, or one-line brief to a deployed app via the RARV-C closure loop with 11 quality gates. Provider-agnostic (Claude Code, OpenAI Codex, Cline, Aider).",
4
+ "version": "7.46.0",
5
+ "description": "Loki Mode by Autonomi. Autonomous spec-to-product system: takes a PRD, GitHub issue, OpenAPI/JSON/YAML, or one-line brief to a deployed app via the RARV-C closure loop with 8 quality gates. Provider-agnostic (Claude Code, OpenAI Codex, Cline, Aider).",
6
6
  "keywords": [
7
7
  "agent",
8
8
  "agent-orchestration",
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "loki-mode",
4
4
  "displayName": "Loki Mode",
5
- "version": "7.45.1",
6
- "description": "Autonomous spec-to-product build system with a built-in trust layer (RARV-C closure loop, 11 quality gates, completion council). Ships Loki's spec-hardening, drift-detection, and deterministic PR verification commands plus the Loki MCP server.",
5
+ "version": "7.46.0",
6
+ "description": "Autonomous spec-to-product build system with a built-in trust layer (RARV-C closure loop, 8 quality gates, completion council). Ships Loki's spec-hardening, drift-detection, and deterministic PR verification commands plus the Loki MCP server.",
7
7
  "author": {
8
8
  "name": "Autonomi",
9
9
  "url": "https://www.autonomi.dev/"
@@ -1,7 +1,7 @@
1
1
  # Loki Mode plugin for Claude Code
2
2
 
3
3
  Loki Mode is the autonomous spec-to-product build system with a built-in trust
4
- layer (RARV-C closure loop, 11 quality gates, completion council). This plugin
4
+ layer (RARV-C closure loop, 8 quality gates, completion council). This plugin
5
5
  brings Loki's spec-hardening, drift-detection, and deterministic PR verification
6
6
  into Claude Code as slash commands, and wires up the Loki MCP server.
7
7
 
@@ -84,4 +84,4 @@ PRD says: "Add a login form with email, password, and submit button."
84
84
  - `skills/magic-modules.md` -- skill module for agents
85
85
  - `references/magic-modules-patterns.md` -- full API and pattern reference
86
86
  - `references/memory-system.md` -- memory engine details
87
- - `skills/quality-gates.md` -- all 12 gates documented
87
+ - `skills/quality-gates.md` -- all 8 deterministic quality gates documented
@@ -240,15 +240,15 @@ This diversity prevents groupthink and catches more issues.
240
240
  |----------|--------|-----------|
241
241
  | **Critical** | BLOCK - Fix immediately | NO |
242
242
  | **High** | BLOCK - Fix immediately | NO |
243
- | **Medium** | BLOCK - Fix before proceeding | NO |
243
+ | **Medium** | Advisory - Add `// TODO(review): ...` comment | YES |
244
244
  | **Low** | Add `// TODO(review): ...` comment | YES |
245
245
  | **Cosmetic** | Add `// FIXME(nitpick): ...` comment | YES |
246
246
 
247
- **Critical/High/Medium = BLOCK and fix before proceeding**
248
- **Low/Cosmetic = Add TODO/FIXME comment, continue**
247
+ **Critical/High = BLOCK and fix before proceeding**
248
+ **Medium/Low/Cosmetic = Add TODO/FIXME comment, continue (advisory)**
249
249
 
250
250
  ### 4. Test Coverage Gates
251
- - Unit tests: 100% pass, >80% coverage
251
+ - Unit tests: 100% pass (coverage % not measured in this release)
252
252
  - Integration tests: 100% pass
253
253
  - E2E tests: critical flows pass
254
254
 
@@ -445,7 +445,7 @@ Quality gates are enforced by `autonomy/CONSTITUTION.md`:
445
445
  **Pre-Commit (BLOCKING):**
446
446
  - Linting (auto-fix enabled)
447
447
  - Type checking (strict mode)
448
- - Contract tests (80% coverage minimum)
448
+ - Contract tests (coverage % not enforced as a gate)
449
449
  - Spec validation (Spectral)
450
450
 
451
451
  **Post-Implementation (AUTO-FIX):**
@@ -233,8 +233,7 @@ npm run test:unit
233
233
  # or
234
234
  pytest tests/unit/
235
235
  ```
236
- - Coverage: >80% required
237
- - All tests must pass
236
+ - All tests must pass (coverage % not measured in this release)
238
237
 
239
238
  **INTEGRATION Phase:**
240
239
  ```bash
@@ -48,7 +48,7 @@
48
48
 
49
49
  ### quality-gates.md
50
50
  **When:** Code review, pre-commit checks, quality assurance
51
- - 11-gate quality system (Gate 10: backward compatibility for healing; Gate 11: documentation coverage, v6.75.0)
51
+ - 8-gate quality system (gate 7: documentation coverage, v6.75.0; backward compatibility is a conditional healing-mode auditor, not numbered)
52
52
  - Blind review + anti-sycophancy
53
53
  - Velocity-quality feedback loop (arXiv research)
54
54
  - Mandatory quality checks per task
@@ -36,7 +36,7 @@ format: "markdown"
36
36
  contents:
37
37
  - Phase name and duration
38
38
  - Tasks completed (from queue)
39
- - Quality gate results (9 gates)
39
+ - Quality gate results (8 gates)
40
40
  - Coverage metrics
41
41
  - Known issues / TODOs
42
42
  ```
package/skills/healing.md CHANGED
@@ -43,7 +43,7 @@ friction_detection:
43
43
  rule: "Before 'fixing' any quirk, verify it is not an undocumented business rule"
44
44
  action: "Document in .loki/healing/friction-map.json"
45
45
  classification:
46
- business_rule: "Keep and document. Gate 10 blocks removal."
46
+ business_rule: "Keep and document. The backward-compatibility / legacy-healing auditor (healing mode) blocks removal."
47
47
  true_bug: "Fix with characterization test proving the fix."
48
48
  unknown: "Keep until classified. NEVER remove unknown friction."
49
49
  ```
@@ -84,8 +84,8 @@ The combination means: specs drive generation, debate drives quality, and the re
84
84
 
85
85
  ### With Quality Gates
86
86
 
87
- - Gate 11 (documentation coverage) now includes component docs -- each spec becomes part of COMPONENTS.md
88
- - Gate 5 (test coverage) applies to generated tests in `.loki/magic/generated/tests/`
87
+ - Gate 7 (documentation coverage) now includes component docs -- each spec becomes part of COMPONENTS.md
88
+ - Gate 2 (test suite) applies to generated tests in `.loki/magic/generated/tests/`
89
89
  - A new healing-style hook blocks merging when a component's spec has been manually edited but the implementation was not regenerated
90
90
 
91
91
  ---
@@ -190,7 +190,7 @@ loki magic diff Button
190
190
  |-------|-------------|
191
191
  | `skills/healing.md` | Healing-style hooks protect spec edits; friction-map tracks manually edited generated files |
192
192
  | `skills/documentation.md` | Component specs feed COMPONENTS.md; registry feeds ARCHITECTURE.md |
193
- | `skills/quality-gates.md` | Gate 11 includes component doc coverage; debate block = gate failure |
193
+ | `skills/quality-gates.md` | Gate 7 includes component doc coverage; Magic Modules debate (gate 8) block = gate failure |
194
194
  | `skills/agents.md` | `component-designer`, `a11y-auditor` agent types map to personas |
195
195
  | `skills/testing.md` | Generated Vitest and Playwright tests execute under the normal test gates |
196
196
  | `skills/artifacts.md` | Generated components count as artifacts and flow through the artifact pipeline |
@@ -2,25 +2,42 @@
2
2
 
3
3
  **Never ship code without passing all quality gates.**
4
4
 
5
- ## The 11 Quality Gates
6
-
7
- 1. **Input Guardrails** - Validate scope, detect injection, check constraints (OpenAI SDK)
8
- 2. **Static Analysis** - CodeQL, ESLint/Pylint, type checking
9
- 3. **Blind Review System** - 3 reviewers in parallel, no visibility of each other's findings
10
- 4. **Anti-Sycophancy Check** - If unanimous approval, run Devil's Advocate reviewer
11
- 5. **Output Guardrails** - Validate code quality, spec compliance, no secrets (tripwire on fail)
12
- 6. **Severity-Based Blocking** - Critical/High/Medium = BLOCK; Low/Cosmetic = TODO comment
13
- 7. **Test Coverage Gates** - Unit: 100% pass, >80% coverage; Integration: 100% pass
14
- 8. **Mock Detector** - Classifies internal vs external mocks; flags tests that never import source code, tautological assertions, and high internal mock ratios
15
- 9. **Test Mutation Detector** - Detects assertion value changes alongside implementation changes (test fitting), low assertion density, and missing pass/fail tracking
16
- 10. **Backward Compatibility** - Behavioral preservation, friction safety, institutional knowledge retention (healing mode)
17
- 11. **Documentation Coverage** - README exists, docs freshness within 10 commits, API docs for packages
18
-
19
- ## Gate 10: Backward Compatibility & Behavioral Preservation (v6.67.0)
20
-
21
- **Triggered when:** `LOKI_HEAL_MODE=true` or `loki heal` is active, or diff touches files flagged in `.loki/healing/friction-map.json`.
22
-
23
- **Purpose:** Prevent accidental removal of institutional logic or behavioral changes to legacy code without explicit documentation.
5
+ ## The 8 Quality Gates
6
+
7
+ Every gate below is wired into the orchestration loop (`autonomy/run.sh`) and
8
+ blocks completion when it fails. The table lists exactly what each gate detects,
9
+ what it does NOT detect (so you never over-trust a green gate), its opt-out flag,
10
+ and its blocking behavior. Transcribe this list verbatim; do not recompute it.
11
+
12
+ | # | Gate | Detects | Does NOT detect | Blocking | Opt-out flag |
13
+ |---|------|---------|-----------------|----------|--------------|
14
+ | 1 | Static Analysis | CodeQL, ESLint/Pylint, type-checker findings on the diff | Logic bugs that pass the linters | Yes (severity ladder) | `PHASE_STATIC_ANALYSIS=false` |
15
+ | 2 | Test Suite (pass/fail) | Whether the project test runner passes or fails (red blocks) | Coverage % (not measured in this release) | Yes (red blocks) | `PHASE_UNIT_TESTS=false` |
16
+ | 3 | Blind Code Review (3-reviewer council + severity blocking) | Correctness/security/design issues via 3 blind reviewers; Critical/High block, Medium/Low advisory | Issues none of the 3 reviewers surface | Yes (Crit/High block) | `PHASE_CODE_REVIEW=false` |
17
+ | 4 | Anti-Sycophancy / Devil's Advocate (on unanimous PASS) | Sycophantic unanimous approvals: a Devil's Advocate re-review on a unanimous PASS; its Crit/High findings block | Problems the Devil's Advocate reviewer also misses | Yes (DA Crit/High block) | `LOKI_GATE_DEVILS_ADVOCATE=false` |
18
+ | 5 | Mock Integrity Detector | Tautological assertions, internal-mock ratio, tests that do not import source (`tests/detect-mock-problems.sh`); HIGH blocks | Semantic correctness of mocks (whether a mock faithfully models the real dependency) | Yes (HIGH blocks) | `LOKI_GATE_MOCK=false` |
19
+ | 6 | Test Mutation Detector | Assertion-value churn alongside implementation changes (test-fitting), low assertion density (`tests/detect-test-mutations.sh`); HIGH blocks | Logically-correct-but-weak assertions | Yes (HIGH blocks) | `LOKI_GATE_MUTATION=false` |
20
+ | 7 | Documentation Coverage | README presence, docs freshness within 10 commits, API docs for exported symbols in packages | Whether the docs are accurate or useful | Yes | `LOKI_GATE_DOC_COVERAGE=false` |
21
+ | 8 | Magic Modules Debate | Spec-vs-implementation debate findings on generated Magic Modules; BLOCK-severity findings block | Issues outside the Magic Modules debate scope | Yes (BLOCK severity) | `LOKI_GATE_MAGIC_DEBATE=false` |
22
+
23
+ **Severity-based blocking** ties the review gates together: any Critical or High
24
+ finding blocks completion. Medium, Low, and cosmetic findings are advisory and
25
+ become TODO comments rather than blockers. It is the block policy inside code
26
+ review (gate 3), not a separate gate function.
27
+
28
+ **Follow-up (later release):** real coverage measurement (Fix A). Today gate 2
29
+ decides purely on the test runner's pass/fail; the coverage percentage is not
30
+ measured.
31
+
32
+ ### Conditional auditor (not numbered): Backward Compatibility (v6.67.0)
33
+
34
+ This is a healing-mode SPECIALIST reviewer, not one of the 8 loop gates. It fires
35
+ only when `LOKI_HEAL_MODE=true`, when `loki heal` is active, or when the diff
36
+ touches files flagged in `.loki/healing/friction-map.json`. Greenfield projects
37
+ skip it entirely. To suppress on a healing project, set `LOKI_HEAL_MODE=false`.
38
+
39
+ **Purpose:** Prevent accidental removal of institutional logic or behavioral
40
+ changes to legacy code without explicit documentation.
24
41
 
25
42
  **Checks:**
26
43
  1. **Friction Safety** - If modified code matches a friction-map entry, verify `safe_to_remove` is true or `classification` is `true_bug`
@@ -36,14 +53,9 @@
36
53
  - Missing adapter for replaced component = **High** (BLOCK)
37
54
  - Behavioral baseline mismatch without documentation = **Medium** (BLOCK)
38
55
 
39
- **Disabling**: gate 10 only fires when `LOKI_HEAL_MODE=true` or
40
- `.loki/healing/friction-map.json` exists in the project root (v7.4.20).
41
- Greenfield projects skip the auditor entirely. To suppress on a healing
42
- project, set `LOKI_HEAL_MODE=false`.
43
-
44
56
  ---
45
57
 
46
- ## Gate 11: Documentation Coverage (v6.75.0)
58
+ ## Gate 7: Documentation Coverage (v6.75.0)
47
59
 
48
60
  **Triggers when:** Diff touches public APIs, new files added, library/package releases
49
61
 
@@ -61,25 +73,27 @@ project, set `LOKI_HEAL_MODE=false`.
61
73
 
62
74
  **Disabling (not recommended for packages):**
63
75
  ```bash
64
- LOKI_GATE_DOC_COVERAGE=false # Disable gate 11
76
+ LOKI_GATE_DOC_COVERAGE=false # Disable gate 7
65
77
  ```
66
78
 
67
79
  ---
68
80
 
69
- ## Gate 8 and 9: Automated Test Integrity
81
+ ## Gates 5 and 6: Automated Test Integrity
70
82
 
71
- Gates 8 (Mock Detector) and 9 (Test Mutation Detector) run during the VERIFY phase and are enabled by default.
83
+ Gate 5 (Mock Integrity Detector) and gate 6 (Test Mutation Detector) run during
84
+ the VERIFY phase and are enabled by default (opt-out, never opt-in).
72
85
 
73
86
  **How they run:**
74
- - Gate 8 runs `tests/detect-mock-problems.sh` against all test files in the project
75
- - Gate 9 runs `tests/detect-test-mutations.sh` against recent commits (default: last 5, or use `--commit HASH` for targeted checks)
87
+ - Gate 5 runs `tests/detect-mock-problems.sh` against all test files in the project
88
+ - Gate 6 runs `tests/detect-test-mutations.sh` against recent commits (default: last 5, or use `--commit HASH` for targeted checks)
76
89
  - Both produce findings at HIGH/MEDIUM/LOW severity levels
77
- - HIGH findings = automatic FAIL (same as other blocking gates)
90
+ - HIGH findings = automatic FAIL (same as other blocking gates); MED/LOW route to the findings-injection file for the next iteration rather than blocking
78
91
 
79
- **Disabling**: gates 8 and 9 are baked into the test pipeline (the bash
80
- scripts at `tests/detect-mock-problems.sh` and
81
- `tests/detect-test-mutations.sh`); they have no env-var toggle today.
82
- Skip the gate by not running the script in your CI.
92
+ **Disabling:**
93
+ ```bash
94
+ LOKI_GATE_MOCK=false # Disable gate 5 (Mock Integrity Detector)
95
+ LOKI_GATE_MUTATION=false # Disable gate 6 (Test Mutation Detector)
96
+ ```
83
97
 
84
98
  ---
85
99
 
@@ -647,12 +661,12 @@ velocity_quality_balance:
647
661
  before_commit:
648
662
  - static_analysis: "Run ESLint/Pylint/CodeQL - warnings must not increase"
649
663
  - complexity_check: "Cyclomatic complexity must not increase >10%"
650
- - test_coverage: "Coverage must not decrease"
664
+ - test_suite: "Tests must pass (coverage % not measured in this release)"
651
665
 
652
666
  thresholds:
653
667
  max_new_warnings: 0 # Zero tolerance for new warnings
654
668
  max_complexity_increase: 10% # Per file, per commit
655
- min_coverage: 80% # Never drop below
669
+ coverage_target: 80% # Target/threshold only; not measured this release (Fix A follow-up)
656
670
 
657
671
  if_threshold_violated:
658
672
  action: "BLOCK commit, fix before proceeding"
@@ -665,7 +679,6 @@ velocity_quality_balance:
665
679
  .loki/metrics/quality/
666
680
  +-- warnings.json # Static analysis warning count over time
667
681
  +-- complexity.json # Cyclomatic complexity per file
668
- +-- coverage.json # Test coverage percentage
669
682
  +-- velocity.json # Lines added/commits per hour
670
683
  +-- ratio.json # Quality/Velocity ratio (must stay positive)
671
684
  ```
@@ -872,7 +885,7 @@ Task(prompt="Stage 2: Check code quality ONLY...")
872
885
  |----------|--------|
873
886
  | Critical | BLOCK - fix immediately |
874
887
  | High | BLOCK - fix before commit |
875
- | Medium | BLOCK - fix before merge |
888
+ | Medium | Advisory - TODO comment, fix recommended |
876
889
  | Low | TODO comment, fix later |
877
890
  | Cosmetic | Note, optional fix |
878
891
 
package/skills/testing.md CHANGED
@@ -10,7 +10,7 @@
10
10
  6. If you believe a test expectation is incorrect, document WHY and flag for council review. Do not silently change it.
11
11
  7. Every test file must have at least one assertion per tested function.
12
12
 
13
- Gate 8 (mock detector) and Gate 9 (mutation detector) enforce rules 3-5 automatically.
13
+ Gate 5 (mock integrity detector) and Gate 6 (mutation detector) enforce rules 3-5 automatically.
14
14
  Violations result in automatic FAIL during VERIFY phase.
15
15
 
16
16
  ---