Token导航 LogoToken导航TokenDH.com
前端设计external-servicegithub未标认证来源可访问clear审计通过

doc-naming文档命名

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

1,175

周安装

48

GitHub Stars

14

下载量

376
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:doc-naming(文档命名)
来源仓库:https://github.com/vladm3105/aidoc-flow-framework
仓库路径:skills/doc-naming
安装命令:
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-naming
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-naming

简介

用于统一文档命名规范,确保结构清晰、术语一致。

  • 适用于创建或编辑各类技术文档前的格式校验与标准化。
  • 通过自动化检查 ID 格式、标签语法和文档路径来提升规范性。
  • 需配合项目现有事实使用,避免引入未经验证的假设信息。
  • doc-naming 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-naming Skill

Enforces unified ID naming standards and threshold naming rules for all SDD documentation artifacts.


1. Purpose & Scope

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

Coverage

This skill covers all 11 SDD documentation artifact types (Layers 1-11):

LayerDocument TypeDescription
1BRDBusiness Requirements Document
2PRDProduct Requirements Document
3EARSEasy Approach to Requirements Syntax
4BDDBehavior-Driven Development
5ADRArchitecture Decision Record
6SYSSystem Requirements
7REQAtomic Requirements
8CTRData Contracts
9SPECTechnical Specifications
10TSPECTest Specifications (UTEST, ITEST, STEST, FTEST)
11TASKSAI Task Breakdown

Note: Layers 12-14 (CODE, TESTS, VALIDATION) are execution layers, not documentation artifacts.


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

Scope

Documents with reserved ID 000 are FULLY EXEMPT from standard validation.

Pattern

{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

Rationale

Reserved ID 000 documents are framework infrastructure (indexes, templates, reference materials), not project artifacts requiring traceability or quality gates.

Validation Behavior

Skip all element ID and traceability checks when filename matches {TYPE}-00_* pattern.


3. Document ID Format (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

Validation Regex

^[A-Z]{2,8}-[0-9]{2,}$

Examples

Document IDValidReason
BRD-01Correct format
PRD-02Correct format
ADR-0013-digit ID allowed
TASKS-12Correct format
brd-01Lowercase not allowed
PRD_02Underscore not allowed
BRD-1Single digit not allowed
BRD01Missing dash separator

Filename Convention

TYPE-NN_descriptive_slug.md

Example: BRD-01_ib_stock_options_mcp_server.md

REF Document Pattern

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}.mdBRD-REF-01_project_overview.md
LocationWithin parent TYPE directorydocs/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)

4. Element ID Format (TYPE.NN.xxxx)

Pattern

{DOC_TYPE}.{DOC_NUM}.{HASH}
SegmentDescriptionFormat
DOC_TYPEDocument type acronym2-8 uppercase letters
DOC_NUMDocument number2+ digits
HASHElement hash4+ alphanumeric chars

Validation Regex

^[A-Z]{2,8}\.[0-9]{2,}\.[a-z0-9]{4,}$

Examples

Element IDValidBreakdown
BRD.02.0601BRD doc 02, Acceptance Criteria (06), item 01
PRD.01.0903PRD doc 01, User Story (09), item 03
ADR.05.1001ADR doc 05, Decision (10), item 01
SPEC.03.1602SPEC doc 03, Interface (16), item 02
AC-001Legacy pattern - use TYPE.NN.xxxx format
FR-01Legacy pattern - use TYPE.NN.xxxx format
BRD-02-0601Wrong separator (use dots)
brd.02.0601Lowercase not allowed

Heading Format

Element IDs appear as markdown headings:

### BRD.02.0601: User Authentication Acceptance Criteria
#### PRD.01.0903: User Login Story

5. Element Type Codes Table

Active 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
30Task ItemTASKS
32Architecture TopicBRD
33Benefit StatementBRD
40Unit Test CaseTSPEC (UTEST)
41Integration Test CaseTSPEC (ITEST)
42Smoke Test CaseTSPEC (STEST)
43Functional Test CaseTSPEC (FTEST)

Quick Lookup by Document Type

DocumentCommon Element Codes
BRD01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 22, 23, 24, 32, 33
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
CTR16, 17, 20
SPEC15, 16, 17, 21, 28
TSPEC40 (UTEST), 41 (ITEST), 42 (STEST), 43 (FTEST)
TASKS18, 30

6. Removed/Legacy Patterns

These patterns are DEPRECATED. Do NOT use them in new documents.

