=20">
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Kilo-Kit: Autonomous Cognitive Flow & Quality Engine for AI Coding Agents
> **Version:** 1.9.1
> **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:
1. **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.
2. **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).
3. **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 (Claude Code / Antigravity / Cursor / Gemini CLI)"]
Sentinel["🛡️ Kilo-Sentinel Supervisor & Circuit Breaker (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 (ToT DAG • Adversarial Grill • 5-Whys • Grounded Synthesis)"]
Skills["📚 180 Curated Skills Catalog"]
Limbs["🛠️ Safe Execution Limbs (Atomic Write • AST Edit • Security Filtered Exec)"]
C4 --> Engines
C4 --> Skills
C4 --> Limbs
end
DB[("💾 SQLite Atomic Memory (cognitive_triangulations • katl_trajectories • facts)")]
Clients |MCP Protocol / stdio| Sentinel
Sentinel Cortex
Cortex DB
mermaid
flowchart LR
G1[" Gate 1: Grounded Probe • Memory Recall • Codebase Probe"]
G2[" Gate 2: Cognitive Reasoning • 3-Option ToT DAG • Adversarial Grill • Low-Confidence Escalator"]
G3[" Gate 3: Approval • Plan Locked • Skills Injected"]
G4[" Gate 4: Execution • Defense-in-Depth • Sentinel Guarded"]
G5[" Gate 5: 4D QA • Playwright E2E • SQLite Reflection"]
G1 --> G2
G2 -->|Confidence >= 0.70| G3
G2 -.->|Confidence Escalation| Subagent["🔬 Research Subagent (GitHub & Docs Sandbox)"]
Subagent -.-> G2
G3 --> G4
G4 --> G5
G4 -.->|3x Loop Detected| Breaker["🛑 Circuit Breaker (Supervised Reset)"]
Breaker -.-> G1
mermaid
flowchart TD
Req["👤 User Prompt"] --> Agent["🤖 Host AI Agent"]
Agent -->|1. Unauthorized Edit Attempt| GateCheck{"🛡️ Kilo-Sentinel Pre-Flight Lock"}
GateCheck -->|❌ Uninitialized / Unread File| Blocked["🛑 403 Hard-Gate Blocked (Forces Planning First)"]