Knowledge Engine · Layer 01
Confidence Scoring
Every query result carries a deterministic confidence score. Base 100, with ten specific deduction rules. No silent aggregation — every penalty appears individually in penalties[].
Design rule
Below confidence 60, suggested_next only recommends human actions — never automated steps. Below 20, the system refuses to proceed entirely.
Penalty Matrix
| Condition | Deduction | Rationale |
|---|---|---|
| LSP unavailable for queried language | −25 | Symbol resolution unreliable |
| Index 1+ commits behind HEAD | −20 | Structural data may be stale |
| Unresolved cross-layer conflict | −20 | Two sources disagree on verifiable facts |
| Recursive CTE hit hub_node cap | −15 | Blast radius truncated |
| Summary-only evidence (no structural backing) | −15 | Evidence is lossy, not authoritative |
| ctags fallback active | −10 | Reduced parsing precision |
Vector dormant but NEEDS_EXPLORE triggered | −10 | Semantic search unavailable |
| Graph truncated at depth limit | −10 | Deeper dependencies unexplored |
| Dirty working tree | −10 | Index reflects last commit, not current edits |
| Tier 3/4 degradation | −30 | Multiple sources materially degraded |
score = 100 − sum(deductions)
Confidence Labels
80–100
HIGHMay suggest automated next step.
60–79
MEDIUMSuggest narrower query or reindex.
40–59
LOWSuggest human verification only.
| Score | Label | Behavior |
|---|---|---|
| 80–100 | High | May suggest automated next step |
| 60–79 | Medium | Suggest narrower query or reindex |
| 40–59 | Low | Human verification only |
| 20–39 | Unreliable | Suggest stopping automated work |
| 0–19 | Insufficient evidence | Cannot answer. Manual investigation required |
| N/A | Unknown | Cannot classify this query. Please rephrase |
Governance Rules
- Every penalty fires individually — zero silent aggregation
penalties[]array contains each:{rule, deduction, detail}- New penalties require a 30-day trace review before being added
- Monthly calibration via
dev replay --all --since 30dtunes penalty weights