Commit 2f50784
committed
feat(query-router): extend RetrievalPlan to ExecutionPlan with skill/tool/extension recommendations
Add ExecutionPlan interface extending RetrievalPlan with capability
activation recommendations. The classifier now evaluates Tier 0
summaries from the CapabilityDiscoveryEngine to recommend which skills,
tools, and extensions should be activated alongside the retrieval plan.
- Add ExecutionPlan, SkillRecommendation, ToolRecommendation,
ExtensionRecommendation types to rag/unified/types.ts
- Add buildDefaultExecutionPlan() factory
- Add getTier0Summaries() and getTier0SummariesByKind() to
CapabilityDiscoveryEngine for prompt injection
- Enhance QueryClassifier.classifyWithPlan() to return ExecutionPlan
with capability recommendations from LLM
- Add setCapabilityDiscoveryEngine() to wire discovery into classifier
- Add heuristicCapabilitySelect() keyword-based fallback (14 patterns)
- Update PLAN_SYSTEM_PROMPT_TEMPLATE with 10-step chain-of-thought
covering capability selection dimensions
- Add CapabilitiesActivateEvent to QueryRouterEventUnion
- Wire capabilities:activate event emission into QueryRouter.route()
- Add setCapabilityDiscoveryEngine() to QueryRouter public API
- 26 new tests covering ExecutionPlan defaults, heuristic selection,
classifier output, capability filtering, and discovery integration1 parent 5f4bc2d commit 2f50784
6 files changed
Lines changed: 1492 additions & 30 deletions
File tree
- src
- discovery
- query-router
- __tests__
- rag/unified
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
298 | 351 | | |
299 | 352 | | |
300 | 353 | | |
| |||
0 commit comments