doc-naming

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

doc-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:
LayerDocument TypeDescription
1BRDBusiness Requirements Document
2PRDProduct Requirements Document
3EARSEasy Approach to Requirements Syntax
4BDDBehavior-Driven Development
5ADRArchitecture Decision Record
6SYSSystem Requirements
7REQAtomic Requirements
8IMPLImplementation Approach
9CTRData Contracts
10SPECTechnical Specifications
11TASKSAI Task Breakdown

此技能涵盖全部11种SDD文档类型:
层级文档类型描述
1BRD业务需求文档
2PRD产品需求文档
3EARS需求语法简易方法(Easy Approach to Requirements Syntax)
4BDD行为驱动开发(Behavior-Driven Development)
5ADR架构决策记录(Architecture Decision Record)
6SYS系统需求
7REQ原子需求
8IMPL实现方案
9CTR数据契约
10SPEC技术规格
11TASKSAI任务拆分

2. Reserved ID Exemption (TYPE-00_*)

2. 保留ID豁免(TYPE-00_*)

Scope

范围

Documents with reserved ID
000
are FULLY EXEMPT from standard validation.
带有保留ID
000
的文档完全豁免标准验证。

Pattern

格式

{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
{TYPE}-00_*
pattern.

当文件名匹配
{TYPE}-00_*
格式时,跳过所有元素ID和可追溯性检查。

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 IDValidReason
BRD-01
Correct format
PRD-02
Correct format
ADR-001
3-digit ID allowed
TASKS-12
Correct format
brd-01
Lowercase not allowed
PRD_02
Underscore not allowed
BRD-1
Single digit not allowed
BRD01
Missing dash separator
文档ID是否有效原因
BRD-01
格式正确
PRD-02
格式正确
ADR-001
允许3位ID
TASKS-12
格式正确
brd-01
不允许小写
PRD_02
不允许下划线
BRD-1
不允许单个数字
BRD01
缺少短横线分隔符

Filename Convention

文件名约定

TYPE-NN_descriptive_slug.md
Example:
BRD-01_ib_stock_options_mcp_server.md
TYPE-NN_descriptive_slug.md
示例:
BRD-01_ib_stock_options_mcp_server.md

REF Document Pattern

REF文档格式

Reference documents use a modified pattern within parent TYPE directories:
ComponentPatternExample
H1 ID
{TYPE}-REF-NN
# BRD-REF-01: Project Overview
Filename
{TYPE}-REF-NN_{slug}.md
BRD-REF-01_project_overview.md
LocationWithin parent TYPE directory
docs/BRD/BRD-REF-01_project_overview.md
Notes:
  • REF documents are supplementary and do not participate in formal traceability chain
  • Similar exemption treatment as
    {TYPE}-000
    index documents
  • Numbering is independent per parent TYPE (BRD-REF-01, ADR-REF-01 are separate sequences)

参考文档在父TYPE目录内使用修改后的格式:
组件格式示例
H1 ID
{TYPE}-REF-NN
# BRD-REF-01: Project Overview
文件名
{TYPE}-REF-NN_{slug}.md
BRD-REF-01_project_overview.md
位置父TYPE目录内
docs/BRD/BRD-REF-01_project_overview.md
注意:
  • 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}
SegmentDescriptionFormat
DOC_TYPEDocument type acronym2-5 uppercase letters
DOC_NUMDocument number2+ digits
ELEM_TYPEElement type code2+ digits (01-31)
SEQSequential number2+ 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 IDValidBreakdown
BRD.02.06.01
BRD doc 02, Acceptance Criteria (06), item 01
PRD.01.09.03
PRD doc 01, User Story (09), item 03
ADR.05.10.01
ADR doc 05, Decision (10), item 01
SPEC.03.16.02
SPEC doc 03, Interface (16), item 02
AC-001
Legacy pattern - use TYPE.NN.06.SS
FR-01
Legacy pattern - use TYPE.NN.01.SS
BRD-02-06-01
Wrong separator (use dots)
brd.02.06.01
Lowercase not allowed
元素ID是否有效拆分说明
BRD.02.06.01
BRD文档02,验收标准(06),条目01
PRD.01.09.03
PRD文档01,用户故事(09),条目03
ADR.05.10.01
ADR文档05,决策(10),条目01
SPEC.03.16.02
SPEC文档03,接口(16),条目02
AC-001
遗留格式 - 请使用TYPE.NN.06.SS
FR-01
遗留格式 - 请使用TYPE.NN.01.SS
BRD-02-06-01
分隔符错误(请使用点号)
brd.02.06.01
不允许小写

Heading Format

标题格式

Element IDs appear as markdown headings:
markdown
undefined
元素ID以Markdown标题形式呈现:
markdown
undefined

BRD.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:
CodeElement TypeApplicable Document Types
01Functional RequirementBRD, PRD, SYS, REQ
02Quality AttributeBRD, PRD, SYS
03ConstraintBRD, PRD
04AssumptionBRD, PRD
05DependencyBRD, PRD, REQ
06Acceptance CriteriaBRD, PRD, REQ
07RiskBRD, PRD
08MetricBRD, PRD
09User StoryPRD, BRD
10DecisionADR, BRD
11Use CasePRD, SYS
12AlternativeADR
13ConsequenceADR
14Test ScenarioBDD
15StepBDD, SPEC
16InterfaceSPEC, CTR
17Data ModelSPEC, CTR
18TaskTASKS
20Contract ClauseCTR
21Validation RuleSPEC
22Feature ItemBRD, PRD
23Business ObjectiveBRD
24Stakeholder NeedBRD, PRD
25EARS StatementEARS
26System RequirementSYS
27Atomic RequirementREQ
28Specification ElementSPEC
29Implementation PhaseIMPL
30Task ItemTASKS
全部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
25EARS语句EARS
26系统需求SYS
27原子需求REQ
28规格元素SPEC
29实现阶段IMPL
30任务项TASKS

Quick Lookup by Document Type

按文档类型快速查询

DocumentCommon Element Codes
BRD01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 22, 23, 24
PRD01, 02, 03, 04, 05, 06, 07, 08, 09, 11, 22, 24
EARS25
BDD14, 15
ADR10, 12, 13
SYS01, 02, 11, 26
REQ01, 05, 06, 27
IMPL29
CTR16, 17, 20
SPEC15, 16, 17, 21, 28
TASKS18, 30

文档常用元素代码
BRD01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 22, 23, 24
PRD01, 02, 03, 04, 05, 06, 07, 08, 09, 11, 22, 24
EARS25
BDD14, 15
ADR10, 12, 13
SYS01, 02, 11, 26
REQ01, 05, 06, 27
IMPL29
CTR16, 17, 20
SPEC15, 16, 17, 21, 28
TASKS18, 30

6. Removed/Legacy Patterns

6. 已移除/遗留格式

These patterns are DEPRECATED. Do NOT use them in new documents.
Removed PatternMigration PathApplies To
AC-XXX
TYPE.NN.06.SS
BRD, PRD, REQ
FR-XXX
TYPE.NN.01.SS
BRD, PRD, SYS, REQ
BC-XXX
TYPE.NN.03.SS
BRD, PRD
BA-XXX
TYPE.NN.04.SS
BRD, PRD
QA-XXX
TYPE.NN.02.SS
BRD, PRD, SYS
BO-XXX
TYPE.NN.23.SS
BRD
RISK-XXX
TYPE.NN.07.SS
BRD, PRD
METRIC-XXX
TYPE.NN.08.SS
BRD, PRD
Feature F-XXX
TYPE.NN.22.SS
BRD, PRD
Event-XXX
TYPE.NN.25.SS
EARS
State-XXX
TYPE.NN.25.SS
EARS
TASK-XXX
TYPE.NN.18.SS
TASKS
T-XXX
TYPE.NN.18.SS
TASKS
Phase-XXX
TYPE.NN.29.SS
IMPL
IP-XXX
TYPE.NN.29.SS
IMPL
IF-XXX
TYPE.NN.16.SS
CTR
DM-XXX
TYPE.NN.17.SS
CTR
CC-XXX
TYPE.NN.20.SS
CTR
DEC-XXX
TYPE.NN.10.SS
ADR
ALT-XXX
TYPE.NN.12.SS
ADR
CON-XXX
TYPE.NN.13.SS
ADR
以下格式已废弃,请勿在新文档中使用。
已移除格式迁移路径适用范围
AC-XXX
TYPE.NN.06.SS
BRD, PRD, REQ
FR-XXX
TYPE.NN.01.SS
BRD, PRD, SYS, REQ
BC-XXX
TYPE.NN.03.SS
BRD, PRD
BA-XXX
TYPE.NN.04.SS
BRD, PRD
QA-XXX
TYPE.NN.02.SS
BRD, PRD, SYS
BO-XXX
TYPE.NN.23.SS
BRD
RISK-XXX
TYPE.NN.07.SS
BRD, PRD
METRIC-XXX
TYPE.NN.08.SS
BRD, PRD
Feature F-XXX
TYPE.NN.22.SS
BRD, PRD
Event-XXX
TYPE.NN.25.SS
EARS
State-XXX
TYPE.NN.25.SS
EARS
TASK-XXX
TYPE.NN.18.SS
TASKS
T-XXX
TYPE.NN.18.SS
TASKS
Phase-XXX
TYPE.NN.29.SS
IMPL
IP-XXX
TYPE.NN.29.SS
IMPL
IF-XXX
TYPE.NN.16.SS
CTR
DM-XXX
TYPE.NN.17.SS
CTR
CC-XXX
TYPE.NN.20.SS
CTR
DEC-XXX
TYPE.NN.10.SS
ADR
ALT-XXX
TYPE.NN.12.SS
ADR
CON-XXX
TYPE.NN.13.SS
ADR

Migration Examples

迁移示例

LegacyUnified Format
### AC-001: Login Validation
### BRD.02.06.01: Login Validation
#### FR-01: User Auth
#### PRD.01.01.01: User Auth
### Event-001: KYC Submission
### EARS.06.25.01: KYC Submission
### TASK-01: Setup
### TASKS.02.18.01: Setup
### Phase-01: Init
### IMPL.02.29.01: Init
### DEC-01: Use PostgreSQL
### ADR.05.10.01: Use PostgreSQL
### ALT-01: MongoDB Option
### ADR.05.12.01: MongoDB Option

遗留格式统一格式
### AC-001: Login Validation
### BRD.02.06.01: Login Validation
#### FR-01: User Auth
#### PRD.01.01.01: User Auth
### Event-001: KYC Submission
### EARS.06.25.01: KYC Submission
### TASK-01: Setup
### TASKS.02.18.01: Setup
### Phase-01: Init
### IMPL.02.29.01: Init
### DEC-01: Use PostgreSQL
### ADR.05.10.01: Use PostgreSQL
### ALT-01: MongoDB Option
### ADR.05.12.01: MongoDB Option

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

有效分类

CategoryDescriptionExample Keys
perfPerformance metrics
perf.latency.p99
timeoutTimeout values
timeout.api.request
rateRate limits
rate.api.requests_per_second
retryRetry policies
retry.max_attempts
circuitCircuit breaker
circuit.failure_threshold
alertAlerting thresholds
alert.error_rate.critical
cacheCache settings
cache.ttl.session
poolConnection pools
pool.max_connections
queueQueue settings
queue.max_size
batchBatch processing
batch.size.max
分类描述示例键
perf性能指标
perf.latency.p99
timeout超时值
timeout.api.request
rate速率限制
rate.api.requests_per_second
retry重试策略
retry.max_attempts
circuit熔断器
circuit.failure_threshold
alert告警阈值
alert.error_rate.critical
cache缓存设置
cache.ttl.session
pool连接池
pool.max_connections
queue队列设置
queue.max_size
batch批量处理
batch.size.max

Examples

示例

Threshold TagValidBreakdown
@threshold: PRD.035.timeout.partner.bridge
PRD doc 035, timeout category
@threshold: BRD.02.perf.latency.p99
BRD doc 02, performance category
@threshold: ADR.05.circuit.failure_threshold
ADR doc 05, circuit breaker
@threshold: timeout.partner.bridge
Missing doc reference
@threshold: PRD-035.timeout
Wrong separator (dash vs dot)
阈值标签是否有效拆分说明
@threshold: PRD.035.timeout.partner.bridge
PRD文档035,超时分类
@threshold: BRD.02.perf.latency.p99
BRD文档02,性能分类
@threshold: ADR.05.circuit.failure_threshold
ADR文档05,熔断器
@threshold: timeout.partner.bridge
缺少文档引用
@threshold: PRD-035.timeout
分隔符错误(短横线 vs 点号)

Source Documents for Thresholds

阈值来源文档