Removed PatternMigration PathApplies To
AC-XXXTYPE.NN.xxxxBRD, PRD, REQ
FR-XXXTYPE.NN.xxxxBRD, PRD, SYS, REQ
BC-XXXTYPE.NN.xxxxBRD, PRD
BA-XXXTYPE.NN.xxxxBRD, PRD
QA-XXXTYPE.NN.xxxxBRD, PRD, SYS
BO-XXXTYPE.NN.xxxxBRD
RISK-XXXTYPE.NN.xxxxBRD, PRD
METRIC-XXXTYPE.NN.xxxxBRD, PRD
Feature F-XXXTYPE.NN.xxxxBRD, PRD
Event-XXXTYPE.NN.xxxxEARS
State-XXXTYPE.NN.xxxxEARS
TASK-XXXTYPE.NN.xxxxTASKS
T-XXXTYPE.NN.xxxxTASKS
IF-XXXTYPE.NN.xxxxCTR
DM-XXXTYPE.NN.xxxxCTR
CC-XXXTYPE.NN.xxxxCTR
DEC-XXXTYPE.NN.xxxxADR
ALT-XXXTYPE.NN.xxxxADR
CON-XXXTYPE.NN.xxxxADR

Migration Examples

LegacyUnified Format
### AC-001: Login Validation### BRD.02.0601: Login Validation
#### FR-01: User Auth#### PRD.01.0101: User Auth
### Event-001: KYC Submission### EARS.06.2501: KYC Submission
### TASK-01: Setup### TASKS.02.1801: Setup
### DEC-01: Use PostgreSQL### ADR.05.1001: Use PostgreSQL
### ALT-01: MongoDB Option### ADR.05.1201: MongoDB Option

7. Threshold Tag Format

Tag Pattern

@threshold: {DOC_TYPE}.{DOC_NUM}.{threshold_key}

Key Format

{category}.{subcategory}.{attribute}[.{qualifier}]

Valid Categories

CategoryDescriptionExample Keys
perfPerformance metricsperf.latency.p99
timeoutTimeout valuestimeout.api.request
rateRate limitsrate.api.requests_per_second
retryRetry policiesretry.max_attempts
circuitCircuit breakercircuit.failure_threshold
alertAlerting thresholdsalert.error_rate.critical
cacheCache settingscache.ttl.session
poolConnection poolspool.max_connections
queueQueue settingsqueue.max_size
batchBatch processingbatch.size.max

Examples

Threshold TagValidBreakdown
@threshold: PRD.035.timeout.partner.bridgePRD doc 035, timeout category
@threshold: BRD.02.perf.latency.p99BRD doc 02, performance category
@threshold: ADR.05.circuit.failure_thresholdADR doc 05, circuit breaker
@threshold: timeout.partner.bridgeMissing doc reference
@threshold: PRD-035.timeoutWrong separator (dash vs dot)

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)

8. ISO 8601 Datetime Format Standard

Purpose

All date and time fields in SDD documentation MUST use ISO 8601 datetime format for:

  • Accurate upstream drift detection (same-day change tracking)
  • Consistent timestamp comparison across tools
  • Timezone-aware change tracking
  • File system mtime compatibility

Format Specification

Required Format: YYYY-MM-DDTHH:MM:SS (ISO 8601 with time)

ComponentFormatExample
DateYYYY-MM-DD2026-02-10
SeparatorTT
TimeHH:MM:SS14:30:00
Timezone (optional)Z or ±HH:MMZ (UTC) or +05:00

Full Format Options

FormatExampleUse Case
Local time2026-02-10T14:30:00Default for most documents
UTC2026-02-10T14:30:00ZCross-timezone systems
With offset2026-02-10T14:30:00+05:00Explicit timezone

YAML Frontmatter Fields

All datetime fields in YAML frontmatter use ISO 8601:

---
title: "BRD-01: Example Document"
custom_fields:
  created_date: "2026-02-10T09:15:00"
  last_updated: "2026-02-10T14:30:00"
  review_date: "2026-02-10T16:45:00"
  fix_date: "2026-02-10T17:00:00"
  approval_date: "2026-02-11T10:00:00"
---

Affected Fields

FieldDescriptionLocation
last_updatedDocument last modification timeYAML frontmatter
created_dateDocument creation timeYAML frontmatter
fix_dateFix report creation timeFix reports
review_dateReview execution timeReview reports
approval_dateDocument approval timeDocument control
decision_dateADR decision timeADR documents
release_dateRelease/deployment timeCTR, SPEC

Migration from Date-Only Format

Deprecated (date-only):

last_updated: "2026-02-10"

Required (ISO 8601 datetime):

last_updated: "2026-02-10T14:30:00"

Validation Regex

^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})?$

Placeholder Format

For templates, use YYYY-MM-DDTHH:MM:SS as placeholder:

# Template placeholder (to be replaced during generation)
last_updated: "YYYY-MM-DDTHH:MM:SS"

# After generation
last_updated: "2026-02-10T14:30:00"

Drift Detection Benefit

ISO 8601 datetime enables same-day drift detection:

BRD ModifiedPRD CreatedDate-Only DetectionDatetime Detection
2026-02-10T10:00:002026-02-10T08:00:00❌ Same day, no drift✅ Drift detected (BRD newer)
2026-02-10T08:00:002026-02-10T10:00:00❌ Same day, no drift✅ No drift (PRD is newer)

Auto-Generation

When generating documents, use current timestamp:

from datetime import datetime

# Generate ISO 8601 timestamp
timestamp = datetime.now().strftime("%Y-%m-%dT%H:%M:%S")
# Result: "2026-02-10T14:30:00"

# With UTC
timestamp_utc = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
# Result: "2026-02-10T09:30:00Z"

9. Validation Examples by Document Type

BRD Examples

### BRD.02.0101: User Authentication Requirement
### BRD.02.0601: Login Acceptance Criteria
### BRD.02.2301: Revenue Growth Objective
### BRD.02.0901: User Onboarding Story
### BRD.02.1001: Database Selection Decision
### BRD.02.3201: Infrastructure Architecture Topic
### BRD.02.3202: Data Architecture Topic
### BRD.02.3301: Cost Reduction Benefit
### BRD.02.3302: Efficiency Improvement Benefit
@threshold: BRD.02.perf.response_time.max

PRD Examples

### PRD.01.0901: User Login Story
### PRD.01.2201: Dashboard Feature
### PRD.01.0601: Feature Acceptance Criteria
@threshold: PRD.01.timeout.session.idle

EARS Examples

#### EARS.06.2501: KYC Submission Event
#### EARS.06.2502: Pending Status State

ADR Examples

### ADR.05.1001: Use PostgreSQL Decision
### ADR.05.1201: MongoDB Alternative
### ADR.05.1301: Migration Consequence
@threshold: ADR.05.circuit.failure_threshold

SPEC Examples

### SPEC.03.1601: REST API Interface
### SPEC.03.1701: User Data Model
### SPEC.03.2101: Email Validation Rule

CTR Examples

### CTR.02.1601: Partner API Interface
### CTR.02.1701: Order Data Model
### CTR.02.2001: Rate Limit Clause

TSPEC Examples

### TSPEC.01.4001: User Authentication Unit Test
### TSPEC.01.4101: API Integration Test
### TSPEC.01.4201: Login Flow Smoke Test
### TSPEC.01.4301: Order Processing Functional Test

TASKS Examples

### TASKS.02.1801: Setup Development Environment
### TASKS.02.3001: Configure CI Pipeline

10. Pre-Flight Checklist

Run this checklist BEFORE creating any SDD document:

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

Element IDs

  • All element IDs use 3-segment dot notation: TYPE.NN.xxxx
  • Element hash is 4+ alphanumeric characters (see Section 5)
  • Element hashes are unique within the document
  • No legacy patterns (AC-XXX, FR-XXX, DEC-XXX, etc.) are used

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

Cross-References

  • Traceability tags use correct prefixes (@brd:, @prd:, @adr:, etc.)
  • Referenced document IDs exist
  • Element ID references are complete (all 4 segments)

11. Error Recovery

Detecting Legacy Patterns

Use grep to find legacy patterns:

# Find all legacy patterns in a file (COMPREHENSIVE - run ALL commands)

# 1. Simple legacy patterns (e.g., FR-001, AC-002)
grep -E "(AC|FR|BC|BA|QA|BO|NFR|RISK|METRIC)-[0-9]+" file.md

# 2. Compound/domain-prefixed patterns (e.g., FR-CICD-001, NFR-PERF-002)
#    CRITICAL: These patterns have additional components between prefix and number
grep -E "(AC|FR|BC|BA|QA|BO|NFR)(-[A-Za-z0-9]+)+-[0-9]+" file.md

# 3. Other legacy patterns
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

# 4. Combined single-command detection (recommended for automation)
grep -E "(AC|FR|BC|BA|QA|BO|NFR|RISK|METRIC)(-[A-Za-z0-9]+)*-[0-9]+" file.md

Pattern Explanation:

Pattern ComponentMatchesExample
`(FR\AC\...)`Legacy prefixFR, AC, NFR
(-[A-Za-z0-9]+)*Optional domain components-CICD, -AUTH-V2
-[0-9]+Numeric ID-001, -42

Examples Caught:

Legacy PatternDetected ByMigration Target
FR-001Simple patternBRD.NN.01.01
FR-CICD-001Compound patternBRD.NN.01.01
NFR-PERF-002Compound patternBRD.NN.02.02
AC-AUTH-V2-003Compound patternBRD.NN.06.03

