Codebase-search MCP — installation stub

Codebase-search MCP — installation stub

Closes Gap #5 from RD-0033 — give talents AST-grade lookup (where_is, find_references, outline) instead of grep-blind.

⚠ Fusion required. This component overlaps RD-0031 (toolkit-catalog distribution). Pablo synchronizes the two orders before custom build. Most of the work is downstream of RD-0031; this kit only ships the wiring.

What it provides

Three tools usable by any skill or by the parent agent:

Tool Purpose Example
where_is Find a symbol's definition by name where_is(name="generate_fiche", kind="function")
find_references List call sites / usages find_references(symbol="DAEObject")
outline Tree of top-level symbols in a file outline(path=".claude/commands/legal-fiche.md")

Backed by an AST index. Source candidate (optional, not a hard dependency): coleam00/helpline codebase-search pattern, and Understand-Anything's knowledge-graph.json (RD-0007) for non-code content.

Wiring (after RD-0031 resolves the distribution question)

  1. Decide whether the talent benefits — code-heavy talents yes, content-only talents no (skip this component entirely).
  2. Choose backend:
    • Default: the toolkit-catalog-distributed server (post-RD-0031)
    • Fallback v1: a thin local server reading from a pre-built .ai-layer/index.json per repo
  3. Add the .mcp.json entry to the talent repo:
{
  "mcpServers": {
    "codebase-search": {
      "type": "stdio",
      "command": "{path-to-server}",
      "args": [],
      "env": {
        "AI_LAYER_INDEX": "${CLAUDE_PROJECT_DIR}/.ai-layer/index.json"
      }
    }
  }
}
  1. Build/refresh the index during assembly Phase C (after skills are placed) — a one-shot indexer script will be the deliverable from RD-0031.

Status v1 of this kit

  • Wiring spec: ✅ this file
  • Reference index format: ⏳ defined in RD-0031
  • Indexer script: ⏳ RD-0031
  • Server binary: ⏳ RD-0031

Until RD-0031 lands, talents skip this component without losing the other four. Document the skip in the talent's user guide ("Recherche structurée arrive en v2").