# A Product Spec Template Your AI Coding Agent Can Use

> Copy a product-spec template with scope, permissions and acceptance criteria for AI coding agents. Includes a complete example and prompts for reviewing it.

- Author: Builderthread Team
- Date Published: 2026-11-16
- Source: https://builderthread.dev/blog/ai-coding-prd-template
- Tags: PRD Template, AI Coding, Product Requirements, Acceptance Criteria
- Format: Raw Markdown for AI Coding Agents

---

To write a product spec for an AI coding agent, define the user, the intended workflow, the scope and the behaviour you will test. Identify the existing repository constraints and separate accepted decisions from open questions. Give the agent one bounded task with acceptance criteria that describe both allowed and rejected actions.

You can copy the template below into a Markdown file. It includes a fictional client-approval feature so you can see the level of detail. Replace the example decisions with your own. The template is a requirements artifact, not an application implementation or evidence of a completed Builderthread customer project.

## Start with a customer outcome

“Add approvals” gives an agent several unanswered choices. It could build a status dropdown, an email workflow or a public link anyone can open. Those implementations have different access rules and consequences.

A clearer outcome names the person and the result:

> A client reviewer can approve a specific deliverable version, and the agency can see who approved it and when.

Now you can ask the questions that change implementation. Who can act as the reviewer? Can the client change their decision? What happens after the agency uploads a replacement? Must old versions remain available?

Answer the questions you can. Put unresolved product choices in an open-questions section and name an owner. An agent can inspect the codebase for an existing upload service, but it cannot establish your intended approval policy by reading a package file.

## Copy the complete feature-spec example

Use this as a starting point for one feature. The proposed identifiers, statuses and behaviour are example choices. They do not describe a mandatory Builderthread schema.

```markdown
# Client deliverable approval

Status: Draft example; replace before accepting for implementation
Owner: Product owner
Requirement revision: 1
Last reviewed: YYYY-MM-DD
Related task: Add the task identifier after planning

## Customer and problem

Small design agencies collect client feedback through email.
They need a record of which deliverable version a client approved.

Evidence: Add links to the source notes you have permission to use.
Unknown: Whether this segment will pay for a separate review product.

## Intended outcome

A named client reviewer can approve a specific deliverable version.
Agency staff can inspect the reviewer, decision and timestamp.

## First-release scope

- Agency staff create a deliverable in their workspace.
- Agency staff upload a version using the existing file service.
- An authorised client reviewer views that version.
- The reviewer records approval or requests a revision with a comment.
- Authorised agency staff can view the decision history.

## Excluded from this release

- Public review links and anonymous approvals.
- Live chat, annotation tools, invoices and accounting integrations.
- Legal electronic signatures.
- Custom approval chains and automated reminders.

## Actors and access

- Workspace owners and admins can create deliverables.
- An assigned client reviewer can view assigned deliverables and decide.
- Agency members can view only the projects their membership permits.
- A user without the required workspace and project access cannot view,
  download or decide on a deliverable, including through server endpoints.
- Removing access prevents future access to the protected resource.

## Workflow

1. An authorised agency user selects a project and creates a deliverable.
2. The user uploads a version through the existing file service.
3. The user assigns an existing client reviewer.
4. The reviewer opens the assigned version after authentication.
5. The reviewer approves it or requests revision with a comment.
6. The agency sees the version, decision, actor and timestamp.

## Requirements

APR-01: Each decision refers to a deliverable version, not a file name.
APR-02: Only an assigned reviewer with current access can decide.
APR-03: A new version requires a new decision; earlier approval does not
        grant approval to replacement content.
APR-04: Repeating the same decision request does not create duplicate
        history entries for the same operation.
APR-05: The interface shows the persisted result after a page refresh.
APR-06: A rejected request creates no decision or approval-history entry.

## Repository constraints

Inspect the current codebase before proposing file paths or packages.
Use the existing authentication, workspace access and file-service patterns.
Follow repository instructions for package management and verification.
Do not introduce a second authorization system.
Do not store secrets or customer documents in this specification.

## Data relationships to preserve

A workspace contains projects.
A project contains deliverables.
A deliverable contains versions.
A decision references one version and the authorised actor.

Inspect the current schema before choosing table or field names.
Propose any needed migration with an explanation of existing-data impact.

## Acceptance criteria

AC-01: An assigned reviewer can approve the version they can access.
AC-02: Refreshing the page shows the same version and persisted approval.
AC-03: A user in another workspace cannot read the version or its decision.
AC-04: A user who lacks review permission cannot submit a decision through
       the server endpoint, even if they construct the request themselves.
AC-05: Uploading a new version leaves that version awaiting review.
AC-06: Retrying a completed operation creates no duplicate history entry.
AC-07: Removing the reviewer's access prevents a later decision request.
AC-08: A rejected request leaves the decision history unchanged.

## Verification plan

Use separate test identities for the allowed and denied roles.
Create a second workspace to test the data boundary.
Run the repository's required checks and task-specific acceptance tests.
Record the commands, results and commit for review.
Describe any check you could not run and the remaining uncertainty.

## Open questions

Q-01: Can a reviewer change an approval? Owner: product owner.
Q-02: How long must version and decision history remain? Owner: product owner.
Q-03: Can existing storage enforce protected downloads? Owner: developer.

Resolve Q-01 and Q-03 before implementing the decision flow.
Do not choose a retention policy without resolving Q-02.

## Change history

YYYY-MM-DD: Initial example. No production implementation claimed.
Record accepted behaviour changes, their reasons and affected tasks here.
```

## Adapt the template to your actual repository

Before assigning the task, have the agent inspect the current application and identify the code it should reuse. Replace proposed file paths only after someone verifies them. A precise path that does not exist gives the agent worse instructions than a request to locate the existing implementation.

Review the data relationships against your schema. Your application might call a workspace an organisation or use project-level roles. Keep the product requirement clear while using the repository's vocabulary for implementation details.

You should also resolve the open questions that affect the work. In the example, the agent cannot implement a complete decision flow without knowing whether a reviewer can reverse approval. It can investigate the file service while you decide, provided that work does not assume the answer.

GitHub's [Spec Kit](https://github.com/github/spec-kit) offers another approach to organising specification-driven development. The template here works as a plain document; choose the process that fits your team and existing tooling. You do not need to adopt a new framework to describe one feature well.

## Write acceptance criteria that expose incorrect behaviour

For each requirement, ask what an implementation could do wrong while still looking plausible in a demo. Then describe the observation that would reveal the error.

For deliverable approval, an agent could attach approval to a file name. A replacement upload with the same name might then appear approved. AC-05 exposes that error by requiring a new version to start without inherited approval.

An agent could also hide the approval button from an unauthorised user while leaving the endpoint open. AC-04 requires a server request from a user who lacks permission. A screenshot of the hidden button cannot satisfy that criterion.

You can use Given/When/Then for an individual check:

```text
Given a reviewer belongs to workspace A and has no access to workspace B,
when they request a deliverable version belonging to workspace B,
then the application denies access and exposes no protected content.
```

The format helps organise the conditions. You still need meaningful conditions and expected outcomes. “Given the app is running, when I click approve, then it works” remains vague despite the structure.

Use performance targets only when you have defined the environment, workload and measurement. “The page feels fast” gives you no acceptance boundary. A made-up response-time target can create work without representing a customer need.

## Keep product decisions separate from coding instructions

Put the intended behaviour in the feature spec. Put durable contributor rules in the instruction files your tool reads. For example, the product spec defines who can approve a deliverable, while repository instructions define the test command and how to handle migrations.

Codex recognises `AGENTS.md` for project guidance. Cursor supports rules and `AGENTS.md`; the exact loading behaviour depends on the tool and configuration. Keep important instructions in a supported location and check that the agent reads them before implementation. [Codex instruction files](https://learn.chatgpt.com/docs/agent-configuration/agents-md), [Cursor rules](https://cursor.com/docs/rules).

Avoid copying an entire feature spec into several tool-specific files. Keep one accepted version and link to it. Multiple copies can disagree after a revision, when different agents work on different features.

## Ask the agent to review the spec before coding

Use a review prompt after you fill in the template:

```text
Review this feature specification against the current repository.
Identify conflicting requirements, missing product decisions and paths
or services that do not exist. Reference the relevant requirement IDs.
Check allowed actions, rejected actions and cross-workspace access.
Separate questions you can resolve from code inspection from decisions
the product owner must make. Propose a bounded first task and its checks.
```

Read the findings before accepting the plan. The agent may identify a missing storage permission or a conflict between the current schema and the proposed history. Those findings can change the task size.

Keep the review focused. You need to resolve decisions that affect the feature, rather than document speculative functionality for the next year. If a question belongs to a later release, mark that boundary and leave it out of the current task.

## Split implementation along behaviour you can verify

For the example feature, you could start with protected access to a deliverable version. The next task could record a review decision and its history. A later task could complete the interface and verify the end-to-end flow.

Each task needs its own acceptance checks and a link to the relevant requirement IDs. Avoid a frontend task whose completion depends on assumptions nobody has tested on the server.

After a requirement changes, inspect the dependent tasks. If you decide to allow a reviewer to revise a decision, update the accepted rule, the history behaviour and the tests. Do not append a new request to chat and leave the old task untouched.

The [living-PRD guide](https://builderthread.dev/blog/living-prd-architecture-for-coding-agents) explains how to maintain that relationship as a product evolves.

## Use Builderthread when you want the plan tied to a generated project

Builderthread prepares a research brief, modular PRDs, a private starter repository and agent build tasks. Its repository guide describes the codebase map and instruction files that accompany the project. That gives you a foundation for requirements that reference the actual generated code. [What is in your repository](https://builderthread.dev/guides/features/boilerplate-mapping).

Through the documented MCP workflow, a compatible coding tool can retrieve task context and record progress. You should still inspect product assumptions, verify the checks and decide whether the implemented behaviour meets the customer need. [MCP build workflow](https://builderthread.dev/guides/features/mcp-agent-gateway).

You can use this template without buying a product. If you want the connected research-to-build workflow, [see how Builderthread works](https://builderthread.dev/#how-it-works) and [review plans](https://builderthread.dev/pricing). Start with the customer outcome and the next bounded task whichever approach you choose.

## Common questions

### Can an AI PRD generator decide the requirements for me?

It can draft a structure and propose missing details. Review the customer, scope and permission decisions before accepting them. Label unsupported assumptions rather than letting a fluent draft make them look settled.

### Should I put the whole product in one spec?

Keep a product overview and split detailed requirements by feature when the document becomes difficult to use. Give tasks links to the sections they need and preserve shared constraints in one place.

### Do I need technical knowledge to fill this out?

You can describe the customer, workflow and boundaries in plain language. A developer or coding agent can inspect technical constraints. Ask a qualified reviewer to check decisions involving access, payments or other behaviour you cannot assess yourself.

### Does a complete spec guarantee correct code?

You still need implementation checks and review. A specification gives you a reference for that work; it does not prove that the code follows it or that customers will buy the product.
