doc-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

doc-review

doc-review

Description: Multi-agent documentation quality review system that analyzes a single file or all files in a folder for data inconsistencies, reference errors, typos, and unclear terminology.
Category: Quality Assurance
Complexity: High (multi-agent coordination)

描述:多代理文档质量审查系统,可分析单个文件或文件夹中的所有文件,检测数据不一致、引用错误、拼写错误以及不明确的术语。
分类:质量保障
复杂度:高(多代理协同)

Purpose

用途

Comprehensive documentation quality review using specialized sub-agents to detect:
  • Data inconsistencies: Contradictory information, wrong data, confusing content
  • Reference errors: Broken links, invalid cross-references, missing anchors
  • Typos and spelling: Misspellings, grammatical errors, formatting issues
  • Terminology issues: Undefined terms, inconsistent naming, ambiguous language

通过专业子代理进行全面的文档质量审查,检测以下问题:
  • 数据不一致:矛盾信息、错误数据、易混淆内容
  • 引用错误:失效链接、无效交叉引用、缺失锚点
  • 拼写错误:拼写失误、语法错误、格式问题
  • 术语问题:未定义术语、命名不一致、歧义语言

Analysis Modes

分析模式

ModeInputBehavior
Single File
/doc-review path/to/file.md
Analyzes one file in depth
Folder
/doc-review path/to/folder/
Analyzes ALL files in folder together, including cross-file consistency
Folder mode provides additional cross-file checks:
  • Terminology consistency across all documents
  • Cross-document reference validation
  • Duplicate content detection across files
  • Consistent naming conventions

模式输入行为
单个文件
/doc-review path/to/file.md
深入分析单个文件
文件夹
/doc-review path/to/folder/
分析文件夹中的所有文件,包括跨文件一致性检查
文件夹模式提供额外的跨文件检查:
  • 所有文档间的术语一致性
  • 跨文档引用验证
  • 文件间重复内容检测
  • 一致的命名规范

When to Use This Skill

何时使用该Skill

Use doc-review when:
  • Reviewing documentation before publication
  • Validating files after batch creation
  • Performing quality audits on markdown/YAML files
  • Checking cross-reference integrity
  • Pre-commit quality validation
  • Reviewing a single file or entire folder
Do NOT use when:
  • Full traceability validation needed (use trace-check)
  • Code-specific review needed (use code-review)
  • Single document structure validation (use doc-*-validator skills)

在以下场景使用doc-review
  • 发布前审查文档
  • 批量创建后验证文件
  • 对markdown/YAML文件执行质量审计
  • 检查交叉引用完整性
  • 提交前的质量验证
  • 审查单个文件或整个文件夹
请勿在以下场景使用
  • 需要完整可追溯性验证(使用trace-check)
  • 需要针对代码的审查(使用code-review)
  • 需要单个文档结构验证(使用doc-*-validator类Skill)

Skill Inputs

Skill输入参数

InputTypeRequiredDescriptionExample
pathstringYesSingle file path or folder path to review
ai_dev_flow/PRD/PRD-001.md
,
docs/EARS/
scopestringNoReview scope
"full"
(default),
"quick"
,
"deep"
focusarrayNoSpecific checks to run
["data", "references", "typos", "terms"]
report_formatstringNoOutput format
"markdown"
(default),
"json"
,
"summary"
auto_fixbooleanNoAttempt automatic fixes
false
(default)

输入项类型是否必填描述示例
path字符串要审查的单个文件路径或文件夹路径
ai_dev_flow/PRD/PRD-001.md
,
docs/EARS/
scope字符串审查范围
"full"
(默认),
"quick"
,
"deep"
focus数组要执行的特定检查项
["data", "references", "typos", "terms"]
report_format字符串输出格式
"markdown"
(默认),
"json"
,
"summary"
auto_fix布尔值尝试自动修复
false
(默认)

Sub-Agent Architecture

子代理架构

The skill coordinates 4 specialized sub-agents that run in parallel:
mermaid
graph TD
    A[doc-review Skill] --> B[Input: File or Folder]
    B --> C[File Discovery]
    C --> D[Parallel Sub-Agents]

    D --> E[Data Consistency Agent]
    D --> F[Reference Checker Agent]
    D --> G[Typo Detection Agent]
    D --> H[Terminology Agent]

    E --> I[Merge Results]
    F --> I
    G --> I
    H --> I

    I --> J[Generate Report]
    J --> K[Output: Quality Report]
