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

doc-spec-reviewer文档规范审阅者

Agent Skill

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

总安装

753

周安装

32

GitHub Stars

14

下载量

264
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

用于技术文档的深度审阅与质量保证,确保规范完整性与内容准确性。

  • 适用于技术规格说明书的结构检查、需求覆盖验证和接口定义审核。
  • 在生成 SPEC 后立即运行,作为质量保障的最后一道人工复核关卡。
  • 需配合 doc-spec-autopilot 或 doc-spec 使用,不直接处理原始文档。
  • doc-spec-reviewer 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-spec-reviewer

Purpose

Comprehensive content review and quality assurance for Technical Specification (SPEC) documents. This skill performs deep content analysis beyond structural validation, checking YAML structure completeness, REQ coverage, interface definitions, threshold compliance, and identifying issues that require manual review.

Layer: 9 (SPEC Quality Assurance)

Upstream: SPEC (from doc-spec-autopilot or doc-spec)

Downstream: None (final QA gate before TSPEC/TASKS generation)


When to Use This Skill

Use doc-spec-reviewer when:

  • After SPEC Generation: Run immediately after doc-spec-autopilot completes
  • Manual SPEC Edits: After making manual changes to SPEC
  • Pre-TASKS Check: Before running doc-tasks-autopilot
  • Pre-TSPEC Check: Before running doc-tspec-autopilot
  • Periodic Review: Regular quality checks on existing SPECs

Do NOT use when:

  • SPEC does not exist yet (use doc-spec or doc-spec-autopilot first)
  • Need structural/schema validation only (use doc-spec-validator)
  • Generating new SPEC content (use doc-spec)

Skill vs Validator: Key Differences

Aspectdoc-spec-validatordoc-spec-reviewer
FocusSchema compliance, TASKS-Ready scoreContent quality, implementation readiness
ChecksRequired sections, YAML syntaxREQ coverage, interface completeness
Auto-FixStructural issues onlyContent issues (formatting)
OutputTASKS-Ready score (numeric)Review score + issue list
PhasePhase 4 (Validation)Phase 5 (Final Review)
BlockingTASKS-Ready < threshold blocksReview score < threshold flags

Review Workflow

flowchart TD
    A[Input: SPEC Path] --> B[Load SPEC File]
    B --> C{YAML Valid?}

    C -->|Yes| D[Parse YAML Structure]
    C -->|No| E[Report Syntax Error]

    D --> F[Run Review Checks]
    E --> F

    subgraph Review["Review Checks"]
        F --> G[1. YAML Structure Completeness]
        G --> H[2. REQ Coverage]
        H --> I[3. Interface Definition Completeness]
        I --> J[4. Threshold Registry Compliance]
        J --> K[5. Data Model Completeness]
        K --> L[6. Error Handling Coverage]
        L --> M[7. Placeholder Detection]
        M --> M2[8. Naming Compliance]
        M2 --> M3[9. Upstream Drift Detection]
    end

    M3 --> N{Issues Found?}
    N -->|Yes| O[Categorize Issues]
    O --> P{Auto-Fixable?}
    P -->|Yes| Q[Apply Auto-Fixes]
    Q --> R[Re-run Affected Checks]
    P -->|No| S[Flag for Manual Review]
    R --> N
    S --> T[Generate Report]
    N -->|No| T
    T --> U[Calculate Review Score]
    U --> V{Score >= Threshold?}
    V -->|Yes| W[PASS]
    V -->|No| X[FAIL with Details]

Review Checks

0. Structure Compliance (MVP) - BLOCKING

Validates SPEC follows the mandatory nested folder rule.

Nested Folder Rule: ALL SPEC documents MUST be in nested folders.

Required Structure:

SPEC TypeRequired Location
YAMLdocs/09_SPEC/SPEC-NN_{slug}/SPEC-NN_{slug}.yaml

Error Codes:

CodeSeverityDescription
REV-STR001ErrorSPEC not in nested folder (BLOCKING)
REV-STR002ErrorFolder name doesn't match SPEC ID
REV-STR003WarningFile name doesn't match folder name

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


1. YAML Structure Completeness

Validates 13-section YAML structure is complete.

Required Sections:

  1. metadata
  2. overview
  3. traceability
  4. interfaces
  5. components
  6. methods
  7. data_models
  8. error_handling
  9. threshold_registry
  10. req_implementations
  11. testing_requirements
  12. deployment
  13. appendices

Error Codes:

CodeSeverityDescription
REV-YS001ErrorRequired YAML section missing
REV-YS002ErrorInvalid YAML syntax
REV-YS003WarningSection is empty
REV-YS004InfoOptional section missing

2. REQ Coverage

Validates all REQ requirements implemented in SPEC.

Scope:

  • Every REQ has corresponding implementation
  • req_implementations section complete
  • Acceptance criteria mapped
  • No orphaned specifications

Error Codes:

CodeSeverityDescription
REV-RC001ErrorREQ not implemented in SPEC
REV-RC002WarningAcceptance criteria not mapped
REV-RC003WarningOrphaned specification (no REQ)
REV-RC004InfoMultiple SPEC items for single REQ (acceptable)

3. Interface Definition Completeness

Validates external, internal, and class interfaces.

Scope:

  • External interfaces documented
  • Internal interfaces defined
  • Class interfaces specified
  • Method signatures complete

Error Codes:

CodeSeverityDescription
REV-IF001ErrorExternal interface missing
REV-IF002ErrorMethod signature incomplete
REV-IF003WarningInternal interface not defined
REV-IF004WarningClass interface missing
REV-IF005InfoParameter types not specified

4. Threshold Registry Compliance

Validates thresholds match upstream documents.

Scope:

  • Thresholds from REQ/SYS/PRD/BRD consistent
  • Performance targets defined
  • SLA requirements met
  • Monitoring thresholds set

Error Codes:

CodeSeverityDescription
REV-TR001ErrorThreshold mismatch with REQ
REV-TR002ErrorPerformance target not defined
REV-TR003WarningSLA requirement may not be met
REV-TR004InfoMonitoring threshold missing

5. Data Model Completeness

Validates data models are implementation-ready.

Scope:

  • All types defined
  • Field specifications complete
  • Validation rules documented
  • Relationships mapped

Error Codes:

CodeSeverityDescription
REV-DM001ErrorType not defined
REV-DM002WarningField specification incomplete
REV-DM003WarningValidation rules missing
REV-DM004InfoRelationship not mapped

6. Error Handling Coverage

Validates error scenarios documented.

Scope:

  • Error codes defined
  • Recovery strategies documented
  • Error messages specified
  • Retry semantics clear

Error Codes:

CodeSeverityDescription
REV-EH001ErrorNo error handling defined
REV-EH002WarningRecovery strategy missing
REV-EH003WarningError messages not specified
REV-EH004InfoRetry semantics not documented

7. Placeholder Detection

Identifies incomplete content requiring replacement.

Error Codes:

CodeSeverityDescription
REV-P001Error[TODO] placeholder found
REV-P002Error[TBD] placeholder found
REV-P003WarningTemplate value not replaced

8. Naming Compliance

Validates element IDs follow doc-naming standards.

Scope:

  • Element IDs use SPEC.NN.xxxx format
  • Element type codes valid for SPEC
  • Component naming convention

Error Codes:

CodeSeverityDescription
REV-N001ErrorInvalid element ID format
REV-N002ErrorElement type code not valid for SPEC
REV-N003ErrorLegacy pattern detected

9. Upstream Drift Detection (Mandatory Cache)

Detects when upstream REQ and CTR documents have been modified after the SPEC was created or last updated.

The drift cache is mandatory. All SPEC review operations must maintain drift cache state to enable accurate incremental drift detection. The cache persists hash values between reviews, eliminating false positives from timestamp-only comparisons.

Purpose: Identifies stale SPEC content that may not reflect current REQ and CTR documentation. When REQ documents (requirements, acceptance criteria) or CTR documents (external API contracts) change, the SPEC may need updates to maintain alignment.

Scope:

  • @req: tag targets (REQ documents)
  • @ctr: tag targets (CTR documents)
  • Traceability section upstream artifact links
  • Any markdown links to ../07_REQ/ or ../08_CTR/ source documents

Drift Cache File (MANDATORY)

Location: docs/09_SPEC/.drift_cache.json

Schema:

{
  "cache_version": "1.0",
  "last_review": "2026-02-10T17:00:00",
  "spec_files": {
    "SPEC-03.yaml": {
      "spec_hash": "sha256:abc123...",
      "last_reviewed": "2026-02-10T17:00:00",
      "upstream_refs": {
        "REQ-03.yaml": {
          "file_hash": "sha256:def456...",
          "section_hashes": {
            "req_implementations": "sha256:ghi789...",
            "acceptance_criteria": "sha256:jkl012..."
          },
          "last_modified": "2026-02-08T10:15:00"
        },
        "CTR-03-001.yaml": {
          "file_hash": "sha256:mno345...",
          "section_hashes": {
            "endpoints": "sha256:pqr678..."
          },
          "last_modified": "2026-02-09T14:30:00"
        }
      }
    }
  }
}

Cache Fields:

FieldTypeDescription
cache_versionstringSchema version for cache format
last_reviewISO8601Timestamp of most recent review run
spec_filesobjectMap of SPEC filename to review state
spec_hashstringSHA-256 hash of SPEC file content
last_reviewedISO8601When this SPEC was last reviewed
upstream_refsobjectMap of upstream file to hash state
file_hashstringSHA-256 hash of entire upstream file
section_hashesobjectMap of section name to content hash
last_modifiedISO8601File modification timestamp

Three-Phase Detection Algorithm

Phase 1: Cache Load

1. Load .drift_cache.json from docs/09_SPEC/
2. If cache missing → initialize empty cache, flag REV-D006
3. Validate cache_version compatibility
4. Extract cached state for target SPEC file

Phase 2: Drift Detection

1. Extract all upstream references from SPEC:
   - @req: tags → [path, section anchor]
   - @ctr: tags → [path, section anchor]
   - Links to ../07_REQ/ → [path]
   - Links to ../08_CTR/ → [path]
   - Traceability table upstream artifacts → [path]

2. For each upstream reference:
   a. Resolve path to absolute file path
   b. Check file exists (already covered by Check #2)
   c. Compute current SHA-256 hash of file
   d. Compare to cached file_hash
   e. If hash differs → DRIFT detected, proceed to section check
   f. If section anchor specified:
      - Extract section content
      - Compute SHA-256 of section
      - Compare to cached section_hash
      - If differs → SECTION_DRIFT detected

Phase 3: Cache Update

1. After review completes (regardless of pass/fail):
   a. Update spec_hash with current SPEC hash
   b. Update last_reviewed timestamp
   c. For each upstream reference:
      - Update file_hash
      - Update section_hashes
      - Update last_modified
   d. Write .drift_cache.json atomically
2. Cache update is MANDATORY - failure to update is REV-D006

Hash Calculation (MANDATORY BASH EXECUTION)

CRITICAL: Execute actual bash commands. DO NOT write placeholder values.

Full File Hash:

sha256sum <file_path> | cut -d' ' -f1

Store as: "hash": "sha256:<64_hex_characters>"

Section Hash (for YAML sections):

# Extract YAML section and hash
yq '.<section_name>' <file_path> | sha256sum | cut -d' ' -f1

REJECTED VALUES (re-compute immediately):

  • sha256:verified_no_drift
  • sha256:pending_verification
  • Any value where hex portion!= 64 characters

Verification:

grep -oP '"hash":\s*"sha256:[0-9a-f]{64}"' .drift_cache.json

Error Codes

CodeSeverityDescription
REV-D001WarningUpstream REQ/CTR document modified after SPEC creation
REV-D002WarningReferenced section content has changed (hash mismatch)
REV-D003InfoUpstream document version incremented
REV-D004InfoNew content added to upstream document
REV-D005ErrorCritical upstream document substantially modified (>20% change)
REV-D006ErrorDrift cache missing or invalid - cache is mandatory
REV-D009ErrorInvalid hash placeholder detected (verified_no_drift, pending_verification)

Report Output

## Upstream Drift Analysis

**Cache Status**: Active (last updated: 2026-02-10T14:30:00)

| Upstream Document | SPEC Reference | Cached Hash | Current Hash | Status | Severity |
|-------------------|----------------|-------------|--------------|--------|----------|
| REQ-03.yaml | @req Section req_implementations | sha256:abc1... | sha256:def4... | DRIFT | Warning |
| CTR-03-001.yaml | @ctr endpoints | sha256:ghi7... | sha256:ghi7... | FRESH | - |

**Drift Summary**:
- Files checked: 2
- Files with drift: 1
- Sections with drift: 1

**Recommendation**: Review upstream REQ/CTR changes and update SPEC if requirements or contracts have changed.

Auto-Actions

  • Mandatory: Update .drift_cache.json with current hashes after every review
  • Add [DRIFT] marker to affected @req/@ctr tags (optional)
  • Generate drift summary in review report

Configuration

SettingDefaultDescription
cache_enabledtrueMandatory - cache cannot be disabled
drift_threshold_days7Days before drift becomes Warning
critical_threshold_days30Days before drift becomes Error
tracked_patterns@req:, @ctr:Patterns to track for drift

Review Score Calculation

Scoring Formula:

CategoryWeightCalculation
YAML Structure Completeness14%(complete_sections / 13) × 14
REQ Coverage19%(implemented / total_reqs) × 19
Interface Definition Completeness19%(complete_interfaces / total) × 19
Threshold Registry Compliance10%(compliant / total_thresholds) × 10
Data Model Completeness14%(complete_models / total) × 14
Error Handling Coverage5%(covered / required) × 5
Placeholder Detection5%(no_placeholders? 5: 5 - count)
Naming Compliance9%(valid_ids / total_ids) × 9
Upstream Drift5%(fresh_refs / total_refs) × 5

Total: Sum of all categories (max 100)

Thresholds:

  • PASS: >= 90
  • WARNING: 80-89
  • FAIL: < 80

Command Usage

# Review specific SPEC
/doc-spec-reviewer SPEC-03

# Review SPEC by path
/doc-spec-reviewer docs/09_SPEC/SPEC-03.yaml

# Review all SPECs
/doc-spec-reviewer all

Output Report

Review reports are stored alongside the reviewed document per project standards.

Nested Folder Rule: ALL SPEC use nested folders (SPEC-NN_{slug}/) regardless of size. This ensures YAML files, review reports, fix reports, and drift cache files are organized together.

File Naming: SPEC-NN.R_review_report_vNNN.md

Audit Wrapper Compatibility: doc-spec-audit may emit preferred SPEC-NN.A_audit_report_vNNN.md; reviewer output remains valid legacy-compatible input for fixer.

Location: Inside the SPEC nested folder: docs/09_SPEC/SPEC-NN_{slug}/

Versioning Rules

  1. First Review: Creates SPEC-NN.R_review_report_v001.md
  2. Subsequent Reviews: Auto-increments version (v002, v003, etc.)
  3. Same-Day Reviews: Each review gets unique version number

Version Detection: Scans folder for existing SPEC-NN.R_review_report_v*.md files and increments.

Example:

docs/09_SPEC/SPEC-03_f3_observability/
├── SPEC-03_f3_observability.yaml
├── SPEC-03.R_review_report_v001.md    # First review
├── SPEC-03.R_review_report_v002.md    # After fixes
└── .drift_cache.json

Delta Reporting

When previous reviews exist, include score comparison in the report.

See REVIEW_DOCUMENT_STANDARDS.md for complete versioning requirements.


Integration with doc-spec-autopilot

This skill is invoked during Phase 5 of doc-spec-autopilot:

flowchart LR
    A[Phase 4: Validation] --> B[Phase 5: Final Review]
    B --> C{doc-spec-reviewer}
    C --> D[Phase 6: Continue]

Related Skills

SkillRelationship
doc-namingNaming standards for Check #8
doc-spec-autopilotInvokes this skill in Phase 5
doc-spec-validatorStructural validation (Phase 4)
doc-spec-fixerApplies fixes based on review findings
doc-specSPEC creation rules
doc-req-reviewerUpstream QA
doc-ctr-reviewerUpstream QA (for external APIs)
doc-tasks-autopilotDownstream consumer
doc-tspec-autopilotDownstream consumer

Version History

VersionDateChanges
1.52026-02-27Normalized metadata schema; aligned structure heading to MVP contract; added audit-wrapper compatibility for .A_ reports
1.42026-02-11Structure Compliance BLOCKING check: Added Check #0 as BLOCKING prerequisite; Validates nested folder rule for SPEC documents; REV-STR001-STR003 error codes; Must pass before other checks proceed
1.32026-02-10Mandatory drift cache: Cache is now required (REV-D006 error if missing); Three-phase detection algorithm; SHA-256 hash calculation with Python implementation; Enhanced cache schema with section-level hashing; Cache status in report output
1.22026-02-10Added Check #9: Upstream Drift Detection - detects when REQ/CTR documents modified after SPEC creation; REV-D001-D005 error codes; drift cache support; configurable thresholds; added doc-spec-fixer to related skills
1.12026-02-10Added review versioning support (_vNNN pattern); Delta reporting for score comparison
1.02026-02-10Initial skill creation with 8 review checks; YAML structure validation; REQ coverage; Interface completeness; Threshold compliance

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

38.9%
按下载量换算103

Claude

29.97%
按下载量换算79

Cursor

17.78%
按下载量换算47

Gemini CLI

9.82%
按下载量换算26

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

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

安装前确认

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

来源信息

继续浏览同类 Skills