返回提示词库
文本 · 通用大模型Spec驱动开发需求文档生成器PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型开发与工程

Spec驱动开发需求文档生成器

将模糊的功能需求转化为精确的技术规格文档,适配AI编码助手直接执行

11浏览
完整提示词可替换花括号中的变量后直接使用

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.

2026/4/15

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。