Skip to content

Commit 194341e

Browse files
RecoDemoclaude
andcommitted
Strengthen CLAUDE.md instructions in README, bump to 0.4.4
The suggested "prefer using codebase-index" language was too weak — models treated it as a suggestion and defaulted to Glob/Grep/Read. Replaced with mandatory language that actually changes behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 84b7493 commit 194341e

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,24 @@ Or using the Python module directly (useful if installed in a virtualenv):
138138
}
139139
```
140140

141-
### Tip: Encourage the AI to Use Indexed Tools
141+
### Important: Make the AI Actually Use Indexed Tools
142142

143-
By default, AI assistants may still read entire files instead of using the indexed tools. Add this to your project's `CLAUDE.md` (or equivalent instructions file) to nudge it:
143+
By default, AI assistants will ignore the indexed tools and fall back to reading entire files with Glob/Grep/Read. Soft language like "prefer" gets rationalized away. Add this to your project's `CLAUDE.md` (or equivalent instructions file) with **mandatory** language:
144144

145145
```
146-
Prefer using codebase-index MCP tools (get_project_summary, find_symbol, get_function_source,
147-
get_class_source, get_dependencies, get_dependents, get_change_impact, get_call_chain, etc.)
148-
over reading entire files when navigating the codebase.
146+
## Codebase Navigation — MANDATORY
147+
148+
You MUST use codebase-index MCP tools FIRST when exploring or navigating the codebase. This is not optional.
149+
150+
- ALWAYS start with: get_project_summary, find_symbol, get_function_source, get_class_source,
151+
get_structure_summary, get_dependencies, get_dependents, get_change_impact, get_call_chain, search_codebase
152+
- Only fall back to Read/Glob/Grep when codebase-index tools genuinely don't have what you need
153+
(e.g. reading non-code files, config, frontmatter)
154+
- If you catch yourself reaching for Glob/Grep/Read to find or understand code, STOP and use
155+
codebase-index instead
149156
```
150157

151-
This ensures the AI reaches for surgical indexed queries first, which saves tokens and context window.
158+
The word "prefer" is too weak — models treat it as a suggestion and default to familiar tools. Mandatory language with explicit fallback criteria is what actually changes behavior.
152159

153160
### Available Tools (18)
154161

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "mcp-codebase-index"
7-
version = "0.4.3"
7+
version = "0.4.4"
88
description = "Structural codebase indexer with MCP server for AI-assisted development"
99
requires-python = ">=3.11"
1010
readme = "README.md"

0 commit comments

Comments
 (0)