Migration Procedure

  1. Identify the document type and number from the filename

- Example: BRD-02_requirements.md → DOC_TYPE=BRD, DOC_NUM=02

  1. Look up the element type code from Section 5

- Example: AC-XXX → Acceptance Criteria → Code 06 - Example: DEC-XXX → Decision → Code 10

  1. Construct the unified ID

- Pattern: {DOC_TYPE}.{DOC_NUM}.{HASH} - Example: AC-001 in BRD-02 → BRD.02.0601 - Example: DEC-01 in ADR-05 → ADR.05.1001

  1. Replace all occurrences # Example sed replacement sed -i 's/### AC-001:/### BRD.02.0601:/g' file.md sed -i 's/### DEC-01:/### ADR.05.1001:/g' file.md
  2. Validate the result # Verify no legacy patterns remain (COMPREHENSIVE check) # Must return empty for all commands grep -E "(AC|FR|BC|BA|QA|BO|NFR|DEC|ALT|CON)-[0-9]+" file.md grep -E "(AC|FR|BC|BA|QA|BO|NFR)(-[A-Za-z0-9]+)+-[0-9]+" file.md

Common Migration Errors

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

12. Source References

Primary Sources

DocumentLocationContent
ID Naming Standardsai_dev_flow/ID_NAMING_STANDARDS.mdDocument IDs, Element IDs, 31 type codes
Threshold Naming Rulesai_dev_flow/THRESHOLD_NAMING_RULES.mdThreshold tags, key formats, categories

Validation Rules Files

Each document type has validation rules with Element ID compliance checks:

Document TypeValidation Rules File
BRDai_dev_flow/01_BRD/BRD_VALIDATION_RULES.md
PRDai_dev_flow/02_PRD/PRD_VALIDATION_RULES.md
EARSai_dev_ssd_flow/03_EARS/EARS_MVP_SCHEMA.yaml
BDDai_dev_flow/04_BDD/BDD_VALIDATION_RULES.md
ADRai_dev_flow/05_ADR/ADR_VALIDATION_RULES.md
SYSai_dev_flow/06_SYS/SYS_VALIDATION_RULES.md
REQai_dev_flow/07_REQ/REQ_VALIDATION_RULES.md
CTRai_dev_ssd_flow/08_CTR/CTR_MVP_SCHEMA.yaml
SPECai_dev_flow/09_SPEC/SPEC_VALIDATION_RULES.md
TSPECai_dev_flow/10_TSPEC/TSPEC_VALIDATION_RULES.md
TASKSai_dev_flow/11_TASKS/TASKS_VALIDATION_RULES.md

Related Skills

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

Diagram Standards

All diagrams MUST use Mermaid syntax. Text-based diagrams (ASCII art, box drawings) are prohibited. See: ai_dev_ssd_flow/DIAGRAM_STANDARDS.md and mermaid-gen skill.

Version History

VersionDateChanges
1.72026-02-27Compound legacy pattern detection: Enhanced Section 11 grep patterns to catch compound/domain-prefixed legacy IDs (e.g., FR-CICD-001, NFR-PERF-002); Added regex (-[A-Za-z0-9]+)* to match optional domain components; Added pattern explanation table and examples; Updated validation step to run comprehensive checks
1.62026-02-10Added Section 8: ISO 8601 Datetime Format Standard - all date fields now require YYYY-MM-DDTHH:MM:SS format for precise drift detection; Deprecated date-only format
1.52026-02-10Added element code 33 (Benefit Statement) for BRD Section 2.5; Updated BRD Quick Lookup to include code 33; Added BRD examples for code 33
1.42026-02-08Added element code 32 (Architecture Topic) for BRD Section 7.2; Updated BRD Quick Lookup to include code 32; Added BRD examples for code 32
1.32026-02-08Fixed layer assignments per LAYER_REGISTRY v1.6: CTR=8, SPEC=9, TSPEC=10, TASKS=11; Removed deprecated IMPL layer; Added TSPEC element codes 40-43; Updated folder paths to use numbered prefixes
1.22026-01-17Updated to 11 active artifact types; Removed legacy element codes 19, 31
1.12025-12-29Added Reserved ID Exemption, REF document pattern, ADR removed patterns, fixed element type codes for BRD
1.02025-12-19Initial release with all 31 element codes and 18 removed patterns

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Gemini CLI

29.24%
按下载量换算110

Claude Code

20.82%
按下载量换算78

OpenCode

17.06%
按下载量换算64

Antigravity

12.8%
按下载量换算48

Codex

8.19%
按下载量换算31

windsurf

3.51%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills