Write a structured specification before touching any code. Use when starting a new feature, facing ambiguous requirements, or when the change touches more than one file. Triggered by "write a spec", "spec this out", "spec-driven", "what should I build", "define this first".