该Skill会协调4个专业子代理并行运行:
mermaid
graph TD
    A[doc-review Skill] --> B[Input: File or Folder]
    B --> C[File Discovery]
    C --> D[Parallel Sub-Agents]

    D --> E[Data Consistency Agent]
    D --> F[Reference Checker Agent]
    D --> G[Typo Detection Agent]
    D --> H[Terminology Agent]

    E --> I[Merge Results]
    F --> I
    G --> I
    H --> I

    I --> J[Generate Report]
    J --> K[Output: Quality Report]

Sub-Agent 1: Data Consistency Agent

子代理1:数据一致性Agent

Purpose: Detect inconsistent, wrong, or confusing information
Checks:
  • Contradictory statements within same document
  • Numerical inconsistencies (counts, dates, versions)
  • Status field mismatches (metadata vs content)
  • Duplicate content with variations
  • Logical contradictions
  • Outdated information markers
Detection Patterns:
yaml
data_consistency_checks:
  count_mismatch:
    pattern: "\\d+ (requirements|items|sections)"
    validate: "count matches actual items"
    error_code: "DATA-E001"

  status_mismatch:
    pattern: "Status:\\s*(Draft|Approved|Implemented)"
    validate: "matches content maturity"
    error_code: "DATA-E002"

  date_inconsistency:
    pattern: "\\d{4}-\\d{2}-\\d{2}"
    validate: "Last Updated >= Created"
    error_code: "DATA-E003"

  version_format:
    pattern: "Version:\\s*[\\d.]+"
    validate: "semantic versioning compliance"
    error_code: "DATA-E004"

  duplicate_content:
    pattern: "similar paragraphs >80%"
    validate: "intentional or error"
    error_code: "DATA-W001"
用途:检测不一致、错误或易混淆的信息
检查项
  • 同一文档内的矛盾陈述
  • 数值不一致(数量、日期、版本)
  • 状态字段不匹配(元数据与内容)
  • 存在差异的重复内容
  • 逻辑矛盾
  • 过时信息标记
检测规则
yaml
data_consistency_checks:
  count_mismatch:
    pattern: "\\d+ (requirements|items|sections)"
    validate: "count matches actual items"
    error_code: "DATA-E001"

  status_mismatch:
    pattern: "Status:\\s*(Draft|Approved|Implemented)"
    validate: "matches content maturity"
    error_code: "DATA-E002"

  date_inconsistency:
    pattern: "\\d{4}-\\d{2}-\\d{2}"
    validate: "Last Updated >= Created"
    error_code: "DATA-E003"

  version_format:
    pattern: "Version:\\s*[\\d.]+"
    validate: "semantic versioning compliance"
    error_code: "DATA-E004"

  duplicate_content:
    pattern: "similar paragraphs >80%"
    validate: "intentional or error"
    error_code: "DATA-W001"

Sub-Agent 2: Reference Checker Agent

子代理2:引用检查Agent

Purpose: Validate all links, references, and cross-document connections
Checks:
  • Markdown link resolution (
    [text](path#anchor)
    )
  • Internal anchor existence (
    #section-id
    )
  • Cross-document reference validity
  • Relative path correctness
  • External URL accessibility (optional)
  • Traceability tag format (
    @brd:
    ,
    @prd:
    , etc.)
Detection Patterns:
yaml
reference_checks:
  broken_link:
    pattern: "\\[.*?\\]\\(.*?\\)"
    validate: "target file exists"
    error_code: "REF-E001"

  invalid_anchor:
    pattern: "\\[.*?\\]\\(.*?#.*?\\)"
    validate: "anchor exists in target"
    error_code: "REF-E002"

  orphan_anchor:
    pattern: "^#{1,6}\\s+.*$"
    validate: "has incoming references"
    error_code: "REF-W001"

  relative_path:
    pattern: "\\.\\./|\\./"
    validate: "path resolves correctly"
    error_code: "REF-E003"

  tag_format:
    pattern: "@(brd|prd|ears|bdd|adr|sys|req|spec|impl|ctr|tasks):"
    validate: "follows TYPE.NN.TT.SS format"
    error_code: "REF-E004"

  circular_reference:
    pattern: "A→B→...→A"
    validate: "no circular chains"
    error_code: "REF-E005"
用途:验证所有链接、引用和跨文档关联
检查项
  • Markdown链接解析(
    [text](path#anchor)
  • 内部锚点存在性(
    #section-id
  • 跨文档引用有效性
  • 相对路径正确性
  • 外部URL可达性(可选)
  • 可追溯性标签格式(
    @brd:
    ,
    @prd:
    等)
检测规则
yaml
reference_checks:
  broken_link:
    pattern: "\\[.*?\\]\\(.*?\\)"
    validate: "target file exists"
    error_code: "REF-E001"

  invalid_anchor:
    pattern: "\\[.*?\\]\\(.*?#.*?\\)"
    validate: "anchor exists in target"
    error_code: "REF-E002"

  orphan_anchor:
    pattern: "^#{1,6}\\s+.*$"
    validate: "has incoming references"
    error_code: "REF-W001"

  relative_path:
    pattern: "\\.\\./|\\./"
    validate: "path resolves correctly"
    error_code: "REF-E003"

  tag_format:
    pattern: "@(brd|prd|ears|bdd|adr|sys|req|spec|impl|ctr|tasks):"
    validate: "follows TYPE.NN.TT.SS format"
    error_code: "REF-E004"

  circular_reference:
    pattern: "A→B→...→A"
    validate: "no circular chains"
    error_code: "REF-E005"

Sub-Agent 3: Typo Detection Agent

子代理3:拼写检测Agent

Purpose: Find spelling errors, grammatical issues, and formatting problems
Checks:
  • Common misspellings
  • Technical term spelling
  • Capitalization inconsistencies
  • Punctuation errors
  • Whitespace issues
  • Markdown syntax errors
Detection Patterns:
yaml
typo_checks:
  common_misspellings:
    dictionary: "en_US + technical_terms"
    error_code: "TYPO-E001"

  case_inconsistency:
    pattern: "same term, different cases"
    examples: ["GitHub/github", "API/api", "JavaScript/Javascript"]
    error_code: "TYPO-W001"

  double_words:
    pattern: "\\b(\\w+)\\s+\\1\\b"
    error_code: "TYPO-E002"

  markdown_syntax:
    patterns:
      - "unclosed_code_block"
      - "mismatched_brackets"
      - "broken_table"
    error_code: "TYPO-E003"

  punctuation:
    patterns:
      - "double_period: \\.\\."
      - "space_before_comma: \\s,"
      - "missing_space_after_period: \\.[A-Z]"
    error_code: "TYPO-W002"

  whitespace:
    patterns:
      - "trailing_whitespace"
      - "multiple_blank_lines"
      - "tabs_vs_spaces"
    error_code: "TYPO-W003"
用途:查找拼写错误、语法问题和格式问题
检查项
  • 常见拼写错误
  • 技术术语拼写
  • 大小写不一致
  • 标点错误
  • 空白字符问题
  • Markdown语法错误
检测规则
yaml
typo_checks:
  common_misspellings:
    dictionary: "en_US + technical_terms"
    error_code: "TYPO-E001"

  case_inconsistency:
    pattern: "same term, different cases"
    examples: ["GitHub/github", "API/api", "JavaScript/Javascript"]
    error_code: "TYPO-W001"

  double_words:
    pattern: "\\b(\\w+)\\s+\\1\\b"
    error_code: "TYPO-E002"

  markdown_syntax:
    patterns:
      - "unclosed_code_block"
      - "mismatched_brackets"
      - "broken_table"
    error_code: "TYPO-E003"

  punctuation:
    patterns:
      - "double_period: \\.\\."
      - "space_before_comma: \\s,"
      - "missing_space_after_period: \\.[A-Z]"
    error_code: "TYPO-W002"

  whitespace:
    patterns:
      - "trailing_whitespace"
      - "multiple_blank_lines"
      - "tabs_vs_spaces"
    error_code: "TYPO-W003"

Sub-Agent 4: Terminology Agent

子代理4:术语检查Agent

Purpose: Identify unclear, undefined, or inconsistent terminology
Checks:
  • Undefined acronyms
  • Inconsistent term usage
  • Ambiguous language
  • Jargon without definition
  • Conflicting definitions
  • Domain-specific term validation
Detection Patterns:
yaml
terminology_checks:
  undefined_acronym:
    pattern: "\\b[A-Z]{2,}\\b"
    validate: "defined on first use or in glossary"
    error_code: "TERM-E001"

  inconsistent_naming:
    examples:
      - "user/User/USER"
      - "login/sign-in/authenticate"
      - "config/configuration/settings"
    error_code: "TERM-E002"

  ambiguous_terms:
    flagged_words:
      - "it"
      - "this"
      - "that"
      - "they"
    context: "unclear antecedent"
    error_code: "TERM-W001"

  subjective_qualifiers:
    flagged_words:
      - "easy"
      - "simple"
      - "fast"
      - "efficient"
      - "powerful"
    context: "lacks quantification"
    error_code: "TERM-W002"

  undefined_jargon:
    pattern: "domain-specific terms without definition"
    error_code: "TERM-W003"

  conflicting_definitions:
    pattern: "same term, different meanings"
    error_code: "TERM-E003"

用途:识别不清晰、未定义或不一致的术语
检查项
  • 未定义的首字母缩写
  • 不一致的术语使用
  • 歧义语言
  • 未定义的行话
  • 冲突的定义
  • 特定领域术语验证
检测规则
yaml
terminology_checks:
  undefined_acronym:
    pattern: "\\b[A-Z]{2,}\\b"
    validate: "defined on first use or in glossary"
    error_code: "TERM-E001"

  inconsistent_naming:
    examples:
      - "user/User/USER"
      - "login/sign-in/authenticate"
      - "config/configuration/settings"
    error_code: "TERM-E002"

  ambiguous_terms:
    flagged_words:
      - "it"
      - "this"
      - "that"
      - "they"
    context: "unclear antecedent"
    error_code: "TERM-W001"

  subjective_qualifiers:
    flagged_words:
      - "easy"
      - "simple"
      - "fast"
      - "efficient"
      - "powerful"
    context: "lacks quantification"
    error_code: "TERM-W002"

  undefined_jargon:
    pattern: "domain-specific terms without definition"
    error_code: "TERM-W003"

  conflicting_definitions:
    pattern: "same term, different meanings"
    error_code: "TERM-E003"

Workflow Execution

工作流执行

Step 1: File Discovery

步骤1:文件发现

python
undefined
python
undefined

Expand path/pattern to file list

Expand path/pattern to file list

def discover_files(path_pattern): if is_glob_pattern(path_pattern): return glob.glob(path_pattern, recursive=True) elif os.path.isfile(path_pattern): return [path_pattern] elif os.path.isdir(path_pattern): return glob.glob(f"{path_pattern}/**/*.md", recursive=True) else: raise FileNotFoundError(f"Path not found: {path_pattern}")
undefined
def discover_files(path_pattern): if is_glob_pattern(path_pattern): return glob.glob(path_pattern, recursive=True) elif os.path.isfile(path_pattern): return [path_pattern] elif os.path.isdir(path_pattern): return glob.glob(f"{path_pattern}/**/*.md", recursive=True) else: raise FileNotFoundError(f"Path not found: {path_pattern}")
undefined

Step 2: Launch Parallel Sub-Agents

步骤2:启动并行子代理

python
undefined
python
undefined

Launch 4 sub-agents in parallel using Task tool

Launch 4 sub-agents in parallel using Task tool

async def run_review(files, scope, focus): tasks = []
if "data" in focus or focus == "all":
    tasks.append(Task(
        subagent_type="general-purpose",
        prompt=f"Review files for data consistency: {files}",
        description="Data consistency check"
    ))

if "references" in focus or focus == "all":
    tasks.append(Task(
        subagent_type="general-purpose",
        prompt=f"Validate all references and links: {files}",
        description="Reference validation"
    ))

if "typos" in focus or focus == "all":
    tasks.append(Task(
        subagent_type="general-purpose",
        prompt=f"Check for typos and formatting: {files}",
        description="Typo detection"
    ))

if "terms" in focus or focus == "all":
    tasks.append(Task(
        subagent_type="general-purpose",
        prompt=f"Validate terminology consistency: {files}",
        description="Terminology review"
    ))

# Run all tasks in parallel
results = await asyncio.gather(*tasks)
return merge_results(results)
undefined
async def run_review(files, scope, focus): tasks = []
if "data" in focus or focus == "all":
    tasks.append(Task(
        subagent_type="general-purpose",
        prompt=f"Review files for data consistency: {files}",
        description="Data consistency check"
    ))

if "references" in focus or focus == "all":
    tasks.append(Task(
        subagent_type="general-purpose",
        prompt=f"Validate all references and links: {files}",
        description="Reference validation"
    ))

if "typos" in focus or focus == "all":
    tasks.append(Task(
        subagent_type="general-purpose",
        prompt=f"Check for typos and formatting: {files}",
        description="Typo detection"
    ))

if "terms" in focus or focus == "all":
    tasks.append(Task(
        subagent_type="general-purpose",
        prompt=f"Validate terminology consistency: {files}",
        description="Terminology review"
    ))

# Run all tasks in parallel
results = await asyncio.gather(*tasks)
return merge_results(results)
undefined

Step 3: Merge and Prioritize Results

步骤3:合并并优先级排序结果

python
def merge_results(agent_results):
    merged = {
        "errors": [],      # Severity: ERROR (must fix)
        "warnings": [],    # Severity: WARNING (should fix)
        "info": [],        # Severity: INFO (consider)
        "stats": {}
    }

    for result in agent_results:
        merged["errors"].extend(result.get("errors", []))
        merged["warnings"].extend(result.get("warnings", []))
        merged["info"].extend(result.get("info", []))

    # Deduplicate and sort by severity
    merged["errors"] = deduplicate(merged["errors"])
    merged["warnings"] = deduplicate(merged["warnings"])

    return merged
python
def merge_results(agent_results):
    merged = {
        "errors": [],      # Severity: ERROR (must fix)
        "warnings": [],    # Severity: WARNING (should fix)
        "info": [],        # Severity: INFO (consider)
        "stats": {}
    }

    for result in agent_results:
        merged["errors"].extend(result.get("errors", []))
        merged["warnings"].extend(result.get("warnings", []))
        merged["info"].extend(result.get("info", []))

    # Deduplicate and sort by severity
    merged["errors"] = deduplicate(merged["errors"])
    merged["warnings"] = deduplicate(merged["warnings"])

    return merged

Step 4: Generate Report

步骤4:生成报告

Output format based on
report_format
parameter.

根据
report_format
参数指定的格式输出结果。

Error Codes Reference

错误码参考

Data Consistency (DATA)

数据一致性(DATA)

CodeSeverityDescriptionAuto-Fix
DATA-E001ERRORCount mismatch (stated vs actual)Yes
DATA-E002ERRORStatus/content maturity mismatchManual
DATA-E003ERRORDate inconsistencyYes
DATA-E004ERRORInvalid version formatYes
DATA-W001WARNINGPotential duplicate contentManual
DATA-W002WARNINGOutdated information markerManual
错误码严重程度描述自动修复
DATA-E001ERROR数量不匹配(声明值与实际值)
DATA-E002ERROR状态/内容成熟度不匹配手动
DATA-E003ERROR日期不一致
DATA-E004ERROR无效版本格式
DATA-W001WARNING潜在重复内容手动
DATA-W002WARNING过时信息标记手动

References (REF)

引用(REF)

CodeSeverityDescriptionAuto-Fix
REF-E001ERRORBroken link (file not found)Manual
REF-E002ERRORInvalid anchorManual
REF-E003ERRORRelative path errorYes
REF-E004ERRORInvalid traceability tag formatYes
REF-E005ERRORCircular reference detectedManual
REF-W001WARNINGOrphan anchor (no incoming refs)Manual
错误码严重程度描述自动修复
REF-E001ERROR失效链接(文件不存在)手动
REF-E002ERROR无效锚点手动
REF-E003ERROR相对路径错误
REF-E004ERROR无效可追溯性标签格式
REF-E005ERROR检测到循环引用手动
REF-W001WARNING孤立锚点(无传入引用)手动

Typos (TYPO)

拼写错误(TYPO)

CodeSeverityDescriptionAuto-Fix
TYPO-E001ERRORMisspelled wordYes
TYPO-E002ERRORDouble wordYes
TYPO-E003ERRORMarkdown syntax errorManual
TYPO-W001WARNINGCase inconsistencyManual
TYPO-W002WARNINGPunctuation issueYes
TYPO-W003WARNINGWhitespace issueYes
错误码严重程度描述自动修复
TYPO-E001ERROR拼写错误的单词
TYPO-E002ERROR重复单词
TYPO-E003ERRORMarkdown语法错误手动
TYPO-W001WARNING大小写不一致手动
TYPO-W002WARNING标点问题
TYPO-W003WARNING空白字符问题

Terminology (TERM)

术语(TERM)

CodeSeverityDescriptionAuto-Fix
TERM-E001ERRORUndefined acronymManual
TERM-E002ERRORInconsistent term usageManual
TERM-E003ERRORConflicting definitionsManual
TERM-W001WARNINGAmbiguous pronounManual
TERM-W002WARNINGSubjective qualifierManual
TERM-W003WARNINGUndefined jargonManual

错误码严重程度描述自动修复
TERM-E001ERROR未定义的首字母缩写手动
TERM-E002ERROR不一致的术语使用手动
TERM-E003ERROR冲突的定义手动
TERM-W001WARNING歧义代词手动
TERM-W002WARNING主观限定词手动
TERM-W003WARNING未定义的行话手动

Usage Examples

使用示例

Example 1: Review Single File

示例1:审查单个文件

/doc-review ai_dev_flow/EARS/EARS_CREATION_RULES.md
Output:
=== Documentation Review Report ===
File: ai_dev_flow/EARS/EARS_CREATION_RULES.md
Mode: Single File
Scope: full

Data Consistency: 2 issues
  [DATA-E001] Line 547: States "total_requirements: 135" but only 130 found
  [DATA-W001] Line 89-95: Similar content to lines 105-111

References: 1 issue
  [REF-E002] Line 137: Anchor #cross-reference-link-format-mandatory not found

Typos: 0 issues

Terminology: 1 issue
  [TERM-W002] Line 26: "Complete reference" - subjective qualifier

Summary: 4 issues (2 errors, 2 warnings)
/doc-review ai_dev_flow/EARS/EARS_CREATION_RULES.md
输出
=== 文档审查报告 ===
文件: ai_dev_flow/EARS/EARS_CREATION_RULES.md
模式: 单个文件
范围: full

数据一致性: 2个问题
  [DATA-E001] 第547行:声明"total_requirements: 135"但实际仅找到130项
  [DATA-W001] 第89-95行:与第105-111行内容相似

引用: 1个问题
  [REF-E002] 第137行:锚点#cross-reference-link-format-mandatory不存在

拼写错误: 0个问题

术语: 1个问题
  [TERM-W002] 第26行:"Complete reference" - 主观限定词

摘要: 4个问题(2个错误,2个警告)

Example 2: Review All Files in Folder

示例2:审查文件夹中的所有文件

/doc-review docs/EARS/
Output:
=== Documentation Review Report ===
Folder: docs/EARS/
Mode: Folder (all files together)
Files analyzed: 12
Scope: full

Cross-File Analysis:
  [TERM-E002] Inconsistent term: "requirement" vs "EARS requirement" across 4 files
  [REF-E001] Broken cross-reference: EARS-001.md → EARS-005.md#section-missing

Per-File Issues:
  EARS-001.md: 2 errors, 1 warning
  EARS-002.md: 0 errors, 3 warnings
  ...

Summary: 8 errors, 15 warnings across 12 files
/doc-review docs/EARS/
输出
=== 文档审查报告 ===
文件夹: docs/EARS/
模式: 文件夹(所有文件一起分析)
分析文件数: 12
范围: full

跨文件分析:
  [TERM-E002] 术语不一致:"requirement"与"EARS requirement"在4个文件中混用
  [REF-E001] 失效交叉引用:EARS-001.md → EARS-005.md#section-missing

单文件问题:
  EARS-001.md: 2个错误,1个警告
  EARS-002.md: 0个错误,3个警告
  ...

摘要: 12个文件中存在8个错误,15个警告

Example 3: Focus on Specific Checks

示例3:聚焦特定检查项

/doc-review ai_dev_flow/PRD/ --focus references,typos
/doc-review ai_dev_flow/PRD/ --focus references,typos

Example 4: Quick Pre-Commit Check

示例4:快速提交前检查

/doc-review docs/ --scope quick --report_format summary
Output:
Quick Review: docs/
Files scanned: 87
Errors: 3
Warnings: 12
Status: NEEDS ATTENTION (fix errors before commit)

/doc-review docs/ --scope quick --report_format summary
输出
快速审查: docs/
扫描文件数: 87
错误数: 3
警告数: 12
状态: 需要处理(提交前修复错误)

Integration Points

集成点

With Other Skills

与其他Skill集成

SkillIntegration
trace-checkShares reference validation logic
doc-validatorComplementary (cross-doc vs single-file)
quality-advisorReal-time vs batch validation
code-reviewSource code vs documentation focus
Skill集成方式
trace-check共享引用验证逻辑
doc-validator互补(跨文档 vs 单文件)
quality-advisor实时 vs 批量验证
code-review源代码 vs 文档聚焦

With CI/CD

与CI/CD集成

yaml
undefined
yaml
undefined

.github/workflows/docs-review.yml

.github/workflows/docs-review.yml

name: Documentation Review
on: [pull_request]
jobs: doc-review: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Run doc review run: | claude-code /doc-review docs/ --scope quick --report_format json > review.json - name: Check for errors run: | if jq '.errors | length > 0' review.json; then echo "Documentation errors found" exit 1 fi

---
name: Documentation Review
on: [pull_request]
jobs: doc-review: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Run doc review run: | claude-code /doc-review docs/ --scope quick --report_format json > review.json - name: Check for errors run: | if jq '.errors | length > 0' review.json; then echo "Documentation errors found" exit 1 fi

---

Quality Gates

质量门禁

Definition of Done

完成定义

  • All ERROR-level issues resolved
  • WARNING-level issues reviewed and addressed or justified
  • No broken links
  • All acronyms defined
  • Terminology consistent across documents
  • No typos in headers or critical content
  • 所有ERROR级问题已解决
  • 所有WARNING级问题已审查并处理或说明理由
  • 无失效链接
  • 所有首字母缩写已定义
  • 术语在所有文档中保持一致
  • 标题或关键内容无拼写错误

Severity Thresholds

严重程度阈值

ScopeErrors AllowedWarnings Allowed
quick010
full05
deep00

范围允许错误数允许警告数
quick010
full05
deep00

Sub-Agent Prompts

子代理提示词

Data Consistency Agent Prompt

数据一致性Agent提示词

You are a data consistency reviewer. Analyze the following file(s) for:

1. **Count Mismatches**: Find stated counts that don't match actual items
   - "N requirements" should match actual requirement count
   - "N sections" should match actual section count

2. **Status Inconsistencies**: Check metadata vs content alignment
   - Status: Approved but content has TBD markers
   - Version mismatches between header and changelog

3. **Date Inconsistencies**: Validate date logic
   - Last Updated should be >= Created date
   - Referenced dates should be valid

4. **Duplicate Content**: Flag similar paragraphs that may be errors

Output format: JSON with error_code, line_number, description, severity
你是一名数据一致性审查员。请分析以下文件,检查:

1. **数量不匹配**:查找声明数量与实际项数不符的内容
   - "N项需求"应与实际需求数量一致
   - "N个章节"应与实际章节数量一致

2. **状态不一致**:检查元数据与内容是否对齐
   - 状态为已批准但内容包含TBD标记
   - 页眉与变更日志中的版本不匹配

3. **日期不一致**:验证日期逻辑
   - 最后更新日期应大于等于创建日期
   - 引用的日期应有效

4. **重复内容**:标记可能为错误的相似段落

输出格式:包含error_code、line_number、description、severity的JSON

Reference Checker Agent Prompt

引用检查Agent提示词

You are a reference validation expert. Analyze the following file(s) for:

1. **Broken Links**: Verify all markdown links resolve
   - [text](path) - file exists
   - [text](path#anchor) - anchor exists

2. **Invalid Cross-References**: Check traceability tags
   - @brd: BRD.NN.TT.SS format
   - @prd: PRD.NN.TT.SS format
   - Document referenced must exist

3. **Relative Path Errors**: Validate ../ paths resolve correctly

4. **Orphan Anchors**: Find headers with no incoming links (optional)

Output format: JSON with error_code, line_number, target, description, severity
你是一名引用验证专家。请分析以下文件,检查:

1. **失效链接**:验证所有Markdown链接是否可解析
   - [text](path) - 文件存在
   - [text](path#anchor) - 锚点存在

2. **无效交叉引用**:检查可追溯性标签
   - @brd: 符合BRD.NN.TT.SS格式
   - @prd: 符合PRD.NN.TT.SS格式
   - 引用的文档必须存在

3. **相对路径错误**:验证../路径是否可正确解析

4. **孤立锚点**:查找无传入链接的标题(可选)

输出格式:包含error_code、line_number、target、description、severity的JSON

Typo Detection Agent Prompt

拼写检测Agent提示词

You are a proofreading expert. Analyze the following file(s) for:

1. **Spelling Errors**: Common misspellings and technical terms
   - Use standard English dictionary + technical glossary
   - Flag words not in either

2. **Markdown Syntax**: Validate proper formatting
   - Unclosed code blocks
   - Mismatched brackets/parentheses
   - Broken table syntax

3. **Punctuation Issues**: Common punctuation errors
   - Double periods, missing spaces after periods
   - Comma usage

4. **Whitespace Problems**: Formatting consistency
   - Trailing whitespace
   - Multiple blank lines
   - Inconsistent indentation

Output format: JSON with error_code, line_number, word/pattern, suggestion, severity
你是一名校对专家。请分析以下文件,检查:

1. **拼写错误**:常见拼写错误和技术术语
   - 使用标准英语词典 + 技术术语表
   - 标记不在两者中的单词

2. **Markdown语法**:验证格式是否正确
   - 未关闭的代码块
   - 不匹配的括号/圆括号
   - 损坏的表格语法

3. **标点问题**:常见标点错误
   - 双句号、句号后缺失空格
   - 逗号使用

4. **空白字符问题**:格式一致性
   - 行尾空白
   - 多个空行
   - 不一致的缩进

输出格式:包含error_code、line_number、word/pattern、suggestion、severity的JSON

Terminology Agent Prompt

术语检查Agent提示词

You are a terminology consistency expert. Analyze the following file(s) for:

1. **Undefined Acronyms**: Find uppercase abbreviations without definitions
   - Check if defined on first use
   - Check if in glossary section

2. **Inconsistent Naming**: Same concept, different names
   - user/User/USER
   - login/sign-in/authenticate
   - Build term consistency map

3. **Ambiguous Language**: Unclear references
   - Pronouns with unclear antecedents (it, this, that)
   - Vague quantifiers (some, many, few)

4. **Subjective Qualifiers**: Unmeasurable claims
   - "easy to use", "fast", "efficient"
   - "simple configuration"

Output format: JSON with error_code, line_number, term, issue, suggestion, severity

你是一名术语一致性专家。请分析以下文件,检查:

1. **未定义的首字母缩写**:查找未定义的大写缩写
   - 检查是否在首次使用时定义
   - 检查是否在术语表章节中

2. **不一致的命名**:同一概念使用不同名称
   - user/User/USER
   - login/sign-in/authenticate
   - 构建术语一致性映射

3. **歧义语言**:不明确的指代
   - 指代对象不明确的代词(it, this, that)
   - 模糊的量词(some, many, few)

4. **主观限定词**:无法衡量的表述
   - "易于使用"、"快速"、"高效"
   - "简单配置"

输出格式:包含error_code、line_number、term、issue、suggestion、severity的JSON

Configuration

配置

Custom Dictionary

自定义词典

Add project-specific terms to skip false positives:
yaml
undefined
添加项目特定术语以避免误报:
yaml
undefined

.doc-review.yaml

.doc-review.yaml

custom_dictionary:
  • "EARS"
  • "BDD"
  • "ADR"
  • "Gherkin"
  • "SDD"
  • "traceability"
ignored_patterns:
  • "node_modules/"
  • "*.min.js"
  • "vendor/"
severity_overrides: TERM-W002: "INFO" # Downgrade subjective qualifiers to INFO

---
custom_dictionary:
  • "EARS"
  • "BDD"
  • "ADR"
  • "Gherkin"
  • "SDD"
  • "traceability"
ignored_patterns:
  • "node_modules/"
  • "*.min.js"
  • "vendor/"
severity_overrides: TERM-W002: "INFO" # 将主观限定词降级为INFO级

---

Performance

性能

Benchmarks

基准测试

FilesScopeTimeMemory
10quick<5s50MB
50full<30s200MB
100deep<60s400MB
文件数范围耗时内存占用
10quick<5秒50MB
50full<30秒200MB
100deep<60秒400MB

Optimization

优化措施

  • Parallel sub-agents reduce wall-clock time by ~60%
  • Caching of dictionary lookups
  • Incremental mode for changed files only

  • 并行子代理可将耗时减少约60%
  • 词典查找缓存
  • 仅变更文件的增量模式

Limitations

局限性

  1. Cannot understand semantic meaning deeply (may miss logical contradictions)
  2. May produce false positives for domain-specific terminology
  3. External URL validation requires network access
  4. Auto-fix limited to simple patterns (typos, formatting)
  5. Complex reference chains require manual review

  1. 无法深度理解语义含义(可能遗漏逻辑矛盾)
  2. 可能对特定领域术语产生误报
  3. 外部URL验证需要网络访问
  4. 自动修复仅支持简单模式(拼写、格式)
  5. 复杂引用链需要手动审查

Version Information

版本信息

Version: 1.0.0 Created: 2026-01-01 Status: Active Author: AI Dev Flow Framework
Change Log:
  • 1.1.0 (2026-01-01): Renamed to doc-review, clarified analysis modes
    • Single file mode: deep analysis of one file
    • Folder mode: analyze all files together with cross-file checks
    • Added cross-file consistency checks in folder mode
  • 1.0.0 (2026-01-01): Initial release as file-review with 4 sub-agents
    • Data consistency checking
    • Reference validation
    • Typo detection
    • Terminology review
    • Parallel execution support
    • Multiple output formats
版本:1.0.0 创建日期:2026-01-01 状态:活跃 作者:AI Dev Flow Framework
变更日志:
  • 1.1.0 (2026-01-01): 重命名为doc-review,明确分析模式
    • 单文件模式:深入分析单个文件
    • 文件夹模式:一起分析所有文件并执行跨文件检查
    • 在文件夹模式中新增跨文件一致性检查
  • 1.0.0 (2026-01-01): 初始版本为file-review,包含4个子代理
    • 数据一致性检查
    • 引用验证
    • 拼写检测
    • 术语审查
    • 并行执行支持
    • 多种输出格式