{{include:repoix-discovery-base.md}}

## Discovery & Orientation

| Task | Tools |
|------|-------|
| Architecture overview | `architecture(action="components")`, `architecture(action="endpoints")` |
| Targeted context | `context(action="task", task="...", token_budget=1500)` |
| Find patterns | `search(action="symbols")`, `file(action="symbols")` |
| Understand deps | `file(action="imports")`, `architecture(action="dependencies")` |

## Before Modifying Code

| Task | Tools |
|------|-------|
| Understand file | `file(action="symbols", path, include_private=true)`, `file(action="imports", path)` |
| Impact analysis | `quality(action="impact", fqn, depth=3, include_tests=true)` |
| Find callers | `symbol(action="callers", fqn, depth=2)` |
| Find references | `symbol(action="references", fqn)` |
| Find tests | `tests(action="for_file", path, include_indirect=true)` |

## Before Creating Code

| Task | Tools |
|------|-------|
| Check duplicates | `quality(action="duplicates", source_only=true)` |
| Find similar | `symbol(action="similar", fqn, similarity_threshold=0.6)` |
| Existing patterns | `context(action="task")`, `search(action="symbols")` |

## After Implementation

| Task | Tools |
|------|-------|
| Dead code | `quality(action="dead_code", limit=30)` |
| Circular deps | `quality(action="circular_deps", level="file")` |

## CLI Conversion

| MCP | CLI |
|-----|-----|
| `architecture(action="components")` | `civyk-repoix query architecture --action components` |
| `architecture(action="endpoints", kind="...", limit=N)` | `civyk-repoix query architecture --action endpoints --kind "..." --limit N` |
| `context(action="task", task="...", token_budget=N)` | `civyk-repoix query context --action task --task "..." --token-budget N` |
| `file(action="symbols", path="...", include_private=true)` | `civyk-repoix query file --action symbols --path "..." --include-private true` |
| `file(action="imports", path="...")` | `civyk-repoix query file --action imports --path "..."` |
| `quality(action="impact", fqn="...", depth=N, include_tests=true)` | `civyk-repoix query quality --action impact --fqn "..." --depth N --include-tests true` |
| `symbol(action="callers", fqn="...", depth=N)` | `civyk-repoix query symbol --action callers --fqn "..." --depth N` |
| `symbol(action="references", fqn="...")` | `civyk-repoix query symbol --action references --fqn "..."` |
| `tests(action="for_file", path="...", include_indirect=true)` | `civyk-repoix query tests --action for_file --path "..." --include-indirect true` |
| `quality(action="duplicates", source_only=true)` | `civyk-repoix query quality --action duplicates --source-only true` |
| `symbol(action="similar", fqn="...", similarity_threshold=N)` | `civyk-repoix query symbol --action similar --fqn "..." --similarity-threshold N` |
| `search(action="symbols", query="...", kind="...")` | `civyk-repoix query search --action symbols --query "..." --kind "..."` |
| `quality(action="dead_code", limit=N)` | `civyk-repoix query quality --action dead_code --limit N` |
| `quality(action="circular_deps", level="file")` | `civyk-repoix query quality --action circular_deps --level file` |
| `context(action="delta", include_symbols=true)` | `civyk-repoix query context --action delta --include-symbols true` |
| `git(action="hotspots", since="30d")` | `civyk-repoix query git --action hotspots --since 30d` |
