feat(research): integrate Context7 MCP as primary source channel

Adds Context7 resolution before websearch for library/framework/API topics,
reducing reliance on web crawling for well-indexed libraries. Falls back to
websearch for unresolved libraries, concept topics, or when the user provides
starting URLs. Subagents are explicitly prohibited from calling Context7 to
prevent tool inheritance from producing duplicate or conflicting summaries.

Includes trigger and output evals for the Context7 path (resolves, fallback,
skipped for non-library topics), stale description and constraint fixes, and a
concrete "sufficient content" threshold.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 10:38:34 +00:00
parent 78db4454b0
commit 542f6ce102
4 changed files with 86 additions and 20 deletions

View File

@@ -36,4 +36,4 @@ No inline URLs in the body — all source traceability lives in `sources.md` via
- **Status:** `extracted` | `no content extracted`
```
Use one `##` section per source. Slugs are kebab-case derived from the domain or page title (e.g. `stripe-api-docs`, `openai-python-sdk-readme`).
Use one `##` section per source. Slugs are kebab-case derived from the domain or page title (e.g. `stripe-api-docs`, `openai-python-sdk-readme`). For Context7 sources, use the slug `context7-<library-slug>` (e.g. `context7-vercel-next-js`) and set **URL** to `context7:<library-id>` (e.g. `context7:/vercel/next.js`).