doc-prd by vladm3105/aidoc-flow-framework
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-prd创建产品需求文档(PRD) - SDD 工作流中的第 2 层产物,用于定义产品功能、用户需求、可衡量的成功标准和关键绩效指标。
层级:2
上游:BRD(第 1 层)
下游产物:EARS(第 3 层)、BDD(第 4 层)、ADR(第 5 层)
在创建此文档之前,您必须:
列出已有的上游产物:
ls docs/01_BRD/ docs/02_PRD/ 2>/dev/null
在可追溯性标签中仅引用现有文档
仅当上游产物类型确实不存在时使用 null
切勿使用占位符,如 BRD-XXX 或 TBD
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
不要创建缺失的上游产物 - 应跳过相关功能
在创建 PRD 之前,请阅读:
.claude/skills/doc-flow/SHARED_CONTENT.mdPRD-MVP-TEMPLATE.md 第 22 节。ai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD_MVP_SCHEMA.yaml在以下情况下使用 doc-prd:
PRD 文档遵循 MVP 模板结构(21 节)。完整结构请参见 ai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.md。
注意:MVP 模板是框架标准。所有就绪度评分均使用 ≥90% 的阈值。扩展通过新的 MVP 迭代(PRD-02、PRD-03)进行,而非修改模板。
第 1 节. 文档控制(必填 - 第一节):
@brd: BRD.NN.EE.SS)XX% (目标: >=90%))XX% (目标: >=90%))所有 21 节(按顺序):
关键说明:
## N. 标题 格式)PRD 文档在文档控制部分需要 两个质量评分:
| 评分 | 目的 | 阈值 |
|---|---|---|
| SYS 就绪度评分 | 为创建 SYS 的准备就绪度 | >=90% |
| EARS 就绪度评分 | 为创建 EARS 的准备就绪度 | >=90% |
格式:XX% (目标: >=90%)
SYS 就绪度评分标准(100%):
EARS 就绪度评分标准(100%):
| 变体 | 章节 | 用例 |
|---|---|---|
| 标准 | 1-21(21 节) | 业务功能、核心平台(默认) |
| 基于代理 | 1-15(15 节) | 机器学习/人工智能代理、智能系统 |
| 自动化导向 | 1-12(12 节) | n8n 工作流、事件处理 |
选择标准:
层级分离原则:
必填范围说明(包含在第 8 节中):
本节提供角色定义和故事摘要。详细的行为需求在 EARS 中捕获;可执行的测试规范在 BDD 特性文件中。
用户故事格式:"作为 [角色],我想要 [能力],以便 [收益]"
PRD 级别内容(包含):
非 PRD 级别内容(排除):
状态:阻塞性 - 如果缺失或仅有占位符则报错
必需内容类别(至少 3 类):
目的:用技术内容(选项、标准)详细阐述 BRD 第 7.2 节的主题。
层级分离:
BRD 第 7.2 节 -> PRD 第 18 节 -> ADR
(是什么 & 为什么) (如何评估) (最终决策)
-------------------------------------------------------------------
业务驱动因素 技术选项 选定选项
业务约束 评估标准 权衡分析
PRD 第 18 节格式:
##### BRD.NN.32.SS: [主题名称]
**上游**: BRD-NN 第 7.2.X 节
**技术选项**:
1. **[选项 A]**: [描述]
2. **[选项 B]**: [描述]
**评估标准**:
- **[标准 1]**: [可衡量的目标]
- **[标准 2]**: [可衡量的目标]
**产品约束**:
- [约束 1]
**决策时间线**: [里程碑引用]
**ADR 需求**: [ADR 必须决定的内容]
关键:请勿引用特定的 ADR 编号(ADR-01、ADR-033 等)- ADR 尚不存在!
目的:建立轻量级、机器可读的提示,用于 AI 可发现性和跨 PRD 文档的依赖关系追踪,而不会阻塞验证。
支持的标签:
@depends: PRD-NN — 硬性先决条件;此 PRD 无法在没有引用的 PRD 的情况下进行@discoverability: PRD-NN (简短理由) — 用于 AI 搜索和排名的相关文档(信息性)ID 格式:文档级别的 ID 遵循 ID_NAMING_STANDARDS.md 中的 {DOC_TYPE}-NN 格式(例如,PRD-01、PRD-02)。
放置位置:将标签添加到可追溯性部分(第 18 节)或与依赖关系描述内联。
示例:
@depends: PRD-01 (核心平台)
@discoverability: PRD-02 (功能增强 - 共享架构)
验证器行为:交叉链接标签被识别并报告为信息级别的发现(非阻塞性)。它们使 AI/LLM 工具能够推断关系并改进搜索排名,而不影响文档批准。
MVP 可选:交叉链接标签在 MVP 模板中是可选的,不是 PRD 批准所必需的;它们纯粹是信息性的。
目的:为 EARS 转换提供结构化需求。
必需子节:
20.1 时序分析矩阵:
| 操作 | p50 | p95 | p99 | 单位 | 触发事件 | 备注 |
|---|---|---|---|---|---|---|
| [操作] | [值] | [值] | [值] | 毫秒 | [事件] | [约束] |
20.2 边界值矩阵:
| 阈值 | 操作符 | 值 | 在边界处 | 高于 | 低于 |
|---|---|---|---|---|---|
| [名称] | >= 或 > 或 <= 或 < | [值] | [行为] | [行为] | [行为] |
20.3 状态转换图:包含错误状态的 Mermaid stateDiagram-v2
20.4 回退路径文档:
| 依赖项 | 故障模式 | 检测 | 回退行为 | 超时 | 恢复 |
|---|
20.5 EARS 就绪度检查清单:所有时序、边界、状态、回退项已验证
| 表示法 | 格式 | 产物 | 目的 |
|---|---|---|---|
| 短横线 | TYPE-NN | ADR, SPEC, CTR | 技术产物 - 文件引用 |
| 点号 | TYPE.NN.TT.SS | BRD, PRD, EARS, BDD, SYS, REQ, IMPL, TASKS | 分层 - 元素引用 |
关键区别:
@adr: ADR-033 -> 指向文档 ADR-033_slug.md@brd: BRD.17.01.01 -> 指向 BRD-017.md 中的元素 01.01模式:PRD.{DOC_NUM}.{ELEM_TYPE}.{SEQ}(4 段,点号分隔)
| 元素类型 | 代码 | 示例 |
|---|---|---|
| 功能需求 | 01 | PRD.02.01.01 |
| 质量属性 | 02 | PRD.02.02.01 |
| 约束 | 03 | PRD.02.03.01 |
| 假设 | 04 | PRD.02.04.01 |
| 依赖项 | 05 | PRD.02.05.01 |
| 验收标准 | 06 | PRD.02.06.01 |
| 风险 | 07 | PRD.02.07.01 |
| 度量标准 | 08 | PRD.02.08.01 |
| 用户故事 | 09 | PRD.02.09.01 |
| 用例 | 11 | PRD.02.11.01 |
| 功能项 | 22 | PRD.02.22.01 |
| 利益相关者需求 | 24 | PRD.02.24.01 |
已移除的模式(请勿使用):
AC-XXX -> 使用 PRD.NN.06.SSFR-XXX -> 使用 PRD.NN.01.SSF-XXX -> 使用 PRD.NN.09.SSUS-XXX -> 使用 PRD.NN.09.SS目的:为可追溯性和跨 PRD 引用建立一致的功能 ID 命名约定。
模式:NN(可变长度的顺序数字,最少 2 位)
| 组件 | 格式 | 描述 |
|---|---|---|
| 功能 ID | NN | 2+ 位顺序数字(01-99,然后是 100-999,1000+) |
| 文档上下文 | PRD-NN | PRD 编号提供命名空间 |
原理:文档上下文(PRD-01)已经提供了命名空间。在功能 ID 中嵌入 PRD 编号是冗余的。功能 ID 与文档 ID 编号约定相匹配。
示例:
01:第一个功能(在任何 PRD 中)15:第 15 个功能99:第 99 个功能100:第 100 个功能(自动扩展)1000:第 1000 个功能验证正则表达式:^\d{2,}$
跨 PRD 引用格式:当引用其他 PRD 中的功能时,请使用交叉引用格式:
@prd: PRD.22.01.15
组件:
@prd: - 标签前缀PRD-NN - 文档 ID(元素 ID 中的 NN).01 - 元素类型(01 = 功能需求).15 - 文档内的序列 ID唯一性:PRD.22.01.15 是全局唯一的(PRD-022,功能 015)
无效格式(请勿使用):
| 无效格式 | 问题 | 正确格式 |
|---|---|---|
Feature-022-001 | 已弃用的格式 | PRD.22.01.01 |
FR-AGENT-001 | 非标准前缀 | PRD.NN.01.01 |
Feature 3.1 | 文本格式 | PRD.25.01.03 |
PRD.1.1 | 未补零 | PRD.01.01.01 |
F-01 | 已弃用的 F- 格式 | PRD.NN.01.01 |
第 2 层(PRD):必须包含第 1 层(BRD)的标签
标签数量:1 个标签(@brd)
格式:
## 18. 可追溯性
### 可追溯性标签
**必填标签**(累积标签层次结构 - 第 2 层):
```markdown
@brd: BRD.01.01.03, BRD.01.01.10
上游来源:
下游产物:
EARS-NN(待创建)- 正式需求
BDD-NN(待创建)- 测试场景
阅读并理解驱动此 PRD 的 BRD。
分段 BRD 处理:
如果 BRD 被拆分为多个分段文件(文件夹结构 docs/01_BRD/BRD-NN_{slug}/):
检查 docs/02_PRD/ 以获取下一个可用的 ID 编号(例如,PRD-01、PRD-02)。
ID 编号约定:以 2 位数字开始,仅在需要时扩展。
ID 匹配:PRD ID 不需要与 BRD ID 匹配(PRD-09 可能实现 BRD-16)。
嵌套文件夹规则(必填):所有 PRD 无论文档大小都必须使用嵌套文件夹。
文件夹结构:
docs/02_PRD/PRD-NN_{slug}/分段 PRD(适用于大于 25KB 的大型文档):
docs/02_PRD/PRD-01_user_authentication/ PRD-01.0_index.md PRD-01.1_executive_summary.md PRD-01.2_problem_statement.md ...
**单体 PRD**(适用于小于等于 25KB 的小型文档):
docs/02_PRD/PRD-01_user_authentication/ PRD-01_user_authentication.md
**关键**:即使是单体 PRD 也必须在嵌套文件夹中。切勿直接在 `02_PRD/` 目录中创建 `docs/02_PRD/PRD-NN_{slug}.md`。
### 步骤 4:完成文档控制
填写所有必需的元数据字段:
- 状态、版本、日期、作者/评审者/批准者
- 带有 `@brd` 标签的 BRD 引用
- SYS 就绪度评分和 EARS 就绪度评分(均 >=90%)
- 模板变体
- 文档修订历史表
### 步骤 5:完成核心章节(2-17)
**第 2-3 节**:问题背景和业务影响
**第 4-6 节**:用户、关键绩效指标、目标
**第 7-9 节**:范围、用户故事、功能需求
**第 10 节**:面向客户的内容(必填)
**第 11-14 节**:验收标准、约束、风险、成功定义
**第 15-17 节**:利益相关者、实施、预算
### 步骤 6:完成可追溯性(第 18 节)
- 添加上游 BRD 引用
- 记录下游产物占位符
- 包含架构决策需求详细说明
- 如果存在跨 PRD 依赖关系,则添加双向引用表
### 步骤 7:完成参考资料(第 19 节)
内部文档、外部标准、领域和技术参考资料。
### 步骤 8:完成 EARS 增强附录(第 20 节)
- 时序分析矩阵(p50/p95/p99)
- 边界值矩阵(明确的操作符)
- 状态转换图(包含错误状态)
- 回退路径文档
- EARS 就绪度检查清单
### 步骤 9:完成质量保证策略(第 21 节)
质量标准和测试策略(从 BRD 移至此)。
### 步骤 10:创建/更新可追溯性矩阵
**必填**:创建或更新 `docs/02_PRD/PRD-00_TRACEABILITY_MATRIX.md`
### 步骤 11:更新上游 BRD 可追溯性(必填)
**关键 - 常被遗漏**:创建 PRD 时,您必须更新父级 BRD 的可追溯性部分。
**流程**:
1. 打开上游 BRD(例如,`docs/01_BRD/BRD-01_platform/BRD-01_platform.md`)
2. 定位 `## 可追溯性` 部分
3. 将此 PRD 添加到 `下游产物`:
```markdown
- 下游产物: [PRD-01](../../../ai_dev_ssd_flow/PROJECT/fixtures/budget_alert/PRD-01.md)
4. 将 BRD 更新与 PRD 创建一起提交(单次提交)
为何重要:
参考:完整指南请参见 .claude/skills/doc-flow/SHARED_CONTENT.md 第 4.3 节"双向可追溯性更新工作流"。
# 统一 PRD 核心验证(规范;预提交/持续集成对等)
bash ai_dev_ssd_flow/02_PRD/scripts/prd_core_wrapper_hook.sh ai_dev_ssd_flow/02_PRD
# 包含标准化的 PRD 元素类型检查 + 遗留模式检测
# 完整 PRD 验证(包含建议性检查)
bash ai_dev_ssd_flow/02_PRD/scripts/validate_prd_wrapper.sh docs/02_PRD
# 组件验证器(辅助诊断)
python ai_dev_ssd_flow/02_PRD/scripts/validate_prd.py docs/02_PRD/PRD-NN_{slug}/
# 链接完整性
python ai_dev_ssd_flow/scripts/validate_links.py --path docs/02_PRD/
# 累积标签验证
python ai_dev_ssd_flow/scripts/validate_tags_against_docs.py --artifact PRD-NN --expected-layers brd --strict
结构(21 节):
文档控制必填字段:
内容质量:
可追溯性:
大小限制:
关键:文档创建后立即执行此验证循环。
循环:
1. 运行: python ai_dev_ssd_flow/scripts/validate_cross_document.py --document {文档路径} --auto-fix
2. 如果错误已修复: 转到循环(重新验证)
3. 如果警告已修复: 转到循环(重新验证)
4. 如果存在无法修复的问题: 记录以供手动审查,继续
5. 如果干净: 标记为已验证,继续
# 按文档验证(阶段 1)- 必须使用嵌套文件夹路径
python ai_dev_ssd_flow/scripts/validate_cross_document.py --document docs/02_PRD/PRD-NN_{slug}/PRD-NN_{slug}.md --auto-fix
# 层级验证(阶段 2)- 所有 PRD 文档完成后运行
python ai_dev_ssd_flow/scripts/validate_cross_document.py --layer PRD --auto-fix
| 代码 | 描述 | 严重性 |
|---|---|---|
| XDOC-001 | 引用的需求 ID 未找到 | 错误 |
| XDOC-002 | 缺少累积标签(@brd) | 错误 |
| XDOC-003 | 上游文档未找到 | 错误 |
| XDOC-006 | 标签格式无效 | 错误 |
| XDOC-009 | 缺少可追溯性部分 | 错误 |
| FWDREF-E001 | 前向引用到不存在的 ADR | 错误 |
阻塞性:是 - 在验证通过且错误数为 0 之前,无法继续创建 EARS/SYS。
创建 PRD 文档时,请完全使用以下元数据值:
tags:
- prd # 必填 - 使用 'prd',而非 'product-prd'、'feature-prd'
- layer-2-artifact # 必填 - 层级标识符
custom_fields:
document_type: prd # 必填 - 使用 'prd',而非 'product-requirements'
artifact_type: PRD # 必填 - 大写
layer: 2 # 必填 - PRD 是第 2 层
architecture_approaches: [ai-agent-based] # 必填 - 数组格式
禁止使用的值:
product-prd、feature-prd、product-requirementsproduct-requirements、product_requirementsarchitecture_approach: value(单数形式)所有图表必须使用 Mermaid 语法。禁止使用基于文本的图表(ASCII 艺术、方框绘图)。参见:ai_dev_ssd_flow/DIAGRAM_STANDARDS.md 和 mermaid-gen 技能。
创建 PRD 后,使用:
doc-ears - 创建正式的 EARS 需求(第 3 层)
EARS 将:
@brd 和 @prd 标签(累积)ai_dev_ssd_flow/SPEC_DRIVEN_DEVELOPMENT_GUIDE.mdai_dev_ssd_flow/02_PRD/PRD_MVP_SCHEMA.yamlai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD_MVP_SCHEMA.yamlai_dev_ssd_flow/02_PRD/PRD_MVP_QUALITY_GATE_VALIDATION.mdai_dev_ssd_flow/02_PRD/README.md.claude/skills/doc-flow/SHARED_CONTENT.md章节模板(所有 PRD 文档的默认模板):
docs/02_PRD/PRD-NN_{slug}/PRD-NN.S_{slug}.mdai_dev_ssd_flow/02_PRD/PRD-SECTION-0-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD-SECTION-TEMPLATE.mdai_dev_ssd_flow/ID_NAMING_STANDARDS.mdPRD 目的:定义产品功能和用户需求
层级:2
所需标签:@brd(1 个标签)
关键章节:
下一个:doc-ears
| 版本 | 日期 | 变更 | 作者 |
|---|---|---|---|
| 1.3 | 2026-03-05 | 添加了交叉链接标签文档(第 6.1 节);添加了质量门验证参考;添加了功能 ID 格式文档;验证了第 20.1 节命名合规性 | 系统 |
| 1.2 | 2026-02-26 | 将 frontmatter 迁移到 metadata 模式;将 PRD 模板/规则引用更新为 ai_dev_ssd_flow 和 MVP 规则文件名 | 系统 |
| 1.1 | 2026-02-11 | 嵌套文件夹强制执行:将所有路径从 docs/PRD/ 修复为 docs/02_PRD/,从 docs/BRD/ 修复为 docs/01_BRD/;移除了嵌套文件夹外的可选单体路径;现在所有 PRD 无论大小都必须在嵌套文件夹中 | 系统 |
| 1.0 | 2026-02-08 | 带有 YAML frontmatter 标准化的初始技能定义 | 系统 |
每周安装次数
94
仓库
GitHub 星标数
9
首次出现
2026 年 1 月 24 日
安全审计
安装于
codex81
gemini-cli81
opencode81
cursor76
github-copilot
Create Product Requirements Documents (PRD) - Layer 2 artifact in the SDD workflow that defines product features, user needs, measurable success criteria, and KPIs.
Layer : 2
Upstream : BRD (Layer 1)
Downstream Artifacts : EARS (Layer 3), BDD (Layer 4), ADR (Layer 5)
Before creating this document, you MUST:
List existing upstream artifacts :
ls docs/01_BRD/ docs/02_PRD/ 2>/dev/null
Reference only existing documents in traceability tags
Usenull only when upstream artifact type genuinely doesn't exist
NEVER use placeholders like BRD-XXX or TBD
Do NOT create missing upstream artifacts - skip functionality instead
Before creating a PRD, read:
.claude/skills/doc-flow/SHARED_CONTENT.mdPRD-MVP-TEMPLATE.md Section 22.ai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD_MVP_SCHEMA.yamlUse doc-prd when:
PRD documents follow the MVP template structure (21 sections). See ai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.md for complete structure.
Note : MVP template is the framework standard. All readiness scores use ≥90% thresholds. Expansion happens through NEW MVP iterations (PRD-02, PRD-03), not template changes.
Section 1. Document Control (MANDATORY - First section):
@brd: BRD.NN.EE.SS)XX% (Target: >=90%))XX% (Target: >=90%))All 21 Sections (in order) :
Critical Notes :
## N. Title format)PRD documents require two quality scores in Document Control:
| Score | Purpose | Threshold |
|---|---|---|
| SYS-Ready Score | Readiness for SYS creation | >=90% |
| EARS-Ready Score | Readiness for EARS creation | >=90% |
Format : XX% (Target: >=90%)
SYS-Ready Scoring Criteria (100%) :
EARS-Ready Scoring Criteria (100%) :
| Variant | Sections | Use Case |
|---|---|---|
| Standard | 1-21 (21) | Business features, core platform (DEFAULT) |
| Agent-Based | 1-15 (15) | ML/AI agents, intelligent systems |
| Automation-Focused | 1-12 (12) | n8n workflows, event processing |
Selection Criteria :
Layer Separation Principle :
MANDATORY Scope Note (include in Section 8):
This section provides role definitions and story summaries. Detailed behavioral requirements are captured in EARS; executable test specifications are in BDD feature files.
User Story Format : "As a [role], I want [capability] so that [benefit]"
PRD-Level Content (INCLUDE) :
NOT PRD-Level (EXCLUDE) :
Status : BLOCKING - error if missing or placeholder-only
Required Content Categories (minimum 3):
Purpose : Elaborate BRD Section 7.2 topics with technical content (options, criteria).
Layer Separation :
BRD Section 7.2 -> PRD Section 18 -> ADR
(WHAT & WHY) (HOW to evaluate) (Final decision)
-------------------------------------------------------------------
Business drivers Technical options Selected option
Business constraints Evaluation criteria Trade-off analysis
PRD Section 18 Format :
##### BRD.NN.32.SS: [Topic Name]
**Upstream**: BRD-NN section 7.2.X
**Technical Options**:
1. **[Option A]**: [Description]
2. **[Option B]**: [Description]
**Evaluation Criteria**:
- **[Criterion 1]**: [Measurable target]
- **[Criterion 2]**: [Measurable target]
**Product Constraints**:
- [Constraint 1]
**Decision Timeline**: [Milestone reference]
**ADR Requirements**: [What ADR must decide]
CRITICAL : Do NOT reference specific ADR numbers (ADR-01, ADR-033, etc.) - ADRs don't exist yet!
Purpose : Establish lightweight, machine-readable hints for AI discoverability and dependency tracing across PRD documents without blocking validation.
Tags Supported :
@depends: PRD-NN — Hard prerequisite; this PRD cannot proceed without the referenced PRD@discoverability: PRD-NN (short rationale) — Related document for AI search and ranking (informational)ID Format : Document-level IDs follow {DOC_TYPE}-NN per ID_NAMING_STANDARDS.md (e.g., PRD-01, PRD-02).
Placement : Add tags to Traceability section (Section 18) or inline with dependency descriptions.
Example :
@depends: PRD-01 (Core Platform)
@discoverability: PRD-02 (Feature Enhancements - shared architecture)
Validator Behavior : Cross-linking tags are recognized and reported as info-level findings (non-blocking). They enable AI/LLM tools to infer relationships and improve search ranking without affecting document approval.
Optional for MVP : Cross-linking tags are optional in MVP templates and are not required for PRD approval; they are purely informational.
Purpose : Provides structured requirements for EARS transformation.
Required Subsections :
20.1 Timing Profile Matrix :
| Operation | p50 | p95 | p99 | Unit | Trigger Event | Notes |
|---|---|---|---|---|---|---|
| [operation] | [value] | [value] | [value] | ms | [event] | [constraints] |
20.2 Boundary Value Matrix :
| Threshold | Operator | Value | At Boundary | Above | Below |
|---|---|---|---|---|---|
| [name] | >= or > or <= or < | [value] | [behavior] | [behavior] | [behavior] |
20.3 State Transition Diagram : Mermaid stateDiagram-v2 with error states
20.4 Fallback Path Documentation :
| Dependency | Failure Mode | Detection | Fallback Behavior | Timeout | Recovery |
|---|
20.5 EARS-Ready Checklist : All timing, boundary, state, fallback items verified
| Notation | Format | Artifacts | Purpose |
|---|---|---|---|
| Dash | TYPE-NN | ADR, SPEC, CTR | Technical artifacts - file references |
| Dot | TYPE.NN.TT.SS | BRD, PRD, EARS, BDD, SYS, REQ, IMPL, TASKS | Hierarchical - element references |
Key Distinction :
@adr: ADR-033 -> Points to document ADR-033_slug.md@brd: BRD.17.01.01 -> Points to element 01.01 inside BRD-017.mdPattern : PRD.{DOC_NUM}.{ELEM_TYPE}.{SEQ} (4 segments, dot-separated)
| Element Type | Code | Example |
|---|---|---|
| Functional Requirement | 01 | PRD.02.01.01 |
| Quality Attribute | 02 | PRD.02.02.01 |
| Constraint | 03 | PRD.02.03.01 |
| Assumption | 04 | PRD.02.04.01 |
| Dependency | 05 | PRD.02.05.01 |
| Acceptance Criteria | 06 | PRD.02.06.01 |
| Risk | 07 | PRD.02.07.01 |
| Metric | 08 | PRD.02.08.01 |
| User Story | 09 | PRD.02.09.01 |
| Use Case | 11 | PRD.02.11.01 |
REMOVED Patterns (Do NOT use):
AC-XXX -> Use PRD.NN.06.SSFR-XXX -> Use PRD.NN.01.SSF-XXX -> Use PRD.NN.09.SSUS-XXX -> Use PRD.NN.09.SSPurpose : Establish consistent Feature ID naming convention for traceability and cross-PRD references.
Pattern : NN (variable-length sequential number, minimum 2 digits)
| Component | Format | Description |
|---|---|---|
| Feature ID | NN | 2+ digit sequential (01-99, then 100-999, 1000+) |
| Document Context | PRD-NN | PRD number provides namespace |
Rationale : Document context (PRD-01) already provides namespace. Embedding PRD number in feature ID is redundant. Feature IDs match document ID numbering convention.
Examples :
01: First feature (in any PRD)15: 15th feature99: 99th feature100: 100th feature (auto-expands)1000: 1000th featureValidation Regex : ^\d{2,}$
Cross-PRD Reference Format : When referencing features from other PRDs, use the cross-reference format:
@prd: PRD.22.01.15
Components :
@prd: - Tag prefixPRD-NN - Document ID (NN in element ID).01 - Element type (01 = Functional Requirement).15 - Sequence ID within documentUniqueness : PRD.22.01.15 is globally unique (PRD-022, Feature 015)
Invalid Formats (Do NOT Use):
| Invalid Format | Issue | Correct Format |
|---|---|---|
Feature-022-001 | Deprecated format | PRD.22.01.01 |
FR-AGENT-001 | Non-standard prefix | PRD.NN.01.01 |
Feature 3.1 | Text format | PRD.25.01.03 |
PRD.1.1 |
Layer 2 (PRD) : Must include tags from Layer 1 (BRD)
Tag Count : 1 tag (@brd)
Format :
## 18. Traceability
### Traceability Tags
**Required Tags** (Cumulative Tagging Hierarchy - Layer 2):
```markdown
@brd: BRD.01.01.03, BRD.01.01.10
Upstream Sources :
Downstream Artifacts :
EARS-NN (to be created) - Formal requirements
BDD-NN (to be created) - Test scenarios
Read and understand the BRD that drives this PRD.
Sectioned BRD Handling:
If BRD is split into multiple section files (folder structure docs/01_BRD/BRD-NN_{slug}/):
Check docs/02_PRD/ for next available ID number (e.g., PRD-01, PRD-02).
ID Numbering Convention: Start with 2 digits and expand only as needed.
ID Matching: PRD ID does NOT need to match BRD ID (PRD-09 may implement BRD-16).
Nested Folder Rule (MANDATORY): ALL PRDs MUST use nested folders regardless of document size.
Folder structure:
docs/02_PRD/PRD-01_user_authentication/ PRD-01.0_index.md PRD-01.1_executive_summary.md PRD-01.2_problem_statement.md ...
**Monolithic PRD** (for smaller documents ≤25KB):
docs/02_PRD/PRD-01_user_authentication/ PRD-01_user_authentication.md
**CRITICAL**: Even monolithic PRDs MUST be in a nested folder. Never create `docs/02_PRD/PRD-NN_{slug}.md` directly in the `02_PRD/` directory.
### Step 4: Complete Document Control
Fill all required metadata fields:
- Status, Version, Dates, Author/Reviewer/Approver
- BRD Reference with `@brd` tag
- SYS-Ready Score and EARS-Ready Score (both >=90%)
- Template Variant
- Document Revision History table
### Step 5: Complete Core Sections (2-17)
**Section 2-3**: Problem context and business impact
**Section 4-6**: Users, KPIs, goals
**Section 7-9**: Scope, user stories, functional requirements
**Section 10**: Customer-facing content (MANDATORY)
**Section 11-14**: Acceptance criteria, constraints, risks, success
**Section 15-17**: Stakeholders, implementation, budget
### Step 6: Complete Traceability (Section 18)
- Add upstream BRD references
- Document downstream artifact placeholders
- Include Architecture Decision Requirements elaboration
- Add bidirectional reference table if cross-PRD dependencies exist
### Step 7: Complete References (Section 19)
Internal documentation, external standards, domain and technology references.
### Step 8: Complete EARS Enhancement Appendix (Section 20)
- Timing Profile Matrix (p50/p95/p99)
- Boundary Value Matrix (explicit operators)
- State Transition Diagram (with error states)
- Fallback Path Documentation
- EARS-Ready Checklist
### Step 9: Complete QA Strategy (Section 21)
Quality standards and testing strategy (moved from BRD).
### Step 10: Create/Update Traceability Matrix
**MANDATORY**: Create or update `docs/02_PRD/PRD-00_TRACEABILITY_MATRIX.md`
### Step 11: Update Upstream BRD Traceability (MANDATORY)
**CRITICAL - Often Missed**: When creating a PRD, you MUST update the parent BRD's traceability section.
**Process**:
1. Open the upstream BRD (e.g., `docs/01_BRD/BRD-01_platform/BRD-01_platform.md`)
2. Locate the `## Traceability` section
3. Add this PRD to `Downstream Artifacts`:
```markdown
- Downstream Artifacts: [PRD-01](../../../ai_dev_ssd_flow/PROJECT/fixtures/budget_alert/PRD-01.md)
4. Commit BRD update with PRD creation (single commit)
Why This Matters :
Reference : See .claude/skills/doc-flow/SHARED_CONTENT.md Section 4.3 "Bidirectional Traceability Update Workflow" for complete guidance.
# Unified PRD core validation (canonical; pre-commit/CI parity)
bash ai_dev_ssd_flow/02_PRD/scripts/prd_core_wrapper_hook.sh ai_dev_ssd_flow/02_PRD
# Includes standardized PRD element type checks + legacy pattern detection
# Full PRD validation (includes advisory checks)
bash ai_dev_ssd_flow/02_PRD/scripts/validate_prd_wrapper.sh docs/02_PRD
# Component validator (secondary diagnostics)
python ai_dev_ssd_flow/02_PRD/scripts/validate_prd.py docs/02_PRD/PRD-NN_{slug}/
# Link integrity
python ai_dev_ssd_flow/scripts/validate_links.py --path docs/02_PRD/
# Cumulative tagging validation
python ai_dev_ssd_flow/scripts/validate_tags_against_docs.py --artifact PRD-NN --expected-layers brd --strict
Structure (21 Sections) :
Document Control Required Fields :
Content Quality :
Traceability :
Size Limits :
CRITICAL : Execute this validation loop IMMEDIATELY after document creation.
LOOP:
1. Run: python ai_dev_ssd_flow/scripts/validate_cross_document.py --document {doc_path} --auto-fix
2. IF errors fixed: GOTO LOOP (re-validate)
3. IF warnings fixed: GOTO LOOP (re-validate)
4. IF unfixable issues: Log for manual review, continue
5. IF clean: Mark VALIDATED, proceed
# Per-document validation (Phase 1) - must use nested folder path
python ai_dev_ssd_flow/scripts/validate_cross_document.py --document docs/02_PRD/PRD-NN_{slug}/PRD-NN_{slug}.md --auto-fix
# Layer validation (Phase 2) - run when all PRD documents complete
python ai_dev_ssd_flow/scripts/validate_cross_document.py --layer PRD --auto-fix
| Code | Description | Severity |
|---|---|---|
| XDOC-001 | Referenced requirement ID not found | ERROR |
| XDOC-002 | Missing cumulative tag (@brd) | ERROR |
| XDOC-003 | Upstream document not found | ERROR |
| XDOC-006 | Tag format invalid | ERROR |
| XDOC-009 | Missing traceability section | ERROR |
| FWDREF-E001 | Forward reference to non-existent ADR | ERROR |
Blocking : YES - Cannot proceed to EARS/SYS creation until validation passes with 0 errors.
When creating PRD documents, use EXACTLY these metadata values:
tags:
- prd # REQUIRED - Use 'prd' NOT 'product-prd', 'feature-prd'
- layer-2-artifact # REQUIRED - Layer identifier
custom_fields:
document_type: prd # REQUIRED - Use 'prd' NOT 'product-requirements'
artifact_type: PRD # REQUIRED - Uppercase
layer: 2 # REQUIRED - PRD is Layer 2
architecture_approaches: [ai-agent-based] # REQUIRED - Array format
FORBIDDEN Values :
product-prd, feature-prd, product-requirementsproduct-requirements, product_requirementsarchitecture_approach: value (singular form)All diagrams MUST use Mermaid syntax. Text-based diagrams (ASCII art, box drawings) are prohibited. See: ai_dev_ssd_flow/DIAGRAM_STANDARDS.md and mermaid-gen skill.
After creating PRD, use:
doc-ears - Create formal EARS requirements (Layer 3)
The EARS will:
@brd and @prd tags (cumulative)ai_dev_ssd_flow/SPEC_DRIVEN_DEVELOPMENT_GUIDE.mdai_dev_ssd_flow/02_PRD/PRD_MVP_SCHEMA.yamlai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD-MVP-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD_MVP_SCHEMA.yamlai_dev_ssd_flow/02_PRD/PRD_MVP_QUALITY_GATE_VALIDATION.mdai_dev_ssd_flow/02_PRD/README.mdSection Templates (DEFAULT for all PRD documents):
docs/02_PRD/PRD-NN_{slug}/PRD-NN.S_{slug}.mdai_dev_ssd_flow/02_PRD/PRD-SECTION-0-TEMPLATE.mdai_dev_ssd_flow/02_PRD/PRD-SECTION-TEMPLATE.mdai_dev_ssd_flow/ID_NAMING_STANDARDS.mdPRD Purpose : Define product features and user needs
Layer : 2
Tags Required : @brd (1 tag)
Key Sections :
Next : doc-ears
| Version | Date | Changes | Author |
|---|---|---|---|
| 1.3 | 2026-03-05 | Added cross-linking tags documentation (Section 6.1); Added quality gate validation reference; Added Feature ID format documentation; Verified Section 20.1 naming compliance | System |
| 1.2 | 2026-02-26 | Migrated frontmatter to metadata schema; updated PRD template/rules references to ai_dev_ssd_flow and MVP rule filenames | System |
| 1.1 | 2026-02-11 | Nested Folder Enforcement : Fixed all paths from docs/PRD/ to docs/02_PRD/ and docs/BRD/ to ; Removed OPTIONAL monolithic path outside nested folder; All PRDs must now be in nested folders regardless of size |
Weekly Installs
94
Repository
GitHub Stars
9
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex81
gemini-cli81
opencode81
cursor76
github-copilot73
claude-code71
注册流程转化率优化指南:减少摩擦、提高完成率的专家技巧
29,300 周安装
Upstash QStash 无服务器消息队列服务:HTTP 消息调度、定时任务与 Webhook 投递
149 周安装
Codex Autoresearch Loop:AI驱动的代码自主优化与验证循环技能
385 周安装
Elastic Cloud 云网络安全策略管理:IP过滤器与VPC过滤器配置指南
187 周安装
Clanker SDK:一键部署带流动性池的ERC20代币 | TypeScript区块链开发工具
125 周安装
Hummingbot 开发助手:官方文档指南、API 使用与交易机器人调试
117 周安装
MCP服务器构建指南 - 模型上下文协议开发教程与最佳实践
93 周安装
| Feature Item | 22 | PRD.02.22.01 |
| Stakeholder Need | 24 | PRD.02.24.01 |
| Not zero-padded |
PRD.01.01.01 |
F-01 | Deprecated F- format | PRD.NN.01.01 |
docs/02_PRD/PRD-NN_{slug}/Sectioned PRD (for large documents >25KB):
.claude/skills/doc-flow/SHARED_CONTENT.mddocs/01_BRD/| System |
| 1.0 | 2026-02-08 | Initial skill definition with YAML frontmatter standardization | System |