Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问clear审计通过

doc-validator文档验证器

Agent Skill

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

总安装

1,388

周安装

59

GitHub Stars

14

下载量

486
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

用于跨文档一致性校验,识别 SDD 框架下的引用断裂与孤立工件。

  • 支持双向链接验证、累积标签层级和全局 ID 去重检查。
  • 监控项目级可追溯性矩阵完整性,输出交叉引用报告。
  • 单文档校验请使用专用层验证器,本技能专注多文档关联分析。
  • doc-validator 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-validator

Cross-document validation for SDD framework compliance. For single-document validation, use the dedicated layer validators.

Purpose

Validates relationships and consistency ACROSS documents in the SDD framework.

Core Functions:

  • Identifies broken cross-references between documents
  • Detects orphaned artifacts (documents with no upstream references)
  • Validates bidirectional link consistency
  • Checks cumulative tagging hierarchy across layers
  • Detects duplicate IDs across documents
  • Validates traceability matrix completeness
  • Monitors project-wide consistency

This Skill Does NOT:

  • Validate single document structure (use {TYPE}_VALIDATION_RULES.md in each artifact directory)
  • Validate single document metadata (use {TYPE}_VALIDATION_RULES.md in each artifact directory)
  • Validate single document content (use {TYPE}_VALIDATION_RULES.md in each artifact directory)

Dedicated Layer Validators:

LayerArtifactValidation Rules File
1BRDai_dev_flow/BRD/BRD_VALIDATION_RULES.md
2PRDai_dev_flow/PRD/PRD_VALIDATION_RULES.md
3EARSai_dev_flow/EARS/EARS_VALIDATION_RULES.md
4BDDai_dev_flow/BDD/BDD_VALIDATION_RULES.md
5ADRai_dev_flow/ADR/ADR_VALIDATION_RULES.md
6SYSai_dev_flow/SYS/SYS_VALIDATION_RULES.md
7REQai_dev_flow/REQ/REQ_VALIDATION_RULES.md
8IMPLai_dev_flow/IMPL/IMPL_VALIDATION_RULES.md
8CTRai_dev_ssd_flow/08_CTR/CTR_MVP_SCHEMA.yaml
10SPECai_dev_flow/10_SPEC/SPEC_VALIDATION_RULES.md
11TASKSai_dev_flow/11_TASKS/TASKS_VALIDATION_RULES.md

ID Format Validation: For unified ID format validation (3-segment element IDs), use doc-naming skill.

Reference: ID_NAMING_STANDARDS.md

Complexity: Medium (cross-reference analysis across multiple documents)

Resource Requirements:

  • CPU: Moderate (file parsing, graph traversal)
  • Memory: 200-500MB for 100-200 documents
  • Disk: Minimal (read-only validation)
  • Network: None (local file operations only)

Failure Modes:

  • Broken cross-reference: Reports links to non-existent documents
  • Missing bidirectional link: Reports one-way references
  • Orphaned artifact: Reports documents with no upstream connections
  • Duplicate ID: Reports ID conflicts across documents
  • Traceability gap: Reports missing required upstream tags

When to Use This Skill

Use doc-validator when:

  • Validating relationships BETWEEN documents
  • Checking project-wide traceability
  • Detecting orphaned artifacts
  • Validating bidirectional link consistency
  • Checking cumulative tagging across layers
  • Detecting duplicate IDs across documents
  • Before major releases (project-wide validation)

Do NOT use doc-validator when:

  • Validating a single document's structure (use {TYPE}_VALIDATION_RULES.md)
  • Validating a single document's metadata (use {TYPE}_VALIDATION_RULES.md)
  • Validating a single document's content (use {TYPE}_VALIDATION_RULES.md)
  • Validating ID format compliance (use doc-naming skill)
  • For detailed traceability analysis (use trace-check skill)

Skill Inputs

InputTypeDescriptionExample/Default
docs_pathRequiredPath to documentation directory{project_root}/docs/
scopeOptionalValidation scope"cross-document" (default), "traceability", "full"
strictnessOptionalValidation strictness level"strict" (default), "permissive"
report_formatOptionalOutput report format"markdown" (default), "json", "text"

Scopes:

  • cross-document: Links, references, bidirectional consistency
  • traceability: Cumulative tags, upstream/downstream validation
  • full: All cross-document validations

Cross-Document Validators

[IMPLEMENTED] Validation Scripts

CategoryScriptDescriptionError Codes
LINKSvalidate_links.pyMarkdown link resolutionXDOC-E001, XDOC-E004
CROSS-REFvalidate_cross_document.pyCross-reference validationXDOC-E001, XDOC-E003
SECTIONvalidate_section_count.pySection file count vs metadataSEC-E001, SEC-E002, SEC-E003, SEC-W001
DIAGRAMvalidate_diagram_consistency.pyMermaid diagrams match proseDIAG-E001, DIAG-E002, DIAG-W001, DIAG-W002
TERMvalidate_terminology.pyTerminology/acronym consistencyTERM-E001, TERM-E002, TERM-W001, TERM-W002
COUNTvalidate_counts.pyStated counts match itemized totalsCOUNT-E001, COUNT-W001
FWDREFvalidate_forward_references.pyPrevent upstream to downstream ID refsFWDREF-E001, FWDREF-E002, FWDREF-W001
TAGSvalidate_tags_against_docs.pyCumulative tag complianceXDOC-E002
IDSvalidate_requirement_ids.pyDuplicate ID detectionXDOC-E006
MATRIXvalidate_traceability_matrix.pyMatrix validationXDOC-W001

Auto-Fix Support: SECTION, TERM, COUNT validators support --auto-fix flag.

Reference: See VALIDATION_STANDARDS.md for complete error code registry.

[IMPLEMENTED] Support Scripts

ScriptPurposeStatus
validate_all.pyUnified orchestrator for all validators[IMPLEMENTED]
validate_cross_document.pyCross-reference validation[IMPLEMENTED]
validate_links.pyMarkdown link resolution[IMPLEMENTED]
validate_tags_against_docs.pyCumulative tag compliance[IMPLEMENTED]
validate_traceability_matrix.pyMatrix validation[IMPLEMENTED]
error_codes.pyStandardized error code registry[IMPLEMENTED]

Validation Workflow

graph TD
    A[Input: Documentation Directory] --> B[Collect All Documents]
    B --> C[Build Document Graph]
    C --> D{Cross-Reference Check}
    D -->|Broken| E[XDOC-E001: Broken Link]
    D -->|Valid| F{Bidirectional Check}
    F -->|Missing| G[XDOC-E003: One-Way Reference]
    F -->|Valid| H{Anchor Check}
    H -->|Missing| I[XDOC-E004: Anchor Not Found]
    H -->|Valid| J{Orphan Check}
    J -->|Orphaned| K[XDOC-E005: Orphaned Artifact]
    J -->|Connected| L{Cumulative Tags}
    L -->|Missing| M[XDOC-E002: Missing Tag]
    L -->|Complete| N{Duplicate IDs}
    N -->|Found| O[XDOC-E006: Duplicate ID]
    N -->|Unique| P[Validation PASS]

    E --> Q[Validation Report]
    G --> Q
    I --> Q
    K --> Q
    M --> Q
    O --> Q
    P --> Q

Error Codes Reference

Cross-Document Errors (XDOC)

CodeMessageSeverityFix
XDOC-E001Referenced ID/file not foundERRORVerify target document exists
XDOC-E002Missing cumulative tagERRORAdd required upstream tag
XDOC-E003Bidirectional link missingERRORAdd reverse reference
XDOC-E004Anchor not found in targetERRORFix anchor reference
XDOC-E005Orphaned artifactERRORAdd upstream reference
XDOC-E006Duplicate ID detectedERRORUse unique IDs across project
XDOC-W001Weak traceabilityWARNINGAdd direct links
XDOC-W002Unused artifactWARNINGConsider removal or linking

Section Consistency Errors (SEC)

CodeMessageSeverityFix
SEC-E001Section count mismatchERRORUpdate metadata or add sections
SEC-E002Missing referenced sectionERRORCreate referenced section file
SEC-E003Section ordering invalidERRORFix section numbering
SEC-W001Empty section detectedWARNINGAdd content or remove section

Diagram Consistency Errors (DIAG)

CodeMessageSeverityFix
DIAG-E001Diagram references missing entityERRORAdd entity to prose
DIAG-E002Diagram syntax errorERRORFix Mermaid syntax
DIAG-W001Diagram outdated vs proseWARNINGUpdate diagram
DIAG-W002Prose entity missing from diagramWARNINGAdd to diagram

Terminology Errors (TERM)

CodeMessageSeverityFix
TERM-E001Undefined term usedERRORAdd to glossary
TERM-E002Conflicting term definitionsERRORStandardize definition
TERM-W001Inconsistent term usageWARNINGUse canonical form
TERM-W002Acronym without expansionWARNINGAdd first-use expansion

Count Consistency Errors (COUNT)

CodeMessageSeverityFix
COUNT-E001Stated count differs from actualERRORUpdate count or items
COUNT-W001Count format non-standardWARNINGUse standard count format

Forward Reference Errors (FWDREF)

CodeMessageSeverityFix
FWDREF-E001Upstream references downstream IDERRORRemove forward reference
FWDREF-E002Circular reference detectedERRORBreak reference cycle
FWDREF-W001Implicit forward referenceWARNINGMake explicit or remove

Cumulative Tag Validation

Each layer must include ALL upstream tags per the SDD hierarchy:

LayerArtifactRequired Upstream Tags
1BRDNone (top level)
2PRD@brd
3EARS@brd, @prd
4BDD@brd, @prd, @ears
5ADR@brd, @prd, @ears, @bdd
6SYS@brd through @adr (5 tags)
7REQ@brd through @sys (6 tags)
8IMPL@brd through @req (7 tags)
9CTR@brd through @req (7 tags)
10SPEC@brd through @req (7 tags)
11TASKS@brd through @spec (8 tags)

Validation Script: validate_tags_against_docs.py


Quality Gates

Severity Levels

LevelCodeExit CodeBlocks CommitDescription
ERRORE2YesCritical issue, must fix
WARNINGW1--strict onlyShould fix
INFOI0NoSuggestion

Project-Wide Gates

GateThresholdMeasurement
Zero Cross-Ref Errors0Count of XDOC-E level issues
Orphan Limit0Count of orphaned artifacts
Bidirectional Compliance100%Links with reverse references
Cumulative Tag Compliance100%Documents with complete upstream tags
Duplicate ID Count0Duplicate IDs across project

Integration Points

With Layer Validators

  • Single-document validation delegated to doc-{type}-validator skills
  • Cross-document validation runs after layer validators pass
  • Combined quality reports

With doc-flow

  • Invoked after artifact generation for cross-document checks
  • Blocks workflow on cross-reference errors
  • Provides link fix suggestions

With trace-check

  • Complementary validation (cross-refs vs. detailed traceability)
  • Shared cumulative tag validation logic
  • Combined traceability reports

With code-review

  • Post-commit cross-document validation
  • Quality gate enforcement

Usage Examples

Validate Cross-References

python ai_dev_flow/scripts/validate_cross_document.py docs/ --strict

Validate All Links

python ai_dev_flow/scripts/validate_links.py docs/

Validate Cumulative Tags

python ai_dev_flow/scripts/validate_tags_against_docs.py \
  --source docs/ \
  --validate-cumulative \
  --strict

Detect Duplicate IDs

python ai_dev_flow/scripts/validate_requirement_ids.py docs/ --check-duplicates

Full Cross-Document Validation

python ai_dev_flow/scripts/validate_all.py docs/ --scope cross-document

Validation Report Format

=== Cross-Document Validation Report ===

Scope: docs/
Status: FAILED

Cross-Reference Errors (3):
- [XDOC-E001] REQ-02_payments.md references non-existent SPEC-05_gateway.yaml
  → Create target document or fix reference

- [XDOC-E003] ADR-03_caching.md linked from SYS-01 but no reverse link
  → Add @sys reference to ADR-03

- [XDOC-E005] IMPL-04_batch.md has no upstream references
  → Add @req tag to connect to requirements

Cumulative Tag Warnings (2):
- [XDOC-E002] TASKS-02 missing required @adr tag
  → Add @adr: ADR-NN to traceability section

- [XDOC-E002] TASKS-01 missing required @spec tag
  → Add @spec: SPEC-NN to traceability section

Summary:
- Documents analyzed: 45
- Cross-reference errors: 3
- Orphaned artifacts: 1
- Bidirectional compliance: 94% (32/34)
- Cumulative tag compliance: 96% (43/45)

Script Reference

Cross-Document Validation Scripts (Location: ai_dev_flow/scripts/)

ScriptPurposeUsage
validate_all.pyUnified orchestratorpython validate_all.py <dir> --scope cross-document
validate_cross_document.pyCross-referencespython validate_cross_document.py <dir>
validate_links.pyLink resolutionpython validate_links.py <dir>
validate_tags_against_docs.pyCumulative tagspython validate_tags_against_docs.py <dir>
validate_traceability_matrix.pyMatrix validationpython validate_traceability_matrix.py <dir>
validate_requirement_ids.pyDuplicate IDspython validate_requirement_ids.py <dir>
validate_section_count.pySection consistencypython validate_section_count.py <dir>
validate_diagram_consistency.pyDiagram vs prosepython validate_diagram_consistency.py <dir>
validate_terminology.pyTerm consistencypython validate_terminology.py <dir>
validate_counts.pyCount consistencypython validate_counts.py <dir>
validate_forward_references.pyForward refspython validate_forward_references.py <dir>
error_codes.pyError code registry(library - import in validators)

Version History

VersionDateChangesAuthor
3.2.02026-02-08Added YAML frontmatter version/last_updated fields; standardized Version History formatSystem
3.1.02025-12-29Updated layer validator references to {TYPE}_VALIDATION_RULES.md files; added doc-naming skill referenceSystem
3.0.02025-12-20Refactored to cross-document validation only; removed single-document validationSystem
2.0.02025-12-19Complete overhaul; restructured following trace-check pattern; standardized error codesSystem
1.0.02025-11-01Initial releaseSystem

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Gemini CLI

31.6%
按下载量换算154

Claude Code

23.66%
按下载量换算115

Antigravity

16.78%
按下载量换算82

OpenCode

13.67%
按下载量换算66

Codex

8.53%
按下载量换算41

windsurf

3.52%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills