
A framework published by Google Chrome engineering lead Addy Osmani on O’Reilly Radar identifies five principles for writing specifications that keep AI coding agents focused and productive. The guide recommends starting with a high-level vision, structuring the spec like a product requirements document covering commands, testing, project structure, code style, git workflow, and boundaries, and breaking tasks into modular prompts rather than single large instructions. Additional principles include embedding self-checks and three-tier constraints (always/ask first/never), and treating spec-writing as an iterative process with continuous testing and refinement.
How to Write a Good Spec for AI Agents - O’Reilly