Code Pattern Discovery
Analyze the codebase to understand patterns and conventions before making changes.
What to look for:
- •File organization — How are files structured? What naming conventions are used?
- •Import patterns — How are modules imported? Relative vs absolute paths? Barrel exports?
- •Error handling — Try/catch? Result types? Error boundaries? Custom error classes?
- •Naming — camelCase, snake_case, PascalCase? Prefixes? Suffixes? Conventions for handlers, services, utils?
- •Testing patterns — Where do tests live? What frameworks? Co-located or separate directory?
- •API patterns — REST? GraphQL? How are endpoints structured? Middleware patterns?
- •State management — How is state managed? Global stores? Context? Props drilling?
- •Configuration — Where do configs live? Env vars? Config files? Defaults?
Output:
Summarize the patterns you find so Claude can follow them when making changes. Be specific — include examples from actual files with file:line references.