How to write a good spec for AI agents

How to structure, plan, and iterate for high-performance coding agents