Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

doc-adr-validator文档地址验证器

Agent Skill

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

总安装

594

周安装

25

GitHub Stars

14

下载量

208
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

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

简介

验证 ADR 是否符合第5层架构规范与 YAML 模式要求。

  • 适用于新建或修改后 ADR 的结构合规性强制检查。
  • 执行文件夹嵌套规则、元数据完整性与命名规范验证。
  • 需手动激活调用,仅支持 Codex、Claude 等指定宿主运行。
  • doc-adr-validator 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-adr-validator

Validate Architecture Decision Records (ADR) against Layer 5 schema standards.

Activation

Invoke when user requests validation of ADR documents or after creating/modifying ADR artifacts.

Validation Schema Reference

Schema: ai_dev_ssd_flow/05_ADR/ADR_MVP_SCHEMA.yaml Layer: 5 Artifact Type: ADR

Validation Checklist

0. Folder Structure Validation (BLOCKING)

Nested Folder Rule: ALL ADR documents MUST be in nested folders regardless of size.

Required Structure:

ADR TypeRequired Location
Monolithicdocs/05_ADR/ADR-NN_{slug}/ADR-NN_{slug}.md

Validation:

1. Check document is inside a nested folder: docs/05_ADR/ADR-NN_{slug}/
2. Verify folder name matches ADR ID pattern: ADR-NN_{slug}
3. Verify file name matches folder: ADR-NN_{slug}.md
4. Parent path must be: docs/05_ADR/

Example Valid Structure:

docs/05_ADR/
├── ADR-01_f1_iam/
│   ├── ADR-01_f1_iam.md           ✓ Valid
│   ├── ADR-01.A_audit_report_v001.md
│   ├── ADR-01.R_review_report_v001.md  (legacy)
│   └── .drift_cache.json
├── ADR-02_f2_session/
│   └── ADR-02_f2_session.md       ✓ Valid

Invalid Structure:

docs/05_ADR/
├── ADR-01_f1_iam.md               ✗ NOT in nested folder

Error Codes:

CodeSeverityDescription
ADR-E020ERRORADR not in nested folder (BLOCKING)
ADR-E021ERRORFolder name doesn't match ADR ID
ADR-E022ERRORFile name doesn't match folder name
VAL-H001ERRORDrift cache missing hash for upstream document
VAL-H002ERRORInvalid hash format (must be sha256:<64 hex chars>)

This check is BLOCKING - ADR must pass folder structure validation before other checks proceed.


1. Metadata Validation

Required custom_fields:
  - document_type: ["adr", "template"]
  - artifact_type: "ADR"
  - layer: 5
  - architecture_approaches: [array format]
  - priority: ["primary", "shared", "fallback"]
  - development_status: ["active", "draft", "deprecated", "reference"]

Required tags:
  - adr (or adr-template)
  - layer-5-artifact

Forbidden tag patterns:
  - "^architecture-decision$"
  - "^decision-record$"
  - "^adr-\\d{3}$"

2. Structure Validation

MVP Template Structure (11 Sections):

#SectionRequiredPurpose
1Document ControlMANDATORYMetadata with SYS-Ready Score
2ContextMANDATORYProblem Statement, Technical Context
3DecisionMANDATORYChosen Solution, Key Components, Approach
4Alternatives ConsideredMANDATORYOptions with pros/cons
5ConsequencesMANDATORYPositive/Negative Outcomes, Costs
6Architecture FlowMANDATORYMermaid diagrams, Integration Points
7Implementation AssessmentMANDATORYPhases, Rollback, Monitoring
8VerificationMANDATORYSuccess Criteria, BDD Scenarios
9TraceabilityMANDATORYUpstream/Downstream, Tags, Cross-Links
10Related DecisionsMANDATORYDependencies, Supersessions
11MVP LifecycleMANDATORYIteration guidance

Title (H1): # ADR-NN: Title

Document Control Required Fields:

  • Project Name
  • Document Version
  • Date
  • Document Owner
  • Prepared By
  • Status

File Naming: Pattern: ADR-NNN_descriptive_name.md

3. Content Validation

Status Values:

  • Proposed
  • Accepted
  • Deprecated
  • Superseded

Context Subsections (Required):

  • 4.1 Problem Statement
  • 4.2 Background
  • 4.3 Driving Forces
  • 4.4 Constraints

Decision Subsections (Required):

  • 5.1 Chosen Solution
  • 5.2 Key Components
  • 5.3 Implementation Approach

Consequences Subsections (Required):

  • 7.1 Positive Outcomes
  • 7.2 Negative Outcomes

Architecture Flow:

  • Must contain Mermaid diagram
  • Allowed types: flowchart, sequenceDiagram, stateDiagram-v2

ADR-Ready Score:

  • Minimum threshold: 90%
  • Components: Problem statement, context, decision clarity, consequences, architecture diagram, implementation assessment, traceability

4. Traceability Validation

Layer 5 Cumulative Tags:

  • @brd: BRD.NN.01.SS (required)
  • @prd: PRD.NN.07.SS (required)
  • @ears: EARS.NN.24.SS (required)
  • @bdd: BDD.NN.13.SS (required)

Downstream Expected:

  • SYS requirements
  • REQ documents
  • SPEC documents

Same-Type References:

  • @related-adr: ADR-NN
  • @supersedes: ADR-NN
  • @depends-adr: ADR-NN

Error Codes

CodeSeverityDescription
ADR-E001errorMissing required tag 'adr'
ADR-E002errorMissing required tag 'layer-5-artifact'
ADR-E003errorInvalid document_type
ADR-E004errorInvalid architecture_approaches format
ADR-E005errorForbidden tag pattern detected
ADR-E006errorMissing required section
ADR-E007errorMultiple H1 headings detected
ADR-E008errorMissing Context section (Section 4)
ADR-E009errorMissing Decision section (Section 5)
ADR-E010errorMissing Consequences section (Section 7)
ADR-E011errorContext missing Problem Statement subsection
ADR-E012errorDecision missing Chosen Solution subsection
ADR-E013errorConsequences missing outcomes
ADR-E014warningFile name does not match format
ADR-W001warningMissing Architecture Flow Mermaid diagram
ADR-W002warningContext missing Constraints subsection
ADR-W003warningMissing upstream tags (@prd, @ears, @bdd)
ADR-W004warningImplementation Assessment missing Complexity
ADR-W005warningSYS-Ready Score below 90%
ADR-W006warningRequirements Satisfied table missing
ADR-I001infoConsider adding Alternatives Considered
ADR-I002infoConsider adding Security Considerations
ADR-I003infoConsider adding Rollback Plan

Validation Commands

# Validate single ADR document
python ai_dev_ssd_flow/05_ADR/scripts/validate_adr.py docs/05_ADR/ADR-001_example.md

# Validate all ADR documents
python ai_dev_ssd_flow/05_ADR/scripts/validate_adr.py docs/05_ADR/

# Check with verbose output
python ai_dev_ssd_flow/05_ADR/scripts/validate_adr.py docs/05_ADR/ --verbose

Validation Workflow

  1. Parse YAML frontmatter
  2. Check required metadata fields
  3. Validate tag taxonomy
  4. Verify 4-part structure
  5. Validate required sections (1-10)
  6. Check Context subsections
  7. Check Decision subsections
  8. Check Consequences subsections
  9. Verify Mermaid diagram presence
  10. Validate upstream references
  11. Calculate SYS-Ready Score
  12. Verify file naming convention
  13. Generate validation report

Integration

  • Invoked by: doc-flow, doc-adr (post-creation)
  • Feeds into: trace-check (cross-document validation)
  • Reports to: quality-advisor

Output Format

ADR Validation Report
=====================
Document: ADR-001_example.md
Status: PASS/FAIL

Structure:
- Context: Complete/Incomplete
- Decision: Complete/Incomplete
- Consequences: Complete/Incomplete
- Architecture Flow: Present/Missing

Errors: N
Warnings: N
Info: N

[Details listed by severity]

Version History

VersionDateChangesAuthor
1.32026-02-27Migrated frontmatter to metadata; normalized schema/command references to ai_dev_ssd_flow/05_ADR; updated valid structure example for preferred ADR-NN.A_audit_report_vNNN.md with legacy reviewer compatibilitySystem
1.22026-02-26Updated structure validation to 11-section MVP template (aligned with ADR-MVP-TEMPLATE.md v1.1)
1.12026-02-11Nested Folder Rule: Added Section 0 Folder Structure Validation (BLOCKING); ADR must be in docs/05_ADR/ADR-NN_{slug}/ folders; Added error codes ADR-E020, ADR-E021, ADR-E022
1.02026-02-08Initial validator skill definition with YAML frontmatterSystem

Implementation Plan Consistency (IPLAN-004)

  • Treat plan-derived outputs as valid source mode and verify intent preservation from implementation plan scope/objectives.
  • Validate upstream autopilot precedence assumption: --iplan > --ref > --prompt.
  • Flag objective/scope conflicts between plan context and artifact output as blocking issues requiring clarification.
  • Do not introduce legacy fallback paths such as docs-v2.0/00_REF.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.14%
按下载量换算75

Claude

31.2%
按下载量换算65

Cursor

18.68%
按下载量换算39

Gemini CLI

8.67%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills