How to estimate a project from a PRD: turn requirements into sprints your AI agent can build
Most estimates fail before the first line of code is written. Not because the team is slow, and not because the work was harder than expected. Because the estimate was made from a paragraph, not a specification. "Build a
Most estimates fail before the first line of code is written. Not because the team is slow, and not because the work was harder than expected. Because the estimate was made from a paragraph, not a specification. "Build a sprint tracker" is not an estimate. It is a wish with a deadline attached.
A PRD that is written for an AI coding agent has something most estimates never get: every feature already broken into testable behaviour, with acceptance criteria, edge cases, and a build order. If you estimate from that, the number stops being a guess. Here is how I do it.
1. Estimate features, not screens
The first mistake is estimating by what you can see. "Five pages, two weeks." Screens are the cheapest part of a build; the expensive part is the behaviour behind them, and a PRD written as prose hides it.
Estimate from the feature list in PRODUCT_REQUIREMENTS.md instead — specifically the P0 features, each with its GIVEN/WHEN/THEN criteria. In the TaskPulse spec I use as my reference, the P0 feature is not "a sprint page". It is this:
P0 Feature: Sprint Velocity Forecast
- GIVEN a team with at least 3 completed sprints
- WHEN the lead creates a new sprint
- THEN calculate and display the recommended story-point
capacity with a 95% confidence interval.
- Edge cases: unassigned tasks default to median story-point
weight; incomplete rollover tasks carry forward without
resetting velocity averages.
One acceptance criterion, two edge cases, one confidence calculation. That is a unit of work you can actually price: a query over completed sprints, a median calculation, a rollover rule, and a display. Estimating "the sprint page" would have missed all four. Estimating the criteria catches them.
Rule: if a feature has no acceptance criteria, you cannot estimate it. Write the criteria first, then the number follows.
2. Put every feature in one of three buckets: known, sized, or unknown
A PRD mixes three kinds of work and prices them as if they were one. Split them:
Known — the spec says exactly what to build:
"name: 3–64 chars, targetPoints defaults to 40"
(a Zod schema, a column, a form field — half a day, no debate)
Sized — the spec names the behaviour, the shape is clear:
"95% confidence interval over 3+ completed sprints"
(a known calculation, but it needs a query, a test, and a
decision on what happens with fewer than 3 sprints)
Unknown — the spec names the goal, the shape is not:
"real-time assignee presence on the kanban board"
(Realtime channel? polling? what counts as present? The PRD
must answer these before anyone prices it)
Known work gets a fixed estimate. Sized work gets a range. Unknown work gets no estimate at all — it gets a question back to the PRD. When an estimate is wrong, it is almost always an unknown item that was priced as if it were known.
3. Let the schema set the sprint size
This is where the PRD does the estimating for you. The technical file of the suite already contains the shape of the work: tables, columns, constraints, endpoints. Count them, and you have the skeleton of a sprint plan.
The TaskPulse spec's sprints table is seven columns, one RLS policy, one typed endpoint:
CREATE TABLE public.sprints (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
workspace_id UUID NOT NULL REFERENCES public.workspaces(id) ON DELETE CASCADE,
name TEXT NOT NULL,
start_date TIMESTAMPTZ NOT NULL,
end_date TIMESTAMPTZ NOT NULL,
target_points INTEGER DEFAULT 0 CHECK (target_points >= 0),
created_at TIMESTAMPTZ DEFAULT now()
);
CREATE POLICY "Tenant Workspace Isolation" ON public.sprints
FOR ALL USING (
workspace_id IN (
SELECT workspace_id FROM public.workspace_members
WHERE user_id = auth.uid()
)
);
export const CreateSprintSchema = z.object({
workspaceId: z.string().uuid(),
name: z.string().min(3).max(64),
startDate: z.string().datetime(),
endDate: z.string().datetime(),
targetPoints: z.number().int().positive().default(40),
});
One table, one policy, one endpoint — that is one sprint-sized chunk, not a quarter of roadmap. The number 40 in targetPoints is doing quiet work here too: it is the default capacity the forecast criterion is measured against. When the schema names its own defaults, the estimate inherits them instead of inventing them.
A useful rule of thumb I use with AI agents: one table + its RLS policy + its typed endpoint + its UI view is roughly one focused sprint task. Count those groups in the technical file and you have a first draft of the sprint plan — no meeting required.
4. Sequence by dependency, not by excitement
The build order in AI_AGENT_IMPLEMENTATION.md is not a suggestion. It is the estimate's second half: work done out of order costs twice, because the agent builds on assumptions it later has to undo.
Phase 1: Database DDL migrations & RLS policy verification
Phase 2: Authentication flow & workspace tenancy middleware
Phase 3: Typed Server Actions & CRUD endpoint validation
Phase 4: Kanban UI components & optimistic state management
The kanban board is the exciting part, and it is Phase 4 for a reason: it needs the sprints table, the tenancy middleware, and the validated endpoints underneath it. Estimate the phases in order, and each phase's estimate is honest because its dependencies are already built. Estimate the UI first and you are pricing a demo, not a product — the demo gets rebuilt the moment the real schema lands.
When a stakeholder asks "can we do the board first?", the phased order is the answer: yes, but the estimate doubles, because the board will be built twice — once on guessed data, once on the real tables.
5. Use velocity from the spec, not from memory
The forecast criterion in the TaskPulse PRD — 95% confidence interval over at least 3 completed sprints — is also the estimating method. You cannot forecast the next sprint from one sprint, and you cannot forecast a project from one feature.
After three sprints, the numbers exist: how many story points the team actually completes, how often the estimate was right, how wide the interval is. Before three sprints, any date you give is a guess wearing a spreadsheet's clothes. Say so. A PRD with a velocity forecast built into its acceptance criteria is telling you the same thing: measure first, then promise.
For an AI agent build, the same rule applies at a smaller scale. The first suite the agent builds from your PRD is the calibration run — that is when you learn how long one table-plus-policy-plus-endpoint group actually takes. The second and third runs are the estimate. Price the first one as discovery, and the rest of the plan gets honest.
Where this lives in my specs
This is why the generator I built writes estimation into the suite instead of leaving it to a meeting. PRODUCT_REQUIREMENTS.md carries the P0 features with GIVEN/WHEN/THEN criteria, so each feature is a unit you can price. TECHNICAL_ARCHITECTURE.md carries the tables, policies, and typed endpoints, so the sprint plan is countable — one table group, one chunk. AI_AGENT_IMPLEMENTATION.md carries the phased build order, so the sequence is already decided before anyone asks for a date.
An estimate made from a paragraph is a promise you cannot keep. An estimate made from a specification is a plan you can defend — because every number in it traces back to a line in the PRD.
If you want the same starting point, the generator writes the criteria, the schema, and the phased build order into every suite it produces. You can try it free with 50 credits at webdevmehedi.com/ai-prd-generator — and the free template behind the format is in the ai-prd-template repo.
Web Dev Mehedi turns an app idea into a build-ready PRD, UI/UX spec, database schema, API contracts, and Cursor/Claude Code rules in under 60 seconds. Free signup includes 50 credits; paid plans start at ৳99/month.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.