Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

doc-brd-auditBRD 审核文件

Agent Skill

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

总安装

643

周安装

26

GitHub Stars

14

下载量

202
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

对 BRD 执行统一审计,结合脚本验证与内容审查。

  • 适用于结构合规性与语义质量的单遍处理流程。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 输出合并报告供修复工具使用,避免多技能切换。
  • 仅限交互式手动调用,不支持预提交自动化运行。
  • doc-brd-audit 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-brd-audit

MANUAL USE ONLY - This skill is for interactive use, not pre-commit. Pre-commit runs shell scripts directly without Claude.

Purpose

Run a unified BRD audit workflow that combines shell script validation and Claude content review into a single pass, producing one combined report optimized for doc-brd-fixer input.

Architecture: Shell scripts for structural validation + Claude for content quality review.

Layer: 1 (BRD Quality Gate Wrapper)

Upstream: BRD file(s)

Downstream:

  • Combined Audit Report: BRD-NN.A_audit_report_vNNN.md
  • Optional Fix Cycle trigger for doc-brd-fixer

Why This Skill Exists

The 2-skill model (doc-brd-audit + doc-brd-fixer) simplifies the BRD quality workflow.

ConcernOwner Skill
All validation + scoringdoc-brd-audit (this skill)
Apply fixes from audit reportdoc-brd-fixer

Fresh Audit Policy (MANDATORY)

ALWAYS run the audit from scratch. Do NOT:

  • Reference previous audit reports for scoring decisions
  • Skip validation steps based on drift cache history
  • Assume compliance from prior fix history
  • Use cached results from previous runs

ALWAYS:

  • Run all validation scripts fresh every time
  • Re-check all structure/schema compliance
  • Re-compute PRD-ready score independently
  • Generate a new audit report with incremented version

Report Cleanup Policy (MANDATORY)

After generating a new audit report, delete all previous reports. Old reports serve no purpose since:

  • Fresh Audit Policy means old reports are never reused for scoring
  • Only the latest report is used by doc-brd-fixer
  • Multiple old reports clutter the BRD folder

Cleanup Rules

File PatternActionReason
BRD-NN.A_audit_report_v*.md (older versions)DELETESuperseded by new audit
BRD-NN.R_review_report_v*.md (legacy)DELETEDeprecated format, superseded
BRD-NN.F_fix_report_v*.mdKEEPFix history may be useful for tracking
.drift_cache.jsonKEEPTracks review history metadata

Cleanup Execution

After writing the new audit report, run:

# In the BRD folder (e.g., docs/01_BRD/BRD-50_octo_agent_orchestration/)
BRD_FOLDER="$1"
NEW_REPORT="$2"  # e.g., BRD-50.A_audit_report_v012.md

# Delete old audit reports (keep only the new one)
find "${BRD_FOLDER}" -name "BRD-*.A_audit_report_v*.md" ! -name "$(basename ${NEW_REPORT})" -delete

# Delete legacy review reports (deprecated format)
find "${BRD_FOLDER}" -name "BRD-*.R_review_report_v*.md" -delete

What Gets Kept

After cleanup, the BRD folder should contain:

docs/01_BRD/BRD-NN_{slug}/
├── BRD-NN_{slug}.md              # Main BRD document
├── BRD-NN.A_audit_report_vNNN.md # Latest audit report (ONLY ONE)
├── BRD-NN.F_fix_report_v*.md     # Fix reports (kept for history)
└── .drift_cache.json             # Drift detection cache

Cleanup Confirmation

The audit report should include a cleanup summary:

## Cleanup Summary
- Deleted: 3 old audit reports (v009, v010, v011)
- Deleted: 4 legacy review reports
- Kept: 2 fix reports

When to Use

Use doc-brd-audit when:

  • You want one command for BRD quality checks
  • You need a combined report for doc-brd-fixer
  • You are running CI/manual QA before PRD generation

Do NOT use when:

  • BRD does not exist (use doc-brd / doc-brd-autopilot generation first)
  • You only need one specific check domain (use validator or reviewer directly)

Execution Contract

Input

  • BRD path (docs/01_BRD/BRD-NN_*/...)
  • Optional: threshold (default review threshold: 90)

Sequence (Mandatory)

1) Run pre-commit validation scripts (see Script-Based Validation)
2) Parse script output for findings
3) Run content quality review (Claude analysis)
4) Normalize and merge all findings
5) Write BRD-NN.A_audit_report_vNNN.md
6) If auto-fixable findings exist, hand off to doc-brd-fixer

