ai-driven-prd
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI-Driven PRD
AI驱动的PRD
Reusable framework for transforming raw stakeholder requests into PRDs that AI coding agents (Claude Code, Cursor, Copilot, Windsurf, Aider) can execute with minimal ambiguity.
可复用框架,用于将原始的利益相关方需求转换为AI编码Agent(Claude Code、Cursor、Copilot、Windsurf、Aider)能够以最小歧义执行的PRD。
Core principle
核心原则
The spec — not the code — is the durable artifact. The reader is "a junior developer who never leaves the project": an LLM with short memory, dated training data, and a tendency to fill gaps with the average of the internet. Therefore the PRD must be explicit, atomic, machine-verifiable, and self-contained. Omission is read as permission; vague adjectives become hallucinations.
规格文档——而非代码——是持久的产物。目标读者是“永不离开项目的初级开发者”:即具有短期记忆、训练数据过时且倾向于用互联网平均内容填补信息空白的LLM。因此PRD必须明确、原子化、可机器验证且自包含。遗漏的内容会被视为许可;模糊的形容词会导致幻觉输出。
When to use
使用场景
- New feature request → start at Phase 1.
- User has a brief / notes / transcript already → start at Phase 2.
- Existing PRD needs hardening → Phase 3, 4, or 6.
- User asks to "audit" / "score" / "review" a PRD for AI readiness → Phase 6.
Skip for: ad-hoc bug fixes, exploratory questions, single-file refactors, anything under ~50 LoC of work.
- 新功能需求 → 从第1阶段开始。
- 用户已有简报/笔记/对话记录 → 从第2阶段开始。
- 现有PRD需要强化 → 第3、4或6阶段。
- 用户要求“审核”/“评分”/“评审”PRD的AI就绪性 → 第6阶段。
以下场景无需使用:临时bug修复、探索性问题、单文件重构、工作量约50行代码以下的任务。
The 8 phases
8个阶段
Each phase has an INPUT, an OUTPUT artifact, and a HUMAN GATE before advancing.
| # | Phase | Input | Output | Prompt file |
|---|---|---|---|---|
| 1 | Socratic discovery | Raw request | | prompts/01-discovery.md |
| 2 | Raw → PRD | | | prompts/02-raw-to-prd.md |
| 3 | Acceptance criteria | PRD with FRs | Gherkin/EARS blocks | prompts/03-acceptance.md |
| 4 | Adversarial pass | PRD + ACs | failure-modes table | prompts/04-adversarial.md |
| 5 | Task decomposition | Validated PRD | | prompts/05-tasks.md |
| 6 | AI-readiness review | PRD + tasks | score ≥13/15 or fixes | prompts/06-readiness.md |
| 7 | Test generation | ACs + edge cases | failing tests committed | prompts/07-tests.md |
| 8 | Execution loop | PRD + tasks + tests | implemented PR | prompts/08-execution.md |
每个阶段都有输入、输出产物,以及进入下一阶段前的人工审核门。
| 序号 | 阶段 | 输入 | 输出 | 提示文件 |
|---|---|---|---|---|
| 1 | 苏格拉底式探索 | 原始需求 | | prompts/01-discovery.md |
| 2 | 原始需求→PRD | | | prompts/02-raw-to-prd.md |
| 3 | 验收标准 | 包含功能需求(FR)的PRD | Gherkin/EARS块 | prompts/03-acceptance.md |
| 4 | 对抗性评审 | PRD + 验收标准(AC) | 故障模式表 | prompts/04-adversarial.md |
| 5 | 任务分解 | 已验证的PRD | | prompts/05-tasks.md |
| 6 | AI就绪性评审 | PRD + 任务 | 评分≥13/15或修复建议 | prompts/06-readiness.md |
| 7 | 测试生成 | 验收标准 + 边缘案例 | 已提交的失败测试 | prompts/07-tests.md |
| 8 | 执行循环 | PRD + 任务 + 测试 | 已实现的PR | prompts/08-execution.md |
Operating protocol
操作协议
- Identify the entry phase from what the user already has.
- Read the matching prompt file in and run it on the user's content. Treat the prompt body as a system instruction — follow its rules (tone, output format, anti-patterns) literally.
prompts/ - Stop at every phase boundary. Show the artifact and ask the user: approved / refine / restart phase. Do not chain phases without explicit approval.
<section> - Phase 2 drafting: copy templates/master-prd.md as the scaffold and fill it. Do not rearrange section order — the template's ordering exploits LLM positional attention bias.
- Phase 6 gate: score the PRD against references/checklist.md. If <13/15, return the prioritized fixes and block the handoff.
- Default artifact paths (declared in §12):
templates/master-prd.md,docs/prd/,tasks/,tests/,evals/.progress.json
- 确定进入阶段:根据用户已有的内容选择合适的起始阶段。
- 读取匹配的提示文件:读取目录下对应的提示文件,并将其应用于用户内容。将提示内容视为系统指令——严格遵循其规则(语气、输出格式、反模式)。
prompts/ - 在每个阶段边界停止:展示产物并询问用户:批准/优化/重新开始本阶段。未经明确批准,不得连续执行多个阶段。
<章节> - 第2阶段草拟:复制templates/master-prd.md作为框架并填充内容。不得调整章节顺序——模板的顺序利用了LLM的位置注意力偏差。
- 第6阶段审核门:根据references/checklist.md为PRD评分。如果评分<13/15,返回优先级排序的修复建议并阻止交付。
- 默认产物路径(在第12节中声明):
templates/master-prd.md、docs/prd/、tasks/、tests/、evals/。progress.json
Hard rules (non-negotiable)
硬性规则(不可协商)
- No fuzzy adjectives. Fast, easy, intuitive, robust, modern, seamless trigger an immediate rewrite to a quantified threshold.
- Number everything. Every functional requirement, user story, and acceptance criterion gets an ID; cross-reference FR-N ↔ AC-N ↔ test name.
- DO NOT list ≥4 items. Concrete forbidden actions, not vibes.
- Each implementation phase ends runnable + tested. No plumbing-only sequences.
- Ambiguity → ASK. Never invent. If a section can't be filled, mark it with the specific question.
⚠️ NEEDS INPUT: - Segment for parsing. Keep headings, code fences, and Anthropic-style XML tags (,
<context>,<requirements>,<do_not>). LLMs follow structure better than prose.<acceptance_criteria> - RFC 2119 keywords (MUST / MUST NOT / SHOULD / MAY) on every normative statement.
- 禁止模糊形容词。快速、易用、直观、健壮、现代、无缝这类词汇会触发立即重写,替换为可量化的阈值。
- 所有内容编号。每个功能需求、用户故事和验收标准都要有ID;建立FR-N ↔ AC-N ↔ 测试名称的交叉引用。
- 不得列出≥4项内容。明确禁止的行为,而非模糊感觉。
- 每个实现阶段结束时必须可运行且已测试。不得仅完成基础架构搭建而无测试。
- 遇到歧义→询问。绝不自行编造。如果某部分内容无法填充,标记为并附上具体问题。
⚠️ NEEDS INPUT: - 按解析需求分段。保留标题、代码块和Anthropic风格的XML标签(、
<context>、<requirements>、<do_not>)。LLM遵循结构的能力优于纯文本。<acceptance_criteria> - 每个规范性陈述使用RFC 2119关键词(MUST / MUST NOT / SHOULD / MAY)。
What NOT to do (common failure modes)
禁止操作(常见失败模式)
See references/anti-patterns.md for the full list. Top three to watch:
- Over-specification (300 requirements that exceed context budget).
- Sub-specification (no pinned stack → agent picks Express in your Fastify project).
- Implicit scope (no DO NOT list → agent "helps" by refactoring unrelated files).
完整列表请参见references/anti-patterns.md。需重点关注的前三项:
- 过度规格化(300项需求超出上下文预算)。
- 规格不足(未固定技术栈→Agent在你的Fastify项目中选择Express)。
- 隐含范围(无禁止操作列表→Agent“帮忙”重构无关文件)。
References
参考资料
- Master PRD template: templates/master-prd.md
- Phase prompts: prompts/01-discovery.md … prompts/08-execution.md
- 15-point AI-readiness checklist: references/checklist.md
- Bad vs AI-ready requirement examples: references/examples.md
- Anti-patterns and remedies: references/anti-patterns.md
- Per-tool notes (Claude Code, Cursor, Copilot, Windsurf, Aider) and framework matrix: references/tooling-notes.md
- 主PRD模板:templates/master-prd.md
- 阶段提示文件:prompts/01-discovery.md … prompts/08-execution.md
- 15分制AI就绪性检查清单:references/checklist.md
- 不良需求与AI就绪需求示例:references/examples.md
- 反模式与解决方案:references/anti-patterns.md
- 各工具说明(Claude Code、Cursor、Copilot、Windsurf、Aider)及框架矩阵:references/tooling-notes.md