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

doc-prd-audit文档 PRD 审核

Agent Skill

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

总安装

917

周安装

39

GitHub Stars

14

下载量

321
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

对 PRD 进行结构与内容双重质量审查。

  • 合并验证与评审流程,输出综合改进报告。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 检测元数据合规性、章节完整性与阈值一致性。
  • 替代旧版 validator 和 reviewer,统一审计标准。
  • doc-prd-audit 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-prd-audit

Purpose

Run a unified PRD audit workflow that combines structural validation and content quality checks into a single pass, producing one combined report optimized for doc-prd-fixer input.

2-Skill Model: This skill replaces the separate doc-prd-validator and doc-prd-reviewer skills (now deprecated). All validation and review logic is consolidated here.

Deprecated Skills:

SkillStatusReplacement
doc-prd-validatorDEPRECATEDMerged into doc-prd-audit
doc-prd-reviewerDEPRECATEDMerged into doc-prd-audit

Layer: 2 (PRD Quality Gate Wrapper)

Upstream: PRD file(s)

Downstream:

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

Why This Skill Exists

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

ConcernOwner Skill
All validation + scoringdoc-prd-audit (this skill)
Apply fixes from audit reportdoc-prd-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 EARS-Ready and SYS-Ready scores independently
  • Generate a new audit report with incremented version

When to Use

Use doc-prd-audit when:

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

Do NOT use when:

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

Execution Contract

Input

  • PRD path (docs/02_PRD/PRD-NN_*/...)
  • Optional: threshold (default review threshold: 90)

Sequence (Mandatory)

1) Run doc-prd-validator (internal)
2) Run doc-prd-reviewer (internal)
3) Normalize and merge findings
4) Write PRD-NN.A_audit_report_vNNN.md
5) Create/Update .drift_cache.json (MANDATORY)
6) If auto-fixable findings exist, hand off to doc-prd-fixer

Drift Cache Creation (MANDATORY)

After every audit, the skill MUST create or update .drift_cache.json in the PRD folder.

Location: docs/02_PRD/{PRD_folder}/.drift_cache.json

Schema (v1.2):

{
  "schema_version": "1.2",
  "document_id": "PRD-NN",
  "document_version": "X.Y",
  "upstream_mode": "brd",
  "upstream_ref_path": "../../01_BRD/BRD-NN_{slug}/",
  "drift_detection_skipped": false,
  "last_reviewed": "YYYY-MM-DDTHH:MM:SS",
  "last_fixed": "YYYY-MM-DDTHH:MM:SS",
  "reviewer_version": "2.2",
  "fixer_version": null,
  "autopilot_version": null,
  "upstream_documents": {
    "../../01_BRD/BRD-NN_{slug}/BRD-NN.0_index.md": {
      "hash": "sha256:<64-hex-chars>",
      "last_modified": "YYYY-MM-DDTHH:MM:SS",
      "file_size": 12345,
      "version": "X.Y"
    }
  },
  "review_history": [
    {
      "date": "YYYY-MM-DDTHH:MM:SS",
      "score": 100,
      "drift_detected": false,
      "report_version": "vNNN",
      "review_type": "audit",
      "status": "PASS"
    }
  ],
  "fix_history": []
}

Required Actions:

  1. Create if .drift_cache.json does not exist
  2. Update last_reviewed timestamp
  3. Append to review_history array with current audit results
  4. Compute SHA-256 hashes for all tracked upstream BRD documents
  5. Set drift_detected: true if any upstream hash changed since last review

Hash Computation:

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

Error Codes:

CodeSeverityDescription
REV-D006InfoCache created (first review)
VAL-H001ErrorDrift cache missing hash for upstream document
VAL-H002ErrorInvalid hash format (must be sha256:<64 hex chars>)

Combined Status Rules

  • PASS: Validator PASS AND Reviewer score >= threshold AND no blocking issues
  • FAIL: Validator FAIL OR Reviewer score < threshold OR blocking/manual-required issues present

Diagram Contract Gate (BLOCKING for PRD)

Audit MUST fail when any blocking diagram code is present:

  • PRD-E023 missing @diagram: c4-l2
  • PRD-E024 missing @diagram: dfd-l1
  • PRD-E025 missing @diagram: sequence-*
  • PRD-E026 sequence diagram missing alt/else exception path

Also include warning diagnostics when present:

  • PRD-W011 diagram intent metadata incomplete

Element Code Contract Gate (BLOCKING for PRD)

Audit MUST fail when element type codes violate naming standards:

  • PRD-E020 Element type code not valid for PRD (must be in VALID_PRD_CODES set)
  • PRD-E022 Section-element type code mismatch (e.g., Section 5 metrics must use type 08)

Valid PRD Type Codes: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 22, 24, 32

Section-Element Mapping (Enforced):

SectionExpected Type CodeElement Type
508Metric/KPI
709User Story
801Functional Requirement
902Quality Attribute
1032Architecture Topic
1207Risk
1406Acceptance Criteria

Validation Command:

bash ai_dev_ssd_flow/02_PRD/scripts/prd_standardized_element_codes_hook.sh <path>

Validation Checks (from deprecated doc-prd-validator)

1. Metadata Validation

Required custom_fields:
  document_type: ["prd", "template"]
  artifact_type: "PRD"
  layer: 2
  architecture_approaches: [array format]
  priority: ["primary", "shared", "fallback"]
  development_status: ["active", "draft", "deprecated", "reference"]

Required tags:
  - prd (or prd-template)
  - layer-2-artifact

Forbidden tag patterns:
  - "^product-requirements$"
  - "^product-prd$"
  - "^feature-prd$"

2. Structure Validation (MVP Template - 17 Sections)

Required Sections (MVP Template):

SectionTitleRequired
1Document ControlMANDATORY
2Executive SummaryMANDATORY
3Problem StatementMANDATORY
4Target Audience & User PersonasMANDATORY
5Success Metrics (KPIs)MANDATORY
6Scope & RequirementsMANDATORY
7User Stories & User RolesMANDATORY
8Functional RequirementsMANDATORY
9Quality AttributesMANDATORY
10Architecture RequirementsMANDATORY
11Constraints & AssumptionsMANDATORY
12Risk AssessmentMANDATORY
13Implementation ApproachMANDATORY
14Acceptance CriteriaMANDATORY
15Budget & ResourcesMANDATORY
16TraceabilityMANDATORY
17GlossaryOptional
18Appendix A: Future RoadmapOptional
19Migration to Full PRD TemplateOptional

3. Document Control Required Fields

FieldDescriptionRequired
StatusDraft/Review/Approved/ImplementedMANDATORY
VersionSemantic versioning (X.Y.Z)MANDATORY
Date CreatedYYYY-MM-DD formatMANDATORY
Last UpdatedYYYY-MM-DD formatMANDATORY
AuthorProduct Manager/Owner NameMANDATORY
ReviewerTechnical reviewer nameMANDATORY
ApproverFinal approver nameMANDATORY
BRD Reference@brd: BRD.NN.xxxx formatMANDATORY
SYS-Ready ScoreXX/100 (Target: ≥90)MANDATORY
EARS-Ready ScoreXX/100 (Target: ≥90)MANDATORY

4. Dual Scoring Requirements

ScoreThreshold
SYS-Ready Score≥90%
EARS-Ready Score≥90%

Both scores must be present and meet thresholds for downstream artifact generation.

5. File Naming Convention

Pattern: PRD-NN_{descriptive_slug}.md

  • NN: 2+ digit number (01, 02,... 99, 100)
  • descriptive_slug: lowercase with underscores

6. Traceability Validation

Layer 2 Cumulative Tags (Required):

@brd: BRD.NN.xxxx

Unified Element ID Format: PRD.NN.xxxx

7. Structure Compliance (Nested Folder Rule)

ALL PRDs MUST use nested folders regardless of size.

PRD TypeRequired Location
Monolithicdocs/02_PRD/PRD-NN_{slug}/PRD-NN_{slug}.md
Sectioneddocs/02_PRD/PRD-NN_{slug}/PRD-NN.0_index.md, PRD-NN.1_*.md, etc.

Review Checks (from deprecated doc-prd-reviewer)

1. Link Integrity

Validates all internal document links resolve correctly.

Error Codes:

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

2. Threshold Consistency

Verifies performance metrics match across all sections.

Error Codes:

CodeSeverityDescription
REV-T001ErrorThreshold mismatch across PRD sections
REV-T002ErrorThreshold differs from BRD source
REV-T003WarningThreshold unit inconsistency (ms vs s)
REV-T004InfoThreshold stricter than BRD (acceptable)

3. Diagram Contract Compliance

Error Codes:

CodeSeverityDescription
REV-DC001ErrorMissing required PRD diagram tag (c4-l2, dfd-l1, or sequence-*)
REV-DC002ErrorRequired sequence flow missing explicit exception path
REV-DC003WarningDiagram intent header missing required fields

4. BRD Alignment

Validates PRD requirements accurately reflect BRD source.

Error Codes:

CodeSeverityDescription
REV-A001ErrorPRD requirement without BRD source
REV-A002WarningBRD requirement without PRD mapping
REV-A003ErrorScope mismatch (PRD vs BRD)
REV-A004InfoRequirement correctly marked as deferred

5. Placeholder Detection

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

6. Traceability Tags

Error Codes:

CodeSeverityDescription
REV-TR001Error@brd tag references non-existent BRD ID
REV-TR002Warning@depends references non-existent PRD
REV-TR003Info@discoverability is forward reference
REV-TR004WarningTag format malformed

7. Section Completeness

Minimum Word Counts (configurable):

SectionMinimum Words
Executive Summary100
Problem Statement75
Functional Requirements200
Quality Attributes100
Customer Content100
Risk Assessment75
Appendices200

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

8. Customer Content Review

Error Codes:

CodeSeverityDescription
REV-C001ErrorSection 10 missing
REV-C002WarningSection 10 is placeholder content
REV-C003InfoTechnical jargon in customer content
REV-C004FlagRequires marketing/business review

9. Naming Compliance

Error Codes:

CodeSeverityDescription
REV-N001ErrorInvalid element ID format
REV-N002ErrorElement type code not valid for PRD
REV-N003ErrorLegacy pattern detected (US-NNN, FR-NNN, etc.)
REV-N004ErrorThreshold tag missing document reference
REV-N005WarningThreshold key format non-standard

10. Upstream Drift Detection

Cache File: docs/02_PRD/{PRD_folder}/.drift_cache.json

Error Codes:

CodeSeverityDescriptionTrigger
REV-D001WarningUpstream document modified after PRD creationmtime > PRD 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-D009ErrorInvalid hash placeholder detectedhash is invalid format

Validator Error Codes

CodeSeverityDescription
PRD-E001ERRORMissing required tag 'prd'
PRD-E002ERRORMissing required tag 'layer-2-artifact'
PRD-E003ERRORInvalid document_type value
PRD-E004ERRORInvalid architecture_approaches format (must be array)
PRD-E005ERRORForbidden tag pattern detected
PRD-E006ERRORMissing required section
PRD-E007ERRORMultiple H1 headings detected
PRD-E008ERRORSection numbering not sequential
PRD-E009ERRORDocument Control missing required fields
PRD-E010ERRORMissing User Stories (Section 7)
PRD-E011ERRORMissing Functional Requirements (Section 8)
PRD-E012ERRORMissing Traceability (Section 16)
PRD-E013ERRORMissing upstream @brd tag
PRD-E014ERRORInvalid element ID format (not PRD.NN.xxxx)
PRD-E015ERRORSYS-Ready Score missing or below threshold
PRD-E016ERROREARS-Ready Score missing or below threshold
PRD-E017ERRORDeprecated ID pattern used (US-NNN, FR-NNN, etc.)
PRD-E018ERRORInvalid threshold tag format (must be @threshold: PRD.NN.key)
PRD-E019ERRORElement type code not valid for PRD (see doc-naming)
PRD-E020ERRORPRD not in nested folder structure (must be in docs/02_PRD/PRD-NN_{slug}/)
PRD-E021ERRORPRD folder name doesn't match PRD ID
PRD-E022ERRORMonolithic PRD not in nested folder (must be PRD-NN_{slug}/PRD-NN_{slug}.md)
PRD-E023ERRORMissing required PRD diagram tag @diagram: c4-l2
PRD-E024ERRORMissing required PRD diagram tag @diagram: dfd-l1
PRD-E025ERRORMissing required PRD diagram tag @diagram: sequence-*
PRD-E026ERRORSequence diagram missing explicit exception/alternate path (alt/else)
PRD-W001WARNINGFile name does not match format PRD-NN_{slug}.md
PRD-W002WARNINGMissing optional section (Glossary, Appendix)
PRD-W003WARNINGScore below recommended threshold but above minimum
PRD-W004WARNINGMissing Document Revision History table
PRD-W005WARNINGArchitecture Decision Requirements reference ADR numbers
PRD-W011WARNINGDiagram intent header missing required fields
VAL-H001ERRORDrift cache missing hash for upstream document
VAL-H002ERRORInvalid hash format (must be sha256:<64 hex chars>)
PRD-I001INFOConsider adding success metrics with quantified targets
PRD-I002INFOConsider adding competitive analysis

Combined Report Format (for doc-prd-fixer)

Output file: PRD-NN.A_audit_report_vNNN.md

Required sections:

  1. ## Summary

- PRD ID, timestamp (EST), overall status - Validator status, reviewer 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. ## Validator Findings

- List by severity/code

  1. ## Reviewer Findings

- List by severity/code

  1. ## Diagram Contract Findings

- Required PRD tags status (c4-l2, dfd-l1, sequence-*) - Exception-flow evidence status (alt/else) - Intent header completeness status

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

- auto_fixable - manual_required - blocked

  1. ## Recommended Next Step

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

Fix Queue Normalization

Each finding MUST include:

  • source: validator | reviewer
  • 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-prd-fixer

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

  • PRD-NN.A_audit_report_vNNN.md (preferred)
  • PRD-NN.R_review_report_vNNN.md (legacy compatibility)

If both exist, fixer should prefer latest timestamp.


Validation Commands

# Canonical wrapper (core only; pre-commit/CI parity)
bash ai_dev_ssd_flow/02_PRD/scripts/prd_core_wrapper_hook.sh ai_dev_ssd_flow/02_PRD

# Strict PRD ID checks (same quality class as BRD ID checks)
bash ai_dev_ssd_flow/02_PRD/scripts/prd_standardized_element_codes_hook.sh ai_dev_ssd_flow/02_PRD
bash ai_dev_ssd_flow/02_PRD/scripts/prd_legacy_pattern_hook.sh ai_dev_ssd_flow/02_PRD

# Canonical wrapper (core + advisory)
bash ai_dev_ssd_flow/02_PRD/scripts/validate_prd_wrapper.sh docs/02_PRD

# Validate single PRD document (must be in nested folder)
python ai_dev_ssd_flow/02_PRD/scripts/validate_prd.py docs/02_PRD/PRD-01_example/PRD-01_example.md

# Validate all PRD documents in directory
python ai_dev_ssd_flow/02_PRD/scripts/validate_prd.py docs/02_PRD/

# Validate with verbose output
python ai_dev_ssd_flow/02_PRD/scripts/validate_prd.py docs/02_PRD/ --verbose

# Validate with auto-fix (includes structure fixes)
python ai_dev_ssd_flow/02_PRD/scripts/validate_prd.py docs/02_PRD/ --auto-fix

# Cross-document validation
python ai_dev_ssd_flow/scripts/validate_cross_document.py --document docs/02_PRD/PRD-01_slug/PRD-01_slug.md --auto-fix

# Layer-wide validation
python ai_dev_ssd_flow/scripts/validate_cross_document.py --layer PRD --auto-fix

Example Invocation

/doc-prd-audit docs/02_PRD/PRD-01_f1_iam/PRD-01_f1_iam.md

Expected outcome:

  1. validator runs (internal)
  2. reviewer runs (internal)
  3. combined audit report generated
  4. fixer can execute directly from combined report

Related Skills

SkillRelationship
doc-namingNaming standards for element IDs and threshold tags
doc-prd-autopilotInvokes this skill in Phase 5
doc-prd-validatorDEPRECATED - merged into this skill
doc-prd-reviewerDEPRECATED - merged into this skill
doc-prd-fixerApplies fixes based on audit findings
doc-prdPRD creation rules
doc-brd-auditBRD source validation (unified quality gate)
doc-ears-autopilotDownstream consumer

Version History

VersionDateChanges
2.32026-03-02Drift Cache Creation (MANDATORY): Added automatic .drift_cache.json creation/update after every audit; Schema v1.2 with upstream BRD hash tracking; Aligned with doc-brd-audit drift cache implementation
2.22026-03-02Element Code Contract Gate (BLOCKING): Added element type code validation as blocking gate; PRD-E020 and PRD-E022 now fail audit; Added section-element type mapping enforcement; Integrated with prd_standardized_element_codes_hook.sh
2.12026-03-022-Skill Model: Deprecated doc-prd-validator and doc-prd-reviewer; Added Fresh Audit Policy (MANDATORY); All validation and scoring unified in this skill; Aligned with doc-brd-audit v2.1 architecture
1.02026-02-26Initial PRD audit wrapper; validator→reviewer orchestration; blocking PRD diagram contract gate; combined report contract for fixer

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

33.78%
按下载量换算108

Claude

31.82%
按下载量换算102

Cursor

19.56%
按下载量换算63

Gemini CLI

9.41%
按下载量换算30

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills