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

doc-adr-reviewer文档 ADR 审阅者

Agent Skill

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

总安装

624

周安装

25

GitHub Stars

14

下载量

202
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

对架构决策记录进行深度内容与质量保证审查。

  • 适用于 ADR 生成后的语义完整性、BRD 对齐及替代方案评估。
  • 执行 Gherkin 语法检查、后果覆盖分析与人工复核建议生成。
  • 需由 doc-adr-autopilot 产出后触发,仅支持特定宿主环境调用。
  • doc-adr-reviewer 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-adr-reviewer

Purpose

Comprehensive content review and quality assurance for Architecture Decision Records (ADR). This skill performs deep content analysis beyond structural validation, checking decision completeness, BRD topic alignment, consequence coverage, alternative evaluation, and identifying issues that require manual architectural review.

Layer: 5 (ADR Quality Assurance)

Upstream: ADR (from doc-adr-autopilot or doc-adr)

Downstream: None (final QA gate before SYS generation)


When to Use This Skill

Use doc-adr-reviewer when:

  • After ADR Generation: Run immediately after doc-adr-autopilot completes
  • Manual ADR Edits: After making manual changes to ADR
  • Pre-SYS Check: Before running doc-sys-autopilot
  • Periodic Review: Regular quality checks on existing ADRs
  • Architecture Reviews: During formal architecture review sessions

Do NOT use when:

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

Skill vs Validator: Key Differences

Aspectdoc-adr-validatordoc-adr-reviewer
FocusSchema compliance, SYS-Ready scoreContent quality, decision rationale
ChecksRequired sections, formatConsequence coverage, alternative evaluation
Auto-FixStructural issues onlyContent issues (links, formatting)
OutputSYS-Ready score (numeric)Review score + issue list
PhasePhase 4 (Validation)Phase 5 (Final Review)
BlockingSYS-Ready < threshold blocksReview score < threshold flags

Review Workflow

flowchart TD
    A[Input: ADR Path] --> B[Load ADR Files]
    B --> C{Single or Multiple?}

    C -->|Multiple| D[Load All ADR Files]
    C -->|Single| E[Load Single File]

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

    subgraph Review["Review Checks"]
        F --> G[1. Decision Completeness]
        G --> H[2. BRD Topic Alignment]
      H --> H2[2a. Diagram Contract Compliance]
      H2 --> I[3. Consequence Coverage]
        I --> J[4. Alternative Evaluation]
        J --> K[5. Cross-Reference Integrity]
        K --> L[6. Placeholder Detection]
        L --> M[7. Naming Compliance]
        M --> N2[8. Upstream Drift Detection]
    end

    N2 --> 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 (12/12) - BLOCKING

Validates ADR follows the mandatory nested folder rule.

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

Required Structure:

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

Error Codes:

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

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


1. Decision Completeness

Validates ADR has all required decision components.

Scope:

  • Context clearly stated
  • Decision explicitly documented
  • Rationale provided
  • Status defined
  • Date recorded

Error Codes:

CodeSeverityDescription
REV-DC001ErrorContext section missing or empty
REV-DC002ErrorDecision not explicitly stated
REV-DC003ErrorRationale missing
REV-DC004WarningStatus not defined
REV-DC005WarningDate not recorded

2. BRD Topic Alignment

Validates ADR addresses BRD Section 7.2 topics.

Scope:

  • ADR maps to BRD ADR topic
  • Topic category correct (Infrastructure, Data, Security, etc.)
  • Decision matches topic requirements
  • All BRD topics have corresponding ADRs

Error Codes:

CodeSeverityDescription
REV-BA001ErrorADR not linked to BRD topic
REV-BA002ErrorTopic category mismatch
REV-BA003WarningDecision doesn't fully address topic
REV-BA004InfoBRD topic not yet addressed by ADR

2a. Diagram Contract Compliance

Validates ADR diagram contract requirements defined by ai_dev_ssd_flow/DIAGRAM_STANDARDS.md.

Scope:

  • Required ADR tags: @diagram: c4-l3 and @diagram: sequence-*
  • Conditional @diagram: dfd-l2 check for data-impacting decisions
  • Intent header fields: diagram_type, level, scope_boundary, upstream_refs, downstream_refs

Error Codes:

CodeSeverityDescription
REV-DC001ErrorMissing required ADR diagram tag (@diagram: c4-l3 or @diagram: sequence-*)
REV-DC002WarningData-impacting ADR missing @diagram: dfd-l2
REV-DC003WarningDiagram intent header missing required fields

3. Consequence Coverage

Validates positive and negative consequences documented.

Scope:

  • Positive consequences listed
  • Negative consequences/trade-offs acknowledged
  • Risk assessment included
  • Mitigation strategies defined

Error Codes:

CodeSeverityDescription
REV-CC001ErrorNo consequences documented
REV-CC002WarningOnly positive consequences (unrealistic)
REV-CC003WarningNegative consequences without mitigation
REV-CC004InfoRisk assessment could be more detailed

4. Alternative Evaluation

Validates alternatives were properly considered.

Scope:

  • Multiple alternatives evaluated
  • Comparison criteria defined
  • Trade-off analysis present
  • Rejection reasons documented

Error Codes:

CodeSeverityDescription
REV-AE001ErrorNo alternatives considered
REV-AE002WarningOnly one alternative (insufficient)
REV-AE003WarningMissing comparison criteria
REV-AE004InfoAlternative rejection reason unclear

5. Cross-Reference Integrity

Validates links to related ADRs and documents.

Scope:

  • Related ADRs referenced
  • Superseded ADRs linked
  • BRD/PRD traceability tags present
  • External references valid

Error Codes:

CodeSeverityDescription
REV-CR001ErrorBroken cross-reference
REV-CR002WarningMissing related ADR link
REV-CR003WarningSuperseded ADR not referenced
REV-CR004InfoExternal link unverified

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

7. Naming Compliance

Validates element IDs follow doc-naming standards.

Scope:

  • Element IDs use ADR.NN.xxxx format
  • Element type codes valid for ADR (13, 14, 15, 16)
  • ADR numbering sequential

Error Codes:

CodeSeverityDescription
REV-N001ErrorInvalid element ID format
REV-N002ErrorElement type code not valid for ADR
REV-N003WarningADR numbering gap detected

8. Upstream Drift Detection (Mandatory Cache)

Detects when upstream source documents have been modified after the ADR was created or last updated.

The drift cache is mandatory. All drift detection operations must read from and write to the cache file. Reviewers must fail with REV-D006 if the cache file cannot be created or accessed.

Purpose: Identifies stale ADR content that may not reflect current BDD scenarios. When upstream documents change, the ADR may need updates to maintain alignment.

Upstream Documents:

  • BDD documents: Feature files and scenario definitions that ADR decisions must support

Scope:

  • @bdd: tag targets (BDD feature files)
  • Traceability section upstream artifact links
  • Any markdown links to ../04_BDD/

Drift Cache File (MANDATORY)

Location: docs/05_ADR/.drift_cache.json

Schema:

{
  "cache_version": "1.0",
  "last_updated": "2026-02-10T17:00:00",
  "documents": {
    "ADR-01_authentication_strategy.md": {
      "adr_hash": "sha256:abc123...",
      "adr_updated": "2026-02-10T17:00:00",
      "upstream_refs": {
        "../../04_BDD/BDD-01_authentication.feature": {
          "hash": "sha256:def456...",
          "last_checked": "2026-02-10T17:00:00",
          "status": "current"
        }
      }
    }
  }
}

Cache Requirements:

  1. Cache file MUST be created on first review if it does not exist
  2. Cache MUST be updated after every review run
  3. Cache entries MUST include SHA-256 hashes for all upstream references
  4. Stale cache entries (>30 days) MUST trigger re-validation

Three-Phase Detection Algorithm

PHASE 1: Cache Initialization
   1. Check if .drift_cache.json exists
   2. If not exists → create with empty documents object
   3. If exists → load and validate schema
   4. If schema invalid → backup and recreate

PHASE 2: Upstream Reference Extraction
   1. Extract all upstream references from ADR:
      - @bdd: tags → [path, scenario anchor]
      - Links to ../04_BDD/ → [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 #5)
      c. Read file content
      d. Compute SHA-256 hash of content

PHASE 3: Drift Comparison
   1. For each upstream reference:
      a. Look up cached hash for this reference
      b. If no cached hash → flag as NEW_REFERENCE
      c. If hash matches → status = "current"
      d. If hash differs → flag as CONTENT_DRIFT

   2. Calculate drift severity:
      a. Compare content size change percentage
      b. If >20% change → CRITICAL (REV-D005)
      c. If <20% change → WARNING (REV-D002)

   3. Update cache with new hashes and timestamps

Hash Calculation (MANDATORY BASH EXECUTION)

CRITICAL: You MUST execute actual bash commands to compute hashes. DO NOT write placeholder values.

Compute File Hash:

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

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

Hash Format Validation:

CheckRequirement
PrefixMust be sha256:
LengthExactly 64 hex characters after prefix

REJECTED VALUES (re-compute immediately):

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

Verification After Cache Write:

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

Hash Scope:

  • Full file content for BDD feature files
  • Specific section content when anchor specified (e.g., #scenario-login)

Error Codes

CodeSeverityDescription
REV-D001WarningUpstream document modified after ADR 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 file cannot be created or accessed (mandatory)
REV-D009ErrorInvalid hash placeholder detected (verified_no_drift, pending_verification)

Report Output

## Upstream Drift Analysis

**Cache Status**: Active | Last Updated: 2026-02-10T17:00:00

| Upstream Document | ADR Reference | Current Hash | Cached Hash | Status | Severity |
|-------------------|---------------|--------------|-------------|--------|----------|
| BDD-01_authentication.feature | @bdd Section 3 | sha256:abc... | sha256:def... | DRIFT | Warning |
| BDD-02_authorization.feature | @bdd Section 5 | sha256:ghi... | sha256:ghi... | Current | - |

**Drift Summary**:
- Documents checked: 2
- Current: 1
- Drifted: 1
- Critical: 0

**Recommendation**: Review upstream changes and update ADR if decision context has changed.

Auto-Actions

  1. Cache Update: Update .drift_cache.json with current hashes after every review
  2. Drift Markers: Add [DRIFT] marker to affected @bdd tags (optional)
  3. Report Generation: Include drift summary in review report
  4. Cache Backup: Create .drift_cache.json.bak before updates

Configuration

SettingDefaultDescription
cache_enabledtrueEnable drift cache (Mandatory - cannot be disabled)
drift_threshold_days7Days before drift becomes Warning
critical_threshold_days30Days before drift becomes Error
tracked_patterns@bdd:Patterns to track for drift
cache_backuptrueCreate backup before cache updates

Review Score Calculation

Scoring Formula:

CategoryWeightCalculation
Decision Completeness24%(complete_fields / required_fields) × 24
BRD Topic Alignment19%(aligned_topics / total_topics) × 19
Consequence Coverage19%(coverage_score) × 19
Alternative Evaluation14%(alternatives_evaluated / 3) × 14
Cross-Reference Integrity5%(valid_refs / total_refs) × 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 ADR
/doc-adr-reviewer ADR-01

# Review ADR by path
/doc-adr-reviewer docs/05_ADR/ADR-01_authentication_strategy.md

# Review all ADRs
/doc-adr-reviewer all

Output Report

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

Nested Folder Rule: ALL ADRs use nested folders (ADR-NN_{slug}/) regardless of size. This ensures review reports, fix reports, and drift cache files are organized with their parent document.

Audit Wrapper Note: doc-adr-audit combines this reviewer output with validator findings and writes ADR-NN.A_audit_report_vNNN.md (preferred for fixer). Reviewer-native report naming remains ADR-NN.R_review_report_vNNN.md.

File Naming: ADR-NN.R_review_report_vNNN.md

Location: Inside the ADR nested folder: docs/05_ADR/ADR-NN_{slug}/

Versioning Rules

  1. First Review: Creates ADR-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 ADR-NN.R_review_report_v*.md files and increments.

Example:

docs/05_ADR/ADR-01_authentication_strategy/
├── ADR-01_authentication_strategy.md
├── ADR-01.R_review_report_v001.md    # First review
├── ADR-01.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-adr-autopilot

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

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

Related Skills

SkillRelationship
doc-namingNaming standards for Check #7
doc-adr-autopilotInvokes this skill in Phase 5
doc-adr-validatorStructural validation (Phase 4)
doc-adr-fixerApplies fixes based on review findings
doc-adrADR creation rules
doc-bdd-reviewerUpstream QA
doc-sys-autopilotDownstream consumer

Version History

VersionDateChanges
1.62026-02-27Migrated frontmatter to metadata; corrected nested-folder report paths to docs/05_ADR; documented audit-wrapper contract with preferred ADR-NN.A_audit_report_vNNN.md output and legacy reviewer compatibility
1.52026-02-26Aligned with ADR-MVP-TEMPLATE.md v1.1 (11-section MVP structure)
1.42026-02-11Added Check #0: Structure Compliance (BLOCKING) - validates ADR follows mandatory nested folder rule; Added REV-STR001-003 error codes; Structure check blocks other checks if failed
1.32026-02-10Made drift cache mandatory; Added REV-D006 error code for cache access failures; Three-phase detection algorithm; SHA-256 hash calculation with Python example; Updated cache schema with document-level tracking; Focused upstream on BDD documents only; Added cache status to report output
1.22026-02-10Added Check #8: Upstream Drift Detection - detects when BDD/BRD documents modified after ADR creation; REV-D001-D005 error codes; drift cache support; configurable thresholds; Added doc-adr-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 7 review checks; Decision completeness; Consequence coverage; Alternative evaluation

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.47%
按下载量换算78

Claude

28.88%
按下载量换算58

Cursor

18.61%
按下载量换算38

Gemini CLI

9.91%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills