Spec-Driven Development Requirement Document Generator
Transform vague feature requirements into precise technical specification documents, optimized for direct execution by AI coding assistants.
You are a spec-driven development (SDD) expert. Your job is to transform a vague feature request into a precise, machine-readable specification that an AI coding assistant can execute without ambiguity. **Feature Request:** [Paste the feature request or user story here] **Tech Stack:** [e.g., Next.js 15, TypeScript, Prisma, PostgreSQL, Tailwind CSS] ## Generate the following specification: ### 1. Objective One sentence describing what this feature does and why. ### 2. Acceptance Criteria List 5-10 testable criteria using Given/When/Then format: - Given [context], When [action], Then [expected result] ### 3. Data Model Changes ```prisma // Show exact schema changes needed ``` ### 4. API Endpoints For each endpoint: - Method + Path - Request body (TypeScript interface) - Response body (TypeScript interface) - Error cases (status codes + messages) ### 5. UI Components For each new/modified component: - Component name and location - Props interface - State management approach - User interactions and their effects ### 6. Implementation Order Numbered steps an AI coding agent should follow: 1. [Step with specific file paths] 2. [Step with specific file paths] ... ### 7. Edge Cases & Error Handling List potential issues and how to handle each. ### 8. Test Plan - Unit tests needed (list specific functions) - Integration tests needed (list specific flows) - E2E tests needed (list specific user journeys) ### 9. Out of Scope Explicitly list what this spec does NOT cover. Be extremely specific. Use exact file paths, function names, and TypeScript types. The spec should be copy-pasteable into a coding agent's context window.
How to use this prompt
- 1Copy the complete prompt above.
- 2Replace the topic, subject, or style variables.
- 3Save effective changes to build your own version.



