spec-product-prototype
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesespec-product-prototype(R3:基于 PRD 生成原型说明)
spec-product-prototype (R3: Generate Prototype Specifications Based on PRD)
概览
Overview
R3 的目标是把 的核心场景/规则/AC加工为 :
{FEATURE_DIR}/requirements/prd.md{FEATURE_DIR}/requirements/prototype.md- 任务流(Mermaid)+ 节点编号(T-001…)
- 页面/弹窗清单(P/D/W-001…)+ 节点覆盖关系
- 逐页说明:入口/控件/状态/跳转 + 纯 ASCII 线框
- AC → 交互节点映射:能回答“哪条 AC 在哪个页面/状态被验证”
- 走查/验证脚本:验证后能回流更新 R1/R2/R3,形成闭环
R3 不是强制步骤:若无交互变化或交互简单且明确,应按 PRD 的分流口径跳过 R3,直接进入 design。
The goal of R3 is to process the core scenarios/rules/AC from into :
{FEATURE_DIR}/requirements/prd.md{FEATURE_DIR}/requirements/prototype.md- Task Flow (Mermaid) + Node Numbering (T-001…)
- Page/Popup Checklist (P/D/W-001…) + Node Coverage Relationship
- Page-by-Page Description: Entry/Controls/Status/Navigation + Pure ASCII Wireframe
- AC → Interactive Node Mapping: Able to answer "which AC is verified on which page/status"
- Walkthrough/Verification Script: Can flow back to update R1/R2/R3 after verification to form a closed loop
R3 is not a mandatory step: If there are no interaction changes or the interaction is simple and clear, you should skip R3 according to the diversion criteria in the PRD and directly proceed to the design phase.
何时使用 / 不使用
When to Use / Not to Use
- 使用时机
- 已完成 R2,存在 ,且需求存在新增/变更交互或交互不够明确,需要通过“文本原型 + 线框”消除实现/验收歧义
{FEATURE_DIR}/requirements/prd.md
- 已完成 R2,存在
- 不要用在
- 失败(上下文定位失败)→ 立刻停止
spec-context - 缺失 → 停止并回到 R2
{FEATURE_DIR}/requirements/prd.md - PRD 明确判定“可跳过 R3”(无交互变化/交互简单明确)→ 不要生成 ;应在 PRD 写清最小交互结论后直接进入 design
prototype.md
- Usage Scenarios
- R2 has been completed, exists, and the requirement involves new/changed interactions or unclear interactions that need to be clarified through "text prototype + wireframe" to eliminate implementation/acceptance ambiguities
{FEATURE_DIR}/requirements/prd.md
- R2 has been completed,
- Do Not Use When
- fails (context positioning failed) → Stop immediately
spec-context - is missing → Stop and return to R2
{FEATURE_DIR}/requirements/prd.md - The PRD clearly states "R3 can be skipped" (no interaction changes/simple and clear interactions) → Do not generate ; directly proceed to design after the PRD clarifies the minimum interaction conclusions
prototype.md
输入 / 输出(落盘约定)
Input / Output (File Storage Convention)
- 硬门禁输入:(必须由
FEATURE_DIR获取)spec-context - 读取
- (必读:场景/规则/AC/验证清单/原型分流结论)
{FEATURE_DIR}/requirements/prd.md - (按需:验证清单引用/决策口径)
{FEATURE_DIR}/requirements/solution.md - (按需:证据入口/原始措辞)
{FEATURE_DIR}/requirements/raw.md
- 写入
- (R3 产物,优先按模板生成)
{FEATURE_DIR}/requirements/prototype.md
- Mandatory Input: (must be obtained via
FEATURE_DIR)spec-context - Read
- (required: scenarios/rules/AC/verification checklists/prototype diversion conclusions)
{FEATURE_DIR}/requirements/prd.md - (as needed: verification checklist references/decision criteria)
{FEATURE_DIR}/requirements/solution.md - (as needed: evidence entry/original wording)
{FEATURE_DIR}/requirements/raw.md
- Write
- (R3 deliverable, preferably generated according to the template)
{FEATURE_DIR}/requirements/prototype.md
门禁(必须先过,否则停止)
Gatekeeping (Must Pass First, Otherwise Stop)
REQUIRED SUB-SKILL:先执行 并回显 。
spec-contextFEATURE_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/prd.md
违反门禁=违反精神:无论“老板 10 分钟后评审/用户催/用户不想跑脚本”,都禁止猜路径、禁止在缺少 PRD 的情况下编造原型。
REQUIRED SUB-SKILL: Execute first and echo .
spec-contextFEATURE_DIR=...powershell
. ".\.aisdlc-cli\scirpts\spec-common.ps1"
$context = Get-SpecContext
$FEATURE_DIR = $context.FEATURE_DIR
Write-Host "FEATURE_DIR=$FEATURE_DIR"- fails → Stop
spec-context - is missing → Stop (must not "generate a prototype first and adjust later")
{FEATURE_DIR}/requirements/prd.md
Violating gatekeeping rules = violating the core principle: No matter if "the boss needs a review in 10 minutes/the user is urging/the user doesn't want to run the script", guessing paths and fabricating prototypes without a PRD are strictly prohibited.
核心流程(分流 → 结构化落盘 → 可追溯验证)
Core Process (Diversion → Structured Storage → Traceable Verification)
0) 先做 R3 分流(强烈建议)
0) First Perform R3 Diversion (Highly Recommended)
若 PRD 已给出“跳过 R3”的结论(无交互变化/交互简单明确),则:
- 不生成
prototype.md - 确保 PRD 已补齐最小交互结论(页面与入口、关键控件/字段与校验要点)
- 直接进入 design 阶段
If the PRD has concluded "skip R3" (no interaction changes/simple and clear interactions):
- Do not generate
prototype.md - Ensure the PRD has supplemented the minimum interaction conclusions (pages and entries, key controls/fields and verification points)
- Directly proceed to the design phase
1) 从 PRD 提取“原型必须信息”(禁止新增决策)
1) Extract "Prototype Mandatory Information" from PRD (No New Decisions Allowed)
只提取与交互走查直接相关的信息(不要在 R3 里发散新规则/新范围):
- 核心场景(建议 ≤ 3 个)与成功标准
- AC 清单(按场景归类)
- 关键规则/口径(会影响交互与校验/提示)
- 风险/依赖与验证清单条目(引用编号)
若 PRD 缺少 AC、或缺少验证清单导致无法落盘:
- 停止并回到 R2(先把可交付规格补齐)
Only extract information directly related to interaction walkthroughs (do not diverge into new rules/scope in R3):
- Core scenarios (recommended ≤ 3) and success criteria
- AC checklist (categorized by scenario)
- Key rules/criteria (that affect interaction and verification/prompts)
- Risks/dependencies and verification checklist items (reference numbers)
If the PRD lacks AC or verification checklists making storage impossible:
- Stop and return to R2 (first complete the deliverable specifications)
2) 生成任务流(Mermaid)与节点编号
2) Generate Task Flow (Mermaid) and Node Numbering
- 节点编号:T-001…
- 每个场景至少一条端到端主链路(成功/失败/取消/返回等关键分支)
- 每个节点必须能落到页面/弹窗清单中的某个 Node ID
- Node numbering: T-001…
- At least one end-to-end main link per scenario (key branches like success/failure/cancel/back, etc.)
- Each node must map to a Node ID in the page/popup checklist
3) 生成页面/弹窗清单(可定位)
3) Generate Page/Popup Checklist (Locatable)
- 页面:P-001…
- 弹窗:D-001…
- 抽屉:W-001…
- 每个 Node 必须标注覆盖哪些 T-xxx、哪些场景、关联哪些 AC
- Pages: P-001…
- Popups: D-001…
- Drawers: W-001…
- Each Node must mark which T-xxx, scenarios, and ACs it covers
4) 逐页写“可实现”的页面说明(含 ASCII 线框)
4) Write "Implementable" Page Descriptions (Including ASCII Wireframe)
每个页面/节点一节,必须包含:
- 入口与目的(含前置条件;未知不得脑补,必须引用验证清单编号)
- ASCII 线框(必须,纯 ASCII 字符画)
- 状态与反馈(至少:正常/加载/空/错误/无权限;提交类交互含成功/失败反馈与恢复路径)
- 关键校验与错误处理(只写会影响 AC 的)
- 跳转与交互(成功/失败/取消/关闭/返回;高风险操作必须写二次确认策略)
用户偏好不能覆盖约束:即便用户觉得 ASCII“丑”,也必须输出 ASCII 线框以保证可移植、可评审、可追溯。可额外附 Figma 链接,但不能删掉 ASCII。
Each page/node section must include:
- Entry and purpose (including preconditions; unknowns must not be fabricated, must reference verification checklist numbers)
- ASCII wireframe (mandatory, pure ASCII character drawing)
- Status and feedback (at minimum: normal/loading/empty/error/no permission; submission interactions include success/failure feedback and recovery paths)
- Key verification and error handling (only those affecting ACs)
- Navigation and interaction (success/failure/cancel/close/back; high-risk operations must include a secondary confirmation strategy)
User preferences cannot override constraints: Even if users find ASCII "ugly", ASCII wireframes must be output to ensure portability, reviewability, and traceability. A Figma link can be attached additionally, but ASCII cannot be removed.
5) 生成 AC → 交互节点映射(必须可追溯)
5) Generate AC → Interactive Node Mapping (Must Be Traceable)
要求:
- PRD 的每条 AC 都必须映射到至少一个页面/节点与具体验证点(状态/文案/按钮可用性/跳转结果)
- 不能映射的 AC:视为原型或 PRD 缺口 → 回流 R2 补齐
Requirements:
- Each AC in the PRD must map to at least one page/node and specific verification point (status/copy/button availability/navigation result)
- ACs that cannot be mapped: Regarded as gaps in the prototype or PRD → Flow back to R2 to complete
6) 写走查/验证脚本(闭环,而非一次性产物)
6) Write Walkthrough/Verification Script (Closed Loop, Not One-Time Deliverable)
- 覆盖哪些验证清单条目(引用 PRD/solution 的编号)
- 每个核心场景写一个任务脚本(目标→步骤→成功标准→观察点)
- 明确回流规则:何种问题回流 R1/R2/R3
- Covers which verification checklist items (reference numbers from PRD/solution)
- Write one task script per core scenario (goal → steps → success criteria → observation points)
- Clarify flow-back rules: What issues require flowing back to R1/R2/R3
Quick reference(高频规则速查)
Quick reference (Quick Check for High-Frequency Rules)
- 必须
- 先跑 ,只用
spec-context拼路径FEATURE_DIR - 必须存在 且可提取出场景 + AC +(至少一份)验证清单
prd.md - 必须包含:任务流(T-xxx)、页面清单(P/D/W-xxx)、逐页 ASCII 线框、AC 映射、走查脚本
prototype.md
- 先跑
- 禁止
- 猜路径 / 在未知上下文里写文件
- 缺失仍继续生成(“先出一版再说”)
prd.md - 写“待确认问题 / Open Questions / TBD”清单(未知必须引用验证清单;缺失则回流补齐)
- 把线框画成表格/图片替代 ASCII(可额外附链接,但不能替代)
- 在 R3 新增范围/规则/决策(R3 只做交互规格化与追溯)
- Mandatory
- Run first, only use
spec-contextto construct pathsFEATURE_DIR - must exist and allow extraction of scenarios + AC + (at least one) verification checklist
prd.md - must include: task flow (T-xxx), page checklist (P/D/W-xxx), page-by-page ASCII wireframes, AC mapping, walkthrough script
prototype.md
- Run
- Prohibited
- Guessing paths / writing files in unknown contexts
- Continuing generation when is missing ("generate a version first")
prd.md - Writing "to-be-confirmed questions / Open Questions / TBD" checklists (unknowns must reference verification checklists; if missing, flow back to complete)
- Replacing ASCII with tables/images (a link can be attached additionally, but cannot replace ASCII)
- Adding new scope/rules/decisions in R3 (R3 only focuses on interaction specification and traceability)
红旗清单(出现任一条:停止并纠正)
Red Flag Checklist (Stop and Correct If Any Item Appears)
- 没跑 就开始读写
spec-context(或开始“猜 FEATURE_DIR”)requirements/*.md - 不存在/缺少 AC,却仍打算“先写原型占坑”
prd.md - 用 Open Questions/待确认清单承接不确定性,而不是引用 PRD/solution 的验证清单
- 把未知写成已知(脑补页面/权限/数据口径/错误策略等)
- 为迎合偏好把 ASCII 线框删掉(导致不可移植/不可评审)
- Starting to read/write without running
requirements/*.md(or "guessing FEATURE_DIR")spec-context - Planning to "write a prototype first to reserve a spot" even though does not exist/lacks ACs
prd.md - Using Open Questions/to-be-confirmed checklists to handle uncertainties instead of referencing verification checklists from PRD/solution
- Writing unknowns as knowns (fabricating pages/permissions/data criteria/error strategies, etc.)
- Removing ASCII wireframes to cater to preferences (resulting in non-portability/unreviewability)
常见借口与反制(基线测试中的高频点)
Common Excuses and Countermeasures (High-Frequency Points in Baseline Testing)
| 借口(原话/近似原话) | 常见违规行为 | 必须的反制动作 |
|---|---|---|
| “老板 10 分钟后评审,先把 prototype 发出来” | 不跑 | 门禁不过就停止;只能交付“阻断说明 + 下一步(先补 PRD/跑 spec-context)”,禁止交付脑补原型 |
| “PRD 还没写好/甚至没有,但我们先对齐交互” | 用常识编造页面与规则,导致后续漂移 | 缺 |
| “别用 ASCII,太丑了;表格/截图更好” | 删除 ASCII 线框,导致跨环境不可读/不可评审 | 必须保留 ASCII;可在 0. 基本信息里附 Figma/截图链接作为补充,但不能替代 ASCII |
| “细节你自己按常见做法写” | 过度脑补(分页/权限/异常策略/字段校验等),并写 Open Questions 清单 | R3 禁止新增决策;把不确定性写成假设并引用验证清单编号;若 PRD/solution 没有验证清单,回流 R2 补齐 |
| Excuse (original/approximate wording) | Common Violations | Mandatory Countermeasures |
|---|---|---|
| "The boss needs a review in 10 minutes, send the prototype first" | Not running | Stop if gatekeeping fails; only deliver "blocking explanation + next steps (first complete PRD/run spec-context)", fabricating prototypes is prohibited |
| "The PRD is not ready/doesn't even exist, but let's align on interactions first" | Fabricating pages and rules based on common sense, leading to subsequent drift | Missing |
| "Don't use ASCII, it's ugly; tables/screenshots are better" | Removing ASCII wireframes, resulting in unreadability/unreviewability across environments | Must retain ASCII; a link to Figma/screenshots can be attached as a supplement in the Basic Information section, but cannot replace ASCII |
| "Write the details according to common practices on your own" | Over-fabricating (pagination/permissions/exception strategies/field verification, etc.) and writing Open Questions checklists | R3 prohibits new decisions; document uncertainties as assumptions and reference verification checklist numbers; if there is no verification checklist in PRD/solution, flow back to R2 to complete |
一个好例子(最小可追溯骨架)
A Good Example (Minimum Traceable Framework)
- 任务流:T-001 进入 → T-002 填写 → T-003 提交成功 / T-004 校验失败
- 页面:P-001 表单页(覆盖 T-001/T-002/T-003/T-004)
- AC 映射:AC-001→P-001/错误态;AC-002→P-001/成功跳转
模板入口:skills/spec-product-prototype/product-prototype-template.md
- Task flow: T-001 Enter → T-002 Fill in → T-003 Submit successfully / T-004 Verification failed
- Page: P-001 Form page (covers T-001/T-002/T-003/T-004)
- AC mapping: AC-001→P-001/error state; AC-002→P-001/success navigation
Template entry:skills/spec-product-prototype/product-prototype-template.md