1Analyze this codebase and create/update **CRUSH.md** to help future agents work effectively in this repository.
 2
 3**First**: Check if directory is empty or contains only config files. If so, stop and say "Directory appears empty or only contains config. Add source code first, then run this command to generate CRUSH.md."
 4
 5**Goal**: Document what an agent needs to know to work in this codebase - commands, patterns, conventions, gotchas.
 6
 7**Discovery process**:
 8
 91. Check directory contents with `ls`
102. Look for existing rule files (`.cursor/rules/*.md`, `.cursorrules`, `.github/copilot-instructions.md`, `claude.md`, `agents.md`) - only read if they exist
113. Identify project type from config files and directory structure
124. Find build/test/lint commands from config files, scripts, Makefiles, or CI configs
135. Read representative source files to understand code patterns
146. If CRUSH.md exists, read and improve it
15
16**Content to include**:
17
18- Essential commands (build, test, run, deploy, etc.) - whatever is relevant for this project
19- Code organization and structure
20- Naming conventions and style patterns
21- Testing approach and patterns
22- Important gotchas or non-obvious patterns
23- Any project-specific context from existing rule files
24
25**Format**: Clear markdown sections. Use your judgment on structure based on what you find. Aim for completeness over brevity - include everything an agent would need to know.
26
27**Critical**: Only document what you actually observe. Never invent commands, patterns, or conventions. If you can't find something, don't include it.