spec-product-prd

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

spec-product-prd(R2:基于方案生成 PRD)

spec-product-prd (R2: Generate PRD Based on Solution)

概览

Overview

R2 的目标是把
{FEATURE_DIR}/requirements/solution.md
推荐决策转写为
{FEATURE_DIR}/requirements/prd.md
:让研发能拆任务、QA 能写用例、干系人能评审与验收。
  • 可验证优先:PRD 的核心是 场景 + 业务规则 + AC(可测试)
  • 不确定性收敛:PRD 中不出现“待确认问题 / Open Questions”清单;未知统一进验证清单(Owner/截止/信号/动作)
  • 不重复 R1:方案对比/为何选择/讨论过程留在
    solution.md
    ;PRD 只写交付规格
开始时宣布:「我正在使用 spec-product-prd 技能基于 solution.md 生成可验收 PRD(prd.md)。」
The goal of R2 is to transcribe the recommended decisions from
{FEATURE_DIR}/requirements/solution.md
into
{FEATURE_DIR}/requirements/prd.md
: enabling R&D to break down tasks, QA to write test cases, and stakeholders to review and accept deliverables.
  • Verification-first: The core of PRD is Scenario + Business Rules + AC (Testable)
  • Uncertainty Convergence: No "Pending Questions / Open Questions" lists are allowed in PRD; all unknowns are consolidated into the Verification Checklist (Owner/Deadline/Signal/Action)
  • No Duplication with R1: Solution comparisons/rationale/discussion processes remain in
    solution.md
    ; PRD only includes delivery specifications
Announce at the start: "I am using the spec-product-prd skill to generate an acceptable PRD (prd.md) based on solution.md."

何时使用 / 不使用

When to Use / Not to Use

  • 使用时机
    • R1 已完成并产出
      requirements/solution.md
      ,需要把交付规格(范围/AC/里程碑/风险依赖)冻结为独立 PRD 评审
    • 需求不满足“简单需求可跳过 R2”的口径(见下方分流)
  • 不要用在
    • spec-context
      失败(上下文定位失败)→ 立刻停止
    • requirements/solution.md
      不存在 / 明显未收敛(缺结论摘要/范围 In-Out/推荐方案/验证清单)→ 停止并回到 R1
  • Use Cases
    • R1 is completed and
      requirements/solution.md
      is produced; need to freeze delivery specifications (scope/AC/milestones/risk dependencies) into an independent PRD for review
    • The requirement does not meet the criteria for "skipping R2 for simple requirements" (see diversion below)
  • Do Not Use When
    • spec-context
      fails (context positioning failed) → Stop immediately
    • requirements/solution.md
      does not exist / is clearly not converged (lacks conclusion summary/scope In-Out/recommended solution/verification checklist) → Stop and return to R1

输入 / 输出(落盘约定)

Input / Output (File Storage Convention)

  • 硬门禁输入
    FEATURE_DIR
    (必须由
    spec-context
    获取)
  • 读取
    • {FEATURE_DIR}/requirements/solution.md
      (必读,作为唯一决策入口)
    • {FEATURE_DIR}/requirements/raw.md
      (按需:补证据入口/原始措辞)
    • project/memory/glossary.md
      (如存在:术语与口径)
  • 写入
    • {FEATURE_DIR}/requirements/prd.md
      (R2 产物,优先按模板生成)
  • Mandatory Gate Input:
    FEATURE_DIR
    (must be obtained via
    spec-context
    )
  • Read
    • {FEATURE_DIR}/requirements/solution.md
      (mandatory read, serves as the only decision entry point)
    • {FEATURE_DIR}/requirements/raw.md
      (as needed: supplementary evidence entry/original wording)
    • project/memory/glossary.md
      (if exists: terminology and specifications)
  • Write
    • {FEATURE_DIR}/requirements/prd.md
      (R2 deliverable, generate according to template first)

门禁(必须先过,否则停止)

Gates (Must Pass First, Otherwise Stop)

REQUIRED SUB-SKILL:先执行
spec-context
并回显
FEATURE_DIR=...
powershell
. ".\.aisdlc-cli\scirpts\spec-common.ps1"
$context = Get-SpecContext
$FEATURE_DIR = $context.FEATURE_DIR
Write-Host "FEATURE_DIR=$FEATURE_DIR"
  • spec-context
    失败 → 停止
  • {FEATURE_DIR}/requirements/solution.md
    缺失 → 停止(不得“先出一版 PRD 再说”)
违反门禁=违反精神:无论“时间紧/老板催/流程卡点”,都禁止猜路径、禁止跳过
solution.md
硬写 PRD。
REQUIRED SUB-SKILL: Execute
spec-context
first and echo
FEATURE_DIR=...
.
powershell
. ".\.aisdlc-cli\scirpts\spec-common.ps1"
$context = Get-SpecContext
$FEATURE_DIR = $context.FEATURE_DIR
Write-Host "FEATURE_DIR=$FEATURE_DIR"
  • If
    spec-context
    fails → Stop
  • If
    {FEATURE_DIR}/requirements/solution.md
    is missing → Stop (do not "generate a PRD first and adjust later")
Violating gates = violating the core principle: Regardless of "time constraints/boss pressure/process bottlenecks", guessing paths and writing PRD without
solution.md
are strictly prohibited.

核心流程(分流 + 规格化落盘)

Core Process (Diversion + Standardized File Storage)

0) 先做 R2 分流(可选,但强烈建议)

0) First Perform R2 Diversion (Optional but Highly Recommended)

如果满足任一“简单需求”口径,则不应生成独立
prd.md
,而应回到 R1 的
solution.md
追加 Mini-PRD 小节后直接进入 design:
  • 纯规则/配置/文案类变更(不改变任务流与页面结构)
  • 变更范围极小且无歧义(通常 1–2 处改动,无复杂权限/状态分支权衡)
  • solution.md
    用少量条目即可写清 AC 且能直接验收
禁止用“issue + checklist”替代 Mini-PRD:本流程的最小交付规格必须落在
solution.md
(可追溯、可继续对话、可入库)。
If any of the "simple requirement" criteria are met, do not generate an independent
prd.md
; instead, return to R1's
solution.md
and append a Mini-PRD section before proceeding to design:
  • Pure rule/configuration/copy changes (no changes to task flow or page structure)
  • Minimal and unambiguous change scope (usually 1–2 changes, no complex trade-offs in permissions/status branches)
  • AC can be clearly written in a few entries in
    solution.md
    and can be directly accepted
Prohibited: Using "issue + checklist" to replace Mini-PRD: The minimum delivery specification of this process must be stored in
solution.md
(traceable, iterable, and storable in repository)

1) 从
solution.md
提取 PRD 的“可交付信息”

1) Extract Deliverable Information for PRD from
solution.md

solution.md
中与交付/验收直接相关的内容抽成清单(不要发散新结论):
  • 目标一句话、In/Out、MVP 边界
  • 核心场景(建议 ≤ 3 个)与成功标准
  • 功能项(可拆解)与优先级(P0/P1/P2 或 Must/Should/Could/Won’t)
  • 会影响 AC 的业务规则/口径(能引用就引用;不确定就进验证清单)
  • 已知风险/依赖/假设(转写到 PRD 的验证清单表)
Extract content directly related to delivery/acceptance from
solution.md
into a checklist (do not add new decisions):
  • One-sentence goal, In/Out, MVP boundaries
  • Core scenarios (recommended ≤3) and success criteria
  • Functional items (decomposable) and priorities (P0/P1/P2 or Must/Should/Could/Won’t)
  • Business rules/specifications that affect AC (reference if possible; add to verification checklist if uncertain)
  • Known risks/dependencies/assumptions (transcribe to the verification checklist table in PRD)

2) 用模板生成/更新
{FEATURE_DIR}/requirements/prd.md

2) Generate/Update
{FEATURE_DIR}/requirements/prd.md
Using Template

优先对齐模板:
skills/spec-product-prd/prd-template.md
(只借结构,不把未知当已知)。
写作要求(最容易跑偏的点):
  • 场景驱动:第 3 节场景要能直接导出第 6 节 AC
  • AC 可测试:每条 AC 都能写成“输入/操作/期望结果”而非主观描述
  • 优先级对齐里程碑:MVP 至少覆盖 P0/Must;Out/Won’t 口径明确
  • 不确定性只出现一次:只写在第 8 节“风险/依赖与验证清单”表里
Prioritize alignment with the template:
skills/spec-product-prd/prd-template.md
(borrow only the structure, do not treat unknowns as knowns)
Writing Requirements (Most Common Pitfalls):
  • Scenario-driven: Section 3 scenarios should directly derive Section 6 AC
  • Testable AC: Each AC can be written as "Input/Operation/Expected Result" instead of subjective descriptions
  • Priority Aligns with Milestones: MVP must cover at least Must/P0; Out/Won’t specifications are clear
  • Uncertainty Appears Only Once: Only written in Section 8 "Risks/Dependencies and Verification Checklist" table

3) R2 自检(写完立刻过一遍)

3) R2 Self-Check (Review Immediately After Writing)

  • In/Out 与
    solution.md
    一致,且不歧义
  • 每个核心场景都有 AC(可直接转测试用例)
  • 功能优先级与里程碑一致:MVP 覆盖 Must/P0
  • 业务规则/口径可追溯;不可追溯的条目已进入验证清单
  • 关键异常与边界覆盖会影响 AC 的情况(权限/失败/幂等等)
  • 文档中不出现“待确认问题 / Open Questions / 待定项”清单
  • In/Out is consistent with
    solution.md
    and unambiguous
  • Each core scenario has corresponding AC (can be directly converted to test cases)
  • Functional priorities are consistent with milestones: MVP covers Must/P0
  • Business rules/specifications are traceable; untraceable entries have been added to the verification checklist
  • Key exceptions and boundaries that affect AC are covered (permissions/failure/idempotency, etc.)
  • No "Pending Questions / Open Questions / To-Be-Determined Items" lists appear in the document

Quick reference(高频规则速查)

Quick Reference (High-Frequency Rules)

  • 必须
    • 先跑
      spec-context
      ,只用
      FEATURE_DIR
      拼路径
    • 必读
      solution.md
      ,PRD 只做“转写/规格化”,不新增决策
    • PRD 里必须有:In/Out、核心场景、AC、验证清单(Owner/截止/信号/动作)
  • 禁止
    • 猜路径(例如手写
      .aisdlc/specs/...
    • solution.md
      缺失仍生成 PRD(“先写再问/先出一版”)
    • 写“待确认问题/Open Questions/待定项”列表(用验证清单表替代)
  • Mandatory
    • Run
      spec-context
      first, only use
      FEATURE_DIR
      to construct file paths
    • Must read
      solution.md
      , PRD only performs "transcription/standardization" and does not add new decisions
    • PRD must include: In/Out, core scenarios, AC, verification checklist (Owner/Deadline/Signal/Action)
  • Prohibited
    • Guessing paths (e.g., manually writing
      .aisdlc/specs/...
      )
    • Generating PRD when
      solution.md
      is missing ("write first and ask later/generate a version first")
    • Writing lists of "Pending Questions/Open Questions/To-Be-Determined Items" (use verification checklist table instead)

红旗清单(出现任一条:停止并纠正)

Red Flag Checklist (Stop and Correct If Any Item Appears)

  • 没跑
    spec-context
    就开始读写
    requirements/*.md
    (或开始“猜 FEATURE_DIR”)
  • solution.md
    不存在/未收敛,却仍打算“先写 PRD 占坑”
  • PRD 里出现
    待确认 / Open Questions / 待定 / TBD
    之类清单
  • AC 充满主观词(“友好/清晰/合理/尽快”)而没有可验证动作
  • 里程碑写了,但功能优先级与 MVP 范围对不上(MVP 不覆盖 P0/Must)
  • Starting to read/write
    requirements/*.md
    without running
    spec-context
    (or starting to "guess FEATURE_DIR")
  • Planning to "write PRD first to reserve a spot" even though
    solution.md
    does not exist/is not converged
  • Lists like
    Pending / Open Questions / To-Be-Determined / TBD
    appear in PRD
  • AC is full of subjective words ("friendly/clear/reasonable/as soon as possible") without verifiable actions
  • Milestones are written, but functional priorities do not align with MVP scope (MVP does not cover Must/P0)

常见借口与反制(基线测试中的高频点)

Common Excuses and Countermeasures (High-Frequency Points in Baseline Testing)

借口(原话/近似原话)常见违规行为必须的反制动作
老板 10 分钟后评审…先写再问跳过
spec-context
/ 猜路径 / 先写 PRD 再补依据
门禁不过就停止;需要先交付时,只能交付“验证清单 + 下一步动作”,不能交付“猜出来的 PRD”
路径靠猜,错了再改写到错误目录,导致后续引用/追溯全部断裂只认
FEATURE_DIR=...
输出;所有路径用
$FEATURE_DIR
拼接
没有 solution 也先出一版 PRD用 raw+常识脑补,导致范围与决策漂移
solution.md
缺失/未收敛 → 停止并回到 R1(先把决策入口稳定)
把不确定都标成待确认问题就行PRD 出现 Open Questions 清单,没人负责、无法收敛用第 8 节验证清单表:Owner/截止/信号/动作齐全;其他章节不再出现“待确认”
简单需求就写个 issue/checklist 吧交付规格散落系统外,无法追溯与迭代简单需求要么走 R2,要么在
solution.md
追加 Mini-PRD;禁止用 issue 替代落盘
Excuse (Original/Approximate Words)Common ViolationsMandatory Countermeasures
"The boss will review in 10 minutes... write first and ask later"Skipping
spec-context
/ guessing paths / writing PRD first and then supplementing basis
Stop if gates are not passed; if delivery is urgent, only deliver "verification checklist + next steps", not "guessed PRD"
"Guess the path, correct it later if wrong"Writing to the wrong directory, causing all subsequent references/traceability to breakOnly recognize the output of
FEATURE_DIR=...
; all paths are constructed using
$FEATURE_DIR
"Generate a PRD first even without solution"Brainstorming based on raw content + common sense, leading to scope and decision driftIf
solution.md
is missing/not converged → Stop and return to R1 (stabilize the decision entry point first)
"Just mark all uncertainties as pending questions"PRD contains Open Questions lists with no responsible person and no way to convergeUse the verification checklist table in Section 8 of PRD: complete with Owner/Deadline/Signal/Action; no "pending" items appear in other sections
"Just write an issue/checklist for simple requirements"Delivery specifications are scattered outside the system, making them untraceable and uniterableSimple requirements either go through R2 or append a Mini-PRD in
solution.md
; using issue to replace file storage is prohibited

一个好例子(把“待确认问题”改写成可执行验证清单)

A Good Example (Rewriting "Pending Questions" into Executable Verification Checklist)

坏写法(禁止)
  • 待确认:最大导出行数是多少?
  • 待确认:性能指标是什么?
好写法(写到 PRD 第 8 节验证清单表)
风险/假设/依赖验证信号方法Owner截止触发动作
假设:MVP 同步导出在 ≤50,000 行内可接受导出耗时 ≤30s 且不触发超时/内存告警用真实数据分布压测;记录 P95DEV评审后 3 天若超阈值:切换异步导出方案,并更新 PRD 的里程碑与 AC
Bad Writing (Prohibited):
  • Pending: What is the maximum number of export rows?
  • Pending: What are the performance indicators?
Good Writing (Write to PRD Section 8 Verification Checklist Table):
Risk/Assumption/DependencyVerification SignalMethodOwnerDeadlineTrigger Action
Assumption: MVP synchronous export is acceptable within ≤50,000 rowsExport time ≤30s and no timeout/memory alerts are triggeredPressure test with real data distribution; record P95DEV3 days after reviewIf threshold is exceeded: switch to asynchronous export solution and update PRD milestones and AC