From d4d24b5afdf1e0ab655a2ca70d3b5e917f2753cd Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Mon, 8 Jun 2026 08:15:25 -0700 Subject: [PATCH] docs(harness): reconcile remaining GrepAI-first refs with wiki-first hierarchy The context-lookup standard + CODING_GUIDELINES still said 'GrepAI First' unconditionally. Updated both to: wiki first for known-entity facts; GrepAI/Grep-before-read for code+discovery. Keeps the search-before-read token discipline; removes the wiki overlap. Completes the positioning fix started in e8a689b0 (all 4 sources now consistent: CORE, EXTENDED, standard, guidelines). Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/CODING_GUIDELINES.md | 7 +++++-- .../standards/context-lookup/grepai-first.md | 21 ++++++++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.claude/CODING_GUIDELINES.md b/.claude/CODING_GUIDELINES.md index 8ea1e4c..bce18c3 100644 --- a/.claude/CODING_GUIDELINES.md +++ b/.claude/CODING_GUIDELINES.md @@ -65,9 +65,12 @@ powershell.exe -Command '$x = 5; Write-Host $x' --- -## Context Lookup — GrepAI First +## Context Lookup — search before reading (wiki first for known entities) -Before reading any file for context, search with GrepAI or Grep. Only open a file when you need its full content for editing or line-by-line review. +For a **known entity's facts** (a specific client/project/system), check the **wiki** first — it is +the synthesized truth layer. For **code and discovery**, search with GrepAI or Grep before reading +any file; only open a file when you need its full content for editing or line-by-line review. Full +rule: `.claude/standards/context-lookup/grepai-first.md`. | Goal | Tool | |------|------| diff --git a/.claude/standards/context-lookup/grepai-first.md b/.claude/standards/context-lookup/grepai-first.md index 2fd9d6a..d0e3dd8 100644 --- a/.claude/standards/context-lookup/grepai-first.md +++ b/.claude/standards/context-lookup/grepai-first.md @@ -1,12 +1,22 @@ --- name: grepai-first -description: Search with GrepAI or Grep before opening any file for context; Read only when full content is needed +description: Wiki first for known-entity facts; then search with GrepAI/Grep before opening any file for code/discovery; Read only when full content is needed applies-to: all --- -# Context Lookup — GrepAI First +# Context Lookup — search before reading (wiki first for known entities) -Before reading any file for context, search with GrepAI or Grep. Only open a file when you need its full content for editing or line-by-line review. +Two-part rule: + +1. **Known-entity facts** (a specific client/project/system — its IPs, creds paths, architecture): + check the **wiki** (`wiki/`) FIRST. It is the synthesized truth layer and is already distilled — + cheaper than re-deriving from raw logs/code. +2. **Everything else** (code, discovery, un-compiled detail): search with **GrepAI or Grep before + opening any file**. Only open a file when you need its full content for editing or line-by-line + review. + +GrepAI's irreplaceable value is **code** (call-graph tracing over the Rust+TS corpus the wiki can't +see). Do NOT GrepAI something the wiki already answers — that's redundant overlap. ## Lookup table @@ -18,8 +28,9 @@ Before reading any file for context, search with GrepAI or Grep. Only open a fil | Find what a function calls | `grepai_trace_callees` | | Full file content needed (edit, review) | `Read` | | Recent changes to a file | `git log`, then `Read` specific file | -| "What did we do with X?" | `grepai_search` over session logs | -| "How is Y configured?" | `grepai_search` before checking any specific file | +| "What did we do with client/system X?" | **wiki article first**, then `grepai_search` over session logs for detail below the wiki's summary | +| "How is Y configured?" (known entity) | **wiki first**, then `grepai_search` / the specific file | +| "How is Y configured?" (code/unknown) | `grepai_search` before opening any file | ## Token cost rationale