diff --git a/.claude/CLAUDE_EXTENDED.md b/.claude/CLAUDE_EXTENDED.md index 7cac7ad..cff8def 100644 --- a/.claude/CLAUDE_EXTENDED.md +++ b/.claude/CLAUDE_EXTENDED.md @@ -323,11 +323,24 @@ Tier 0 — **Ollama is the documentation and classification engine.** Route pros ### GrepAI (Semantic Code Search) -**Use GrepAI first for any context lookup before reading files directly.** It indexes all session logs, skill files, and project docs with boosted relevance for `.claude/` and `session-logs/`. +**Recall hierarchy — wiki first, GrepAI second.** GrepAI is NOT the first stop for context. +The synthesized **wiki** (`wiki/`, 57 curated client/project/system articles) is the truth layer +for a *known entity* — check it first (it is cheaper and already distilled). Go to GrepAI when the +wiki can't answer: + +1. **Code** — `grepai_search` / `grepai_trace_callers` / `grepai_trace_callees` over the Rust+TS + corpus (~8k files). The wiki has zero code awareness; this is GrepAI's irreplaceable value for + GuruRMM/GuruConnect dev (call-graph tracing, "where is Z implemented"). +2. **Discovery** — you don't know the entity name, or no wiki article exists yet (a new + client/system not yet compiled). +3. **Sub-synthesis detail** — a fact that was in a raw session log but didn't make the wiki's + summary cut. + +Order of recall: **wiki (known entity) -> GrepAI (code / discovery / un-compiled detail) -> raw +file reads.** Do NOT GrepAI something the wiki already answers — that's the redundant overlap. -- **When to use:** "what did we do with X", "how does Y work", "find where Z is configured", context recovery, exploring unfamiliar code - **MCP tools:** `grepai_search` (primary), `grepai_trace_callers`, `grepai_trace_callees` -- **Agent:** `deep-explore` (for multi-hop exploration) +- **Agent:** `deep-explore` (for multi-hop CODE exploration) - **CLI:** `$CLAUDETOOLS_ROOT/grepai search "query" --json -c -n 5` - **Watcher:** runs as scheduled task "GrepAI Watcher - claudetools" (auto-starts on login, keeps index current)