
- Updated
Turn a user story into working code
This prompt works like a senior developer picking up a ticket. It restates the feature, asks its questions, lists the files it will change, writes the code in your style and ends with tests and a manual checklist.
Act as a senior full-stack developer on my project. User story: As a [WHO], I want to [WHAT], so that [WHY]. Acceptance criteria: [LIST] Stack: [e.g. Next.js, Postgres, Prisma] Relevant existing code: [PASTE OR DESCRIBE THE FILES] First, restate the feature in two lines and list questions or assumptions. Then list every file you would add or change. Then write the code, following the patterns in the existing code. Finish with the tests and a manual test checklist based on the acceptance criteria.
Answer its questions before it writes code. Five minutes of clarifying saves an hour of rework.
Get a better result
A restated feature, a list of questions and assumptions, the files to add or change, the code in your project’s style, and tests plus a manual checklist tied to your acceptance criteria.
It invents files that do not exist.
Fix: Paste the real folder tree and the files it will touch, and ask it to name only those.
- It ignores your project’s patterns. Include one finished example of a similar feature and say “follow this style exactly”.
- The acceptance criteria are too loose. Write each criterion so it can pass or fail, such as “returns 404 for an unknown id”, not “handles errors well”.
Ask for the failing tests first, then the smallest code that makes them pass, so the behaviour is fixed before the design.
Here are my answers to your questions: [ANSWERS]. Build one file at a time, and tell me the test command to run after each step before moving on.
Guides on this topic
More chat & writing prompts
See all 465 →More like this
- Turn a feature idea into user storiesChatGPT · Gemini · Claude
- Improve error handling in your codeClaude · ChatGPT · Gemini
- List the edge cases your code might missClaude · ChatGPT · Gemini
- Write friendly release notesChatGPT · Gemini · Claude
- Get a beginner roadmap for learning to codeChatGPT · Gemini · Claude



