doc-prd-autopilot
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesedoc-prd-autopilot
doc-prd-autopilot
Purpose
用途
Automated Product Requirements Document (PRD) generation pipeline that processes one or more BRD documents and generates their corresponding PRDs with dependency awareness, readiness validation, and parallel execution support.
Layer: 2 (PRD Generation)
Upstream: BRD (Layer 1)
Downstream: EARS (Layer 3), BDD (Layer 4), ADR (Layer 5)
可自动处理一个或多个BRD文档并生成对应PRD的流水线,具备依赖感知、就绪状态验证和并行执行支持。
层级:2(PRD生成)
上游:BRD(层级1)
下游:EARS(层级3)、BDD(层级4)、ADR(层级5)
Skill Dependencies
技能依赖
This autopilot orchestrates the following skills:
| Skill | Purpose | Phase |
|---|---|---|
| Element ID format, threshold tags, legacy pattern detection | All Phases |
| Validate BRD PRD-Ready score | Phase 2: BRD Readiness |
| PRD creation rules, template, section structure | Phase 3: PRD Generation |
| Real-time quality feedback during PRD generation | Phase 3: PRD Generation |
| Validate PRD structure, content, EARS-Ready score | Phase 4: PRD Validation |
| Content review, link validation, quality scoring | Phase 5: Review |
| Apply fixes from review report, create missing files | Phase 5: Fix |
Delegation Principle: The autopilot orchestrates workflow but delegates:
- PRD structure/content rules → skill
doc-prd - Real-time quality feedback → skill
quality-advisor - PRD validation logic → skill
doc-prd-validator - BRD validation logic → skill
doc-brd-validator - Content review and scoring → skill
doc-prd-reviewer - Issue resolution and fixes → skill
doc-prd-fixer
该自动流水线编排以下技能:
| 技能 | 用途 | 阶段 |
|---|---|---|
| 元素ID格式、阈值标签、遗留模式检测 | 所有阶段 |
| 验证BRD的PRD就绪分数 | 阶段2:BRD就绪性 |
| PRD创建规则、模板、章节结构 | 阶段3:PRD生成 |
| PRD生成期间的实时质量反馈 | 阶段3:PRD生成 |
| 验证PRD结构、内容、EARS就绪分数 | 阶段4:PRD验证 |
| 内容审查、链接验证、质量评分 | 阶段5:审查 |
| 应用审查报告中的修复、创建缺失文件 | 阶段5:修复 |
委托原则:自动流水线编排工作流,但将以下任务委托给对应技能:
- PRD结构/内容规则 → 技能
doc-prd - 实时质量反馈 → 技能
quality-advisor - PRD验证逻辑 → 技能
doc-prd-validator - BRD验证逻辑 → 技能
doc-brd-validator - 内容审查与评分 → 技能
doc-prd-reviewer - 问题解决与修复 → 技能
doc-prd-fixer
Smart Document Detection
智能文档检测
The autopilot automatically determines the action based on the input document type.
自动流水线会根据输入文档类型自动确定操作。
Input Type Recognition
输入类型识别
| Input | Detected As | Action |
|---|---|---|
| Self type | Review existing PRD document |
| Upstream type | Generate if missing, review if exists |
| 输入 | 识别类型 | 操作 |
|---|---|---|
| 自身类型 | 审查现有PRD文档 |
| 上游类型 | 缺失则生成,存在则审查 |
Detection Algorithm
检测算法
1. Parse input: Extract TYPE and NN from "{TYPE}-{NN}"
2. Determine action:
- IF TYPE == "PRD": Review Mode
- ELSE IF TYPE == "BRD": Generate/Find Mode
- ELSE: Error (invalid type for this autopilot)
3. For Generate/Find Mode:
- Check: Does PRD-{NN} exist in docs/02_PRD/?
- IF exists: Switch to Review Mode for PRD-{NN}
- ELSE: Proceed with Generation from BRD-{NN}1. 解析输入:从"{TYPE}-{NN}"中提取TYPE和NN
2. 确定操作:
- 若TYPE == "PRD":审查模式
- 若TYPE == "BRD":生成/查找模式
- 否则:错误(该自动流水线不支持的类型)
3. 对于生成/查找模式:
- 检查:PRD-{NN}是否存在于docs/02_PRD/中?
- 若存在:切换为PRD-{NN}的审查模式
- 否则:从BRD-{NN}开始生成流程File Existence Check
文件存在性检查
bash
undefinedbash
undefinedCheck for nested folder structure (mandatory)
检查嵌套文件夹结构(必填)
ls docs/02_PRD/PRD-{NN}_*/
undefinedls docs/02_PRD/PRD-{NN}_*/
undefinedExamples
示例
bash
undefinedbash
undefinedReview mode (same type - PRD input)
审查模式(同类型 - PRD输入)
/doc-prd-autopilot PRD-01 # Reviews existing PRD-01
/doc-prd-autopilot PRD-01 # 审查现有PRD-01
Generate/Find mode (upstream type - BRD input)
生成/查找模式(上游类型 - BRD输入)
/doc-prd-autopilot BRD-01 # Generates PRD-01 if missing, or reviews existing PRD-01
/doc-prd-autopilot BRD-01 # 若PRD-01缺失则生成,若存在则审查
Multiple inputs
多输入
/doc-prd-autopilot BRD-01,BRD-02 # Generates/reviews PRD-01 and PRD-02
/doc-prd-autopilot PRD-01,PRD-02 # Reviews PRD-01 and PRD-02
undefined/doc-prd-autopilot BRD-01,BRD-02 # 生成/审查PRD-01和PRD-02
/doc-prd-autopilot PRD-01,PRD-02 # 审查PRD-01和PRD-02
undefinedAction Determination Output
操作确定输出
Input: BRD-01
├── Detected Type: BRD (upstream)
├── Expected PRD: PRD-01
├── PRD Exists: Yes → docs/02_PRD/PRD-01_f1_iam/
└── Action: REVIEW MODE - Running doc-prd-reviewer on PRD-01
Input: BRD-05
├── Detected Type: BRD (upstream)
├── Expected PRD: PRD-05
├── PRD Exists: No
└── Action: GENERATE MODE - Creating PRD-05 from BRD-05
Input: PRD-03
├── Detected Type: PRD (self)
└── Action: REVIEW MODE - Running doc-prd-reviewer on PRD-03输入:BRD-01
├── 检测类型:BRD(上游)
├── 预期PRD:PRD-01
├── PRD是否存在:是 → docs/02_PRD/PRD-01_f1_iam/
└── 操作:审查模式 - 对PRD-01运行doc-prd-reviewer
输入:BRD-05
├── 检测类型:BRD(上游)
├── 预期PRD:PRD-05
├── PRD是否存在:否
└── 操作:生成模式 - 从BRD-05创建PRD-05
输入:PRD-03
├── 检测类型:PRD(自身)
└── 操作:审查模式 - 对PRD-03运行doc-prd-reviewerWhen to Use This Skill
何时使用该技能
Use when:
doc-prd-autopilot- You have one or more completed BRD documents ready for PRD generation
- You want automated dependency analysis to determine optimal PRD creation order
- You need PRD-Ready score validation before generation
- You want automatic EARS-Ready score validation after PRD creation
- You need parallel PRD generation for independent BRDs
Do NOT use when:
- Creating a single PRD with extensive manual customization (use instead)
doc-prd - BRDs are incomplete or in Draft status
- You need fine-grained control over each PRD section
在以下场景使用:
doc-prd-autopilot- 您有一个或多个已完成的BRD文档,准备生成PRD
- 您需要自动分析依赖关系以确定最优PRD创建顺序
- 您需要在生成前验证PRD就绪分数
- 您需要在PRD创建后自动验证EARS就绪分数
- 您需要为独立的BRD并行生成PRD
请勿在以下场景使用:
- 需要大量手动定制的单个PRD生成(改用)
doc-prd - BRD文档不完整或处于草稿状态
- 您需要对每个PRD章节进行细粒度控制
8-Step Autopilot Workflow
8步自动流水线工作流
Overview Diagram
概览图
mermaid
flowchart TD
subgraph Phase1["Phase 1: Dependency Analysis"]
A[Input: BRD List] --> B[Analyze Dependencies]
B --> C[Build Dependency Graph]
C --> D[Topological Sort]
D --> E[Define Creation Order]
end
subgraph Phase2["Phase 2: BRD Readiness"]
E --> F{Next BRD}
F --> G[Check PRD-Ready Score]
G --> H{Score >= 90?}
H -->|No| I[Auto-Fix Issues]
I --> J[Re-validate]
J --> H
H -->|Yes| K[Mark BRD Ready]
end
subgraph Phase3["Phase 3: PRD Generation"]
K --> L[Load BRD Content]
L --> M[Apply PRD Template]
M --> N[Generate PRD Sections]
N --> N2[quality-advisor: Real-time Feedback]
N2 --> O[Add Traceability Tags]
O --> P[Write PRD Files]
end
subgraph Phase4["Phase 4: PRD Validation"]
P --> Q[Check EARS-Ready Score]
Q --> R{Score >= 90?}
R -->|No| S[Auto-Fix PRD Issues]
S --> T[Re-validate PRD]
T --> R
R -->|Yes| U[Validation Passed]
end
subgraph Phase5["Phase 5: Final Review"]
U --> U1[Check Link Integrity]
U1 --> U2[Verify Threshold Consistency]
U2 --> U3[Validate BRD Alignment]
U3 --> U4[Check Placeholder Text]
U4 --> U5{Review Passed?}
U5 -->|No| U6[Flag Issues]
U6 --> U7[Auto-Fix or Manual]
U7 --> U5
U5 -->|Yes| U8[Mark PRD Complete]
end
subgraph Phase6["Phase 6: Parallel/Continue"]
U8 --> V{More BRDs?}
V -->|Yes| W{Independent?}
W -->|Yes| X[Parallel Generation]
W -->|No| F
X --> F
V -->|No| Y[Generate Summary Report]
end
Y --> Z[Complete]mermaid
flowchart TD
subgraph Phase1["Phase 1: Dependency Analysis"]
A[Input: BRD List] --> B[Analyze Dependencies]
B --> C[Build Dependency Graph]
C --> D[Topological Sort]
D --> E[Define Creation Order]
end
subgraph Phase2["Phase 2: BRD Readiness"]
E --> F{Next BRD}
F --> G[Check PRD-Ready Score]
G --> H{Score >= 90?}
H -->|No| I[Auto-Fix Issues]
I --> J[Re-validate]
J --> H
H -->|Yes| K[Mark BRD Ready]
end
subgraph Phase3["Phase 3: PRD Generation"]
K --> L[Load BRD Content]
L --> M[Apply PRD Template]
M --> N[Generate PRD Sections]
N --> N2[quality-advisor: Real-time Feedback]
N2 --> O[Add Traceability Tags]
O --> P[Write PRD Files]
end
subgraph Phase4["Phase 4: PRD Validation"]
P --> Q[Check EARS-Ready Score]
Q --> R{Score >= 90?}
R -->|No| S[Auto-Fix PRD Issues]
S --> T[Re-validate PRD]
T --> R
R -->|Yes| U[Validation Passed]
end
subgraph Phase5["Phase 5: Final Review"]
U --> U1[Check Link Integrity]
U1 --> U2[Verify Threshold Consistency]
U2 --> U3[Validate BRD Alignment]
U3 --> U4[Check Placeholder Text]
U4 --> U5{Review Passed?}
U5 -->|No| U6[Flag Issues]
U6 --> U7[Auto-Fix or Manual]
U7 --> U5
U5 -->|Yes| U8[Mark PRD Complete]
end
subgraph Phase6["Phase 6: Parallel/Continue"]
U8 --> V{More BRDs?}
V -->|Yes| W{Independent?}
W -->|Yes| X[Parallel Generation]
W -->|No| F
X --> F
V -->|No| Y[Generate Summary Report]
end
Y --> Z[Complete]Step 1: Input Document List
步骤1:输入文档列表
Command Format:
/doc-prd-autopilot <DOCUMENT_LIST>Input Patterns (Smart Detection):
| Pattern | Type | Action |
|---|---|---|
| Upstream | Generate PRD if missing, review if exists |
| Self | Review existing PRD document |
| Multiple upstream | Batch generate/review |
| Multiple self | Batch review |
| All upstream | Process all BRDs |
Input Options:
- Single BRD (generate/find): or
BRD-01docs/01_BRD/BRD-01_f1_iam/ - Single PRD (review): or
PRD-01docs/02_PRD/PRD-01_f1_iam/ - Multiple BRDs: (comma-separated)
BRD-01,BRD-02,BRD-03 - Multiple PRDs: (comma-separated)
PRD-01,PRD-02,PRD-03 - All BRDs: or
all(scan entire docs/01_BRD/ directory)* - Pattern Match: or
BRD-0*(glob patterns)PRD-0*
Example Invocations:
bash
undefined命令格式:
/doc-prd-autopilot <DOCUMENT_LIST>输入模式(智能检测):
| 模式 | 类型 | 操作 |
|---|---|---|
| 上游 | 缺失则生成PRD,存在则审查 |
| 自身 | 审查现有PRD文档 |
| 多个上游 | 批量生成/审查 |
| 多个自身 | 批量审查 |
| 所有上游 | 处理所有BRD |
输入选项:
- 单个BRD(生成/查找): 或
BRD-01docs/01_BRD/BRD-01_f1_iam/ - 单个PRD(审查): 或
PRD-01docs/02_PRD/PRD-01_f1_iam/ - 多个BRD: (逗号分隔)
BRD-01,BRD-02,BRD-03 - 多个PRD: (逗号分隔)
PRD-01,PRD-02,PRD-03 - 所有BRD: 或
all(扫描整个docs/01_BRD/目录)* - 模式匹配: 或
BRD-0*(通配符模式)PRD-0*
调用示例:
bash
undefinedGenerate/Find mode (BRD input)
生成/查找模式(BRD输入)
/doc-prd-autopilot BRD-01 # Generates PRD-01 if missing, reviews if exists
/doc-prd-autopilot BRD-01 # 若PRD-01缺失则生成,若存在则审查
Review mode (PRD input)
审查模式(PRD输入)
/doc-prd-autopilot PRD-01 # Reviews existing PRD-01
/doc-prd-autopilot PRD-01 # 审查现有PRD-01
Multiple specific BRDs (generate/find)
多个指定BRD(生成/查找)
/doc-prd-autopilot BRD-01,BRD-02,BRD-05
/doc-prd-autopilot BRD-01,BRD-02,BRD-05
Multiple specific PRDs (review)
多个指定PRD(审查)
/doc-prd-autopilot PRD-01,PRD-02,PRD-05
/doc-prd-autopilot PRD-01,PRD-02,PRD-05
All available BRDs
所有可用BRD
/doc-prd-autopilot all
/doc-prd-autopilot all
Pattern match (foundation modules)
模式匹配(基础模块)
/doc-prd-autopilot BRD-0[1-7]
undefined/doc-prd-autopilot BRD-0[1-7]
undefinedStep 2: Dependency Analysis & Creation Order
步骤2:依赖分析与创建顺序
The autopilot analyzes cross-BRD dependencies to determine optimal PRD creation order.
Dependency Sources:
- Explicit References: tags in BRD documents
@depends-brd: BRD-NN - Cross-BRD References: References to other BRDs in Traceability sections
- Module Dependencies: Foundation module (F1-F7) vs Domain module (D1-D7) hierarchy
- Platform vs Feature: Platform BRDs before Feature BRDs
Algorithm:
python
def analyze_dependencies(brd_list):
"""
1. Build directed graph of BRD dependencies
2. Detect circular dependencies (error if found)
3. Perform topological sort
4. Group independent BRDs for parallel processing
5. Return ordered execution plan
"""
graph = build_dependency_graph(brd_list)
if has_cycle(graph):
raise CircularDependencyError()
sorted_order = topological_sort(graph)
parallel_groups = identify_independent_groups(sorted_order)
return ExecutionPlan(sorted_order, parallel_groups)Output Example:
Dependency Analysis Complete:
├── Execution Order: BRD-06 → BRD-07 → [BRD-01, BRD-02] → BRD-03 → BRD-04 → BRD-05
├── Parallel Groups:
│ ├── Group 1: [BRD-06] (Infrastructure)
│ ├── Group 2: [BRD-07] (Config)
│ ├── Group 3: [BRD-01, BRD-02] (Parallel - no dependencies)
│ ├── Group 4: [BRD-03] (depends on BRD-01)
│ └── Group 5: [BRD-04, BRD-05] (Parallel - depend on BRD-03)
└── Estimated Time: Sequential 7 units, Parallel 4 units自动流水线会分析跨BRD的依赖关系,以确定最优PRD创建顺序。
依赖来源:
- 显式引用: BRD文档中的标签
@depends-brd: BRD-NN - 跨BRD引用: 可追溯性章节中对其他BRD的引用
- 模块依赖: 基础模块(F1-F7)与领域模块(D1-D7)的层级关系
- 平台与功能: 平台BRD优先于功能BRD
算法:
python
def analyze_dependencies(brd_list):
"""
1. 构建BRD依赖的有向图
2. 检测循环依赖(若发现则报错)
3. 执行拓扑排序
4. 对独立BRD分组以进行并行处理
5. 返回有序执行计划
"""
graph = build_dependency_graph(brd_list)
if has_cycle(graph):
raise CircularDependencyError()
sorted_order = topological_sort(graph)
parallel_groups = identify_independent_groups(sorted_order)
return ExecutionPlan(sorted_order, parallel_groups)输出示例:
依赖分析完成:
├── 执行顺序: BRD-06 → BRD-07 → [BRD-01, BRD-02] → BRD-03 → BRD-04 → BRD-05
├── 并行分组:
│ ├── 分组1: [BRD-06](基础设施)
│ ├── 分组2: [BRD-07](配置)
│ ├── 分组3: [BRD-01, BRD-02](并行 - 无依赖)
│ ├── 分组4: [BRD-03](依赖BRD-01)
│ └── 分组5: [BRD-04, BRD-05](并行 - 依赖BRD-03)
└── 预计时间: 串行7单位,并行4单位Step 3: PRD-Ready Score Validation
步骤3:PRD就绪分数验证
Before generating a PRD, validate that the source BRD meets PRD-Ready requirements.
Skill Delegation: This phase uses validation rules fromskill. See:doc-brd-validatorfor complete BRD validation rules..claude/skills/doc-brd-validator/SKILL.md
PRD-Ready Scoring Criteria (100%):
| Category | Weight | Criteria |
|---|---|---|
| Business Requirements Completeness | 40% | All 18 BRD sections present, objectives defined, stakeholders identified |
| Technical Readiness | 30% | Architecture Decision Requirements section complete, technology prerequisites documented |
| Business Alignment | 20% | Success criteria quantified, risks assessed, constraints documented |
| Traceability | 10% | Strategy references included, downstream placeholders defined |
Minimum Score: 90% (configurable)
Auto-Fix Actions:
| Issue | Auto-Fix Action |
|---|---|
| Missing timing profiles (p50/p95/p99) | Add template timing table |
| Pending ADR topics without elaboration | Add business driver and constraints placeholders |
| Missing threshold registry | Add Appendix with threshold template |
| Incomplete Document Control | Add missing required fields |
| Missing section numbers | Renumber sections sequentially |
Validation Command (internal):
bash
python ai_dev_flow/scripts/validate_prd_ready.py \
--brd docs/01_BRD/BRD-01_f1_iam/ \
--min-score 90 \
--auto-fix在生成PRD前,需验证源BRD是否满足PRD就绪要求。
技能委托: 该阶段使用技能的验证规则。 详见:doc-brd-validator中的完整BRD验证规则。.claude/skills/doc-brd-validator/SKILL.md
PRD就绪评分标准(100%):
| 类别 | 权重 | 标准 |
|---|---|---|
| 业务需求完整性 | 40% | 所有18个BRD章节齐全、目标明确、干系人已识别 |
| 技术就绪性 | 30% | 架构决策需求章节完整、技术前提已文档化 |
| 业务对齐 | 20% | 成功标准可量化、风险已评估、约束已文档化 |
| 可追溯性 | 10% | 包含战略引用、已定义下游占位符 |
最低分数: 90%(可配置)
自动修复操作:
| 问题 | 自动修复操作 |
|---|---|
| 缺失时间配置文件(p50/p95/p99) | 添加模板时间表格 |
| 未详细说明的待处理ADR主题 | 添加业务驱动因素和约束占位符 |
| 缺失阈值注册表 | 添加带阈值模板的附录 |
| 不完整的文档控制 | 添加缺失的必填字段 |
| 缺失章节编号 | 按顺序重新编号章节 |
验证命令(内部):
bash
python ai_dev_flow/scripts/validate_prd_ready.py \
--brd docs/01_BRD/BRD-01_f1_iam/ \
--min-score 90 \
--auto-fixStep 4: PRD Generation
步骤4:PRD生成
Generate the PRD document from the validated BRD with real-time quality feedback.
Skill Delegation: This phase follows rules defined inskill. See:doc-prdfor complete PRD creation guidance..claude/skills/doc-prd/SKILL.mdQuality Guidance: Usesskill for real-time feedback during generation. See:quality-advisorfor quality monitoring..claude/skills/quality-advisor/SKILL.md
Generation Process:
-
Load BRD Content:
- Read all BRD section files (for sectioned BRDs)
- Extract business requirements, objectives, stakeholders
- Parse Architecture Decision Requirements topics
-
Template Selection (perskill):
doc-prd- MVP Template (default): (17 sections, ≥85% thresholds)
ai_dev_flow/02_PRD/PRD-MVP-TEMPLATE.md - Full Template: For enterprise/regulatory projects (21 sections, ≥90% thresholds)
- Section Templates: For sectioned PRDs (>25KB)
- MVP Template (default):
-
Section Mapping (BRD → PRD):
| BRD Section | PRD Section(s) |
|---|---|
| 0. Document Control | 1. Document Control |
| 1. Executive Summary | 2. Executive Summary |
| 2. Business Context | 3. Problem Statement |
| 3. Stakeholder Analysis | 4. Target Audience & User Personas |
| 4. Business Requirements | 6. Goals & Objectives, 9. Functional Requirements |
| 5. Success Criteria | 5. Success Metrics (KPIs) |
| 6. Constraints | 12. Constraints & Assumptions |
| 7. Architecture Decision Requirements | 18. Traceability (Architecture Decision Requirements) |
| 8. Risk Assessment | 13. Risk Assessment |
| 9. Traceability | 18. Traceability |
-
PRD-Specific Content Generation:
- Section 7: Scope & Requirements (derive from BRD scope)
- Section 8: User Stories & User Roles (extract from stakeholders)
- Section 10: Customer-Facing Content & Messaging (MANDATORY)
- Section 11: Acceptance Criteria (from BRD success criteria)
- Section 14: Success Definition (go-live criteria)
- Section 15: Stakeholders & Communication
- Section 16: Implementation Approach
- Section 17: Budget & Resources
- Section 19: References
- Section 20: EARS Enhancement Appendix (timing, boundary, state, fallback)
- Section 21: Quality Assurance & Testing Strategy
-
Real-Time Quality Feedback (viaskill):
quality-advisor- Monitor section completion as content is generated
- Detect anti-patterns (AP-001 to AP-017) during creation
- Validate cumulative tagging (@brd requirement for Layer 2)
- Check element ID format compliance (PRD.NN.TT.SS)
- Flag issues early to reduce post-generation rework
-
Traceability Tags:markdown
@brd: BRD.01.01.01, BRD.01.01.02, BRD.01.23.01 -
File Output (ALWAYS use nested folder):
- Monolithic (<20k tokens):
docs/02_PRD/PRD-NN_{slug}/PRD-NN_{slug}.md - Sectioned (≥20k tokens): ,
docs/02_PRD/PRD-NN_{slug}/PRD-NN.0_index.md, etc.PRD-NN.1_core.md - Master Index (always): (create or update)
docs/02_PRD/PRD-00_index.md
Nested Folder Rule: ALL PRDs use nested folders () regardless of size. This keeps companion files (review reports, fix reports, drift cache) organized with their parent document.PRD-NN_{slug}/ - Monolithic (<20k tokens):
从已验证的BRD生成PRD文档,并提供实时质量反馈。
技能委托: 该阶段遵循技能定义的规则。 详见:doc-prd中的完整PRD创建指南。.claude/skills/doc-prd/SKILL.md质量指导: 使用技能在生成期间提供实时反馈。 详见:quality-advisor中的质量监控说明。.claude/skills/quality-advisor/SKILL.md
生成流程:
-
加载BRD内容:
- 读取所有BRD章节文件(针对分章节的BRD)
- 提取业务需求、目标、干系人
- 解析架构决策需求主题
-
模板选择(基于技能):
doc-prd- MVP模板(默认): (17个章节,≥85%阈值)
ai_dev_flow/02_PRD/PRD-MVP-TEMPLATE.md - 完整模板: 适用于企业/监管项目(21个章节,≥90%阈值)
- 章节模板: 适用于分章节的PRD(>25KB)
- MVP模板(默认):
-
章节映射(BRD → PRD):
| BRD章节 | PRD章节 |
|---|---|
| 0. 文档控制 | 1. 文档控制 |
| 1. 执行摘要 | 2. 执行摘要 |
| 2. 业务背景 | 3. 问题陈述 |
| 3. 干系人分析 | 4. 目标受众与用户画像 |
| 4. 业务需求 | 6. 目标与目的、9. 功能需求 |
| 5. 成功标准 | 5. 成功指标(KPI) |
| 6. 约束 | 12. 约束与假设 |
| 7. 架构决策需求 | 18. 可追溯性(架构决策需求) |
| 8. 风险评估 | 13. 风险评估 |
| 9. 可追溯性 | 18. 可追溯性 |
-
PRD专属内容生成:
- 章节7: 范围与需求(从BRD范围推导)
- 章节8: 用户故事与用户角色(从干系人提取)
- 章节10: 面向客户的内容与消息(必填)
- 章节11: 验收标准(从BRD成功标准提取)
- 章节14: 成功定义(上线标准)
- 章节15: 干系人与沟通
- 章节16: 实施方法
- 章节17: 预算与资源
- 章节19: 参考资料
- 章节20: EARS增强附录(时间、边界、状态、回退)
- 章节21: 质量保证与测试策略
-
实时质量反馈(通过技能):
quality-advisor- 在内容生成时监控章节完成情况
- 在创建过程中检测反模式(AP-001至AP-017)
- 验证累积标签(层级2所需的@brd要求)
- 检查元素ID格式合规性(PRD.NN.TT.SS)
- 提前标记问题以减少生成后的返工
-
可追溯性标签:markdown
@brd: BRD.01.01.01, BRD.01.01.02, BRD.01.23.01 -
文件输出(始终使用嵌套文件夹):
- 单文件(<20k tokens):
docs/02_PRD/PRD-NN_{slug}/PRD-NN_{slug}.md - 分章节(≥20k tokens): ,
docs/02_PRD/PRD-NN_{slug}/PRD-NN.0_index.md等PRD-NN.1_core.md - 主索引(始终生成): (创建或更新)
docs/02_PRD/PRD-00_index.md
嵌套文件夹规则: 所有PRD无论大小都使用嵌套文件夹()。这将使配套文件(审查报告、修复报告、漂移缓存)与父文档保持有序。PRD-NN_{slug}/ - 单文件(<20k tokens):
Step 5: EARS-Ready Score Validation
步骤5:EARS就绪分数验证
After PRD generation, validate EARS-Ready score.
Skill Delegation: This phase uses validation rules fromskill. See:doc-prd-validatorfor complete validation rules and error codes..claude/skills/doc-prd-validator/SKILL.md
EARS-Ready Scoring Criteria (100%):
| Category | Weight | Criteria |
|---|---|---|
| Business Requirements Clarity | 40% | SMART objectives, functional requirements, acceptance criteria |
| Requirements Maturity | 35% | System boundaries, stakeholder requirements, problem statement |
| EARS Translation Readiness | 20% | User journeys, quality attributes quantified, timing profiles |
| Strategic Alignment | 5% | Domain-specific business logic references |
Minimum Score: 85% for MVP (90% for full template) - configurable
Auto-Fix Actions (per error codes):
doc-prd-validator| Issue | Error Code | Auto-Fix Action |
|---|---|---|
| Missing timing profile matrix | PRD-W002 | Add Section 20.1 template |
| Missing boundary value matrix | PRD-W002 | Add Section 20.2 template |
| Missing state transition diagram | PRD-W002 | Add Section 20.3 Mermaid template |
| Missing fallback documentation | PRD-W002 | Add Section 20.4 template |
| Incomplete customer-facing content | PRD-E006 | Flag for manual review (Section 10) |
PRD生成完成后,验证EARS就绪分数。
技能委托: 该阶段使用技能的验证规则。 详见:doc-prd-validator中的完整验证规则和错误代码。.claude/skills/doc-prd-validator/SKILL.md
EARS就绪评分标准(100%):
| 类别 | 权重 | 标准 |
|---|---|---|
| 业务需求清晰度 | 40% | SMART目标、功能需求、验收标准 |
| 需求成熟度 | 35% | 系统边界、干系人需求、问题陈述 |
| EARS转换就绪性 | 20% | 用户旅程、质量属性量化、时间配置文件 |
| 战略对齐 | 5% | 领域特定业务逻辑引用 |
最低分数: MVP模板为85%(完整模板为90%)- 可配置
自动修复操作(基于错误代码):
doc-prd-validator| 问题 | 错误代码 | 自动修复操作 |
|---|---|---|
| 缺失时间配置文件矩阵 | PRD-W002 | 添加章节20.1模板 |
| 缺失边界值矩阵 | PRD-W002 | 添加章节20.2模板 |
| 缺失状态转换图 | PRD-W002 | 添加章节20.3 Mermaid模板 |
| 缺失回退文档 | PRD-W002 | 添加章节20.4模板 |
| 不完整的面向客户内容 | PRD-E006 | 标记为需要手动审查(章节10) |
Step 6: Review & Fix Cycle (v2.3)
步骤6:审查与修复循环(v2.3)
Iterative review and fix cycle to ensure PRD quality before completion.
mermaid
flowchart TD
A[Phase 5 Start] --> B[Run doc-prd-reviewer]
B --> C[Generate Review Report]
C --> D{Review Score >= 90?}
D -->|Yes| E[PASS - Proceed to Phase 6]
D -->|No| F{Iteration < Max?}
F -->|Yes| G[Run doc-prd-fixer]
G --> H[Apply Fixes]
H --> I[Generate Fix Report]
I --> J[Increment Iteration]
J --> B
F -->|No| K[Flag for Manual Review]
K --> L[Generate Final Report with Remaining Issues]
L --> E迭代式审查与修复循环,确保PRD在完成前达到质量要求。
mermaid
flowchart TD
A[Phase 5 Start] --> B[Run doc-prd-reviewer]
B --> C[Generate Review Report]
C --> D{Review Score >= 90?}
D -->|Yes| E[PASS - Proceed to Phase 6]
D -->|No| F{Iteration < Max?}
F -->|Yes| G[Run doc-prd-fixer]
G --> H[Apply Fixes]
H --> I[Generate Fix Report]
I --> J[Increment Iteration]
J --> B
F -->|No| K[Flag for Manual Review]
K --> L[Generate Final Report with Remaining Issues]
L --> E5.1 Initial Review
5.1 初始审查
Run to identify issues.
doc-prd-reviewerbash
/doc-prd-reviewer PRD-NNOutput:
PRD-NN.R_review_report_v001.mdReview Checklist:
| Check | Description | Auto-Fix | Manual |
|---|---|---|---|
| Link Integrity | All internal links between sections resolve | Yes | - |
| Threshold Consistency | Performance metrics match across sections | Yes | - |
| BRD Alignment | PRD content accurately reflects BRD requirements | - | Review |
| Placeholder Detection | No | Yes | - |
| Traceability Tags | All | Yes | - |
| Cross-Reference Validity | | Yes | - |
| Section Completeness | No empty or stub sections | - | Flag |
| Customer Content | Section 10 has substantive content | - | Flag |
运行以识别问题。
doc-prd-reviewerbash
/doc-prd-reviewer PRD-NN输出:
PRD-NN.R_review_report_v001.md审查清单:
| 检查项 | 描述 | 自动修复 | 手动处理 |
|---|---|---|---|
| 链接完整性 | 章节间所有内部链接均可解析 | 是 | - |
| 阈值一致性 | 各章节性能指标匹配 | 是 | - |
| BRD对齐 | PRD内容准确反映BRD需求 | - | 审查 |
| 占位符检测 | 无 | 是 | - |
| 可追溯性标签 | 所有 | 是 | - |
| 交叉引用有效性 | | 是 | - |
| 章节完整性 | 无空章节或 stub 章节 | - | 标记 |
| 客户内容 | 章节10包含实质性内容 | - | 标记 |
5.2 Fix Cycle
5.2 修复循环
If review score < 90%, invoke .
doc-prd-fixerbash
/doc-prd-fixer PRD-NN --revalidateFix Categories:
| Category | Fixes Applied |
|---|---|
| Missing Files | Create glossary, reference docs |
| Broken Links | Update paths, create targets |
| Element IDs | Convert legacy patterns, fix invalid type codes |
| Content | Replace template placeholders, dates |
| References | Update traceability tags |
| Thresholds | Align inconsistent values to BRD source |
Output:
PRD-NN.F_fix_report_v001.md若审查分数<90%,调用。
doc-prd-fixerbash
/doc-prd-fixer PRD-NN --revalidate修复类别:
| 类别 | 应用的修复 |
|---|---|
| 缺失文件 | 创建术语表、参考文档 |
| 损坏链接 | 更新路径、创建目标 |
| 元素ID | 转换遗留模式、修复无效类型代码 |
| 内容 | 替换模板占位符、日期 |
| 引用 | 更新可追溯性标签 |
| 阈值 | 将不一致的值与BRD源对齐 |
输出:
PRD-NN.F_fix_report_v001.md5.3 Re-Review
5.3 重新审查
After fixes, automatically re-run reviewer.
bash
/doc-prd-reviewer PRD-NNOutput:
PRD-NN.R_review_report_v002.md修复完成后,自动重新运行审查器。
bash
/doc-prd-reviewer PRD-NN输出:
PRD-NN.R_review_report_v002.md5.4 Iteration Control
5.4 迭代控制
| Parameter | Default | Description |
|---|---|---|
| 3 | Maximum fix-review cycles |
| 90 | Minimum passing score |
| false | Stop if only manual issues remain |
Iteration Example:
Iteration 1:
Review v001: Score 85 (2 errors, 4 warnings)
Fix v001: Fixed 5 issues, created 1 file
Iteration 2:
Review v002: Score 94 (0 errors, 2 warnings)
Status: PASS (score >= 90)| 参数 | 默认值 | 描述 |
|---|---|---|
| 3 | 最大修复-审查循环次数 |
| 90 | 最低合格分数 |
| false | 若仅剩余手动问题则停止 |
迭代示例:
迭代1:
审查v001: 分数85(2个错误,4个警告)
修复v001: 修复5个问题,创建1个文件
迭代2:
审查v002: 分数94(0个错误,2个警告)
状态: 通过(分数≥90)5.5 Quality Checks (Post-Fix)
5.5 修复后质量检查
After passing the fix cycle:
-
Link Integrity Check:
Scanning PRD-01 for internal links... ├── PRD-01.0_index.md: 17 links found │ ├── PRD-01.1_document_control.md ✓ │ ├── PRD-01.2_executive_summary.md ✓ │ └── ... (all valid) └── Result: 0 broken links -
Threshold Consistency Check:
Comparing thresholds across sections... ├── Section 5 (Success Metrics): auth.p99 = 100ms ├── Section 9 (Quality Attributes): auth.p99 = 100ms ├── Section 17 (Appendix B.1): auth.p99 = 100ms └── Result: Consistent ✓ -
BRD Alignment Check:
Verifying PRD requirements map to BRD source... ├── PRD.01.01.01 → BRD.01.01.01 (Multi-Provider Auth) ✓ ├── PRD.01.01.02 → BRD.01.01.02 (4D Authorization) ✓ └── Result: 12/12 requirements aligned ✓ -
EARS-Ready Report:
EARS-Ready Score Breakdown ========================= Business Requirements Clarity: 40/40 Requirements Maturity: 35/35 EARS Translation Readiness: 20/20 Strategic Alignment: 5/5 ---------------------------- Total EARS-Ready Score: 100/100 (Target: >= 90) Status: READY FOR EARS GENERATION -
Traceability Matrix Update:bash
# Update PRD-00_TRACEABILITY_MATRIX.md python ai_dev_flow/scripts/update_traceability_matrix.py \ --prd docs/02_PRD/PRD-NN_{slug}/PRD-NN_{slug}.md \ --matrix docs/02_PRD/PRD-00_TRACEABILITY_MATRIX.md
通过修复循环后:
-
链接完整性检查:
扫描PRD-01的内部链接... ├── PRD-01.0_index.md: 发现17个链接 │ ├── PRD-01.1_document_control.md ✓ │ ├── PRD-01.2_executive_summary.md ✓ │ └── ...(全部有效) └── 结果: 0个损坏链接 -
阈值一致性检查:
跨章节比较阈值... ├── 章节5(成功指标): auth.p99 = 100ms ├── 章节9(质量属性): auth.p99 = 100ms ├── 章节17(附录B.1): auth.p99 = 100ms └── 结果: 一致 ✓ -
BRD对齐检查:
验证PRD需求与BRD源的映射... ├── PRD.01.01.01 → BRD.01.01.01(多提供商认证) ✓ ├── PRD.01.01.02 → BRD.01.01.02(4D授权) ✓ └── 结果: 12/12需求对齐 ✓ -
EARS就绪报告:
EARS就绪分数明细 ========================= 业务需求清晰度: 40/40 需求成熟度: 35/35 EARS转换就绪性: 20/20 战略对齐: 5/5 ---------------------------- 总EARS就绪分数: 100/100(目标: ≥90) 状态: 已准备好生成EARS -
可追溯性矩阵更新:bash
# 更新PRD-00_TRACEABILITY_MATRIX.md python ai_dev_flow/scripts/update_traceability_matrix.py \ --prd docs/02_PRD/PRD-NN_{slug}/PRD-NN_{slug}.md \ --matrix docs/02_PRD/PRD-00_TRACEABILITY_MATRIX.md
Step 7: Process Next BRD
步骤7:处理下一个BRD
After completing one PRD:
- Mark current BRD→PRD as complete
- Update traceability matrix
- Move to next BRD in execution order
- Repeat Steps 3-5
Progress Tracking:
PRD Generation Progress:
[████████░░░░░░░░] 3/7 Complete
Completed:
✓ PRD-06 (from BRD-06) - EARS-Ready: 94%
✓ PRD-07 (from BRD-07) - EARS-Ready: 92%
✓ PRD-01 (from BRD-01) - EARS-Ready: 96%
In Progress:
⟳ PRD-02 (from BRD-02) - Generating Section 10...
Pending:
○ PRD-03 (from BRD-03) - Awaiting BRD-01 completion
○ PRD-04 (from BRD-04)
○ PRD-05 (from BRD-05)完成一个PRD后:
- 将当前BRD→PRD标记为完成
- 更新可追溯性矩阵
- 按执行顺序处理下一个BRD
- 重复步骤3-5
进度跟踪:
PRD生成进度:
[████████░░░░░░░░] 3/7 完成
已完成:
✓ PRD-06(来自BRD-06)- EARS就绪: 94%
✓ PRD-07(来自BRD-07)- EARS就绪: 92%
✓ PRD-01(来自BRD-01)- EARS就绪: 96%
处理中:
⟳ PRD-02(来自BRD-02)- 正在生成章节10...
待处理:
○ PRD-03(来自BRD-03)- 等待BRD-01完成
○ PRD-04(来自BRD-04)
○ PRD-05(来自BRD-05)Step 8: Parallel Generation
步骤8:并行生成
For independent BRDs (no cross-dependencies), generate PRDs in parallel.
Parallel Execution Rules:
- Independence Check: No shared references
@depends-brd - Resource Limits: Maximum 3 parallel generations (configurable)
- Failure Isolation: One failure doesn't block others
- Progress Reporting: Aggregate status updates
Parallel Execution Example:
Parallel Group Execution:
├── Thread 1: BRD-01 → PRD-01 [████████████████] 100%
├── Thread 2: BRD-02 → PRD-02 [████████████░░░░] 75%
└── Thread 3: BRD-05 → PRD-05 [████████░░░░░░░░] 50%对于独立的BRD(无跨依赖),并行生成PRD。
并行执行规则:
- 独立性检查: 无共享的引用
@depends-brd - 资源限制: 最大并行生成数为3(可配置)
- 故障隔离: 一个失败不会阻塞其他任务
- 进度报告: 汇总状态更新
并行执行示例:
并行分组执行:
├── 线程1: BRD-01 → PRD-01 [████████████████] 100%
├── 线程2: BRD-02 → PRD-02 [████████████░░░░] 75%
└── 线程3: BRD-05 → PRD-05 [████████░░░░░░░░] 50%Configuration
配置
Default Configuration
默认配置
yaml
undefinedyaml
undefinedconfig/prd_autopilot.yaml
config/prd_autopilot.yaml
prd_autopilot:
version: "1.2"
scoring:
prd_ready_min: 90
ears_ready_min: 90
review_score_min: 90
strict_mode: false
execution:
max_parallel: 3
auto_fix: true
continue_on_error: false
timeout_per_brd: 300 # seconds
output:
structure: auto # auto, monolithic, sectioned
size_threshold_kb: 25
report_format: markdown
validation:
skip_validation: false
fix_iterations_max: 3
review:
enabled: true
check_links: true
check_thresholds: true
check_brd_alignment: true
check_placeholders: true
check_traceability: true
auto_fix_links: true
auto_fix_placeholders: true
flag_customer_content: true
undefinedprd_autopilot:
version: "1.2"
scoring:
prd_ready_min: 90
ears_ready_min: 90
review_score_min: 90
strict_mode: false
execution:
max_parallel: 3
auto_fix: true
continue_on_error: false
timeout_per_brd: 300 # seconds
output:
structure: auto # auto, monolithic, sectioned
size_threshold_kb: 25
report_format: markdown
validation:
skip_validation: false
fix_iterations_max: 3
review:
enabled: true
check_links: true
check_thresholds: true
check_brd_alignment: true
check_placeholders: true
check_traceability: true
auto_fix_links: true
auto_fix_placeholders: true
flag_customer_content: true
undefinedCommand Line Options
命令行选项
| Option | Default | Description |
|---|---|---|
| 90 | Minimum PRD-Ready score |
| 90 | Minimum EARS-Ready score |
| 90 | Minimum Final Review score |
| 3 | Maximum parallel PRD generations |
| false | Disable auto-fix (manual only) |
| false | Continue if one BRD fails |
| false | Preview execution plan only |
| auto | Force monolithic or sectioned output |
| false | Skip final content review phase |
| false | Run only final review on existing PRD |
| 选项 | 默认值 | 描述 |
|---|---|---|
| 90 | 最低PRD就绪分数 |
| 90 | 最低EARS就绪分数 |
| 90 | 最低最终审查分数 |
| 3 | 最大并行PRD生成数 |
| false | 禁用自动修复(仅手动) |
| false | 若一个BRD失败则继续执行 |
| false | 仅预览执行计划 |
| auto | 强制单文件或分章节输出 |
| false | 跳过最终内容审查阶段 |
| false | 仅对现有PRD运行最终审查 |
Context Management
上下文管理
Chunked Parallel Execution (MANDATORY)
分块并行执行(必填)
CRITICAL: To prevent conversation context overflow errors ("Prompt is too long", "Conversation too long"), all autopilot operations MUST follow chunked execution rules:
Chunk Size Limit: Maximum 3 documents per chunk
Chunking Rules:
- Chunk Formation: Group documents into chunks of maximum 3 documents each
- Sequential Chunk Processing: Process one chunk at a time, completing all documents in a chunk before starting the next
- Context Pause: After completing each chunk, provide a summary and pause for user acknowledgment
- Progress Tracking: Display chunk progress (e.g., "Chunk 2/5: Processing BRD-04, BRD-05, BRD-06")
Execution Pattern:
Documents: BRD-01, BRD-02, BRD-03, BRD-04, BRD-05, BRD-06, BRD-07
Chunk 1: [BRD-01, BRD-02, BRD-03] → Process → Summary → Pause
Chunk 2: [BRD-04, BRD-05, BRD-06] → Process → Summary → Pause
Chunk 3: [BRD-07] → Process → Summary → CompleteChunk Completion Summary Template:
Chunk N/M Complete:
├── Generated: PRD-01, PRD-02, PRD-03
├── EARS-Ready Scores: 94%, 92%, 91%
├── Status: All validated
└── Next: Continue with Chunk N+1? [Y/n]Why Chunking is Required:
- Prevents "Conversation too long" errors during batch processing
- Allows context compaction between chunks
- Enables recovery from failures without losing all progress
- Provides natural checkpoints for user review
Configuration Override:
yaml
execution:
max_parallel: 3 # HARD LIMIT - do not exceed
chunk_size: 3 # Documents per chunk
pause_between_chunks: true关键: 为防止对话上下文溢出错误("Prompt is too long", "Conversation too long"),所有自动流水线操作必须遵循分块执行规则:
分块大小限制: 每个分块最多3个文档
分块规则:
- 分块形成: 将文档分组为每个分块最多3个文档
- 顺序分块处理: 一次处理一个分块,完成一个分块中的所有文档后再开始下一个
- 上下文暂停: 完成每个分块后,提供摘要并暂停以等待用户确认
- 进度跟踪: 显示分块进度(例如: "Chunk 2/5: Processing BRD-04, BRD-05, BRD-06")
执行模式:
Documents: BRD-01, BRD-02, BRD-03, BRD-04, BRD-05, BRD-06, BRD-07
Chunk 1: [BRD-01, BRD-02, BRD-03] → 处理 → 摘要 → 暂停
Chunk 2: [BRD-04, BRD-05, BRD-06] → 处理 → 摘要 → 暂停
Chunk 3: [BRD-07] → 处理 → 摘要 → 完成分块完成摘要模板:
Chunk N/M 完成:
├── 已生成: PRD-01, PRD-02, PRD-03
├── EARS就绪分数: 94%, 92%, 91%
├── 状态: 全部已验证
└── 下一步: 继续处理Chunk N+1? [Y/n]为何需要分块:
- 防止批量处理期间出现"Conversation too long"错误
- 允许分块之间的上下文压缩
- 支持从故障中恢复而不丢失所有进度
- 为用户审查提供自然的检查点
配置覆盖:
yaml
execution:
max_parallel: 3 # 硬限制 - 请勿超过
chunk_size: 3 # 每个分块的文档数
pause_between_chunks: trueExecution Modes
执行模式
Mode 1: Interactive (Default)
模式1:交互式(默认)
User confirms each step before proceeding.
bash
/doc-prd-autopilot BRD-01,BRD-02 --interactive用户在每个步骤前确认。
bash
/doc-prd-autopilot BRD-01,BRD-02 --interactiveOutput:
输出:
Dependency Analysis: BRD-01 → BRD-02 (BRD-02 depends on BRD-01)
依赖分析: BRD-01 → BRD-02(BRD-02依赖BRD-01)
[1/2] BRD-01: PRD-Ready Score = 92% (PASS)
[1/2] BRD-01: PRD就绪分数 = 92%(通过)
Generate PRD-01? [Y/n] y
生成PRD-01? [Y/n] y
PRD-01 generated. EARS-Ready Score = 94% (PASS)
PRD-01已生成。EARS就绪分数 = 94%(通过)
[2/2] BRD-02: PRD-Ready Score = 88% (FAIL)
[2/2] BRD-02: PRD就绪分数 = 88%(失败)
Auto-fix available. Apply fixes? [Y/n] y
可自动修复。应用修复? [Y/n] y
Fixes applied. New score = 91% (PASS)
已应用修复。新分数 = 91%(通过)
Generate PRD-02? [Y/n] y
生成PRD-02? [Y/n] y
PRD-02 generated. EARS-Ready Score = 90% (PASS)
PRD-02已生成。EARS就绪分数 = 90%(通过)
Summary: 2/2 PRDs generated successfully.
摘要: 2/2 PRD生成成功。
undefinedundefinedMode 2: Automatic
模式2:自动
No user confirmation, auto-fix enabled.
bash
/doc-prd-autopilot all --auto无需用户确认,启用自动修复。
bash
/doc-prd-autopilot all --autoOutput:
输出:
PRD Autopilot - Automatic Mode
PRD自动流水线 - 自动模式
==============================
==============================
Scanning: docs/01_BRD/
扫描: docs/01_BRD/
Found: 7 BRDs
发现: 7个BRD
Phase 1: Dependency Analysis... Done
阶段1: 依赖分析... 完成
Phase 2-4: Processing...
阶段2-4: 处理中...
[████████████████] 7/7 Complete
[████████████████] 7/7 完成
Summary:
摘要:
✓ 7 PRDs generated
✓ 7个PRD已生成
✓ 3 BRDs auto-fixed
✓ 3个BRD已自动修复
✓ Average EARS-Ready: 93%
✓ 平均EARS就绪分数: 93%
undefinedundefinedMode 3: Dry Run
模式3:试运行
Preview execution plan without generating files.
bash
/doc-prd-autopilot all --dry-run预览执行计划但不生成文件。
bash
/doc-prd-autopilot all --dry-runOutput:
输出:
PRD Autopilot - Dry Run Mode
PRD自动流水线 - 试运行模式
============================
============================
Execution Plan:
执行计划:
1. BRD-06 (Infrastructure) → PRD-06
1. BRD-06(基础设施)→ PRD-06
2. BRD-07 (Config) → PRD-07
2. BRD-07(配置)→ PRD-07
3. [Parallel] BRD-01, BRD-02 → PRD-01, PRD-02
3. [并行] BRD-01, BRD-02 → PRD-01, PRD-02
4. BRD-03 → PRD-03
4. BRD-03 → PRD-03
5. [Parallel] BRD-04, BRD-05 → PRD-04, PRD-05
5. [并行] BRD-04, BRD-05 → PRD-04, PRD-05
Estimated Duration: ~4 units (parallel) vs ~7 units (sequential)
预计时长: ~4单位(并行) vs ~7单位(串行)
No files will be created in dry-run mode.
试运行模式下不会创建任何文件。
undefinedundefinedMode 4: Review Mode (v2.1)
模式4:审查模式(v2.1)
Validate existing PRD documents and generate a quality report without modification.
Purpose: Audit existing PRD documents for compliance, quality scores, and identify issues.
Command:
bash
undefined验证现有PRD文档并生成质量报告,不修改文档。
用途: 审计现有PRD文档的合规性、质量分数并识别问题。
命令:
bash
undefinedReview single PRD
审查单个PRD
/doc-prd-autopilot PRD-01 --mode review
/doc-prd-autopilot PRD-01 --mode review
Review all PRDs
审查所有PRD
/doc-prd-autopilot all --mode review --output-report tmp/prd_review_report.md
**Review Report Structure**:
```markdown/doc-prd-autopilot all --mode review --output-report tmp/prd_review_report.md
**审查报告结构**:
```markdownPRD Review Report: PRD-01_f1_iam
PRD审查报告: PRD-01_f1_iam
Summary
摘要
- EARS-Ready Score: 87% 🟡
- Final Review Score: 85% 🟡
- Total Issues: 14
- Auto-Fixable: 10
- Manual Review: 4
- EARS就绪分数: 87% 🟡
- 最终审查分数: 85% 🟡
- 总问题数: 14
- 可自动修复: 10
- 需要手动审查: 4
Score Breakdown
分数明细
| Category | Score | Status |
|---|---|---|
| Business Requirements Clarity | 38/40 | 🟡 |
| Requirements Maturity | 32/35 | 🟡 |
| EARS Translation Readiness | 18/20 | 🟡 |
| Strategic Alignment | 5/5 | ✅ |
| 类别 | 分数 | 状态 |
|---|---|---|
| 业务需求清晰度 | 38/40 | 🟡 |
| 需求成熟度 | 32/35 | 🟡 |
| EARS转换就绪性 | 18/20 | 🟡 |
| 战略对齐 | 5/5 | ✅ |
Final Review Checks
最终审查检查
| Check | Status | Details |
|---|---|---|
| Link Integrity | ✅ | All links valid |
| Threshold Consistency | 🟡 | 2 mismatches found |
| BRD Alignment | ✅ | All requirements traced |
| Placeholder Detection | ❌ | 3 [TODO] markers found |
| Traceability Tags | ✅ | Valid @brd references |
| Section 10 Content | 🟡 | Needs business review |
| 检查项 | 状态 | 详情 |
|---|---|---|
| 链接完整性 | ✅ | 所有链接有效 |
| 阈值一致性 | 🟡 | 发现2处不匹配 |
| BRD对齐 | ✅ | 所有需求均可追溯 |
| 占位符检测 | ❌ | 发现3个[TODO]标记 |
| 可追溯性标签 | ✅ | @brd引用有效 |
| 章节10内容 | 🟡 | 需要业务审查 |
Auto-Fixable Issues
可自动修复问题
| # | Issue | Location | Fix Action |
|---|---|---|---|
| 1 | Legacy element ID | Section 9:L45 | Convert PO-001 to PRD.01.07.01 |
| 2 | Placeholder text | Section 14:L78 | Remove [TODO] marker |
| 3 | Inconsistent threshold | Section 5:L23 | Align to BRD value |
| ... | ... | ... | ... |
| # | 问题 | 位置 | 修复操作 |
|---|---|---|---|
| 1 | 遗留元素ID | 章节9:L45 | 将PO-001转换为PRD.01.07.01 |
| 2 | 占位符文本 | 章节14:L78 | 移除[TODO]标记 |
| 3 | 不一致的阈值 | 章节5:L23 | 与BRD值对齐 |
| ... | ... | ... | ... |
Manual Review Required
需要手动审查
| # | Issue | Location | Reason |
|---|---|---|---|
| 1 | Incomplete Section 10 | Customer-Facing Content | Requires business input |
| 2 | Missing timing profile | Section 20.1 | Domain expertise needed |
| ... | ... | ... | ... |
**Review Configuration**:
```yaml
review_mode:
enabled: true
checks:
- structure_validation # 17/21 sections
- element_id_compliance # PRD.NN.TT.SS format
- link_integrity # Internal link check
- threshold_consistency # Cross-section consistency
- brd_alignment # Upstream traceability
- placeholder_detection # [TODO], [TBD] markers
- traceability_tags # @brd tag validation
- section_10_content # Customer-facing content
- score_calculation # EARS-Ready score
output:
format: markdown
include_fix_suggestions: true
thresholds:
pass: 90
warning: 85
fail: 0| # | 问题 | 位置 | 原因 |
|---|---|---|---|
| 1 | 章节10不完整 | 面向客户内容 | 需要业务输入 |
| 2 | 缺失时间配置文件 | 章节20.1 | 需要领域专业知识 |
| ... | ... | ... | ... |
**审查配置**:
```yaml
review_mode:
enabled: true
checks:
- structure_validation # 17/21章节
- element_id_compliance # PRD.NN.TT.SS格式
- link_integrity # 内部链接检查
- threshold_consistency # 跨章节一致性
- brd_alignment # 上游可追溯性
- placeholder_detection # [TODO], [TBD]标记
- traceability_tags # @brd标签验证
- section_10_content # 面向客户内容
- score_calculation # EARS就绪分数
output:
format: markdown
include_fix_suggestions: true
thresholds:
pass: 90
warning: 85
fail: 0Mode 5: Fix Mode (v2.1)
模式5:修复模式(v2.1)
Auto-repair existing PRD documents while preserving manual content.
Purpose: Apply automated fixes to PRD documents to improve quality scores and compliance.
Command:
bash
undefined自动修复现有PRD文档,同时保留手动内容。
用途: 对PRD文档应用自动修复以提高质量分数和合规性。
命令:
bash
undefinedFix single PRD
修复单个PRD
/doc-prd-autopilot PRD-01 --mode fix
/doc-prd-autopilot PRD-01 --mode fix
Fix with backup
修复并备份
/doc-prd-autopilot PRD-01 --mode fix --backup
/doc-prd-autopilot PRD-01 --mode fix --backup
Fix specific issue types only
仅修复特定类型的问题
/doc-prd-autopilot PRD-01 --mode fix --fix-types "element_ids,thresholds,placeholders"
/doc-prd-autopilot PRD-01 --mode fix --fix-types "element_ids,thresholds,placeholders"
Dry-run fix (preview changes)
试运行修复(预览更改)
/doc-prd-autopilot PRD-01 --mode fix --dry-run
**Fix Categories and Actions**:
| Category | Issue | Auto-Fix Action | Preserves Content |
|----------|-------|-----------------|-------------------|
| **Element IDs** | Legacy PO-XXX format | Convert to PRD.NN.07.SS | ✅ |
| **Element IDs** | Legacy FF-XXX format | Convert to PRD.NN.01.SS | ✅ |
| **Element IDs** | Legacy AC-XXX format | Convert to PRD.NN.06.SS | ✅ |
| **Thresholds** | Inconsistent values | Align to BRD source | ✅ |
| **Thresholds** | Hardcoded values | Replace with @threshold | ✅ |
| **Links** | Broken internal links | Update paths or remove | ✅ |
| **Placeholders** | [TODO], [TBD] text | Remove markers, flag content | ✅ |
| **Sections** | Missing Document Control | Add from template | ✅ |
| **Sections** | Missing EARS-Ready score | Calculate and insert | ✅ |
| **Sections** | Missing Section 20 | Add EARS Enhancement template | ✅ |
| **Traceability** | Missing @brd tags | Add with placeholder | ✅ |
| **Traceability** | Invalid @brd reference | Correct or remove | ✅ |
**Content Preservation Rules**:
1. **Never delete** existing requirements or user stories
2. **Never modify** executive summary content
3. **Never change** stakeholder analysis details
4. **Only add** missing sections and metadata
5. **Only replace** legacy element IDs and placeholders
6. **Backup first** if `--backup` flag is set
**Element ID Migration**:
| Legacy Pattern | New Format | Example |
|----------------|------------|---------|
| `PO-XXX` | `PRD.NN.07.SS` | PO-001 → PRD.01.07.01 |
| `FF-XXX` | `PRD.NN.01.SS` | FF-001 → PRD.01.01.01 |
| `AC-XXX` | `PRD.NN.06.SS` | AC-001 → PRD.01.06.01 |
| `US-XXX` | `PRD.NN.08.SS` | US-001 → PRD.01.08.01 |
**Fix Report Structure**:
```markdown/doc-prd-autopilot PRD-01 --mode fix --dry-run
**修复类别与操作**:
| 类别 | 问题 | 自动修复操作 | 保留内容 |
|----------|-------|-----------------|-------------------|
| **元素ID** | 遗留PO-XXX格式 | 转换为PRD.NN.07.SS | ✅ |
| **元素ID** | 遗留FF-XXX格式 | 转换为PRD.NN.01.SS | ✅ |
| **元素ID** | 遗留AC-XXX格式 | 转换为PRD.NN.06.SS | ✅ |
| **元素ID** | 遗留US-XXX格式 | 转换为PRD.NN.08.SS | ✅ |
| **阈值** | 不一致的值 | 与BRD源对齐 | ✅ |
| **阈值** | 硬编码值 | 替换为@threshold | ✅ |
| **链接** | 损坏的内部链接 | 更新路径或移除 | ✅ |
| **占位符** | [TODO], [TBD]文本 | 移除标记,标记内容 | ✅ |
| **章节** | 缺失文档控制 | 从模板添加 | ✅ |
| **章节** | 缺失EARS就绪分数 | 计算并插入 | ✅ |
| **章节** | 缺失章节20 | 添加EARS增强模板 | ✅ |
| **可追溯性** | 缺失@brd标签 | 添加占位符 | ✅ |
| **可追溯性** | 无效@brd引用 | 更正或移除 | ✅ |
**内容保留规则**:
1. **永不删除**现有需求或用户故事
2. **永不修改**执行摘要内容
3. **永不更改**干系人分析详情
4. **仅添加**缺失的章节和元数据
5. **仅替换**遗留元素ID和占位符
6. **先备份**若设置`--backup`标志
**元素ID迁移**:
| 遗留模式 | 新格式 | 示例 |
|----------------|------------|---------|
| `PO-XXX` | `PRD.NN.07.SS` | PO-001 → PRD.01.07.01 |
| `FF-XXX` | `PRD.NN.01.SS` | FF-001 → PRD.01.01.01 |
| `AC-XXX` | `PRD.NN.06.SS` | AC-001 → PRD.01.06.01 |
| `US-XXX` | `PRD.NN.08.SS` | US-001 → PRD.01.08.01 |
**修复报告结构**:
```markdownPRD Fix Report: PRD-01_f1_iam
PRD修复报告: PRD-01_f1_iam
Summary
摘要
- Before EARS-Ready Score: 87% 🟡
- After EARS-Ready Score: 94% ✅
- Issues Fixed: 10
- Issues Remaining: 4 (manual review required)
- 修复前EARS就绪分数: 87% 🟡
- 修复后EARS就绪分数: 94% ✅
- 已修复问题数: 10
- 剩余问题数: 4(需要手动审查)
Fixes Applied
已应用修复
| # | Issue | Location | Fix Applied |
|---|---|---|---|
| 1 | Legacy element ID | Section 9:L45 | Converted PO-001 → PRD.01.07.01 |
| 2 | Placeholder text | Section 14:L78 | Removed [TODO] marker |
| 3 | Inconsistent threshold | Section 5:L23 | Aligned to BRD.01 value |
| ... | ... | ... | ... |
| # | 问题 | 位置 | 应用的修复 |
|---|---|---|---|
| 1 | 遗留元素ID | 章节9:L45 | 已转换PO-001 → PRD.01.07.01 |
| 2 | 占位符文本 | 章节14:L78 | 已移除[TODO]标记 |
| 3 | 不一致的阈值 | 章节5:L23 | 已与BRD.01值对齐 |
| ... | ... | ... | ... |
Files Modified
修改的文件
- docs/02_PRD/PRD-01_f1_iam/PRD-01.0_index.md
- docs/02_PRD/PRD-01_f1_iam/PRD-01.5_success_metrics.md
- docs/02_PRD/PRD-01_f1_iam/PRD-01.9_functional_requirements.md
- docs/02_PRD/PRD-01_f1_iam/PRD-01.0_index.md
- docs/02_PRD/PRD-01_f1_iam/PRD-01.5_success_metrics.md
- docs/02_PRD/PRD-01_f1_iam/PRD-01.9_functional_requirements.md
Backup Location
备份位置
- tmp/backup/PRD-01_f1_iam_20260209_143022/
- tmp/backup/PRD-01_f1_iam_20260209_143022/
Score Impact
分数影响
| Category | Before | After | Delta |
|---|---|---|---|
| Requirements Clarity | 38/40 | 40/40 | +2 |
| Requirements Maturity | 32/35 | 34/35 | +2 |
| EARS Translation | 18/20 | 19/20 | +1 |
| 类别 | 修复前 | 修复后 | 变化 |
|---|---|---|---|
| 需求清晰度 | 38/40 | 40/40 | +2 |
| 需求成熟度 | 32/35 | 34/35 | +2 |
| EARS转换 | 18/20 | 19/20 | +1 |
Next Steps
下一步
- Complete Section 10 (Customer-Facing Content)
- Add timing profile to Section 20.1
- Re-run validation to confirm score
**Fix Configuration**:
```yaml
fix_mode:
enabled: true
backup:
enabled: true
location: "tmp/backup/"
retention_days: 7
fix_categories:
element_ids: true # Legacy ID conversion
thresholds: true # Consistency fixes
links: true # Broken link repair
placeholders: true # [TODO]/[TBD] removal
sections: true # Missing sections
traceability: true # @brd tag fixes
preservation:
executive_summary: true # Never modify
requirements: true # Never delete
user_stories: true # Never modify
comments: true # Preserve user comments
validation:
re_validate_after_fix: true
require_score_improvement: false
max_fix_iterations: 3
element_id_migration:
PO_XXX_to_PRD_NN_07_SS: true
FF_XXX_to_PRD_NN_01_SS: true
AC_XXX_to_PRD_NN_06_SS: true
US_XXX_to_PRD_NN_08_SS: trueCommand Line Options (Review/Fix):
| Option | Mode | Default | Description |
|---|---|---|---|
| Review | - | Run review mode only |
| Fix | - | Run fix mode |
| Both | auto | Report output path |
| Fix | true | Create backup before fixing |
| Fix | all | Comma-separated fix categories |
| Fix | false | Preview fixes without applying |
| Fix | false | Extra cautious preservation |
- 完成章节10(面向客户内容)
- 为章节20.1添加时间配置文件
- 重新运行验证以确认分数
**修复配置**:
```yaml
fix_mode:
enabled: true
backup:
enabled: true
location: "tmp/backup/"
retention_days: 7
fix_categories:
element_ids: true # 遗留ID转换
thresholds: true # 一致性修复
links: true # 损坏链接修复
placeholders: true # [TODO]/[TBD]移除
sections: true # 缺失章节添加
traceability: true # @brd标签修复
preservation:
executive_summary: true # 永不修改
requirements: true # 永不删除
user_stories: true # 永不修改
comments: true # 保留用户评论
validation:
re_validate_after_fix: true
require_score_improvement: false
max_fix_iterations: 3
element_id_migration:
PO_XXX_to_PRD_NN_07_SS: true
FF_XXX_to_PRD_NN_01_SS: true
AC_XXX_to_PRD_NN_06_SS: true
US_XXX_to_PRD_NN_08_SS: true命令行选项(审查/修复):
| 选项 | 模式 | 默认值 | 描述 |
|---|---|---|---|
| 审查 | - | 仅运行审查模式 |
| 修复 | - | 运行修复模式 |
| 两者 | auto | 报告输出路径 |
| 修复 | true | 修复前创建备份 |
| 修复 | all | 逗号分隔的修复类别 |
| 修复 | false | 预览修复但不应用 |
| 修复 | false | 额外谨慎的内容保留 |
Output Files
输出文件
Generated PRD Structure
生成的PRD结构
Nested Folder Rule: ALL PRDs use nested folders () regardless of size.
PRD-NN_{slug}/Monolithic Output (single file ≤25KB - in nested folder):
docs/02_PRD/
├── PRD-00_TRACEABILITY_MATRIX.md # Updated
└── PRD-01_f1_iam/ # Nested folder (REQUIRED)
└── PRD-01_f1_iam.md # Monolithic PRD inside folderSectioned Output (multiple files >25KB - in nested folder):
docs/02_PRD/
├── PRD-00_TRACEABILITY_MATRIX.md # Updated
└── PRD-01_f1_iam/ # Nested folder (REQUIRED)
├── PRD-01.0_index.md
├── PRD-01.1_document_control.md
├── PRD-01.2_executive_summary.md
├── PRD-01.3_problem_statement.md
...
└── PRD-01.21_qa_strategy.md嵌套文件夹规则: 所有PRD无论大小都使用嵌套文件夹()。
PRD-NN_{slug}/单文件输出(单个文件≤25KB - 在嵌套文件夹中):
docs/02_PRD/
├── PRD-00_TRACEABILITY_MATRIX.md # 已更新
└── PRD-01_f1_iam/ # 嵌套文件夹(必填)
└── PRD-01_f1_iam.md # 单文件PRD在文件夹内分章节输出(多个文件>25KB - 在嵌套文件夹中):
docs/02_PRD/
├── PRD-00_TRACEABILITY_MATRIX.md # 已更新
└── PRD-01_f1_iam/ # 嵌套文件夹(必填)
├── PRD-01.0_index.md
├── PRD-01.1_document_control.md
├── PRD-01.2_executive_summary.md
├── PRD-01.3_problem_statement.md
...
└── PRD-01.21_qa_strategy.mdSummary Report
摘要报告
Generated after completion:
markdown
undefined完成后生成:
markdown
undefinedPRD Autopilot Summary Report
PRD自动流水线摘要报告
Execution Date: 2026-02-08
Input: 7 BRDs
Output: 7 PRDs
执行日期: 2026-02-08
输入: 7个BRD
输出: 7个PRD
Execution Order
执行顺序
| Step | BRD | PRD | PRD-Ready | EARS-Ready | Duration | Status |
|---|---|---|---|---|---|---|
| 1 | BRD-06 | PRD-06 | 94% | 92% | 45s | Success |
| 2 | BRD-07 | PRD-07 | 91% | 90% | 52s | Success |
| 3 | BRD-01 | PRD-01 | 96% | 96% | 48s | Success |
| 3 | BRD-02 | PRD-02 | 92% | 91% | 47s | Success (Parallel) |
| 4 | BRD-03 | PRD-03 | 90% | 93% | 50s | Success |
| 5 | BRD-04 | PRD-04 | 88%→91% | 90% | 62s | Success (Auto-fixed) |
| 5 | BRD-05 | PRD-05 | 93% | 94% | 44s | Success (Parallel) |
| 步骤 | BRD | PRD | PRD就绪分数 | EARS就绪分数 | 时长 | 状态 |
|---|---|---|---|---|---|---|
| 1 | BRD-06 | PRD-06 | 94% | 92% | 45s | 成功 |
| 2 | BRD-07 | PRD-07 | 91% | 90% | 52s | 成功 |
| 3 | BRD-01 | PRD-01 | 96% | 96% | 48s | 成功 |
| 3 | BRD-02 | PRD-02 | 92% | 91% | 47s | 成功(并行) |
| 4 | BRD-03 | PRD-03 | 90% | 93% | 50s | 成功 |
| 5 | BRD-04 | PRD-04 | 88%→91% | 90% | 62s | 成功(已自动修复) |
| 5 | BRD-05 | PRD-05 | 93% | 94% | 44s | 成功(并行) |
Auto-Fixes Applied
已应用自动修复
| BRD | Issue | Fix Applied |
|---|---|---|
| BRD-04 | Missing timing profiles | Added p50/p95/p99 table |
| BRD-04 | Pending ADR topic | Added business driver |
| BRD | 问题 | 应用的修复 |
|---|---|---|
| BRD-04 | 缺失时间配置文件 | 添加p50/p95/p99表格 |
| BRD-04 | 待处理ADR主题 | 添加业务驱动因素 |
Next Steps
下一步
- Review generated PRDs for domain-specific content
- Complete Section 10 (Customer-Facing Content) manually if flagged
- Run to generate EARS from PRDs
/doc-ears-autopilot
---- 审查生成的PRD中的领域特定内容
- 若标记则手动完成章节10(面向客户内容)
- 运行从PRD生成EARS
/doc-ears-autopilot
---Error Handling
错误处理
Common Errors
常见错误
| Error | Cause | Resolution |
|---|---|---|
| BRD-A depends on BRD-B and vice versa | Review and remove circular reference |
| Specified BRD does not exist | Check path and BRD ID |
| BRD score < 90% after auto-fix attempts | Manual BRD improvement required |
| PRD score < 90% after auto-fix | Manual PRD improvement required |
| PRD template missing | Verify |
| 错误 | 原因 | 解决方法 |
|---|---|---|
| BRD-A依赖BRD-B,反之亦然 | 审查并移除循环引用 |
| 指定的BRD不存在 | 检查路径和BRD ID |
| 自动修复后BRD分数<90% | 需要手动改进BRD |
| 自动修复后PRD分数<90% | 需要手动改进PRD |
| PRD模板缺失 | 验证 |
Recovery Actions
恢复操作
bash
undefinedbash
undefinedResume from last successful point
从最后成功的点恢复
/doc-prd-autopilot resume
/doc-prd-autopilot resume
Skip failed BRD and continue
跳过失败的BRD并继续
/doc-prd-autopilot all --continue-on-error
/doc-prd-autopilot all --continue-on-error
Retry single failed BRD
重试单个失败的BRD
/doc-prd-autopilot BRD-04 --force
---/doc-prd-autopilot BRD-04 --force
---Integration with Other Skills
与其他技能的集成
Upstream Skills
上游技能
- : Create/update BRDs before running autopilot
doc-brd - : Pre-validate BRDs for readiness
doc-validator
- : 在运行自动流水线前创建/更新BRD
doc-brd - : 提前验证BRD的就绪性
doc-validator
Downstream Skills
下游技能
- : Chain autopilot for EARS generation (future)
doc-ears-autopilot - : Manual EARS creation from PRDs
doc-ears - : Manual PRD editing after autopilot
doc-prd
- : 链式自动流水线以生成EARS(未来)
doc-ears-autopilot - : 从PRD手动创建EARS
doc-ears - : 自动流水线后手动编辑PRD
doc-prd
Typical Workflow
典型工作流
1. doc-brd (create BRDs)
2. doc-prd-autopilot (generate PRDs) ← This skill
3. doc-ears (create EARS from PRDs)
4. doc-bdd (create BDD from EARS)
5. ... continue SDD workflow1. doc-brd(创建BRD)
2. doc-prd-autopilot(生成PRD) ← 本技能
3. doc-ears(从PRD创建EARS)
4. doc-bdd(从EARS创建BDD)
5. ... 继续SDD工作流Prerequisites
前提条件
Before using this skill, ensure:
- BRD Documents Exist: At least one BRD in
docs/01_BRD/ - Templates Available:
ai_dev_flow/02_PRD/PRD-MVP-TEMPLATE.md - Shared Standards:
.claude/skills/doc-flow/SHARED_CONTENT.md
使用该技能前,请确保:
- BRD文档存在: 中至少有一个BRD
docs/01_BRD/ - 模板可用: 存在
ai_dev_flow/02_PRD/PRD-MVP-TEMPLATE.md - 共享标准: 存在
.claude/skills/doc-flow/SHARED_CONTENT.md
Pre-Flight Check
飞行前检查
bash
undefinedbash
undefinedVerify BRD directory
验证BRD目录
ls docs/01_BRD/
ls docs/01_BRD/
Verify PRD template
验证PRD模板
ls ai_dev_flow/02_PRD/PRD-MVP-TEMPLATE.md
ls ai_dev_flow/02_PRD/PRD-MVP-TEMPLATE.md
Check for existing PRDs
检查现有PRD
ls docs/02_PRD/ 2>/dev/null || echo "PRD directory will be created"
---ls docs/02_PRD/ 2>/dev/null || echo "PRD目录将被创建"
---Validation Checklist
验证清单
After autopilot completion:
- All target PRDs generated
- Each PRD has EARS-Ready score >= 90%
- Each PRD has Final Review score >= 90%
- Traceability matrix updated ()
PRD-00_TRACEABILITY_MATRIX.md - Each PRD references upstream BRD with tags
@brd - Section 10 (Customer-Facing Content) has substantive content
- Section 20 (EARS Enhancement Appendix) completed
- No broken links in generated documents (verified by Final Review)
- No placeholder text remaining (verified by Final Review)
- Thresholds consistent across sections (verified by Final Review)
- BRD alignment verified (all PRD requirements trace to BRD source)
自动流水线完成后:
- 所有目标PRD已生成
- 每个PRD的EARS就绪分数≥90%
- 每个PRD的最终审查分数≥90%
- 可追溯性矩阵已更新()
PRD-00_TRACEABILITY_MATRIX.md - 每个PRD使用标签引用上游BRD
@brd - 章节10(面向客户内容)包含实质性内容
- 章节20(EARS增强附录)已完成
- 生成的文档中无损坏链接(由最终审查验证)
- 无残留占位符文本(由最终审查验证)
- 各章节阈值一致(由最终审查验证)
- BRD对齐已验证(所有PRD需求均可追溯到BRD源)
Quick Reference
快速参考
| Input | Output | Key Metric |
|---|---|---|
| BRD(s) | PRD(s) | EARS-Ready >= 90% |
Usage:
/doc-prd-autopilot <BRD-LIST> [OPTIONS]Common Commands:
bash
undefined| 输入 | 输出 | 关键指标 |
|---|---|---|
| BRD(s) | PRD(s) | EARS就绪分数≥90% |
用法:
/doc-prd-autopilot <BRD-LIST> [OPTIONS]常用命令:
bash
undefinedSingle BRD
单个BRD
/doc-prd-autopilot BRD-01
/doc-prd-autopilot BRD-01
All BRDs (automatic)
所有BRD(自动模式)
/doc-prd-autopilot all --auto
/doc-prd-autopilot all --auto
Preview only
仅预览
/doc-prd-autopilot all --dry-run
/doc-prd-autopilot all --dry-run
Resume after failure
失败后恢复
/doc-prd-autopilot resume
---/doc-prd-autopilot resume
---Related Resources
相关资源
Skills (Delegated)
委托的技能
- PRD Skill: - PRD creation rules and structure
.claude/skills/doc-prd/SKILL.md - PRD Validator Skill: - Validation rules and error codes
.claude/skills/doc-prd-validator/SKILL.md - BRD Validator Skill: - BRD readiness validation
.claude/skills/doc-brd-validator/SKILL.md
- PRD技能: - PRD创建规则和结构
.claude/skills/doc-prd/SKILL.md - PRD验证器技能: - 验证规则和错误代码
.claude/skills/doc-prd-validator/SKILL.md - BRD验证器技能: - BRD就绪性验证
.claude/skills/doc-brd-validator/SKILL.md
Templates and Rules
模板和规则
- PRD Template:
ai_dev_flow/02_PRD/PRD-MVP-TEMPLATE.md - PRD Schema:
ai_dev_flow/02_PRD/PRD_MVP_SCHEMA.yaml - PRD Creation Rules:
ai_dev_flow/02_PRD/PRD_MVP_CREATION_RULES.md - PRD Validation Rules:
ai_dev_flow/02_PRD/PRD_MVP_VALIDATION_RULES.md
- PRD模板:
ai_dev_flow/02_PRD/PRD-MVP-TEMPLATE.md - PRD Schema:
ai_dev_flow/02_PRD/PRD_MVP_SCHEMA.yaml - PRD创建规则:
ai_dev_flow/02_PRD/PRD_MVP_CREATION_RULES.md - PRD验证规则:
ai_dev_flow/02_PRD/PRD_MVP_VALIDATION_RULES.md
Framework References
框架参考
- SDD Workflow:
ai_dev_flow/SPEC_DRIVEN_DEVELOPMENT_GUIDE.md - MVP Autopilot:
ai_dev_flow/AUTOPILOT/MVP_AUTOPILOT.md
- SDD工作流:
ai_dev_flow/SPEC_DRIVEN_DEVELOPMENT_GUIDE.md - MVP自动流水线:
ai_dev_flow/AUTOPILOT/MVP_AUTOPILOT.md
Review Document Standards (v2.2)
审查文档标准(v2.2)
IMPORTANT: Review reports generated by this autopilot are formal project documents.
See: for complete standards.
.claude/skills/REVIEW_DOCUMENT_STANDARDS.md重要: 该自动流水线生成的审查报告是正式项目文档。
详见: 中的完整标准。
.claude/skills/REVIEW_DOCUMENT_STANDARDS.mdQuick Reference
快速参考
| Requirement | Value |
|---|---|
| Storage Location | Same folder as reviewed PRD |
| File Name | |
| YAML Frontmatter | MANDATORY - see shared standards |
| Parent Reference | MANDATORY - link to PRD index |
Example Location (ALL PRDs use nested folders):
docs/02_PRD/PRD-03_f3_observability/ # Nested folder (REQUIRED)
├── PRD-03_f3_observability.md # Monolithic PRD
├── PRD-03.R_review_report_v001.md # Review report v001
├── PRD-03.R_review_report_v002.md # Review report v002
├── PRD-03.F_fix_report_v001.md # Fix report (if fixes applied)
└── .drift_cache.json # Drift cache
docs/02_PRD/PRD-04_f4_config/ # Sectioned PRD example
├── PRD-04.0_index.md # Index file
├── PRD-04.1_core.md
├── PRD-04.R_review_report_v001.md # Review report
└── .drift_cache.json # Drift cache| 要求 | 值 |
|---|---|
| 存储位置 | 与被审查PRD同一文件夹 |
| 文件名 | |
| YAML前置元数据 | 必填 - 详见共享标准 |
| 父文档引用 | 必填 - 链接到PRD索引 |
示例位置(所有PRD使用嵌套文件夹):
docs/02_PRD/PRD-03_f3_observability/ # 嵌套文件夹(必填)
├── PRD-03_f3_observability.md # 单文件PRD
├── PRD-03.R_review_report_v001.md # 审查报告v001
├── PRD-03.R_review_report_v002.md # 审查报告v002
├── PRD-03.F_fix_report_v001.md # 修复报告(若应用修复)
└── .drift_cache.json # 漂移缓存
docs/02_PRD/PRD-04_f4_config/ # 分章节PRD示例
├── PRD-04.0_index.md # 索引文件
├── PRD-04.1_core.md
├── PRD-04.R_review_report_v001.md # 审查报告
└── .drift_cache.json # 漂移缓存Version History
版本历史
| Version | Date | Changes |
|---|---|---|
| 2.5 | 2026-02-11 | Smart Document Detection: Added automatic document type recognition; Self-type input (PRD-NN) triggers review mode; Upstream-type input (BRD-NN) triggers generate-if-missing or find-and-review; Updated input patterns table with type-based actions |
| 2.4 | 2026-02-11 | Nested Folder Enforcement: Fixed output structure examples to show ALL PRDs in nested folders regardless of size; Removed incorrect non-nested monolithic PRD example; Updated review report location examples |
| 2.3 | 2026-02-10 | Review & Fix Cycle: Replaced Phase 5 (Step 6) with iterative Review -> Fix cycle using |
| 2.2 | 2026-02-10 | Added Review Document Standards: review reports stored alongside reviewed documents with YAML frontmatter and parent references; references shared |
| 2.1 | 2026-02-09 | Added Mode 4: Review Mode for validation-only analysis with visual score indicators; Added Mode 5: Fix Mode for auto-repair with backup and content preservation; Element ID migration (PO-XXX→PRD.NN.07.SS, FF-XXX→PRD.NN.01.SS, AC-XXX→PRD.NN.06.SS, US-XXX→PRD.NN.08.SS) |
| 1.3 | 2026-02-08 | Integrated quality-advisor skill for real-time quality feedback in Phase 3 (PRD Generation) |
| 1.2 | 2026-02-08 | Added Phase 5: Final Content Review with link integrity, threshold consistency, BRD alignment, and placeholder detection checks |
| 1.1 | 2026-02-08 | Added skill dependencies, integrated doc-prd and doc-prd-validator skills |
| 1.0 | 2026-02-08 | Initial skill creation with 7-step workflow |
| 版本 | 日期 | 变更 |
|---|---|---|
| 2.5 | 2026-02-11 | 智能文档检测: 添加自动文档类型识别;自身类型输入(PRD-NN)触发审查模式;上游类型输入(BRD-NN)触发缺失则生成或查找并审查;更新输入模式表格以包含基于类型的操作 |
| 2.4 | 2026-02-11 | 嵌套文件夹强制: 修复输出结构示例,显示所有PRD无论大小都在嵌套文件夹中;移除不正确的非嵌套单文件PRD示例;更新审查报告位置示例 |
| 2.3 | 2026-02-10 | 审查与修复循环: 用迭代式审查→修复循环替换阶段5(步骤6),使用 |
| 2.2 | 2026-02-10 | 添加审查文档标准:审查报告存储在被审查文档旁,包含YAML前置元数据和父文档引用;引用共享的 |
| 2.1 | 2026-02-09 | 添加模式4:审查模式,用于仅验证分析并提供可视化分数指标;添加模式5:修复模式,用于带备份和内容保留的自动修复;元素ID迁移(PO-XXX→PRD.NN.07.SS, FF-XXX→PRD.NN.01.SS, AC-XXX→PRD.NN.06.SS, US-XXX→PRD.NN.08.SS) |
| 1.3 | 2026-02-08 | 集成quality-advisor技能,在阶段3(PRD生成)提供实时质量反馈 |
| 1.2 | 2026-02-08 | 添加阶段5:最终内容审查,包含链接完整性、阈值一致性、BRD对齐和占位符检测检查 |
| 1.1 | 2026-02-08 | 添加技能依赖,集成doc-prd和doc-prd-validator技能 |
| 1.0 | 2026-02-08 | 初始技能创建,包含7步工作流 |