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

doc-ears-validator文档耳朵验证器

Agent Skill

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

总安装

674

周安装

27

GitHub Stars

14

下载量

218
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

用于验证EARS文档是否符合Layer 3架构标准。

  • 适合检查嵌套文件夹结构和双文件一致性要求。
  • 在用户请求或修改EARS后自动触发,确保符合MVP Schema。
  • 需严格验证EARS-NN_{slug}格式的文件路径和命名规范。
  • doc-ears-validator 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-ears-validator

Validate EARS (Easy Approach to Requirements Syntax) documents against Layer 3 schema standards.

Activation

Invoke when user requests validation of EARS documents or after creating/modifying EARS artifacts.

Validation Schema Reference

Schema: ai_dev_ssd_flow/03_EARS/EARS_MVP_SCHEMA.yaml Layer: 3 Artifact Type: EARS

Validation Checklist

0. Folder Structure Validation (BLOCKING)

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

Required Structure:

EARS TypeRequired Location
Monolithicdocs/03_EARS/EARS-NN_{slug}/EARS-NN_{slug}.md

Validation:

1. Check document is inside a nested folder: docs/03_EARS/EARS-NN_{slug}/
2. Verify folder name matches EARS ID pattern: EARS-NN_{slug}
3. Verify file name matches folder: EARS-NN_{slug}.md
4. Parent path must be: docs/03_EARS/

Example Valid Structure:

docs/03_EARS/
├── EARS-01_f1_iam/
│   ├── EARS-01_f1_iam.md          ✓ Valid
│   ├── EARS-01.A_audit_report_v001.md
│   ├── EARS-01.R_review_report_v001.md  (legacy)
│   └── .drift_cache.json
├── EARS-02_f2_session/
│   └── EARS-02_f2_session.md      ✓ Valid

Invalid Structure:

docs/03_EARS/
├── EARS-01_f1_iam.md              ✗ NOT in nested folder

Error Codes:

CodeSeverityDescription
EARS-E020ERROREARS not in nested folder (BLOCKING)
EARS-E021ERRORFolder name doesn't match EARS ID
EARS-E022ERRORFile name doesn't match folder name
VAL-H001ERRORDrift cache missing hash for upstream document
VAL-H002ERRORInvalid hash format (must be sha256:<64 hex chars>)

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


1. Metadata Validation

Required custom_fields:
  - document_type: ["ears", "template"]
  - artifact_type: "EARS"
  - layer: 3
  - architecture_approaches: [array format]
  - priority: ["primary", "shared", "fallback"]
  - development_status: ["active", "draft", "deprecated", "reference"]

Required tags:
  - ears (or ears-template)
  - layer-3-artifact

Forbidden tag patterns:
  - "^ears-requirements$"
  - "^ears-\\d{3}$"

2. Structure Validation

Required Sections (6-Section MVP Structure):

  • Title (H1): # EARS-NN: Title
  • Document Control (unnumbered) - Metadata with BDD-Ready Score
  • Section 1: Purpose and Context - Business and technical objectives
  • Section 2: EARS in Development Workflow - SDD position and EARS role
  • Section 3: Requirements - Event-Driven, State-Driven, Unwanted Behavior, Ubiquitous
  • Section 4: Quality Attributes - Performance, Security, Reliability
  • Section 5: Traceability - Upstream sources, downstream artifacts, tags
  • Section 6: References - Internal and external documentation

Document Control Required Fields:

  • EARS ID
  • Document Name
  • Version
  • Date Created
  • Last Updated
  • Author
  • Status
  • Source PRD

File Naming: Pattern: EARS-NNN_descriptive_name.md

3. Content Validation

EARS Requirement Patterns:

TypePatternExample
UbiquitousThe [system] SHALL [action]The system SHALL log all errors
Event-DrivenWHEN [trigger] THE [system] SHALL [action]WHEN user clicks submit THE system SHALL validate input
State-DrivenWHILE [state] THE [system] SHALL [action]WHILE connected THE system SHALL maintain heartbeat
UnwantedIF [condition] THEN THE [system] SHALL [action]IF timeout occurs THEN THE system SHALL retry
OptionalWHERE [feature] IS SUPPORTED THE [system] SHALL [action]WHERE dark mode IS SUPPORTED THE system SHALL apply theme
ComplexCombination of patternsWHEN user logs in WHILE session active THE system SHALL refresh token

Requirement ID Format:

  • Pattern: EARS.NN.EE.SS (3-segment format)
  • Example: EARS.01.2401

BDD-Ready Score:

  • Minimum threshold: 90%
  • Components: Pattern compliance, requirement clarity, testability, traceability

4. Traceability Validation

Layer 3 Cumulative Tags:

  • @brd: BRD.NN.01.SS (required)
  • @prd: PRD.NN.07.SS (required)

Downstream Expected:

  • BDD scenarios
  • ADR documents
  • SYS requirements

Same-Type References:

  • @related-ears: EARS-NN
  • @depends-ears: EARS-NN

Error Codes

CodeSeverityDescription
EARS-E001errorMissing required tag 'ears'
EARS-E002errorMissing required tag 'layer-3-artifact'
EARS-E003errorInvalid document_type
EARS-E004errorInvalid architecture_approaches format
EARS-E005errorForbidden tag pattern detected
EARS-E006errorMissing required section
EARS-E007errorMultiple H1 headings detected
EARS-E008errorSection numbering not sequential
EARS-E009errorDocument Control missing required fields
EARS-E010errorInvalid EARS pattern detected
EARS-E011errorMissing Traceability (Section 5)
EARS-E012warningFile name does not match format
EARS-W001warningRequirement not using EARS syntax
EARS-W002warningMissing upstream @brd or @prd tag
EARS-W003warningBDD-Ready Score below 90%
EARS-W004warningRequirement missing SHALL keyword
EARS-W005warningComplex requirement too long
EARS-I001infoConsider adding unwanted behavior handling
EARS-I002infoConsider adding timing constraints (WITHIN)

Validation Commands

# Validate single EARS document
python ai_dev_ssd_flow/03_EARS/scripts/validate_ears.py docs/03_EARS/EARS-001_example.md

# Validate all EARS documents
python ai_dev_ssd_flow/03_EARS/scripts/validate_ears.py docs/03_EARS/

# Check with verbose output
python ai_dev_ssd_flow/03_EARS/scripts/validate_ears.py docs/03_EARS/ --verbose

Validation Workflow

  1. Parse YAML frontmatter
  2. Check required metadata fields
  3. Validate tag taxonomy
  4. Verify section structure (6-section MVP)
  5. Validate Document Control table
  6. Check EARS pattern compliance
  7. Verify SHALL/SHOULD/MAY keywords
  8. Validate upstream references
  9. Calculate BDD-Ready Score
  10. Verify file naming convention
  11. Generate validation report

EARS Pattern Detection

patterns = {
    'ubiquitous': r'^The\s+\[?\w+\]?\s+SHALL\s+',
    'event_driven': r'^WHEN\s+.+\s+THE\s+\[?\w+\]?\s+SHALL\s+',
    'state_driven': r'^WHILE\s+.+\s+THE\s+\[?\w+\]?\s+SHALL\s+',
    'unwanted': r'^IF\s+.+\s+THEN\s+THE\s+\[?\w+\]?\s+SHALL\s+',
    'optional': r'^WHERE\s+.+\s+IS\s+SUPPORTED\s+THE\s+\[?\w+\]?\s+SHALL\s+'
}

Integration

  • Invoked by: doc-flow, doc-ears (post-creation)
  • Feeds into: trace-check (cross-document validation)
  • Reports to: quality-advisor

Output Format

EARS Validation Report
======================
Document: EARS-001_example.md
Status: PASS/FAIL

Pattern Compliance:
- Ubiquitous: N requirements
- Event-Driven: N requirements
- State-Driven: N requirements
- Unwanted: N requirements
- Optional: N requirements

Errors: N
Warnings: N
Info: N

[Details listed by severity]

Version History

VersionDateChangesAuthor
1.32026-02-26Migrated frontmatter to metadata; updated validator command paths to ai_dev_ssd_flow/03_EARS/scripts; aligned valid structure examples with audit-wrapper compatibilitySystem
1.12026-02-11Nested Folder Rule: Added Section 0 Folder Structure Validation (BLOCKING); EARS must be in docs/03_EARS/EARS-NN_{slug}/ folders; Added error codes EARS-E020, EARS-E021, EARS-E022
1.02026-02-08Initial validator skill definition with YAML frontmatterSystem

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

37.77%
按下载量换算82

Claude

31.54%
按下载量换算69

Cursor

18.58%
按下载量换算41

Gemini CLI

9.39%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills