AI coding · How Founders Use AI
How do I write a spec or PRD that an AI coding agent like Claude Code can build from?
Checked 17 November 2026
Write a short spec the agent can check its work against, not a long PRD: the outcome, what done looks like as testable checks, the must-haves, what is out of scope, and the stack. If you are unsure, ask Claude Code to interview you until it can write SPEC.md, then build from it in a fresh session.
On the AI map, 29 October 2026 Coding agentsApp builders
By case
-
If you build with Claude Code
Use the interview, SPEC.md and fresh-session flow above.
It is Anthropic's own advice for work you have not fully thought through.
-
If you want a fixed flow from spec to plan to tasks
Use GitHub's Spec Kit: a constitution once per project, then specify, plan, tasks and implement for each feature.
It is free, open source and works with several coding agents.
-
If you use Kiro
Use its specs, which write requirements.md, design.md and tasks.md.
The three files keep the requirements, the design and the task list apart and reviewable.
-
If you build in an app builder such as Lovable
Follow its prompting guide and describe one feature at a time.
Smaller, specific prompts give the builder less to guess.
The steps7 steps
-
State the outcome: who uses it, the job it does, and what done looks like as checks you can test.
-
List the must-haves, what it must not change or touch, and what is out of scope for now.
-
Name the stack, the data it stores and the screens or commands, briefly.
-
If you are unsure, ask Claude Code to interview you until it could write the spec, and have it write SPEC.md.
-
Start a fresh session to build from SPEC.md, so it begins with a clean context and a written definition of done.
-
Have it split the spec into small tasks, do one at a time, and review each against SPEC.md.
-
Keep standing project rules, such as build and test commands and conventions, in CLAUDE.md or AGENTS.md, not in the spec.
What goes wrong
Writing a long PRD of goals and personas with no checks the agent can run to know it is done.
Leaving out what is out of scope, so the agent adds features nobody asked for.
Building in the same long session where you brainstormed, so old ideas leak into the build.
Putting project-wide rules in each spec, where they drift apart, instead of in CLAUDE.md or AGENTS.md.
Go deeper7 sources
-
Best practices for Claude Code
Anthropic · Guide · 2026
The primary source for the interview-me-into-SPEC.md method: brainstorm the spec with Claude, build in a fresh session, then review the diff against the spec.
-
How to write a good spec for AI agents
Addy Osmani · Article · Jan 2026
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.
-
Spec Kit
GitHub · Tool · 2026
GitHub's open-source toolkit for spec-driven development: a constitution, then specify, plan and tasks commands you run inside your coding agent.
-
Specs (Kiro docs)
Kiro (AWS) · Guide · 2026
Shows the three files a working spec splits into: requirements with acceptance criteria, a design doc, and a task list you track.
-
AGENTS.md
AGENTS.md · Guide · 2026
The open format for a README written for coding agents: setup and test commands and code style, read by Codex, Copilot and others.
-
Store instructions and memories (CLAUDE.md)
Anthropic · Guide · 2026
Where standing project rules go in Claude Code, and how /init drafts the file for you.
-
Prompting best practices
Lovable · Guide · 2026
For app-builder users: make Lovable ask clarifying questions, plan before you prompt and build component by component.