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

doc-brd-reviewerdoc brd 审稿人

Agent Skill

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

总安装

240

周安装

10

GitHub Stars

14

下载量

80
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

对 BRD 进行深度内容审查与质量保证。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 适用于链接完整性、需求完整性与战略对齐检查。
  • 执行 ADR 主题覆盖分析与人工业务评审建议生成。
  • 需在 doc-brd-autopilot 生成后立即调用,仅限指定宿主。
  • doc-brd-reviewer 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-brd-reviewer

Purpose

Comprehensive content review and quality assurance for Business Requirements Documents (BRD). This skill performs deep content analysis beyond structural validation, checking link integrity, requirement completeness, ADR topic coverage, strategic alignment, and identifying issues that require manual business review.

Layer: 1 (BRD Quality Assurance)

Upstream: Strategy documents, stakeholder requirements

Downstream: None (final QA gate before PRD generation)


When to Use This Skill

Use doc-brd-reviewer when:

  • After BRD Generation: Run immediately after doc-brd-autopilot completes
  • Manual BRD Edits: After making manual changes to a BRD
  • Pre-PRD Check: Before running doc-prd-autopilot
  • Periodic Review: Regular quality checks on existing BRDs
  • CI/CD Integration: Automated review gate in documentation pipelines

Do NOT use when:

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

Skill vs Validator: Key Differences

Aspectdoc-brd-validatordoc-brd-reviewer
FocusSchema compliance, PRD-Ready scoreContent quality, strategic alignment
ChecksRequired sections, field formatsLink integrity, ADR completeness, placeholders
Auto-FixStructural issues onlyContent issues (links, dates, placeholders)
OutputPRD-Ready score (numeric)Review score + issue list
PhasePhase 4 (Validation)Phase 5 (Final Review)
BlockingPRD-Ready < threshold blocksReview score < threshold flags

Review Workflow

flowchart TD
    A[Input: BRD Path] --> B[Load BRD Files]
    B --> C{Sectioned or Monolithic?}

    C -->|Sectioned| D[Load All Section Files]
    C -->|Monolithic| E[Load Single File]

    D --> F0[Check #0: Structure Compliance]
    E --> F0

    F0 --> F0a{Nested Folder Valid?}
    F0a -->|No| F0b[FAIL - BLOCKING]
    F0a -->|Yes| F[Run Review Checks]

    subgraph Review["Review Checks"]
        F --> G[1. Link Integrity]
        G --> H[2. Requirement Completeness]
      H --> H2[2a. Diagram Contract Compliance]
      H2 --> I[3. ADR Topic Coverage]
      I --> J[4. Placeholder Detection]
      J --> K[5. Traceability Tags]
      K --> L[6. Section Completeness]
      L --> M[7. Strategic Alignment]
      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 (BLOCKING)

Validates BRD follows the mandatory nested folder rule.

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

Required Structure:

BRD TypeRequired Location
Monolithicdocs/01_BRD/BRD-NN_{slug}/BRD-NN_{slug}.md
Sectioneddocs/01_BRD/BRD-NN_{slug}/BRD-NN.0_index.md, BRD-NN.1_*.md, etc.

Validation:

1. Check document is inside a nested folder: docs/01_BRD/BRD-NN_{slug}/
2. Verify folder name matches BRD ID pattern: BRD-NN_{slug}
3. Verify file name matches folder: BRD-NN_{slug}.md or BRD-NN.N_*.md
4. Parent path must be: docs/01_BRD/

Example Valid Structure:

docs/01_BRD/
├── BRD-01_f1_iam/
│   ├── BRD-01_f1_iam.md           ✓ Valid (monolithic)
│   ├── BRD-01.R_review_report_v001.md
│   └── .drift_cache.json
├── BRD-02_f2_session/
│   ├── BRD-02.0_index.md          ✓ Valid (sectioned)
│   ├── BRD-02.1_core.md
│   └── BRD-02.2_requirements.md

Invalid Structure:

docs/01_BRD/
├── BRD-01_f1_iam.md               ✗ NOT in nested folder

Auto-Fix:

  1. Create the nested folder docs/01_BRD/BRD-NN_{slug}/
  2. Move the BRD file(s) into the folder
  3. Update all internal links (navigation, cross-references)
  4. Update any downstream PRD links to correct path

Error Codes:

CodeSeverityDescription
REV-STR001ErrorBRD not in nested folder (blocking)
REV-STR002ErrorBRD folder name doesn't match BRD ID
REV-STR003WarningMonolithic BRD should be sectioned (>25KB)

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


1. Link Integrity

Validates all internal document links resolve correctly.

Scope:

  • Navigation links ([Previous:...], [Next:...])
  • Section cross-references (for example, See Section 7.2)
  • Index to section links
  • External documentation links (warns if unreachable)

Error Codes:

CodeSeverityDescription
REV-L001ErrorBroken internal link
REV-L002WarningExternal link unreachable
REV-L003InfoLink path uses absolute instead of relative

2. Requirement Completeness

Validates all business requirements have complete specifications.

Scope:

  • Each requirement has acceptance criteria
  • Success metrics defined
  • Scope boundaries clear (in/out)
  • Priority assignments present
  • Dependencies documented

Error Codes:

CodeSeverityDescription
REV-R001ErrorRequirement missing acceptance criteria
REV-R002ErrorNo success metrics defined
REV-R003WarningScope boundaries unclear
REV-R004WarningMissing priority assignment
REV-R005InfoDependency not documented

2a. Diagram Contract Compliance

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

Scope:

  • Required BRD tags: @diagram: c4-l1, @diagram: dfd-l0
  • Sequence tag presence when sequence diagram is used
  • Intent header fields: diagram_type, level, scope_boundary, upstream_refs, downstream_refs
  • Trust-boundary annotations when data boundary movement is documented

Error Codes:

CodeSeverityDescription
REV-DC001WarningMissing recommended BRD diagram tag (@diagram: c4-l1 or @diagram: dfd-l0)
REV-DC002WarningSequence diagram present without sequence contract tag
REV-DC003WarningDiagram intent header missing required fields
REV-DC004WarningTrust boundary annotation missing where expected

3. ADR Topic Coverage

Validates Section 7.2 ADR Topics have complete coverage.

Scope:

  • All 7 mandatory categories present (Infrastructure, Data Architecture, Integration, Security, Observability, AI/ML, Technology Selection)
  • Each topic has Status, Alternatives Overview, Decision Drivers
  • Selected topics have Cloud Provider Comparison table
  • Deferred topics have justification

Error Codes:

CodeSeverityDescription
REV-ADR001ErrorMandatory ADR category missing
REV-ADR002ErrorTopic missing Alternatives Overview
REV-ADR003ErrorSelected topic missing comparison table
REV-ADR004WarningTopic missing Decision Drivers
REV-ADR005InfoDeferred topic needs justification

4. Placeholder Detection

Identifies incomplete content requiring replacement.

Scope:

  • [TODO], [TBD], [PLACEHOLDER] text
  • Template dates: YYYY-MM-DDTHH:MM:SS, MM/DD/YYYY
  • Template names: [Name], [Author], [Reviewer]
  • Empty sections: <!-- Content here -->
  • Lorem ipsum or sample text

Auto-Fix:

  • Replace YYYY-MM-DDTHH:MM:SS with current datetime
  • Replace [Name] with document author from metadata
  • Remove empty comment placeholders
  • Flag [TODO]/[TBD] for manual completion

Error Codes:

CodeSeverityDescription
REV-P001Error[TODO] placeholder found
REV-P002Error[TBD] placeholder found
REV-P003WarningTemplate date not replaced
REV-P004WarningTemplate name not replaced
REV-P005WarningEmpty section content

5. Traceability Tags

Validates cross-reference tags and element IDs.

Scope:

  • @ref: tags reference valid documents (if upstream_mode: "ref")
  • Element IDs properly formatted
  • Cross-references consistent
  • Traceability section completeness

Error Codes:

CodeSeverityDescription
REV-TR001ErrorInvalid document ID in metadata
REV-TR002WarningMissing element ID
REV-TR003InfoInconsistent cross-reference format
REV-TR004WarningMalformed parent_doc reference

6. Section Completeness

Verifies all 18 required sections have substantive content per BRD-MVP-TEMPLATE.

Scope:

  • All 18 numbered sections present (plus Document Control)
  • Minimum word count per section
  • Required subsections for governance, traceability, glossary
  • Tables have data rows (not just headers)
  • Mermaid diagrams render properly

18-Section Structure Validation:

#SectionMin WordsRequired Subsections
1Introduction1001.1-1.4
2Business Objectives1502.1 MVP Hypothesis, 2.2-2.5
3Project Scope2003.2 MVP Core Features, 3.4.1, 3.4.2, 3.5
4Stakeholders75Decision Makers + Key Contributors blocks
5User Stories1005.1-5.2
6Functional Requirements2006.1-6.5
7Quality Attributes3007.2 ADR Topics, 7.3-7.5
8Business Constraints and Assumptions1008.1-8.2
9Acceptance Criteria1009.1 MVP Launch Criteria, 9.2
10Business Risk Management150Risk table required
11Implementation Approach10011.1-11.2
12Support and Maintenance7512.1-12.3
13Cost-Benefit Analysis100ROI summary + qualitative impact
14Project Governance15014.1-14.5 (14.5 required)
15Quality Assurance10015.3 Quality Gates
16Traceability15016.1-16.4 (all required)
17Glossary5017.1-17.6 (including 17.5 Cross-References, 17.6 External Standards)
18Appendices10018.1-18.5

MVP-Critical Subsections (bold items above):

SubsectionPurposeError if Missing
2.1 MVP HypothesisValidates core MVP assumptionREV-MVP001
3.2 MVP Core FeaturesP1/P2 feature checklistREV-MVP002
9.1 MVP Launch CriteriaGo/no-go checklistREV-MVP003
14.5 Approval and Sign-offStakeholder sign-off tableREV-MVP004
15.3 Quality GatesQuality gate checklistREV-MVP005
16.1-16.4Traceability matrix subsectionsREV-MVP006-009
17.1-17.6Glossary structure (17.5 Cross-References, 17.6 External Standards)REV-MVP010

Error Codes:

CodeSeverityDescription
REV-S001ErrorRequired section missing entirely
REV-S002WarningSection below minimum word count
REV-S003WarningTable has no data rows
REV-S004ErrorMermaid diagram syntax error
REV-MVP001ErrorMissing MVP Hypothesis (Section 2.1)
REV-MVP002WarningMissing MVP Core Features checklist (Section 3.2)
REV-MVP003ErrorMissing MVP Launch Criteria (Section 9.1)
REV-MVP004ErrorMissing Approval Sign-off Table (Section 14.5)
REV-MVP005ErrorMissing Quality Gates (Section 15.3)
REV-MVP006ErrorMissing Requirements Traceability Matrix (Section 16.1)
REV-MVP007WarningMissing Cross-BRD Dependencies (Section 16.2)
REV-MVP008WarningMissing Test Coverage Traceability (Section 16.3)
REV-MVP009WarningMissing Traceability Summary (Section 16.4)
REV-MVP010WarningMissing Glossary subsection structure (17.1-17.6)

6.1 Subsection Validation Algorithm

FOR each section in 18_SECTION_LIST:
  1. Verify section header exists: "## {N}. {Title}"
  2. Count words in section content
  3. IF section has required_subsections:
     FOR each subsection in required_subsections:
       - Search for header pattern: "### {N}.{M}" or "#### {N}.{M}.{X}"
       - IF not found: Add appropriate error code
       - IF found: Validate minimum content (>10 words)
  4. IF section < minimum_words: Add REV-S002 warning

Section Detection Patterns:

Section TypePatternExample
Main section## N. Title## 14. Project Governance
Subsection### N.M Title### 14.5 Approval and Sign-off
Sub-subsection#### N.M.X Title#### 16.1.1 Business Objectives → FRs

Sectioned BRD Handling:

For sectioned BRDs (BRD-NN.N_*.md files):

  1. Map file to section number from filename pattern
  2. Validate section content within that file
  3. Cross-reference section numbering consistency
File PatternSection
BRD-NN.14_*.mdSection 14 (Governance)
BRD-NN.15_*.mdSection 15 (Quality Assurance)
BRD-NN.16_*.mdSection 16 (Traceability)
BRD-NN.17_*.mdSection 17 (Glossary)

7. Strategic Alignment

Validates BRD aligns with business strategy and objectives.

Scope:

  • Business objectives trace to strategic goals
  • Success metrics align with KPIs
  • Scope matches project charter
  • Stakeholder concerns addressed
  • Implementation-derived content is translated into business-language outcomes

Error Codes:

CodeSeverityDescription
REV-SA001WarningBusiness objective not traced to strategy
REV-SA002InfoSuccess metric may not align with KPI
REV-SA003WarningScope may exceed project charter
REV-SA004FlagRequires stakeholder review
REV-SA005WarningImplementation-heavy wording not abstracted to BRD business language

8. Naming Compliance

Validates element IDs follow doc-naming standards.

Scope:

  • Element IDs use BRD.NN.TT.SS format
  • Element type codes valid for BRD (01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 22, 23, 24, 32)
  • Element type codes match section context (semantic validation)
  • No legacy patterns (simple OR compound)

Section-Element Type Mapping (MANDATORY):

Element type codes MUST match the section where they appear:

SectionSection TitleRequired CodeCode Meaning
2Business Objectives23Business Objective
5User Stories09User Story
6Functional Requirements01Functional Requirement
7.1Quality Attributes02Quality Attribute
7.2ADR Topics32Architecture Topic
8.1Constraints03Constraint
8.2Assumptions04Assumption
9Acceptance Criteria06Acceptance Criteria
10Risk Management07Risk

Semantic Validation Algorithm:

FOR each section containing element IDs:
  1. Identify section number from heading (## N. Title)
  2. Extract all element IDs matching BRD.NN.TT.SS pattern
  3. FOR each element ID:
     a. Extract TT (element type code)
     b. Look up expected code for current section
     c. IF TT != expected_code:
        - Flag REV-N007: Section-element type mismatch
        - Report expected vs actual code

Example Violations:

Found IDSectionExpectedActualViolation
BRD.64.05.015. User Stories09 (User Story)05 (Dependency)REV-N007
BRD.64.01.012. Business Objectives23 (Business Objective)01 (Functional Req)REV-N007

Legacy Pattern Detection (MANDATORY):

Detect BOTH simple and compound legacy patterns:

Pattern TypeRegexExamples
Simple legacy`(FRAC
Compound legacy`(FRAC
Domain-prefixed`(FRNFR)-[A-Z]+-[0-9]+`

Detection Algorithm:

# Comprehensive legacy pattern detection (MUST run all)
grep -E "(FR|AC|BO|NFR|QA|BC|BA)-[0-9]+" file.md                    # Simple patterns
grep -E "(FR|AC|BO|NFR|QA|BC)(-[A-Za-z0-9]+)+-[0-9]+" file.md       # Compound patterns
grep -E "(RISK|METRIC|Event|State|TASK)-[0-9]+" file.md             # Other legacy patterns

Auto-Fix:

  • Convert legacy patterns to unified format
  • Handle compound patterns: FR-CICD-001BRD.NN.01.01
  • Suggest correct element type codes

Error Codes:

CodeSeverityDescription
REV-N001ErrorInvalid element ID format
REV-N002ErrorElement type code not valid for BRD
REV-N003ErrorSimple legacy pattern detected (e.g., FR-001)
REV-N004WarningInconsistent ID sequencing
REV-N005ErrorCompound legacy pattern detected (e.g., FR-CICD-001)
REV-N006ErrorDomain-prefixed legacy pattern detected (e.g., NFR-PERF-001)
REV-N007ErrorSection-element type mismatch (e.g., User Stories using code 05 instead of 09)

9. Upstream Drift Detection (Conditional)

Detects when upstream reference documents have been modified after the BRD was created. This check is CONDITIONAL based on upstream_mode setting.

9.0 Mode Detection (First Step)

Before running drift detection:

  1. Read YAML frontmatter custom_fields.upstream_mode
  2. Apply behavior:
upstream_modeActionScore
"none" (default)Skip Check #9 entirely5/5 automatic
"ref"Run drift detection on upstream_ref_pathCalculated
*(not set)*Treat as "none"5/5 automatic

If skipping:

  • Log: INFO: Upstream drift detection skipped (upstream_mode: none)
  • Award full 5/5 points
  • Create minimal drift cache entry

Scope (when upstream_mode: "ref"):

  • Documents in paths specified by upstream_ref_path
  • @ref: tag targets within those paths
  • Traceability section upstream artifact links
  • GAP analysis document references

9.1 Drift Cache File (MANDATORY)

Location: docs/01_BRD/{BRD_folder}/.drift_cache.json

IMPORTANT: The reviewer MUST:

  1. Read the cache if it exists (for hash comparison)
  2. Create the cache if it doesn't exist
  3. Update the cache after every review with current hashes

Cache Schema (when upstream_mode: "none" or not set):

{
  "schema_version": "1.1",
  "document_id": "BRD-01",
  "document_version": "1.0",
  "upstream_mode": "none",
  "upstream_ref_path": null,
  "drift_detection_skipped": true,
  "skip_reason": "upstream_mode set to none (default)",
  "last_reviewed": "2026-02-24T21:00:00",
  "reviewer_version": "1.6",
  "upstream_documents": {},
  "review_history": [
    {
      "date": "2026-02-24T21:00:00",
      "score": 97,
      "drift_detected": false,
      "report_version": "v001"
    }
  ]
}

Cache Schema (when upstream_mode: "ref"):

{
  "schema_version": "1.1",
  "document_id": "BRD-01",
  "document_version": "1.0",
  "upstream_mode": "ref",
  "upstream_ref_path": ["../../00_REF/source_docs/"],
  "drift_detection_skipped": false,
  "last_reviewed": "2026-02-24T21:00:00",
  "reviewer_version": "1.6",
  "upstream_documents": {
    "../../00_REF/source_docs/BeeLocal_BRD_v2.1.md": {
      "hash": "sha256:c9810281...",
      "last_modified": "2024-12-25T00:00:06",
      "file_size": 76908,
      "version": "2.1",
      "sections_tracked": []
    }
  },
  "review_history": [
    {
      "date": "2026-02-24T21:00:00",
    PRD-Ready Score = 100 - total_deductions
      "drift_detected": false,
      "report_version": "v001"
    }
  ]
}

9.2 Detection Algorithm (Three-Phase)

PHASE 1: Load Cache (if exists)
=========================================
1. Check for .drift_cache.json in BRD folder
2. If exists:
   - Load cached hashes and metadata
   - Set detection_mode = "hash_comparison"
3. If not exists:
   - Set detection_mode = "timestamp_only"
   - Will create cache at end of review

PHASE 2: Detect Drift
=========================================
For each upstream reference in BRD:

  A. Extract reference:
     - @ref: tags → [path, section anchor]
     - @strategy: tags → [document ID]
     - Links to ../00_REF/ → [path]
     - Traceability table upstream artifacts → [path]

  B. Resolve and validate:
     - Resolve path to absolute file path
     - Check file exists (skip if covered by Check #1)
     - Get file stats: mtime, size

  C. Compare (based on detection_mode):

     IF detection_mode == "hash_comparison":
       - Compute SHA-256 hash of current file content
       - Compare to cached hash
       - IF hash differs:
           - Calculate change_percentage
           - Flag as CONTENT_DRIFT (REV-D002)
           - IF change > 20%: Flag as CRITICAL (REV-D005)

     ELSE (timestamp_only):
       - Compare file mtime > BRD last_updated
       - IF mtime > BRD date:
           - Flag as TIMESTAMP_DRIFT (REV-D001)

  D. Check version field (if YAML frontmatter):
     - Extract version from upstream doc
     - Compare to cached version
     - IF version incremented: Flag REV-D003

PHASE 3: Update Cache (MANDATORY)
=========================================
1. Compute SHA-256 hash for ALL upstream documents
2. Create/update .drift_cache.json with:
   - Current hashes
   - Current timestamps
   - Current file sizes
   - Review metadata
3. Append to review_history array

9.3 Hash Calculation (MANDATORY BASH EXECUTION)

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

9.3.1 Compute File Hash

Execute this bash command for each upstream document:

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

Example:

sha256sum docs/00_REF/project_governance/engineering_standards.md | cut -d' ' -f1
# Output: a9ca05f4e9b2379465526221271672954feff29e40c57f2a91fe8a050eb46105

Store result in drift cache as: "hash": "sha256:<64_hex_characters>"

9.3.2 Hash Format Validation

Before writing to drift cache, validate the hash:

CheckRequirementAction if Failed
PrefixMust be sha256:Add prefix
LengthExactly 64 hex characters after prefixRe-run sha256sum
Characters[0-9a-f] onlyRe-run sha256sum
PlaceholdersMust NOT be placeholderRe-run sha256sum

REJECTED VALUES (re-compute immediately if found):

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

9.3.3 Verification After Cache Write

After updating .drift_cache.json, verify hashes are valid:

# Verify all hashes match valid format
grep -oP '"hash":\s*"sha256:[0-9a-f]{64}"' .drift_cache.json

# Check for any placeholder values (must return empty)
grep -E '"hash":\s*"(sha256:)?(verified_no_drift|pending_verification|TBD)"' .drift_cache.json

If verification fails, re-run sha256sum and update cache before proceeding.

9.3.4 Hash Comparison Algorithm

When comparing hashes for drift detection:

  1. Read stored hash from .drift_cache.json
  2. Validate stored hash - if placeholder, flag REV-D009 and compute real hash
  3. Compute current hash via bash: CURRENT_HASH=$(sha256sum <upstream_file> | cut -d' ' -f1)
  4. Compare:

- If CURRENT_HASH!= stored_hash → Flag REV-D002 (CONTENT_DRIFT) - If hashes match → No drift

  1. Update cache with current hash and timestamp

9.4 Error Codes

CodeSeverityDescriptionTrigger
REV-D001WarningUpstream document modified after BRD creationmtime > BRD date (no cache)
REV-D002WarningReferenced content has changedhash mismatch (with cache)
REV-D003InfoUpstream document version incrementedversion field changed
REV-D004InfoNew content added to upstreamfile size increased >10%
REV-D005ErrorCritical modification (>20% change)hash diff >20%
REV-D006InfoCache created (first review)no prior cache existed
REV-D007InfoDrift detection skippedupstream_mode: "none"
REV-D008Warningupstream_ref_path not foundspecified path doesn't exist
REV-D009ErrorInvalid hash placeholder detectedhash is verified_no_drift, pending_verification, or invalid format

9.5 Report Output

## 9. Upstream Drift Detection (5/5)

### Cache Status

| Field | Value |
|-------|-------|
| Cache File | `.drift_cache.json` |
| Cache Status | ✅ Updated |
| Detection Mode | Hash Comparison |
| Documents Tracked | 2 |

### Upstream Document Analysis

| Upstream Document | Hash Status | Last Modified | Change % | Status |
|-------------------|-------------|---------------|----------|--------|
| F1_IAM_Technical_Specification.md | ✅ Match | 2026-02-10T15:34:26 | 0% | Current |
| GAP_Foundation_Module_Gap_Analysis.md | ✅ Match | 2026-02-10T15:34:21 | 0% | Current |

### Drift Summary

| Status | Count | Details |
|--------|-------|---------|
| ✅ Current | 2 | All upstream documents synchronized |
| ⚠️ Warning | 0 | No drift detected |
| ❌ Critical | 0 | No major changes |

**Cache updated**: 2026-02-10T17:00:00

9.6 Configuration

SettingDefaultDescription
cache_enabledtrueMandatory - always create/update cache
drift_threshold_days7Days before timestamp drift becomes Warning
critical_change_pct20Percentage change for critical drift
track_sectionstrueTrack individual section hashes for anchored refs
max_history_entries10Maximum review_history entries to retain

Review Score Calculation

Canonical Source of Truth:

  • ai_dev_ssd_flow/01_BRD/BRD_MVP_VALIDATION_RULES.md (deduction model)
  • ai_dev_ssd_flow/01_BRD/README.md (quality-gate interpretation)

Scoring Formula (Deduction-Based):

PRD-Ready Score = 100 - total_deductions

Deduction CategoryMax DeductionRule Summary
PRD-level content contamination50Code blocks and technical/UI implementation language in BRD business sections
FR structure completeness30Missing required FR subsections and invalid cross-references
Document structure and quality20Missing required sections, document control gaps, revision history issues

Total: 100 - total_deductions (bounded to 0..100)

Blocking Note: Structure compliance check remains blocking. If structure validation fails (e.g., REV-STR001), the review cannot pass regardless of computed score.

Thresholds:

  • PASS: ≥ 90 (configurable)
  • FAIL: < 90

Workflow Gate Interpretation:

  • >=90: PRD-ready gate satisfied
  • <90: not PRD-ready, must route to fix cycle/manual remediation

Command Usage

Basic Usage

# Review specific BRD
/doc-brd-reviewer BRD-01

# Review BRD by path
/doc-brd-reviewer docs/01_BRD/BRD-01_platform/

# Review all BRDs
/doc-brd-reviewer all

Options

OptionDefaultDescription
--min-score90Minimum passing review score
--auto-fixtrueApply automatic fixes
--no-auto-fixfalseDisable auto-fix (report only)
--checkallSpecific checks to run (comma-separated)
--skipnoneChecks to skip (comma-separated)
--verbosefalseDetailed output per check
--reporttrueGenerate markdown report

Output Report

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

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

File Naming: BRD-NN.R_review_report_vNNN.md

Location: Inside the BRD nested folder: docs/01_BRD/BRD-NN_{slug}/

Versioning Rules

  1. First Review: Creates BRD-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 Algorithm:

1. Scan folder for pattern: BRD-NN.R_review_report_v*.md
2. Extract highest version number (N)
3. Create new file with version (N + 1)

Example:

docs/01_BRD/BRD-03_f3_observability/
├── BRD-03.R_review_report_v001.md    # First review
├── BRD-03.R_review_report_v002.md    # After fixes
└── BRD-03.R_review_report_v003.md    # Final review

Delta Reporting

When previous reviews exist, include score comparison:

## Score Comparison

| Metric | Previous (v002) | Current (v003) | Delta |
|--------|-----------------|----------------|-------|
| Overall Score | 85 | 94 | +9 |
| Errors | 3 | 0 | -3 |
| Warnings | 5 | 2 | -3 |

See REVIEW_DOCUMENT_STANDARDS.md for complete requirements.


Integration with doc-brd-autopilot

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

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

Related Skills

SkillRelationship
doc-namingNaming standards for Check #8
doc-brd-autopilotInvokes this skill in Phase 5
doc-brd-validatorStructural validation (Phase 4)
doc-brd-fixerApplies fixes based on review findings
doc-brdBRD creation rules
doc-prd-autopilotDownstream consumer

Version History

VersionDateChanges
2.22026-02-28T10:05:00Validator parity alignment: Removed code 33 from BRD valid element code set to match ai_dev_ssd_flow/scripts/validate_standardized_element_codes.py; retained REV-N007 semantic mismatch checks.
2.12026-02-28T09:30:00Section-element type semantic validation: Added mandatory check that element type codes match section context (e.g., Section 5 User Stories must use code 09, not 05); Added section-element type mapping table; Added REV-N007 error code; Added semantic validation algorithm
2.02026-02-27T22:00:00Comprehensive legacy pattern detection: Enhanced Check #8 (Naming Compliance) to detect compound/domain-prefixed legacy patterns (e.g., FR-CICD-001, NFR-PERF-002); Added regex patterns for simple, compound, and domain-prefixed patterns; Added REV-N005 and REV-N006 error codes; Added detection algorithm with bash commands; Updated auto-fix to handle compound patterns
1.92026-02-27T16:30:00Fixed drift detection hash computation: Section 9.3 now requires mandatory bash sha256sum execution; Added hash format validation (Section 9.3.2); Added placeholder rejection list; Added verification step (Section 9.3.3); Added comparison algorithm (Section 9.3.4); Added REV-D009 error code for invalid hash placeholders
1.22026-02-26T12:45:00Unified template-based versioning: Skill version now tracks ai_dev_ssd_flow/01_BRD/BRD-MVP-TEMPLATE schema version to avoid cross-skill version drift.
1.82026-02-26T12:30:00Template compliance correction: Aligned Check #6 subsection contract to ai_dev_ssd_flow/01_BRD/BRD-MVP-TEMPLATE.md v1.2; corrected mismatched requirements (1.1-1.4, 3.4.1/3.4.2, 5.1-5.2, 12.1-12.3, 18.1-18.5) and clarified glossary requirements as 17.5 Cross-References + 17.6 External Standards.
1.72026-02-25T11:00:00Template alignment: Check #6 updated for 18-section structure validation; Added MVP-critical subsection validation (2.1, 3.2, 9.1, 14.5, 15.3, 16.1-16.4, 17.1-17.6); Added REV-MVP001-MVP010 error codes; Updated scoring formula (28-point validation: 18 sections + 10 MVP subsections)
1.62026-02-24T21:30:00Conditional drift detection: Check #9 now skipped when upstream_mode: "none" (default); Removed @strategy: tag references; Updated drift cache schema to v1.1 with upstream_mode and drift_detection_skipped fields; Added REV-D007 (drift skipped) and REV-D008 (path not found) error codes; Updated scoring formula for conditional check
1.52026-02-11T18:00:00Structure Compliance: Added Check #0 for nested folder rule enforcement (REV-STR001-STR003); Updated workflow diagram with structure validation decision node; Added structure compliance to scoring (12% weight, blocking); Consistent with other reviewer skills
1.42026-02-10T17:00:00Mandatory drift cache: Reviewer MUST create/update .drift_cache.json after every review; Three-phase detection algorithm; SHA-256 hash computation; Hash comparison mode when cache exists; REV-D006 code for cache creation; Cache schema with review_history tracking
1.32026-02-10T14:30:00Added Check #9: Upstream Drift Detection - detects when source documents modified after BRD creation; REV-D001-D005 error codes; drift cache support; configurable thresholds
1.22026-02-10Added element type code 33 (Benefit Statement) to valid BRD codes per then-current guidance (superseded in 2.2)
1.12026-02-10Added review versioning support (_vNNN pattern); Delta reporting for score comparison
1.02026-02-10Initial skill creation with 8 review checks; ADR topic coverage validation; Strategic alignment check

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

38.55%
按下载量换算31

Claude

27.74%
按下载量换算22

Cursor

20.44%
按下载量换算16

Gemini CLI

9.14%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills