Knowledge Engine · Layer 01
Knowledge Engine
The Knowledge Engine produces a reliability-scored Execution Context Object (ECO) for every task. It does not understand code — it retrieves structural facts, measures its own reliability, and communicates its limits.
Responsibilities
- Parse every commit into a structured module index (symbols, dependencies, exports)
- Detect intent from the spec file — heuristic, 1–2 intents maximum
- Retrieve evidence biased by detected intent
- Score evidence across five ECO dimensions
- Gate — block the pipeline if evidence is insufficient
What It Is Not
- Not a code understanding engine
- Not an LLM wrapper
- Not a semantic search system (vector search is a Tier 3 fallback only)
Reasoning happens in the consuming LLM. The Knowledge Engine provides the evidence that makes that reasoning grounded.
Components
| Component | Role |
|---|---|
| Parsing Layer | Tree-sitter + ctags, atomic post-commit |
| Storage Layer | SQLite schema, WAL mode, FTS5 |
| Retrieval Sources | Four-tier retrieval cascade |
| Query Router | Intent-biased tier selection |
| Confidence Scoring | Deterministic 0–100 penalty matrix |