From 871e07ba8a4b3487f80d50a59989eb8b3dba979d Mon Sep 17 00:00:00 2001 From: drknowhow Date: Sun, 6 Sep 2026 17:57:01 -0400 Subject: [PATCH] docs: regenerate managed instruction docs from the 2.124+ template The committed CLAUDE.md, AGENTS.md and copilot-instructions.md still described the retired c3_compress map flow; `c3 init` on this box regenerated the managed blocks with the c3_read map wording that shipped in 2.124.0. Claude-Session: https://claude.ai/code/session_014bfbPQnDabCTSdKyJVmr41 --- .github/copilot-instructions.md | 4 ++-- AGENTS.md | 2 +- CLAUDE.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e60d38e..f6f622d 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -17,7 +17,7 @@ When falling back, state which c3_* tool was attempted and why it was insufficie ## Workflow (follow this order — do not skip steps) 1. **RECALL**: `c3_memory(action='recall')` — before any multi-step or context-dependent task. Large memory stores: use `index` first (compact list), then `fetch` for specific IDs 2. **SEARCH FIRST**: `c3_search(action='code|files|semantic')` — before ANY file discovery or content search. Never start with Grep/Glob -3. **MAP before READ**: `c3_compress(mode='map')` then `c3_read(symbols=...|lines=...)` — for ANY file read. Never start with native Read. Use `mode='ast'` for knowledge-graph overview (requires codebase-memory-mcp) +3. **MAP before READ**: `c3_read(file_path)` with no symbols/lines returns the file map (one line per symbol with signature and `[La-Lb]` range, ~10% of the file's tokens; a directory path maps its files), then `c3_read(symbols=['Class.method']|lines=[a,b])` for the source you need. Never start with native Read. `c3_compress` is the same map for a comma-separated batch (legacy; removed in 2.124.0) 4. **IMPACT** (shared symbols): `c3_impact(target='symbol')` — blast-radius check before editing any function/class used across files 5. **EDIT via C3**: `c3_edit(file_path, old_string, new_string, summary)` — for ALL edits. Parallel across files; `edits=[]` batch for same file 6. **FILTER**: `c3_filter(text=...)` — for terminal output >10 lines or log files @@ -40,7 +40,7 @@ In plan mode, all c3_* read tools (search, read, compress, filter, validate, sta ## Anti-patterns (DO NOT do these) - Starting with native file search/read/grep without a prior c3_* call - Using native Edit when c3_edit is available -- Reading entire files when c3_compress + c3_read would be more surgical +- Reading entire files when a c3_read map + a symbol read would be more surgical - Skipping c3_validate after making edits --- diff --git a/AGENTS.md b/AGENTS.md index e685855..a0f9326 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,7 +5,7 @@ Use C3 for repository intelligence and audited changes: 1. Recall relevant project facts with c3_memory; inspect .c3/MAP.md. -2. Find candidates with c3_search; map with c3_compress(mode='map'), then +2. Find candidates with c3_search; map with c3_read(file_path) (no symbols), then read exact symbols or lines with c3_read. Check shared changes with c3_impact. 3. Edit with c3_edit, validate with c3_validate, and record decisions with c3_session(action='log'). Preserve unrelated work. diff --git a/CLAUDE.md b/CLAUDE.md index 2b60546..7093e49 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,7 @@ When falling back, state which c3_* tool was attempted and why it was insufficie ## Workflow (follow this order — do not skip steps) 1. **RECALL**: `c3_memory(action='recall')` — before any multi-step or context-dependent task. Large memory stores: use `index` first (compact list), then `fetch` for specific IDs 2. **SEARCH FIRST**: `c3_search(action='code|files|semantic')` — before ANY file discovery or content search. Never start with Grep/Glob -3. **MAP before READ**: `c3_compress(mode='map')` then `c3_read(symbols=...|lines=...)` — for ANY file read. Never start with native Read. Use `mode='ast'` for knowledge-graph overview (requires codebase-memory-mcp) +3. **MAP before READ**: `c3_read(file_path)` with no symbols/lines returns the file map (one line per symbol with signature and `[La-Lb]` range, ~10% of the file's tokens; a directory path maps its files), then `c3_read(symbols=['Class.method']|lines=[a,b])` for the source you need. Never start with native Read. `c3_compress` is the same map for a comma-separated batch (legacy; removed in 2.124.0) 4. **IMPACT** (shared symbols): `c3_impact(target='symbol')` — blast-radius check before editing any function/class used across files 5. **EDIT via C3**: `c3_edit(file_path, old_string, new_string, summary)` — for ALL edits. Parallel across files; `edits=[]` batch for same file 6. **FILTER**: `c3_filter(text=...)` — for terminal output >10 lines or log files @@ -35,7 +35,7 @@ In plan mode, all c3_* read tools (search, read, compress, filter, validate, sta ## Anti-patterns (DO NOT do these) - Starting with native file search/read/grep without a prior c3_* call - Using native Edit when c3_edit is available -- Reading entire files when c3_compress + c3_read would be more surgical +- Reading entire files when a c3_read map + a symbol read would be more surgical - Skipping c3_validate after making edits ---