3.6 KiB
3.6 KiB
Civyk Repo Index - Code Intelligence
Always use civyk-repoix MCP tools for code discovery, navigation, and analysis - provides semantic understanding with symbol-level precision and AI-aware caching.
Always Use civyk-repoix For
- Finding code →
search_symbols,get_file_symbols(not grep/find) - Understanding structure →
get_symbol,get_components(not reading entire files) - Checking dependencies →
get_dependencies,get_imports(not manual tracing) - Finding tests →
get_tests_for,get_recommended_tests(not guessing) - Impact analysis →
analyze_impact,get_references(not searching manually) - PR context →
build_delta_context_pack(not reading all changed files)
Tools by Scenario
| Scenario | Tools |
|---|---|
| Explore | list_files, get_file_symbols, search_symbols |
| Understand | recall_understanding, get_symbol, get_file_symbols |
| Dependencies | get_dependencies, get_imports, find_circular_dependencies |
| Architecture | get_components, get_api_endpoints, get_inheritance_tree |
| Testing | get_tests_for, get_code_for_test, get_recommended_tests |
| Review | build_delta_context_pack, get_recent_changes, analyze_impact |
| Navigate | get_definition, get_references, get_callers |
| Quality | get_dead_code, get_hotspots, find_circular_dependencies |
AI Cache - Context Preservation
Persist understanding across sessions at file, module, and project levels:
# Check cached understanding before reading
recall_understanding(scope="file", target="path/file.py")
recall_understanding(scope="module", target="src/auth")
recall_understanding(scope="project")
# Store after analyzing - hierarchical workflow
store_understanding(scope="file", target="path/file.py", purpose="...", key_points=[...])
store_understanding(scope="module", target="src/auth", purpose="...", key_points=[...])
store_understanding(scope="project", purpose="...", key_points=[...])
Hierarchical Workflow:
- Read file →
store_understanding(scope="file", ...) - After all files in module →
store_understanding(scope="module", ...) - After all modules →
store_understanding(scope="project", ...)
Recall Response:
found=true+fresh=true→ Use cached, skip readfound=true+fresh=false→ Changed, re-read and updatefound=false→ Read, analyze, then store
Token-Efficient Patterns
- Cache first:
recall_understandingbefore reading files - Context packs:
build_context_pack(task="...", token_budget=800) - Symbols over files:
get_file_symbolsuses ~10x fewer tokens - Save insights:
store_understandingafter analysis
Tool Sequences
| Action | Sequence |
|---|---|
| Session start | get_understanding → recall_understanding for key files → resume |
| New task | build_context_pack → recall_understanding → work |
| Understand function | get_symbol → get_callers → get_references |
| Find location | search_symbols → get_file_symbols → get_definition |
| Refactor | get_references → analyze_impact → get_recommended_tests |
| Review PR | build_delta_context_pack → analyze_impact |
Before Commit
- Build - No errors or warnings
- Format - Run formatter (prettier, black, gofmt, etc.)
- Lint - Fix all issues (eslint, ruff, markdownlint, etc.)
- Type check - If applicable (tsc, mypy, etc.)
- Test changes -
get_recommended_tests(changed_files=[...]) - Full tests - Ensure no regression