Kilo-Kit
Kilo-Kit: Autonomous Cognitive Flow & Quality Engine for AI Coding Agents
Version: 1.9.0
Author: Kilo-Kit Team
License: Apache 2.0
Kilo-Kit is an agentic MCP runtime and curated 180-skill catalog designed to enforce grounded diagnosis, Tree-of-Thoughts architectural planning, adversarial red-teaming, 4D quality verification, and continuous SQLite self-improvement for AI coding assistants.
๐ง Core Architectural Pillars:
Division of Labor (Cortex vs Limbs): Kilo-Kit acts as the high-level cognitive brain (Tree of Thoughts, 5-Whys root cause analysis, adversarial stress-testing, context compaction) while host clients handle surgical I/O.
Kilo-Sentinel Supervisor & Circuit Breaker: Real-time middleware enforcing Pre-flight Grounding Locks (no editing unread files), loop tripwires (identical call and edit-thrashing detection), and SQLite trajectory logging (
katl_trajectories).Triangulated Cognitive Synthesis & Low-Confidence Escalation: Combines internal SQLite memory recall, GitHub 10k+ stars patterns, and ToT DAG benchmarking (
kilo_triangulate_research), with automatic subagent delegation when confidence < 0.70.Fuzzy Skill & Alias Resolver: Instant, resilient skill loading with support for aliases (
brainstorming,diagnose,playwright,clean-code,tdd,grounded-research-benchmark).4D Quality Assurance & Playwright E2E Gate: Validates Given-When-Then acceptance criteria, clean code interfaces, UI/UX aesthetics, and automated Playwright browser/DOM verification before work is marked complete.
๐๏ธ System Architecture & Division of Labor
Kilo-Kit enforces a strict architectural boundary between High-Level Cognitive Reasoning (Cortex) and Surgical I/O Execution (Limbs):
flowchart TD
Clients["๐ฅ๏ธ Host AI Clients<br/>(Claude Code / Antigravity / Cursor / Gemini CLI)"]
Sentinel["๐ก๏ธ Kilo-Sentinel Supervisor & Circuit Breaker<br/>(Pre-flight Grounding Lock โข Loop Tripwire โข Step Budget)"]
subgraph Cortex["๐ง Kilo-Kit Cognitive Cortex (MCP Runtime)"]
direction TB
C4["๐๏ธ C4 5-Gate Lifecycle Controller"]
Engines["โ๏ธ 6 Cognitive Engines<br/>(ToT DAG โข Adversarial Grill โข 5-Whys โข Grounded Synthesis)"]
Skills["๐ 180 Curated Skills Catalog"]
Limbs["๐ ๏ธ Safe Execution Limbs<br/>(Atomic Write โข AST Edit โข Security Filtered Exec)"]
C4 --> Engines
C4 --> Skills
C4 --> Limbs
end
DB[("๐พ SQLite Atomic Memory<br/>(cognitive_triangulations โข katl_trajectories โข facts)")]
Clients <-->|MCP Protocol / stdio| Sentinel
Sentinel <--> Cortex
Cortex <--> DB๐ C4 Cognitive Lifecycle & Low-Confidence Escalator
All agent tasks flow through a deterministic 5-Gate state machine. Unauthorized file mutations prior to Gate 3 approval are blocked at the server level:
flowchart LR
G1["<b>Gate 1: Grounded Probe</b><br/>โข Memory Recall<br/>โข Codebase Probe"]
G2["<b>Gate 2: Cognitive Reasoning</b><br/>โข 3-Option ToT DAG<br/>โข Adversarial Grill<br/>โข Low-Confidence Escalator"]
G3["<b>Gate 3: Approval</b><br/>โข Plan Locked<br/>โข Skills Injected"]
G4["<b>Gate 4: Execution</b><br/>โข Defense-in-Depth<br/>โข Sentinel Guarded"]
G5["<b>Gate 5: 4D QA</b><br/>โข Playwright E2E<br/>โข SQLite Reflection"]
G1 --> G2
G2 -->|Confidence >= 0.70| G3
G2 -.->|Confidence < 0.70<br/>Escalation| Subagent["๐ฌ Research Subagent<br/>(GitHub & Docs Sandbox)"]
Subagent -.-> G2
G3 --> G4
G4 --> G5
G4 -.->|3x Loop Detected| Breaker["๐ Circuit Breaker<br/>(Supervised Reset)"]
Breaker -.-> G1๐ก๏ธ Protocol-Level Hard-Gate Enforcement
Traditional prompt rules (.cursorrules, CLAUDE.md) suffer from prompt drift. Kilo-Kit enforces safety via JSON-RPC Interceptor Middleware:
flowchart TD
Req["๐ค User Prompt"] --> Agent["๐ค Host AI Agent"]
Agent -->|1. Unauthorized Edit Attempt| GateCheck{"๐ก๏ธ Kilo-Sentinel<br/>Pre-Flight Lock"}
GateCheck -->|โ Uninitialized / Unread File| Blocked["๐ 403 Hard-Gate Blocked<br/>(Forces Planning First)"]
Blocked --> Plan["๐ง Gate 1 & 2: C4 Planning<br/>(kilo_orchestrate_task + kilo_triangulate_research)"]
Plan --> SaveDB[("๐พ Commit CoT to SQLite")]
SaveDB --> Approval["๐ค User Approves Plan"]
Approval -->|2. Authorized Execution| GateCheck
GateCheck -->|โ
State = READY| Exec["๐ Gate 4: Safe Execution<br/>(kilo_write_file / kilo_edit_file)"]
Exec --> Verify["โ
Gate 5: 4D Verification & SQLite Reflection"]๐งฐ The 24 All-in-One MCP Tools Suite
Kilo-Kit provides a complete, self-contained execution and cognitive runtime:
Category | Tool | Description |
Gating & Orchestration |
| C4 closed-loop gate. Enforces brainstorming and cognitive steps before code mutation. |
| Routes intent to best workflow chains, task modes, and rules. | |
| Loads curated | |
| High-precision semantic and keyword search across 180 skills. | |
| Inspects persistent SQLite decisions, facts, and sessions. | |
| Pins immutable operational rules and architectural decisions into SQLite | |
| Self-Improvement: Persists reflections, correct/wrong paths, and lessons to SQLite. | |
| Reports route telemetry, top skills, workflows, scores, and conflict penalties. | |
| Validates entire skill catalog against the quality gate. | |
Cognitive Reasoning |
| Grounded Synthesis & Low-Confidence Escalator: Combines SQLite memory + GitHub grounding + 3-option ToT DAG, atomically commits reasoning to SQLite, and triggers research escalation when confidence < 0.70. |
| Tree of Thoughts DAG: Step-by-step reasoning, 3-option trade-off matrix & hypothesis branching. | |
| Adversarial Red-Teaming: Inversion, simplification, mobile touch & concurrency stress testing. | |
| 5-Whys Diagnostic Engine: Recursive causal back-propagation with regression test scaffolding. | |
| Cognitive Compactor: 40-70% token savings while locking invariants. | |
| Self-Evolution: Distills solved patterns into reusable skills. | |
Sentinel & Supervision |
| Supervisor Telemetry: Inspects circuit breaker state, step budget, and grounded files list. |
| Supervised Reset: Resets tripped circuit breaker with root-cause justification. | |
| Industry Benchmark: Audits trajectory against GitHub standards and triggers re-planning. | |
Safe Execution Suite |
| Line slicing, size capping, and repository boundary enforcement. |
| Glob pattern search across directory trees. | |
| Line-by-line regex and substring search. | |
| Atomic write with Protocol Hard-Gate, clean-code smell audit, and secret detection. | |
| Targeted search-and-replace with JSON syntax & bracket balancing audit. | |
| Defense-in-depth terminal execution with security guardrails & command injection filtering. |
๐ 180 Curated Skills Catalog Taxonomy
Skills are organized into 6 functional modules with instant alias mapping:
skills/
โโโ ๐๏ธ engineering/ (39 skills)
โ โโโ backend-development, codebase-design, api-patterns, database-design
โ โโโ nextjs-best-practices, react-patterns, tailwind-patterns, aspnet-core, better-auth
โโโ ๐งฉ problem-solving/ (24 skills)
โ โโโ sequential-thinking, root-cause-tracing, systematic-debugging
โ โโโ collision-zone-thinking, scale-game, simplification-cascades, inversion-exercise
โโโ ๐ productivity/ (33 skills)
โ โโโ brainstorming, spec-driven-development, tdd-workflow, code-review
โ โโโ grounded-research-benchmark, verification-before-completion, grill-me, subagent-driven-development
โโโ ๐ค agent-frameworks/ (26 skills)
โ โโโ workflow-state-machines, agent-memory, agentic-rag, multi-agent-orchestration
โ โโโ mcp-agent-patterns, code-agent-patterns, context-optimization
โโโ ๐ก๏ธ security/ (22 skills)
โ โโโ ai-guardrails, red-team-tactics, security-best-practices, vulnerability-scanner
โโโ โ๏ธ devops-cloud/ (36 skills)
โโโ devops, server-management, chrome-devtools, performance-profiling, render-deployFuzzy Alias Resolution: Calling kilo_get_skill("brainstorming") automatically loads productivity/brainstorming/SKILL.md.
โก Quick Start & Multi-Client IDE Setup
Global Installation
npm install -g @vodailoc/kilo-kit-mcp
kilo-kit-init globalMulti-Client Configuration
1. Claude Code (~/.claude.json or project root)
{
"mcpServers": {
"kilo-kit": {
"command": "kilo-kit-mcp",
"args": []
}
}
}2. Antigravity & Gemini CLI (~/.gemini/antigravity-cli/mcp_config.json)
{
"mcpServers": {
"kilo-kit": {
"command": "node",
"args": ["/usr/local/lib/node_modules/@vodailoc/kilo-kit-mcp/dist/index.js"]
}
}
}3. Cursor & Windsurf (.cursor/mcp.json)
{
"mcpServers": {
"kilo-kit": {
"command": "npx",
"args": ["-y", "@vodailoc/kilo-kit-mcp"]
}
}
}4. Team Repository Rollout
Generate protocol guidelines (CLAUDE.md, AGENTS.md, GEMINI.md) for your entire engineering team:
kilo-kit-init init --client all
git add CLAUDE.md AGENTS.md GEMINI.md
git commit -m "chore: configure Kilo-Kit C4 cognitive protocol"๐ Empirical Verification & Quality Benchmarks
Metric | Without Kilo-Kit (Vanilla Agent) | With Kilo-Kit v1.9.0 | Verification Mechanism |
Ungrounded Code Mutations | 42% of sessions (modifying unread files) | 0% (100% Blocked) | Server-side Pre-flight Grounding Lock |
Context Window Longevity | Degrades at >30k tokens | Sustained >150k tokens |
|
Silent Regression Rate | 28% of PRs | < 2% | 4D QA (Playwright + Given-When-Then criteria) |
Tool Thrashing / Infinite Loops | Common on complex bugs | Terminated โค 3 loops | Kilo-Sentinel Loop & Thrashing Tripwire |
Self-Healing & Reasoning Recall | Zero across sessions | 100% SQLite Persistence |
|
๐ Documentation Directory Index
For detailed specifications, protocol definitions, and developer guides, explore the docs/ directory:
๐๏ธ Architecture Overview - System topology, Cortex vs Limbs, and Memory schema.
๐ C4 Protocol Specification - 5-Gate lifecycle state transitions and invariant rules.
๐งฐ MCP Tooling Reference - JSON schemas, error codes, and tool calling examples.
๐ Skills Taxonomy & Authoring - Skill catalog guidelines and authoring standard.
๐ Benchmarks & Methodology - Token reduction experiments and SWE-bench alignment.
๐ก๏ธ Security & Guardrails - Circuit breaker, input sanitization, and blast-radius control.
๐งช Development, Testing & Verification
# Clone repository
git clone https://github.com/VoDaiLocz/KILO-KIT.git
cd KILO-KIT
npm install
# Run unit test suites (15/15 test files, 68/68 tests passing)
npm test
# Run full health diagnostics
npm run doctor
# Validate 100% of 180 skills against structural quality gates
node src/tools/validate-skill.js --all skills๐ License
Distributed under the Apache 2.0 License. See LICENSE for more details.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VoDaiLocz/kilo-kit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server