Script-Based Validation (Pre-commit Integration)

This skill MUST invoke the same validation scripts used by pre-commit hooks. This ensures consistency between CI/CD and manual audit runs.

Required Scripts

ScriptPurposeExit Codes
validate_brd_wrapper.shCore + advisory validation wrapper0=pass, 2=core fail, 1=advisory fail
validate_standardized_element_codes.pyElement ID format validation0=pass, non-zero=fail
detect_legacy_element_ids.pyLegacy pattern detection0=pass, non-zero=warnings

Script Execution

# From repository root
REPO_ROOT="$(git rev-parse --show-toplevel)"
BRD_PATH="$1"  # e.g., docs/01_BRD/BRD-01_platform

# 1. Run core wrapper (includes structural + quality gate)
bash "${REPO_ROOT}/ai_dev_ssd_flow/01_BRD/scripts/validate_brd_wrapper.sh" "${BRD_PATH}" 2>&1

# 2. Run standardized element codes (strict mode)
python3 "${REPO_ROOT}/ai_dev_ssd_flow/scripts/validate_standardized_element_codes.py" "${BRD_PATH}" --strict 2>&1

# 3. Run legacy pattern detection
python3 "${REPO_ROOT}/ai_dev_ssd_flow/scripts/detect_legacy_element_ids.py" "${BRD_PATH}" --summary 2>&1

Script Output Parsing

The skill MUST parse script output to extract findings:

Output PatternFinding TypeSeverity
[FAIL]Blocking issueerror
[WARN]Non-blocking issuewarning
[PASS]Check passedinfo
ERROR:Script errorerror
Line with file path + issueFile-specific findingvaries

Validation Tiers (from validate_brd_wrapper.sh)

TierChecksBlocking
Tier 1 (CORE)Standardized element codes, BRD structural validation, BRD quality gateYes
Tier 2 (ADVISORY)Metadata validation, Link validation, Forward reference validation, Diagram consistencyNo (default)

Pre-commit vs Skill Separation

Pre-commit hooks run shell scripts directly (no Claude):

# .pre-commit-config.yaml - runs on every commit
- id: brd-core-wrapper           # validate_brd_wrapper.sh
- id: brd-standardized-element-codes  # validate_standardized_element_codes.py
- id: brd-legacy-patterns        # detect_legacy_element_ids.py

This skill is for manual/interactive use:

# Manual invocation for full audit + report generation
/doc-brd-audit docs/01_BRD/BRD-01_platform

Flow:

Automatic (pre-commit):
  git commit → shell scripts → pass/fail

Manual (skill):
  /doc-brd-audit → shell scripts → Claude review → audit report

Combined Status Rules

  • PASS: Script validation PASS AND Claude review score >= threshold AND no blocking issues
  • FAIL: Script validation FAIL OR Claude review score < threshold OR blocking/manual-required issues present

Diagram Contract Gate (ADVISORY for BRD):

  • BRD diagram findings are recorded as non-blocking by default.
  • Recommended tags: @diagram: c4-l1 and @diagram: dfd-l0
  • If sequence diagram exists, recommend one sequence tag (@diagram: sequence-sync|sequence-async|sequence-error)
  • Recommended intent fields: diagram_type, level, scope_boundary, upstream_refs, downstream_refs
  • Optional strict mode only when explicitly enabled (e.g., audit_strict_diagrams: true).

Metadata Validation

The audit MUST validate BRD frontmatter metadata compliance.

Required Metadata Fields

FieldTypeRequiredValid Values
document_typestringYesbrd-document
artifact_typestringYesBRD
layerintegerYes1
deliverable_typestringYescode, document, ux, risk, process

Metadata Validation Rules

VALID-M001: deliverable_type Present

  • Severity: Error
  • Check: deliverable_type exists in custom_fields
  • Fix: Add deliverable_type: code (default)

VALID-M002: deliverable_type Valid Value

  • Severity: Error
  • Check: deliverable_type is one of: code, document, ux, risk, process
  • Fix: Reset to code (default) or suggest based on BRD content

VALID-M003: document_type Correct for Instance

  • Severity: Error
  • Check: document_type is brd-document (not template)
  • Fix: Change to brd-document

Metadata Validation Detection

def validate_deliverable_type(frontmatter: dict) -> list[Finding]:
    """Validate deliverable_type metadata field."""
    findings = []
    custom_fields = frontmatter.get('custom_fields', {})

    # Check M001: deliverable_type present
    if 'deliverable_type' not in custom_fields:
        findings.append({
            'code': 'VALID-M001',
            'severity': 'error',
            'message': 'Missing deliverable_type in custom_fields',
            'fix_action': 'Add deliverable_type: code',
            'confidence': 'auto-safe'
        })
        return findings

    # Check M002: valid value
    deliverable_type = custom_fields['deliverable_type']
    valid_values = ['code', 'document', 'ux', 'risk', 'process']

    if deliverable_type not in valid_values:
        findings.append({
            'code': 'VALID-M002',
            'severity': 'error',
            'message': f'Invalid deliverable_type: {deliverable_type}',
            'valid_values': valid_values,
            'fix_action': f'Change to one of: {", ".join(valid_values)}',
            'confidence': 'auto-assisted'  # May need content analysis
        })

    return findings

Combined Report Format (for doc-brd-fixer)

Output file: BRD-NN.A_audit_report_vNNN.md

Required sections:

  1. ## Summary

- BRD ID, timestamp (EST), overall status - Script validation status, Claude review score

  1. ## Score Calculation (Deduction-Based)

- Formula: 100 - total_deductions - Deductions grouped by: contamination (max 50), FR completeness (max 30), structure/quality (max 20) - Threshold comparison (>=90 pass gate)

  1. ## Metadata Validation Findings

- deliverable_type presence and validity - document_type correctness - Other required metadata fields

  1. ## Script Findings

- Findings from shell validation scripts - List by severity/code

  1. ## Claude Review Findings

- Findings from Claude content quality review - List by severity/code

  1. ## Diagram Contract Findings

- Required BRD tags status (c4-l1, dfd-l0) - Sequence contract status when sequence is present - Intent header completeness status

  1. ## Fix Queue for doc-brd-fixer

- auto_fixable - manual_required - blocked

  1. ## Recommended Next Step

- run doc-brd-fixer - or manual update required

Fix Queue Normalization

Each finding MUST include:

  • source: script | claude (script = shell validation, claude = content review)
  • code: issue code
  • severity: error|warning|info
  • file: relative path
  • section: heading/anchor if known
  • action_hint: short imperative guidance
  • confidence: high|medium|manual-required

Hand-off Contract to doc-brd-fixer

doc-brd-fixer MUST accept combined audit report as equivalent upstream input:

  • BRD-NN.A_audit_report_vNNN.md
  • BRD-NN.R_review_report_vNNN.md (legacy compatibility)

If both exist, fixer should prefer latest timestamp.


Example Invocation

/doc-brd-audit docs/01_BRD/BRD-01_platform/BRD-01_platform.md

Expected outcome:

  1. Shell validation scripts run (same as pre-commit)
  2. Claude content quality review runs
  3. Combined audit report generated: BRD-01.A_audit_report_vNNN.md
  4. Fixer can execute directly from combined report

Version History

VersionDateChanges
2.42026-03-05Metadata Validation: Added validation for deliverable_type metadata field (VALID-M001, VALID-M002, VALID-M003); Validates presence, valid values (code, document, ux, risk, process), and document_type correctness; Added "Metadata Validation Findings" section to combined report
2.32026-03-05Report Cleanup Policy: Added mandatory cleanup of old audit reports after generating new one; Deletes previous BRD-NN.A_audit_report_v*.md and legacy BRD-NN.R_review_report_v*.md files; Keeps fix reports and drift cache; Added cleanup summary section to audit report
2.22026-03-05Shell-first approach: Pre-commit runs shell scripts directly (not Claude); Skill is for manual use only; Skill invokes same scripts then adds Claude review; Removed obsolete doc-brd-validator/doc-brd-reviewer references
2.12026-03-01Added Fresh Audit Policy (MANDATORY); All validation and scoring unified in this skill
1.32026-02-26Added advisory BRD C4/DFD/sequence diagram contract checks and required Diagram Contract Findings section in combined audit reports
1.22026-02-26Initial audit wrapper; combined report contract for fixer

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.11%
按下载量换算67

Claude

33.21%
按下载量换算67

Cursor

19.22%
按下载量换算39

Gemini CLI

9.21%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-brd-audit 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills