feat(intelligence): capability matrix + deterministic query planner (RAN-148)#27
feat(intelligence): capability matrix + deterministic query planner (RAN-148)#27aksOps wants to merge 4 commits into
Conversation
Adds lodash >= 4.17.24 override in package.json to resolve two CVEs (HIGH code injection via _.template, MODERATE prototype pollution via _.unset/_.omit) in transitive dependencies swagger-ui-react and @antv/g6. All lodash instances now resolve to 4.18.1. npm audit reports 0 vulnerabilities. Co-Authored-By: Paperclip <noreply@paperclip.ing>
…ry planner (RAN-148) Adds Phase 3 of the Repository Intelligence system: - CapabilityMatrix: static per-language × per-dimension capability registry (EXACT/PARTIAL/LEXICAL_ONLY/UNSUPPORTED) for Java, TypeScript, JavaScript, Python, Go, C#, Rust, and lexical-only languages. - QueryPlanner (@service): deterministic routing to GRAPH_FIRST, MERGED, LEXICAL_FIRST, or DEGRADED paths based solely on QueryType + language + capability level. No LLM, no probabilistic logic. - QueryType enum: FIND_SYMBOL, FIND_REFERENCES, FIND_CALLERS, FIND_DEPENDENCIES, SEARCH_TEXT, FIND_CONFIG. - CapabilityDimension enum: 9 analysis dimensions. - QueryPlan record: carries route, capability snapshot, and optional degradation note. - GET /api/capabilities endpoint (optional ?language= filter). - get_capabilities MCP tool (32nd tool). - 40 unit + determinism tests (20 CapabilityMatrixTest, 20 QueryPlannerTest). Co-Authored-By: Paperclip <noreply@paperclip.ing>
Code reviewFound 3 issues:
Neither
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Principal Engineer Follow-up Review — PR #27 (RAN-148 Phase 3)The 3 issues I raised in my previous review remain unresolved. This PR must not merge until all 3 are fixed. 🚫 ISSUE 1 (unchanged):
|
…anner utility class (RAN-155) - CapabilityMatrix: add distinct CPP_CAPS table (PARTIAL structural, no ORM, LEXICAL_ONLY auth) - CapabilityMatrix.tableFor(): explicit case "cpp","c++" -> CPP_CAPS (was incorrectly using CSHARP_CAPS fallback) - CapabilityMatrix.asSerializableMap(): add "cpp" to language list for REST/MCP responses - QueryPlanner: remove @service (Option B) — plain utility class, never injected anywhere; resolves spurious @Profile("serving") absence Co-Authored-By: Paperclip <noreply@paperclip.ing>
PE Final Review — PR #27 APPROVED ✅All 3 issues from my earlier review are resolved in commit Fixes verified:1. 2. 3. PE approves merge of PR #27. |
Summary
EXACT / PARTIAL / LEXICAL_ONLY / UNSUPPORTEDfor 9 analysis dimensions across Java, TypeScript, JavaScript, Python, Go, C#, Rust, and lexical-only languages (Kotlin, Scala, Shell, etc.)@Service): deterministic routing toGRAPH_FIRST,MERGED,LEXICAL_FIRST, orDEGRADED— no LLM, explicit rules only; includesdegradationNotefor degraded pathsQueryType,CapabilityDimension,QueryRoute,QueryPlan— all inio.github.randomcodespace.iq.intelligence.queryGET /api/capabilitiesendpoint (optional?language=filter)get_capabilitiesMCP tool (32nd tool)CapabilityMatrixTest(20) +QueryPlannerTest(20), all passing; includes determinism testCloses RAN-148. Part of RAN-141 Phase 3.
Test plan
mvn test -Dtest="CapabilityMatrixTest,QueryPlannerTest"— all 40 passBundleCommandTestskip)GET /api/capabilitiesreturns full matrix JSONGET /api/capabilities?language=javareturns only Java rowget_capabilitiesMCP tool returns same data🤖 Generated with Claude Code