Doc TypeThreshold Scope
BRDBusiness-level thresholds (SLAs, business rules)
PRDProduct-level thresholds (user experience, product metrics)
ADRTechnical thresholds (architecture decisions, system limits)

文档类型阈值范围
BRD业务级阈值(SLA、业务规则)
PRD产品级阈值(用户体验、产品指标)
ADR技术级阈值(架构决策、系统限制)

8. Validation Examples by Document Type

8. 按文档类型的验证示例

BRD Examples

BRD示例

markdown
undefined
markdown
undefined

BRD.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
undefined

PRD Examples

PRD示例

markdown
undefined
markdown
undefined

PRD.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
undefined

EARS Examples

EARS示例

markdown
undefined
markdown
undefined

EARS.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

undefined
undefined

ADR Examples

ADR示例

markdown
undefined
markdown
undefined

ADR.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
undefined

SPEC Examples

SPEC示例

markdown
undefined
markdown
undefined

SPEC.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

undefined
undefined

CTR Examples

CTR示例

markdown
undefined
markdown
undefined

CTR.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

undefined
undefined

TASKS Examples

TASKS示例

markdown
undefined
markdown
undefined

TASKS.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

undefined
undefined

IMPL Examples

IMPL示例

markdown
undefined
markdown
undefined

IMPL.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
    TYPE-NN
    format
  • Filename follows
    TYPE-NN_descriptive_slug.md
    pattern
  • YAML frontmatter includes correct
    artifact_type
    and
    layer
  • Not a reserved ID document (TYPE-00_*) requiring exemption
  • 文档ID遵循
    TYPE-NN
    格式
  • 文件名遵循
    TYPE-NN_descriptive_slug.md
    格式
  • YAML前置元数据包含正确的
    artifact_type
    layer
  • 不属于需要豁免的保留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
    @threshold:
    tags include document reference:
    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
undefined

Find 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
undefined
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
undefined

Migration Procedure

迁移步骤

  1. Identify the document type and number from the filename
    • Example:
      BRD-02_requirements.md
      → DOC_TYPE=BRD, DOC_NUM=02
  2. Look up the element type code from Section 5
    • Example:
      AC-XXX
      → Acceptance Criteria → Code 06
    • Example:
      DEC-XXX
      → Decision → Code 10
  3. Construct the unified ID
    • Pattern:
      {DOC_TYPE}.{DOC_NUM}.{ELEM_TYPE}.{SEQ}
    • Example:
      AC-001
      in BRD-02 →
      BRD.02.06.01
    • Example:
      DEC-01
      in ADR-05 →
      ADR.05.10.01
  4. Replace all occurrences
    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
  5. Validate the result
    bash
    # Verify no legacy patterns remain
    grep -E "(AC|FR|BC|BA|DEC|ALT|CON)-[0-9]+" file.md
  1. 从文件名识别文档类型和编号
    • 示例:
      BRD-02_requirements.md
      → DOC_TYPE=BRD, DOC_NUM=02
  2. 从第5节查找元素类型代码
    • 示例:
      AC-XXX
      → 验收标准 → 代码06
    • 示例:
      DEC-XXX
      → 决策 → 代码10
  3. 构建统一ID
    • 格式:
      {DOC_TYPE}.{DOC_NUM}.{ELEM_TYPE}.{SEQ}
    • 示例:BRD-02中的
      AC-001
      BRD.02.06.01
    • 示例:ADR-05中的
      DEC-01
      ADR.05.10.01
  4. 替换所有匹配项
    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
  5. 验证结果
    bash
    # Verify no legacy patterns remain
    grep -E "(AC|FR|BC|BA|DEC|ALT|CON)-[0-9]+" file.md

Common Migration Errors

常见迁移错误

ErrorCauseFix
Wrong element codeUsing FR code (01) for Acceptance CriteriaUse code 06 for AC
Missing document number
BRD..06.01
Include document number:
BRD.02.06.01
Dash instead of dot
BRD-02-06-01
Use dots:
BRD.02.06.01
Lowercase type
brd.02.06.01
Uppercase:
BRD.02.06.01

错误原因修复方法
元素代码错误为验收标准使用FR代码(01)为AC使用代码06
缺少文档编号
BRD..06.01
包含文档编号:
BRD.02.06.01
使用短横线而非点号
BRD-02-06-01
使用点号:
BRD.02.06.01
类型使用小写
brd.02.06.01
使用大写:
BRD.02.06.01

11. Source References

11. 参考来源

Primary Sources

主要来源

DocumentLocationContent
ID Naming Standards
ai_dev_flow/ID_NAMING_STANDARDS.md
Document IDs, Element IDs, 31 type codes
Threshold Naming Rules
ai_dev_flow/THRESHOLD_NAMING_RULES.md
Threshold tags, key formats, categories
文档位置内容
ID命名标准
ai_dev_flow/ID_NAMING_STANDARDS.md
文档ID、元素ID、31种类型代码
阈值命名规则
ai_dev_flow/THRESHOLD_NAMING_RULES.md
阈值标签、键格式、分类

Validation Rules Files

验证规则文件

Each document type has validation rules with Element ID compliance checks:
Document TypeValidation Rules File
BRD
ai_dev_flow/BRD/BRD_VALIDATION_RULES.md
PRD
ai_dev_flow/PRD/PRD_VALIDATION_RULES.md
EARS
ai_dev_flow/EARS/EARS_VALIDATION_RULES.md
BDD
ai_dev_flow/BDD/BDD_VALIDATION_RULES.md
ADR
ai_dev_flow/ADR/ADR_VALIDATION_RULES.md
SYS
ai_dev_flow/SYS/SYS_VALIDATION_RULES.md
REQ
ai_dev_flow/REQ/REQ_VALIDATION_RULES.md
IMPL
ai_dev_flow/IMPL/IMPL_VALIDATION_RULES.md
CTR
ai_dev_flow/CTR/CTR_VALIDATION_RULES.md
SPEC
ai_dev_flow/SPEC/SPEC_VALIDATION_RULES.md
TASKS
ai_dev_flow/TASKS/TASKS_VALIDATION_RULES.md
每种文档类型都有包含元素ID合规性检查的验证规则文件:
文档类型验证规则文件
BRD
ai_dev_flow/BRD/BRD_VALIDATION_RULES.md
PRD
ai_dev_flow/PRD/PRD_VALIDATION_RULES.md
EARS
ai_dev_flow/EARS/EARS_VALIDATION_RULES.md
BDD
ai_dev_flow/BDD/BDD_VALIDATION_RULES.md
ADR
ai_dev_flow/ADR/ADR_VALIDATION_RULES.md
SYS
ai_dev_flow/SYS/SYS_VALIDATION_RULES.md
REQ
ai_dev_flow/REQ/REQ_VALIDATION_RULES.md
IMPL
ai_dev_flow/IMPL/IMPL_VALIDATION_RULES.md
CTR
ai_dev_flow/CTR/CTR_VALIDATION_RULES.md
SPEC
ai_dev_flow/SPEC/SPEC_VALIDATION_RULES.md
TASKS
ai_dev_flow/TASKS/TASKS_VALIDATION_RULES.md

Related Skills

相关技能

SkillPurpose
doc-validatorAutomated validation of SDD documents
doc-flowSDD workflow orchestration
trace-checkTraceability validation

技能用途
doc-validatorSDD文档自动化验证
doc-flowSDD工作流编排
trace-check可追溯性验证

Diagram Standards

图表标准

All diagrams MUST use Mermaid syntax. Text-based diagrams (ASCII art, box drawings) are prohibited. See:
ai_dev_flow/DIAGRAM_STANDARDS.md
and
mermaid-gen
skill.
所有图表必须使用Mermaid语法。禁止使用基于文本的图表(ASCII艺术、框线绘图)。 参考:
ai_dev_flow/DIAGRAM_STANDARDS.md
mermaid-gen
技能。

Version History

版本历史

VersionDateChanges
1.2.02026-01-17Updated to 11 active artifact types; Removed legacy element codes 19, 31
1.1.02025-12-29Added Reserved ID Exemption, REF document pattern, ADR removed patterns, fixed element type codes for BRD
1.0.02025-12-19Initial release with all 31 element codes and 18 removed patterns
版本日期变更
1.2.02026-01-17更新为11种活跃制品类型;移除遗留元素代码19、31
1.1.02025-12-29添加保留ID豁免、REF文档格式、ADR已移除格式,修复BRD的元素类型代码
1.0.02025-12-19初始版本,包含全部31种元素代码和18种已移除格式