Creating Testable User Stories from PRD and UI Artifacts
A PRD alone isnât enough, and a screen alone isnât either
Section titled âA PRD alone isnât enough, and a screen alone isnât eitherâThe architecture decision and explicit requirements from the previous article arenât yet a âunit of implementation.â Before an AI coding assistant or a developer can actually start working, the requirement has to be broken down into a user story with acceptance criteria.
A common mistake in this transformation is feeding in only the PRD text, or only a link to a UI artifact (Figma, etc.), and asking for stories to be generated. Either source alone always leaves gaps.
| Source | What it tells you | What it doesnât tell you |
|---|---|---|
| PRD (text) | Business intent, priority, exception-handling rules | The exact layout, field order, visual representation of state transitions |
| UI artifact (Figma, etc.) | Screen structure, field list, interactions (hover/disable, etc.) | Why a field is needed, business rules, exception cases not shown on screen |
In short, the PRD tells you âwhy,â and the UI artifact tells you âwhat it looks like.â A story is only complete when both are combined. With only one source, an AI fills the gap by guessing, and that guess only surfaces once testing begins.
Continuing with the Event Registration example
Section titled âContinuing with the Event Registration exampleâThis article continues with the Event Registration domain from the previous article. Using the common capabilities confirmed in the architecture decision (user/permission, form validation, file management, state management, operator lookup), it walks through turning a single âregistration and submissionâ screen into a story.
Step 1: Provide the PRD and the UI artifact together
Section titled âStep 1: Provide the PRD and the UI artifact togetherâWhen requesting story generation, both of the following must be supplied at the same time.
[Input 1: PRD excerpt]## Registration and submission- A registration form is provided; team names must be unique (real-time duplicate check).- Team member info (name, phone, email) is collected.- Attachments are optional, and once uploaded must also be deletable.- Registration is not possible outside the submission window.
[Input 2: UI artifact summary]- Registration form screen: team name field (with a duplicate-check button), team member input area (add/remove dynamically), attachment area (drag and drop), submit button (disabled until all required fields are filled)- On duplicate check, real-time status text appears below the field, color-coded by success/failureProviding both lets the AI reference why the team name must be unique (the PRD) alongside how that check appears on screen (the UI artifact) when drafting the story.
Step 2: Write it as a complete workflow, not a simple screen lookup
Section titled âStep 2: Write it as a complete workflow, not a simple screen lookupâState the following conditions explicitly when requesting a story.
[Story generation conditions]- Write it considering the complete business workflow, not just a simple screen lookup- Every acceptance criterion must cover exception handling, defaults, state persistence, and permission conditions- Do not infer non-functional requirements that aren't clearly present in the UI artifact â mark them "no information available"- When information is insufficient, output "unknown" or "needs more information" (do not fill it in arbitrarily)The last two conditions matter most. An AI tends to fill in what isnât on the screen with something plausible-sounding. Without stating these conditions explicitly, unverified performance targets or security requirements get mixed into the story as if they were already confirmed.
Step 3: Given-When-Then acceptance criteria
Section titled âStep 3: Given-When-Then acceptance criteriaâA story sentence alone canât be verified. Every story needs acceptance criteria in Given-When-Then form.
## Story: Team name duplicate check
Story: "As a registrant, I want to know immediately whether a team name isalready taken when I type it, so that I don't get rejected at submissiontime and can complete my registration."
Acceptance Criteria:- Given the team name field When the user enters a team name and moves focus away Then the duplicate status must be checked in real time
- Given a team name that is already in use When the user attempts to submit Then submission must be blocked and the message "this team name is already taken" must be shown
- Given a unique team name When the user attempts to submit Then submission must proceed normally
- Given two users submit the same team name at the same time When one request is processed first Then the later request must be rejected by a server-side re-check (to prevent a race condition)That last condition (concurrent submission) doesnât come from the UI artifact alone. It only appears by referencing the architecture decision confirmed in the previous article (âdouble-guarded by a DB unique constraintâ). This is where the traceability from that article actually gets used.
Step 4: Story points are a draft: calibrate with the teamâs own data
Section titled âStep 4: Story points are a draft: calibrate with the teamâs own dataâAsk an AI to estimate story points and it produces a number for every story. That number should not be fed directly into sprint planning.
An AIâs story point estimate is calculated purely from the number and complexity of the storyâs sentences and acceptance criteria. It doesnât reflect the teamâs actual velocity, familiarity with the tech stack, or how long similar work actually took in the past. So the following principle applies.
[Story point operating principle]1. Treat any story point the AI proposes as a draft only.2. The team cross-checks how long similarly-sized stories actually took in past sprints.3. When the AI's estimate and the team's measured data diverge significantly, record the divergence itself (e.g. "AI estimated 5 points, but the team's data shows similar work averaged 8 points").4. Final story point confirmation always remains the team's responsibility (e.g. via planning poker).An AI applying a consistent scoring standard and that number being accurate are two different things. Consistency in estimation saves meeting time, but accuracy can only be corrected using the teamâs own historical data.
Step 5: Check story quality against INVEST
Section titled âStep 5: Check story quality against INVESTâBefore finalizing a story, check it against the six INVEST criteria.
| Criterion | Question to ask |
|---|---|
| Independent | Can it be developed without waiting on another story to finish? |
| Negotiable | Is the implementation detail not locked in, and open to discussion? |
| Valuable | Does it deliver clear value to the user or the business? |
| Estimable | Is it concrete enough for the team to size the work? |
| Small | Can it fit inside a single sprint? |
| Testable | Can completion be judged objectively via acceptance criteria? |
Independent and Small are the two most often broken when an AI auto-splits a story. Bundling âteam name duplicate checkâ and âregistration form submissionâ into one story breaks Independent; splitting too finely, on the other hand, breaks Valuable because each fragment no longer delivers value on its own.
Next article
Section titled âNext articleâOnce the story and acceptance criteria are confirmed, the next step is turning them into actual tests. The next article covers a two-pass test design: document-first scenarios written before code exists, and code-grounded refinement once it does.
â From User Stories to Test Scenarios and Test Code