PromptForge
Back to list
开发工具

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

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

7 views4/15/2026

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

// 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.