Article

How to write a good spec for AI agents

Addy Osmani · addyosmani.com

A Google engineering lead's five principles: start from a short brief, let the agent draft the detail, plan in read-only mode and split big tasks.

The question it answers

  1. How do I write a spec or PRD that an AI coding agent like Claude Code can build from?

Read with it

  1. The primary source for the interview-me-into-SPEC.md method: brainstorm the spec with Claude, build in a fresh session, then... code.claude.com Guide Best practices for Claude Code Anthropic
  2. GitHub's open-source toolkit for spec-driven development: a constitution, then specify, plan and tasks commands you run inside... github.com Tool Spec Kit GitHub
  3. Shows the three files a working spec splits into: requirements with acceptance criteria, a design doc, and a task list you track. kiro.dev Guide Specs (Kiro docs) Kiro (AWS)
  4. The open format for a README written for coding agents: setup and test commands and code style, read by Codex, Copilot and others. agents.md Guide AGENTS.md AGENTS.md
  5. Where standing project rules go in Claude Code, and how /init drafts the file for you. code.claude.com Guide Store instructions and memories (CLAUDE.md) Anthropic
  6. For app-builder users: make Lovable ask clarifying questions, plan before you prompt and build component by component. docs.lovable.dev Guide Prompting best practices Lovable
eChai Partner Brands The partnership →