searching-code
Intelligent Code Search with WarpGrep
WarpGrep is an RL-trained search agent that reasons about code, not just pattern matches. Use zoom-out mode when the user needs a higher-level map before touching code.
How It Works
- 8 parallel searches per turn (explores multiple hypotheses)
- 4 reasoning turns (follows causal chains across files)
- F1=0.73 in ~3.8 steps (vs 12.4 for standard search)
When to Use Which Tool
| Use WarpGrep | Use Smart Explore (claude-mem) | Use Built-in Grep |
|---|---|---|
| "How does auth flow work?" | "What functions are in this file?" | "Find class UserService" |
| "Trace data from API to DB" | "Show me this function's source" | Simple regex patterns |
| "Find all error handling" | "Find all types matching X" | "Where is X defined?" |
| Large repos (1000+ files) | File structure at a glance | Known file patterns |
| Before major refactoring | Targeted function extraction | Quick needle lookups |
When available, prefer Smart Explore for structural queries (10-20x fewer tokens). Use WarpGrep for semantic/reasoning queries across files.
Query Formulation
Good queries (reasoning required):
"How does authentication flow from the login handler to the database?"
"Find all places where user permissions are checked"
"Trace the request lifecycle from router to response"
Bad queries (use Grep instead):
"Find UserService" → use Grep
"Search for 'import React'" → use Grep
Workflow
- Formulate query: Describe WHAT you want to understand, not just WHAT to find
- Load domain docs when present:
CONTEXT.md,CONTEXT-MAP.md, and relevant ADRs - Run WarpGrep:
mcp__morphllm__warpgrep_codebase_search - Interpret results: Ranked snippets with file paths and line numbers
- Follow up: Read specific files for deeper understanding
Zoom-Out Mode
Use when the user says "zoom out", "map this area", "go up a layer", or sounds lost in local details.
Return a map, not a dump:
- relevant modules and callers
- data/control flow across seams
- domain terms from
CONTEXT.md - ADR constraints that shape the design
- where to read next, limited to the top 3 files
Avoid line-by-line explanations unless asked. The point is orientation, not drowning the user in snippets.
Parameters
search_string: "natural language description of what to find"
repo_path: "/absolute/path/to/repo"
Tips
- Be specific about the behavior or flow you're investigating
- Include context: "in the API layer" or "during startup"
- WarpGrep handles ambiguity better than exact pattern matching
- Results include surrounding context for understanding
More from alexei-led/cc-thingz
improving-tests
Improve test design and coverage, including TDD/red-green-refactor guidance. Use when user says "improve tests", "refactor tests", "test coverage", "combine tests", "table-driven", "parametrize", "test.each", "test-first", "TDD", "red-green-refactor", or wants to remove test waste.
4refactoring-code
Batch refactoring via MorphLLM edit_file. Use for "refactor across files", "batch rename", "update pattern everywhere", large files (500+ lines), 5+ edits in same file, or applying an approved architecture-deepening refactor.
3debating-ideas
Dialectic thinking — spawn thesis and antithesis agents to stress-test ideas, then synthesize and verify against code. Use when user says "debate", "argue both sides", "devil's advocate", "stress test this idea", "pros and cons of approach", or wants rigorous evaluation of a design decision.
3linting-instructions
Lint plugin agent/skill prompts against rules derived from Anthropic model cards (Opus 4.6, Sonnet 4.6). Use when authoring or reviewing skills and agents — "lint instructions", "audit prompts", "model card rules".
3learning-patterns
Extract learnings and generate project-specific customizations (CLAUDE.md, commands, skills, hooks). Use when user says "learn", "extract learnings", "what did we learn", "save learnings", "adapt config", or wants to improve Claude Code based on conversation patterns.
3documenting-code
Update project documentation based on recent changes. Use when user says "update docs", "document", "add documentation", "update readme", "write docs", or wants to improve documentation.
3