ai-driven-prd

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

AI-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.
#PhaseInputOutputPrompt file
1Socratic discoveryRaw request
brief.md
prompts/01-discovery.md
2Raw → PRD
brief.md
docs/prd/prd-<slug>.md
prompts/02-raw-to-prd.md
3Acceptance criteriaPRD with FRsGherkin/EARS blocksprompts/03-acceptance.md
4Adversarial passPRD + ACsfailure-modes tableprompts/04-adversarial.md
5Task decompositionValidated PRD
tasks/tasks-prd-<slug>.md
prompts/05-tasks.md
6AI-readiness reviewPRD + tasksscore ≥13/15 or fixesprompts/06-readiness.md
7Test generationACs + edge casesfailing tests committedprompts/07-tests.md
8Execution loopPRD + tasks + testsimplemented PRprompts/08-execution.md
每个阶段都有输入、输出产物,以及进入下一阶段前的人工审核门
序号阶段输入输出提示文件
1苏格拉底式探索原始需求
brief.md
prompts/01-discovery.md
2原始需求→PRD
brief.md
docs/prd/prd-<slug>.md
prompts/02-raw-to-prd.md
3验收标准包含功能需求(FR)的PRDGherkin/EARS块prompts/03-acceptance.md
4对抗性评审PRD + 验收标准(AC)故障模式表prompts/04-adversarial.md
5任务分解已验证的PRD
tasks/tasks-prd-<slug>.md
prompts/05-tasks.md
6AI就绪性评审PRD + 任务评分≥13/15或修复建议prompts/06-readiness.md
7测试生成验收标准 + 边缘案例已提交的失败测试prompts/07-tests.md
8执行循环PRD + 任务 + 测试已实现的PRprompts/08-execution.md

Operating protocol

操作协议

  1. Identify the entry phase from what the user already has.
  2. Read the matching prompt file in
    prompts/
    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.
  3. Stop at every phase boundary. Show the artifact and ask the user: approved / refine
    <section>
    / restart phase
    . Do not chain phases without explicit approval.
  4. 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.
  5. Phase 6 gate: score the PRD against references/checklist.md. If <13/15, return the prioritized fixes and block the handoff.
  6. Default artifact paths (declared in
    templates/master-prd.md
    §12):
    docs/prd/
    ,
    tasks/
    ,
    tests/
    ,
    evals/
    ,
    progress.json
    .
  1. 确定进入阶段:根据用户已有的内容选择合适的起始阶段。
  2. 读取匹配的提示文件:读取
    prompts/
    目录下对应的提示文件,并将其应用于用户内容。将提示内容视为系统指令——严格遵循其规则(语气、输出格式、反模式)。
  3. 在每个阶段边界停止:展示产物并询问用户:批准/优化
    <章节>
    /重新开始本阶段
    。未经明确批准,不得连续执行多个阶段。
  4. 第2阶段草拟:复制templates/master-prd.md作为框架并填充内容。不得调整章节顺序——模板的顺序利用了LLM的位置注意力偏差。
  5. 第6阶段审核门:根据references/checklist.md为PRD评分。如果评分<13/15,返回优先级排序的修复建议并阻止交付。
  6. 默认产物路径(在
    templates/master-prd.md
    第12节中声明):
    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
    ⚠️ NEEDS INPUT:
    with the specific question.
  • Segment for parsing. Keep headings, code fences, and Anthropic-style XML tags (
    <context>
    ,
    <requirements>
    ,
    <do_not>
    ,
    <acceptance_criteria>
    ). LLMs follow structure better than prose.
  • 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>
    <acceptance_criteria>
    )。LLM遵循结构的能力优于纯文本。
  • 每个规范性陈述使用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.mdprompts/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.mdprompts/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