doc-naming
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesedoc-naming Skill
doc-naming 技能
Enforces unified ID naming standards and threshold naming rules for all SDD documentation artifacts.
为所有SDD文档制品强制执行统一的ID命名标准和阈值命名规则。
1. Purpose & Scope
1. 目的与范围
When to Invoke
调用时机
Invoke this skill BEFORE creating or editing any SDD documentation artifact. Use it to:
- Verify element ID format compliance
- Check for removed/legacy patterns
- Validate threshold tag syntax
- Ensure document ID format correctness
在创建或编辑任何SDD文档制品之前调用此技能。使用它来:
- 验证元素ID格式合规性
- 检查是否存在已移除/遗留的格式
- 验证阈值标签语法
- 确保文档ID格式正确
Coverage
覆盖范围
This skill covers all 12 SDD document types:
| Layer | Document Type | Description |
|---|---|---|
| 1 | BRD | Business Requirements Document |
| 2 | PRD | Product Requirements Document |
| 3 | EARS | Easy Approach to Requirements Syntax |
| 4 | BDD | Behavior-Driven Development |
| 5 | ADR | Architecture Decision Record |
| 6 | SYS | System Requirements |
| 7 | REQ | Atomic Requirements |
| 8 | IMPL | Implementation Approach |
| 9 | CTR | Data Contracts |
| 10 | SPEC | Technical Specifications |
| 11 | TASKS | AI Task Breakdown |
此技能涵盖全部11种SDD文档类型:
| 层级 | 文档类型 | 描述 |
|---|---|---|
| 1 | BRD | 业务需求文档 |
| 2 | PRD | 产品需求文档 |
| 3 | EARS | 需求语法简易方法(Easy Approach to Requirements Syntax) |
| 4 | BDD | 行为驱动开发(Behavior-Driven Development) |
| 5 | ADR | 架构决策记录(Architecture Decision Record) |
| 6 | SYS | 系统需求 |
| 7 | REQ | 原子需求 |
| 8 | IMPL | 实现方案 |
| 9 | CTR | 数据契约 |
| 10 | SPEC | 技术规格 |
| 11 | TASKS | AI任务拆分 |
2. Reserved ID Exemption (TYPE-00_*)
2. 保留ID豁免(TYPE-00_*)
Scope
范围
Documents with reserved ID are FULLY EXEMPT from standard validation.
000带有保留ID 的文档完全豁免标准验证。
000Pattern
格式
{DOC_TYPE}-00_{slug}.{ext}{DOC_TYPE}-00_{slug}.{ext}Document Types
适用文档类型
- Index documents (e.g., ,
BRD-00_index.md)REQ-00_index.md - Traceability matrix templates (e.g., )
SPEC-00_TRACEABILITY_MATRIX-TEMPLATE.md - Glossaries, registries, checklists
- 索引文档(例如:,
BRD-00_index.md)REQ-00_index.md - 可追溯性矩阵模板(例如:)
SPEC-00_TRACEABILITY_MATRIX-TEMPLATE.md - 术语表、注册表、检查清单
Rationale
理由
Reserved ID 000 documents are framework infrastructure (indexes, templates, reference materials), not project artifacts requiring traceability or quality gates.
保留ID 000的文档属于框架基础设施(索引、模板、参考资料),而非需要可追溯性或质量门禁的项目制品。
Validation Behavior
验证行为
Skip all element ID and traceability checks when filename matches pattern.
{TYPE}-00_*当文件名匹配格式时,跳过所有元素ID和可追溯性检查。
{TYPE}-00_*3. Document ID Format (TYPE-NN)
3. 文档ID格式(TYPE-NN)
Pattern
格式
TYPE-NN- TYPE: Uppercase document type acronym (BRD, PRD, EARS, etc.)
- Separator: Single dash
- - NN: 2+ digit sequential number with leading zeros
TYPE-NN- TYPE:大写的文档类型缩写(BRD、PRD、EARS等)
- 分隔符:单个短横线
- - NN:2位及以上带前导零的连续数字
Validation Regex
验证正则表达式
regex
^[A-Z]{2,5}-[0-9]{2,}$regex
^[A-Z]{2,5}-[0-9]{2,}$Examples
示例
| Document ID | Valid | Reason |
|---|---|---|
| ✅ | Correct format |
| ✅ | Correct format |
| ✅ | 3-digit ID allowed |
| ✅ | Correct format |
| ❌ | Lowercase not allowed |
| ❌ | Underscore not allowed |
| ❌ | Single digit not allowed |
| ❌ | Missing dash separator |
| 文档ID | 是否有效 | 原因 |
|---|---|---|
| ✅ | 格式正确 |
| ✅ | 格式正确 |
| ✅ | 允许3位ID |
| ✅ | 格式正确 |
| ❌ | 不允许小写 |
| ❌ | 不允许下划线 |
| ❌ | 不允许单个数字 |
| ❌ | 缺少短横线分隔符 |
Filename Convention
文件名约定
TYPE-NN_descriptive_slug.mdExample:
BRD-01_ib_stock_options_mcp_server.mdTYPE-NN_descriptive_slug.md示例:
BRD-01_ib_stock_options_mcp_server.mdREF Document Pattern
REF文档格式
Reference documents use a modified pattern within parent TYPE directories:
| Component | Pattern | Example |
|---|---|---|
| H1 ID | | |
| Filename | | |
| Location | Within parent TYPE directory | |
Notes:
- REF documents are supplementary and do not participate in formal traceability chain
- Similar exemption treatment as index documents
{TYPE}-000 - Numbering is independent per parent TYPE (BRD-REF-01, ADR-REF-01 are separate sequences)
参考文档在父TYPE目录内使用修改后的格式:
| 组件 | 格式 | 示例 |
|---|---|---|
| H1 ID | | |
| 文件名 | | |
| 位置 | 父TYPE目录内 | |
注意:
- REF文档为补充文档,不参与正式可追溯性链条
- 与索引文档享受类似豁免待遇
{TYPE}-000 - 编号按父TYPE独立编排(BRD-REF-01与ADR-REF-01为独立序列)
4. Element ID Format (TYPE.NN.TT.SS)
4. 元素ID格式(TYPE.NN.TT.SS)
Pattern
格式
{DOC_TYPE}.{DOC_NUM}.{ELEM_TYPE}.{SEQ}| Segment | Description | Format |
|---|---|---|
| DOC_TYPE | Document type acronym | 2-5 uppercase letters |
| DOC_NUM | Document number | 2+ digits |
| ELEM_TYPE | Element type code | 2+ digits (01-31) |
| SEQ | Sequential number | 2+ digits |
{DOC_TYPE}.{DOC_NUM}.{ELEM_TYPE}.{SEQ}| 分段 | 描述 | 格式 |
|---|---|---|
| DOC_TYPE | 文档类型缩写 | 2-5位大写字母 |
| DOC_NUM | 文档编号 | 2位及以上数字 |
| ELEM_TYPE | 元素类型代码 | 2位及以上数字(01-31) |
| SEQ | 连续编号 | 2位及以上数字 |
Validation Regex
验证正则表达式
regex
^[A-Z]{2,5}\.[0-9]{2,}\.[0-9]{2,}\.[0-9]{2,}$regex
^[A-Z]{2,5}\.[0-9]{2,}\.[0-9]{2,}\.[0-9]{2,}$Examples
示例
| Element ID | Valid | Breakdown |
|---|---|---|
| ✅ | BRD doc 02, Acceptance Criteria (06), item 01 |
| ✅ | PRD doc 01, User Story (09), item 03 |
| ✅ | ADR doc 05, Decision (10), item 01 |
| ✅ | SPEC doc 03, Interface (16), item 02 |
| ❌ | Legacy pattern - use TYPE.NN.06.SS |
| ❌ | Legacy pattern - use TYPE.NN.01.SS |
| ❌ | Wrong separator (use dots) |
| ❌ | Lowercase not allowed |
| 元素ID | 是否有效 | 拆分说明 |
|---|---|---|
| ✅ | BRD文档02,验收标准(06),条目01 |
| ✅ | PRD文档01,用户故事(09),条目03 |
| ✅ | ADR文档05,决策(10),条目01 |
| ✅ | SPEC文档03,接口(16),条目02 |
| ❌ | 遗留格式 - 请使用TYPE.NN.06.SS |
| ❌ | 遗留格式 - 请使用TYPE.NN.01.SS |
| ❌ | 分隔符错误(请使用点号) |
| ❌ | 不允许小写 |
Heading Format
标题格式
Element IDs appear as markdown headings:
markdown
undefined元素ID以Markdown标题形式呈现:
markdown
undefinedBRD.02.06.01: User Authentication Acceptance Criteria
BRD.02.06.01: User Authentication Acceptance Criteria
PRD.01.09.03: User Login Story
PRD.01.09.03: User Login Story
---
---5. Element Type Codes Table
5. 元素类型代码表
All 31 element type codes with document type applicability:
| Code | Element Type | Applicable Document Types |
|---|---|---|
| 01 | Functional Requirement | BRD, PRD, SYS, REQ |
| 02 | Quality Attribute | BRD, PRD, SYS |
| 03 | Constraint | BRD, PRD |
| 04 | Assumption | BRD, PRD |
| 05 | Dependency | BRD, PRD, REQ |
| 06 | Acceptance Criteria | BRD, PRD, REQ |
| 07 | Risk | BRD, PRD |
| 08 | Metric | BRD, PRD |
| 09 | User Story | PRD, BRD |
| 10 | Decision | ADR, BRD |
| 11 | Use Case | PRD, SYS |
| 12 | Alternative | ADR |
| 13 | Consequence | ADR |
| 14 | Test Scenario | BDD |
| 15 | Step | BDD, SPEC |
| 16 | Interface | SPEC, CTR |
| 17 | Data Model | SPEC, CTR |
| 18 | Task | TASKS |
| 20 | Contract Clause | CTR |
| 21 | Validation Rule | SPEC |
| 22 | Feature Item | BRD, PRD |
| 23 | Business Objective | BRD |
| 24 | Stakeholder Need | BRD, PRD |
| 25 | EARS Statement | EARS |
| 26 | System Requirement | SYS |
| 27 | Atomic Requirement | REQ |
| 28 | Specification Element | SPEC |
| 29 | Implementation Phase | IMPL |
| 30 | Task Item | TASKS |
全部31种元素类型代码及适用文档类型:
| 代码 | 元素类型 | 适用文档类型 |
|---|---|---|
| 01 | 功能需求 | BRD, PRD, SYS, REQ |
| 02 | 质量属性 | BRD, PRD, SYS |
| 03 | 约束条件 | BRD, PRD |
| 04 | 假设条件 | BRD, PRD |
| 05 | 依赖关系 | BRD, PRD, REQ |
| 06 | 验收标准 | BRD, PRD, REQ |
| 07 | 风险 | BRD, PRD |
| 08 | 指标 | BRD, PRD |
| 09 | 用户故事 | PRD, BRD |
| 10 | 决策 | ADR, BRD |
| 11 | 用例 | PRD, SYS |
| 12 | 备选方案 | ADR |
| 13 | 影响结果 | ADR |
| 14 | 测试场景 | BDD |
| 15 | 步骤 | BDD, SPEC |
| 16 | 接口 | SPEC, CTR |
| 17 | 数据模型 | SPEC, CTR |
| 18 | 任务 | TASKS |
| 20 | 契约条款 | CTR |
| 21 | 验证规则 | SPEC |
| 22 | 功能项 | BRD, PRD |
| 23 | 业务目标 | BRD |
| 24 | 干系人需求 | BRD, PRD |
| 25 | EARS语句 | EARS |
| 26 | 系统需求 | SYS |
| 27 | 原子需求 | REQ |
| 28 | 规格元素 | SPEC |
| 29 | 实现阶段 | IMPL |
| 30 | 任务项 | TASKS |
Quick Lookup by Document Type
按文档类型快速查询
| Document | Common Element Codes |
|---|---|
| BRD | 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 22, 23, 24 |
| PRD | 01, 02, 03, 04, 05, 06, 07, 08, 09, 11, 22, 24 |
| EARS | 25 |
| BDD | 14, 15 |
| ADR | 10, 12, 13 |
| SYS | 01, 02, 11, 26 |
| REQ | 01, 05, 06, 27 |
| IMPL | 29 |
| CTR | 16, 17, 20 |
| SPEC | 15, 16, 17, 21, 28 |
| TASKS | 18, 30 |
| 文档 | 常用元素代码 |
|---|---|
| BRD | 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 22, 23, 24 |
| PRD | 01, 02, 03, 04, 05, 06, 07, 08, 09, 11, 22, 24 |
| EARS | 25 |
| BDD | 14, 15 |
| ADR | 10, 12, 13 |
| SYS | 01, 02, 11, 26 |
| REQ | 01, 05, 06, 27 |
| IMPL | 29 |
| CTR | 16, 17, 20 |
| SPEC | 15, 16, 17, 21, 28 |
| TASKS | 18, 30 |
6. Removed/Legacy Patterns
6. 已移除/遗留格式
These patterns are DEPRECATED. Do NOT use them in new documents.
| Removed Pattern | Migration Path | Applies To |
|---|---|---|
| | BRD, PRD, REQ |
| | BRD, PRD, SYS, REQ |
| | BRD, PRD |
| | BRD, PRD |
| | BRD, PRD, SYS |
| | BRD |
| | BRD, PRD |
| | BRD, PRD |
| | BRD, PRD |
| | EARS |
| | EARS |
| | TASKS |
| | TASKS |
| | IMPL |
| | IMPL |
| | CTR |
| | CTR |
| | CTR |
| | ADR |
| | ADR |
| | ADR |
以下格式已废弃,请勿在新文档中使用。
| 已移除格式 | 迁移路径 | 适用范围 |
|---|---|---|
| | BRD, PRD, REQ |
| | BRD, PRD, SYS, REQ |
| | BRD, PRD |
| | BRD, PRD |
| | BRD, PRD, SYS |
| | BRD |
| | BRD, PRD |
| | BRD, PRD |
| | BRD, PRD |
| | EARS |
| | EARS |
| | TASKS |
| | TASKS |
| | IMPL |
| | IMPL |
| | CTR |
| | CTR |
| | CTR |
| | ADR |
| | ADR |
| | ADR |
Migration Examples
迁移示例
| Legacy | Unified Format |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| 遗留格式 | 统一格式 |
|---|---|
| |
| |
| |
| |
| |
| |
| |
7. Threshold Tag Format
7. 阈值标签格式
Tag Pattern
标签格式
@threshold: {DOC_TYPE}.{DOC_NUM}.{threshold_key}@threshold: {DOC_TYPE}.{DOC_NUM}.{threshold_key}Key Format
键格式
{category}.{subcategory}.{attribute}[.{qualifier}]{category}.{subcategory}.{attribute}[.{qualifier}]Valid Categories
有效分类
| Category | Description | Example Keys |
|---|---|---|
| perf | Performance metrics | |
| timeout | Timeout values | |
| rate | Rate limits | |
| retry | Retry policies | |
| circuit | Circuit breaker | |
| alert | Alerting thresholds | |
| cache | Cache settings | |
| pool | Connection pools | |
| queue | Queue settings | |
| batch | Batch processing | |
| 分类 | 描述 | 示例键 |
|---|---|---|
| perf | 性能指标 | |
| timeout | 超时值 | |
| rate | 速率限制 | |
| retry | 重试策略 | |
| circuit | 熔断器 | |
| alert | 告警阈值 | |
| cache | 缓存设置 | |
| pool | 连接池 | |
| queue | 队列设置 | |
| batch | 批量处理 | |
Examples
示例
| Threshold Tag | Valid | Breakdown |
|---|---|---|
| ✅ | PRD doc 035, timeout category |
| ✅ | BRD doc 02, performance category |
| ✅ | ADR doc 05, circuit breaker |
| ❌ | Missing doc reference |
| ❌ | Wrong separator (dash vs dot) |
| 阈值标签 | 是否有效 | 拆分说明 |
|---|---|---|
| ✅ | PRD文档035,超时分类 |
| ✅ | BRD文档02,性能分类 |
| ✅ | ADR文档05,熔断器 |
| ❌ | 缺少文档引用 |
| ❌ | 分隔符错误(短横线 vs 点号) |
Source Documents for Thresholds
阈值来源文档
| Doc Type | Threshold Scope |
|---|---|
| BRD | Business-level thresholds (SLAs, business rules) |
| PRD | Product-level thresholds (user experience, product metrics) |
| ADR | Technical thresholds (architecture decisions, system limits) |
| 文档类型 | 阈值范围 |
|---|---|
| BRD | 业务级阈值(SLA、业务规则) |
| PRD | 产品级阈值(用户体验、产品指标) |
| ADR | 技术级阈值(架构决策、系统限制) |
8. Validation Examples by Document Type
8. 按文档类型的验证示例
BRD Examples
BRD示例
markdown
undefinedmarkdown
undefinedBRD.02.01.01: User Authentication Requirement
BRD.02.01.01: User Authentication Requirement
BRD.02.06.01: Login Acceptance Criteria
BRD.02.06.01: Login Acceptance Criteria
BRD.02.23.01: Revenue Growth Objective
BRD.02.23.01: Revenue Growth Objective
BRD.02.09.01: User Onboarding Story
BRD.02.09.01: User Onboarding Story
BRD.02.10.01: Database Selection Decision
BRD.02.10.01: Database Selection Decision
@threshold: BRD.02.perf.response_time.max
undefined@threshold: BRD.02.perf.response_time.max
undefinedPRD Examples
PRD示例
markdown
undefinedmarkdown
undefinedPRD.01.09.01: User Login Story
PRD.01.09.01: User Login Story
PRD.01.22.01: Dashboard Feature
PRD.01.22.01: Dashboard Feature
PRD.01.06.01: Feature Acceptance Criteria
PRD.01.06.01: Feature Acceptance Criteria
@threshold: PRD.01.timeout.session.idle
undefined@threshold: PRD.01.timeout.session.idle
undefinedEARS Examples
EARS示例
markdown
undefinedmarkdown
undefinedEARS.06.25.01: KYC Submission Event
EARS.06.25.01: KYC Submission Event
EARS.06.25.02: Pending Status State
EARS.06.25.02: Pending Status State
undefinedundefinedADR Examples
ADR示例
markdown
undefinedmarkdown
undefinedADR.05.10.01: Use PostgreSQL Decision
ADR.05.10.01: Use PostgreSQL Decision
ADR.05.12.01: MongoDB Alternative
ADR.05.12.01: MongoDB Alternative
ADR.05.13.01: Migration Consequence
ADR.05.13.01: Migration Consequence
@threshold: ADR.05.circuit.failure_threshold
undefined@threshold: ADR.05.circuit.failure_threshold
undefinedSPEC Examples
SPEC示例
markdown
undefinedmarkdown
undefinedSPEC.03.16.01: REST API Interface
SPEC.03.16.01: REST API Interface
SPEC.03.17.01: User Data Model
SPEC.03.17.01: User Data Model
SPEC.03.21.01: Email Validation Rule
SPEC.03.21.01: Email Validation Rule
undefinedundefinedCTR Examples
CTR示例
markdown
undefinedmarkdown
undefinedCTR.02.16.01: Partner API Interface
CTR.02.16.01: Partner API Interface
CTR.02.17.01: Order Data Model
CTR.02.17.01: Order Data Model
CTR.02.20.01: Rate Limit Clause
CTR.02.20.01: Rate Limit Clause
undefinedundefinedTASKS Examples
TASKS示例
markdown
undefinedmarkdown
undefinedTASKS.02.18.01: Setup Development Environment
TASKS.02.18.01: Setup Development Environment
TASKS.02.30.01: Configure CI Pipeline
TASKS.02.30.01: Configure CI Pipeline
undefinedundefinedIMPL Examples
IMPL示例
markdown
undefinedmarkdown
undefinedIMPL.02.29.01: Foundation Phase
IMPL.02.29.01: Foundation Phase
IMPL.02.29.02: Integration Phase
IMPL.02.29.02: Integration Phase
---
---9. Pre-Flight Checklist
9. 预检查清单
Run this checklist BEFORE creating any SDD document:
在创建任何SDD文档之前,请运行此检查清单:
Document Setup
文档设置
- Document ID follows format
TYPE-NN - Filename follows pattern
TYPE-NN_descriptive_slug.md - YAML frontmatter includes correct and
artifact_typelayer - Not a reserved ID document (TYPE-00_*) requiring exemption
- 文档ID遵循格式
TYPE-NN - 文件名遵循格式
TYPE-NN_descriptive_slug.md - YAML前置元数据包含正确的和
artifact_typelayer - 不属于需要豁免的保留ID文档(TYPE-00_*)
Element IDs
元素ID
- All element IDs use 4-segment dot notation:
TYPE.NN.TT.SS - Element type code (TT) is valid for this document type (see Section 5)
- Sequential numbers (SS) are unique within the document
- No legacy patterns (AC-XXX, FR-XXX, DEC-XXX, etc.) are used
- 所有元素ID使用4段点号格式:
TYPE.NN.TT.SS - 元素类型代码(TT)对应该文档类型有效(参见第5节)
- 连续编号(SS)在文档内唯一
- 未使用遗留格式(AC-XXX、FR-XXX、DEC-XXX等)
Threshold Tags
阈值标签
- All tags include document reference:
@threshold:TYPE.NN.key - Threshold keys follow category.subcategory.attribute format
- Categories are from the approved list (perf, timeout, rate, etc.)
- 所有标签包含文档引用:
@threshold:TYPE.NN.key - 阈值键遵循category.subcategory.attribute格式
- 分类来自批准列表(perf、timeout、rate等)
Cross-References
交叉引用
- Traceability tags use correct prefixes (@brd:, @prd:, @adr:, etc.)
- Referenced document IDs exist
- Element ID references are complete (all 4 segments)
- 可追溯性标签使用正确前缀(@brd:、@prd:、@adr:等)
- 引用的文档ID存在
- 元素ID引用完整(包含全部4段)
10. Error Recovery
10. 错误修复
Detecting Legacy Patterns
检测遗留格式
Use grep to find legacy patterns:
bash
undefined使用grep查找遗留格式:
bash
undefinedFind all legacy patterns in a file
Find all legacy patterns in a file
grep -E "(AC|FR|BC|BA|QA|BO|RISK|METRIC)-[0-9]+" file.md
grep -E "(Event|State|TASK|Phase|IP|IF|DM|CC)-[0-9]+" file.md
grep -E "(DEC|ALT|CON)-[0-9]+" file.md
grep -E "Feature F-[0-9]+" file.md
grep -E "T-[0-9]+" file.md
undefinedgrep -E "(AC|FR|BC|BA|QA|BO|RISK|METRIC)-[0-9]+" file.md
grep -E "(Event|State|TASK|Phase|IP|IF|DM|CC)-[0-9]+" file.md
grep -E "(DEC|ALT|CON)-[0-9]+" file.md
grep -E "Feature F-[0-9]+" file.md
grep -E "T-[0-9]+" file.md
undefinedMigration Procedure
迁移步骤
-
Identify the document type and number from the filename
- Example: → DOC_TYPE=BRD, DOC_NUM=02
BRD-02_requirements.md
- Example:
-
Look up the element type code from Section 5
- Example: → Acceptance Criteria → Code 06
AC-XXX - Example: → Decision → Code 10
DEC-XXX
- Example:
-
Construct the unified ID
- Pattern:
{DOC_TYPE}.{DOC_NUM}.{ELEM_TYPE}.{SEQ} - Example: in BRD-02 →
AC-001BRD.02.06.01 - Example: in ADR-05 →
DEC-01ADR.05.10.01
- Pattern:
-
Replace all occurrencesbash
# Example sed replacement sed -i 's/### AC-001:/### BRD.02.06.01:/g' file.md sed -i 's/### DEC-01:/### ADR.05.10.01:/g' file.md -
Validate the resultbash
# Verify no legacy patterns remain grep -E "(AC|FR|BC|BA|DEC|ALT|CON)-[0-9]+" file.md
-
从文件名识别文档类型和编号
- 示例:→ DOC_TYPE=BRD, DOC_NUM=02
BRD-02_requirements.md
- 示例:
-
从第5节查找元素类型代码
- 示例:→ 验收标准 → 代码06
AC-XXX - 示例:→ 决策 → 代码10
DEC-XXX
- 示例:
-
构建统一ID
- 格式:
{DOC_TYPE}.{DOC_NUM}.{ELEM_TYPE}.{SEQ} - 示例:BRD-02中的→
AC-001BRD.02.06.01 - 示例:ADR-05中的→
DEC-01ADR.05.10.01
- 格式:
-
替换所有匹配项bash
# Example sed replacement sed -i 's/### AC-001:/### BRD.02.06.01:/g' file.md sed -i 's/### DEC-01:/### ADR.05.10.01:/g' file.md -
验证结果bash
# Verify no legacy patterns remain grep -E "(AC|FR|BC|BA|DEC|ALT|CON)-[0-9]+" file.md
Common Migration Errors
常见迁移错误
| Error | Cause | Fix |
|---|---|---|
| Wrong element code | Using FR code (01) for Acceptance Criteria | Use code 06 for AC |
| Missing document number | | Include document number: |
| Dash instead of dot | | Use dots: |
| Lowercase type | | Uppercase: |
| 错误 | 原因 | 修复方法 |
|---|---|---|
| 元素代码错误 | 为验收标准使用FR代码(01) | 为AC使用代码06 |
| 缺少文档编号 | | 包含文档编号: |
| 使用短横线而非点号 | | 使用点号: |
| 类型使用小写 | | 使用大写: |
11. Source References
11. 参考来源
Primary Sources
主要来源
| Document | Location | Content |
|---|---|---|
| ID Naming Standards | | Document IDs, Element IDs, 31 type codes |
| Threshold Naming Rules | | Threshold tags, key formats, categories |
| 文档 | 位置 | 内容 |
|---|---|---|
| ID命名标准 | | 文档ID、元素ID、31种类型代码 |
| 阈值命名规则 | | 阈值标签、键格式、分类 |
Validation Rules Files
验证规则文件
Each document type has validation rules with Element ID compliance checks:
| Document Type | Validation Rules File |
|---|---|
| BRD | |
| PRD | |
| EARS | |
| BDD | |
| ADR | |
| SYS | |
| REQ | |
| IMPL | |
| CTR | |
| SPEC | |
| TASKS | |
每种文档类型都有包含元素ID合规性检查的验证规则文件:
| 文档类型 | 验证规则文件 |
|---|---|
| BRD | |
| PRD | |
| EARS | |
| BDD | |
| ADR | |
| SYS | |
| REQ | |
| IMPL | |
| CTR | |
| SPEC | |
| TASKS | |
Related Skills
相关技能
| Skill | Purpose |
|---|---|
| doc-validator | Automated validation of SDD documents |
| doc-flow | SDD workflow orchestration |
| trace-check | Traceability validation |
| 技能 | 用途 |
|---|---|
| doc-validator | SDD文档自动化验证 |
| doc-flow | SDD工作流编排 |
| trace-check | 可追溯性验证 |
Diagram Standards
图表标准
All diagrams MUST use Mermaid syntax. Text-based diagrams (ASCII art, box drawings) are prohibited.
See: and skill.
ai_dev_flow/DIAGRAM_STANDARDS.mdmermaid-gen所有图表必须使用Mermaid语法。禁止使用基于文本的图表(ASCII艺术、框线绘图)。
参考:和技能。
ai_dev_flow/DIAGRAM_STANDARDS.mdmermaid-genVersion History
版本历史
| Version | Date | Changes |
|---|---|---|
| 1.2.0 | 2026-01-17 | Updated to 11 active artifact types; Removed legacy element codes 19, 31 |
| 1.1.0 | 2025-12-29 | Added Reserved ID Exemption, REF document pattern, ADR removed patterns, fixed element type codes for BRD |
| 1.0.0 | 2025-12-19 | Initial release with all 31 element codes and 18 removed patterns |
| 版本 | 日期 | 变更 |
|---|---|---|
| 1.2.0 | 2026-01-17 | 更新为11种活跃制品类型;移除遗留元素代码19、31 |
| 1.1.0 | 2025-12-29 | 添加保留ID豁免、REF文档格式、ADR已移除格式,修复BRD的元素类型代码 |
| 1.0.0 | 2025-12-19 | 初始版本,包含全部31种元素代码和18种已移除格式 |