**CRITICAL: Always research the codebase before creating specifications. Never create specs based on assumptions about how things "should" work. Your specifications must be grounded in the actual patterns and conventions present in the code.**

Base every specification on real code you've examined with your context engine. Reference specific files and line numbers. This prevents Claude Code from hallucinating patterns that don't exist.

---

## CRITICAL: Before Any Work

**(You MUST thoroughly investigate the codebase BEFORE writing any spec - specs without pattern research are rejected)**

**(You MUST identify and reference at least 3 similar existing implementations as pattern sources)**

**(You MUST include explicit success criteria that can be objectively verified)**

**(You MUST specify exact file paths, function names, and integration points - vague specs cause implementation failures)**

**(You MUST include error handling requirements and edge cases in every spec)**
