Token导航 LogoToken导航TokenDH.com
AI 工具需要联网github未标认证来源可访问clear审计通过

doc-ears耳朵医生

Agent Skill

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

总安装

1,224

周安装

50

GitHub Stars

14

下载量

392
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

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

简介

用于创建EARS(需求语法易近方法)形式化需求文档。

  • 适合在BRD和PRD基础上生成WHEN-THEN-WITHIN结构的需求语句。
  • 需先验证上游文档存在性,无上游时返回null并终止流程。
  • 输出结果将作为BDD、ADR和SYS文档的输入基础。
  • doc-ears 属于AI 工具类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

doc-ears

Purpose

Create EARS (Easy Approach to Requirements Syntax) documents - Layer 3 artifact in the SDD workflow that formalizes requirements using the WHEN-THE-SHALL-WITHIN syntax.

Layer: 3

Upstream: BRD (Layer 1), PRD (Layer 2)

Downstream Artifacts: BDD (Layer 4), ADR (Layer 5), SYS (Layer 6)

Prerequisites

Upstream Artifact Verification (CRITICAL)

Before creating this document, you MUST:

  1. List existing upstream artifacts: ls docs/01_BRD/ docs/02_PRD/ docs/03_EARS/ 2>/dev/null
  2. Reference only existing documents in traceability tags
  3. Use null only when upstream artifact type genuinely doesn't exist
  4. NEVER use placeholders like BRD-XXX or TBD
  5. Do NOT create missing upstream artifacts - skip functionality instead

Before creating EARS, read:

  1. Shared Standards: .claude/skills/doc-flow/SHARED_CONTENT.md
  2. Upstream BRD and PRD: Read the BRD and PRD that drive this EARS
  3. Template: ai_dev_ssd_flow/03_EARS/EARS-MVP-TEMPLATE.md (Template Version 1.1, primary authority)
  4. Schema: ai_dev_ssd_flow/03_EARS/EARS_MVP_SCHEMA.yaml (machine-readable validation rules)
  5. Creation Rules: ai_dev_ssd_flow/03_EARS/EARS-MVP-TEMPLATE.md
  6. Validation Rules: ai_dev_ssd_flow/03_EARS/EARS_MVP_SCHEMA.yaml

Template Binding (CRITICAL)

Always use these exact metadata values:

tags:
  - ears                 # NOT 'ears-requirements' or 'ears-formal-requirements'
  - layer-3-artifact
  - shared-architecture  # OR 'ai-agent-primary' for agent docs

custom_fields:
  document_type: ears    # NOT 'engineering-requirements'
  artifact_type: EARS
  layer: 3
  architecture_approaches: [ai-agent-based, traditional-8layer]  # ARRAY format required
  priority: shared
  development_status: active

When to Use This Skill

Use doc-ears when:

  • Have completed BRD (Layer 1) and PRD (Layer 2)
  • Need to formalize requirements with precise behavioral statements
  • Translating product features into formal requirements
  • Establishing event-driven, state-driven, or conditional requirements
  • You are at Layer 3 of the SDD workflow

Document Structure (MANDATORY)

Per EARS-MVP-TEMPLATE.md, EARS documents require these sections:

SectionContent
Document ControlStatus, Version, Date, BDD-Ready Score, Source Document
1. Purpose and ContextDocument Purpose, Scope, Intended Audience
2. EARS in Development WorkflowLayer positioning diagram
3. RequirementsEvent-Driven, State-Driven, Unwanted Behavior, Ubiquitous
4. Quality AttributesPerformance, Security, Reliability (tabular format)
5. TraceabilityUpstream Sources, Downstream Artifacts, Tags, Thresholds
6. ReferencesInternal Documentation, External Standards

Document Control Requirements

Required Fields (6 mandatory):

  • Status: Draft/In Review/Approved/Implemented
  • Version: Semantic versioning (e.g., 1.0.0)
  • Date Created/Last Updated: YYYY-MM-DD
  • Priority: High/Medium/Low
  • Source Document: Single @prd: PRD.NN.EE.SS value (NO ranges, NO multiple @prd values)
  • BDD-Ready Score: Format XX% (Target: ≥90%)

Source Document Rule (E044):

# VALID - Single @prd reference
| **Source Document** | @prd: PRD.01.0701 |

# INVALID - Range or multiple values
| **Source Document** | @prd: PRD.12.1901 - @prd: PRD.12.1957 |

EARS Syntax Patterns

1. Event-Driven Requirements

WHEN [triggering condition] THE [system] SHALL [response] WITHIN [constraint]

WHEN [trigger condition],
THE [system component] SHALL [action 1],
[action 2],
and [action 3]
WITHIN [timing constraint].

Example:

WHEN trade order received,
THE order management system SHALL validate order parameters
WITHIN 50 milliseconds (@threshold: PRD.035.timeout.order.validation).

2. State-Driven Requirements

WHILE [system state] THE [system] SHALL [behavior] WITHIN [constraint]

WHILE [state condition],
THE [system component] SHALL [continuous behavior]
WITHIN [operational context].

3. Unwanted Behavior Requirements

IF [error/problem] THE [system] SHALL [prevention/workaround] WITHIN [constraint]

IF [error condition],
THE [system component] SHALL [prevention/recovery action]
WITHIN [timing constraint].

4. Ubiquitous Requirements

THE [system] SHALL [system-wide requirement] WITHIN [architectural boundary]

THE [system component] SHALL [universal behavior]
for [scope/context].

Code Block Formatting (MANDATORY)

Always use triple backticks for EARS statements:

#### EARS.01.2501: Requirement Name

WHEN [condition], THE [component] SHALL [action] WITHIN [constraint].

**Traceability**: @brd: BRD.01.0101 | @prd: PRD.01.0701

Unified Element ID Format (MANDATORY)

Pattern: EARS.{DOC_NUM}.{HASH} (3 segments, dot-separated)

Element TypeCodeExample
EARS Statement25EARS.02.2501

Category ID Ranges:

CategoryID RangeExample
Event-Driven001-099EARS.01.25001
State-Driven101-199EARS.01.25101
Unwanted Behavior201-299EARS.01.25201
Ubiquitous401-499EARS.01.25401
REMOVED PATTERNS - Do NOT use: - Category prefixes: E-XXX, S-XXX, Event-XXX, State-XXX - 3-segment format: EARS.NN.EE - Dash-based: EARS-NN-XXX

BDD-Ready Scoring System

Purpose: Measures EARS maturity and readiness for BDD progression.

Format in Document Control:

| **BDD-Ready Score** | 95% (Target: ≥90%) |

Status and BDD-Ready Score Mapping

BDD-Ready ScoreRequired Status
≥90%Approved
70-89%In Review
<70%Draft

Scoring Criteria

Requirements Clarity (40%):

  • EARS statements follow WHEN-THE-SHALL-WITHIN syntax: 20%
  • Each statement defines one testable concept (atomicity): 15%
  • All timing/constraint clauses are quantifiable: 5%

Testability (35%):

  • BDD translation possible for each statement: 15%
  • Observable verification methods defined: 10%
  • Edge cases and error conditions specified: 10%

Quality Attribute Completeness (15%):

  • Performance targets with percentiles: 5%
  • Security/compliance requirements complete: 5%
  • Reliability/scalability targets measurable: 5%

Strategic Alignment (10%):

  • Links to business objectives traceable: 5%
  • Implementation paths documented: 5%

Quality Gate: Score <90% blocks BDD artifact creation.

Quality Attributes Section

Use tabular format for quality attribute requirements:

Performance Requirements

QA IDRequirement StatementMetricTargetPriorityMeasurement Method
EARS.NN.02.01THE [component] SHALL complete [operation]Latencyp95 < NNmsHigh[method]
EARS.NN.02.02THE [component] SHALL process [workload]ThroughputNN/sMedium[method]

Quality Attribute Categories

CategoryKeywords for Detection
Performancelatency, throughput, response time, p95, p99
Reliabilityavailability, MTBF, MTTR, fault tolerance, recovery
Scalabilityconcurrent users, data volumes, horizontal scaling
Securityauthentication, authorization, encryption, RBAC
Observabilitylogging, monitoring, tracing, alerting, metrics
Maintainabilitycode coverage, deployment, CI/CD, documentation

Formal Language Rules

Mandatory Keywords:

  • SHALL: Mandatory requirement (do this)
  • SHALL NOT: Prohibited requirement (never do this)
  • SHOULD: Recommended requirement (preferred but not mandatory)
  • MAY: Optional requirement (allowed but not required)

Avoid ambiguous terms: "fast", "efficient", "user-friendly" Use quantifiable metrics: "within 100ms", "with 99.9% uptime"

Threshold References (Section 5.4)

Purpose: EARS documents REFERENCE thresholds defined in PRD threshold registry. All quantitative values must use @threshold: tags.

Threshold Naming Convention: @threshold: PRD.NN.category.subcategory.key

Example Usage:

WHEN [trigger condition],
THE [system component] SHALL [action]
WITHIN @threshold: PRD.035.timeout.request.sync.

Common Threshold Categories:

timing:
  - "@threshold: PRD.NN.timeout.request.sync"
  - "@threshold: PRD.NN.timeout.connection.default"

performance:
  - "@threshold: PRD.NN.perf.api.p95_latency"
  - "@threshold: PRD.NN.perf.batch.max_duration"

limits:
  - "@threshold: PRD.NN.limit.api.requests_per_second"

error:
  - "@threshold: PRD.NN.sla.error_rate.target"

Tag Format Convention

NotationFormatArtifactsPurpose
DashTYPE-NNADR, SPEC, CTRTechnical artifacts - document references
DotTYPE.NN.xxxxBRD, PRD, EARS, BDD, SYS, REQ, IMPL, TASKSHierarchical artifacts - element references

Cumulative Tagging Requirements

Layer 3 (EARS): Must include tags from Layers 1-2 (BRD, PRD)

Tag Count: 2 tags (@brd, @prd)

Format:

## Traceability

**Required Tags** (Cumulative Tagging Hierarchy - Layer 3):

@brd: BRD.01.0103, BRD.01.0110 @prd: PRD.01.0702, PRD.01.0715

Traceability Tag Separators (E041)

Inline format - Use pipes:

**Traceability**: @brd: BRD.02.0110 | @prd: PRD.02.0101 | @threshold: PRD.035.key

List format - Also valid:

**Traceability**:
- @brd: BRD.02.0110
- @prd: PRD.02.0101
- @threshold: PRD.035.category.key

Downstream Artifact References (E045)

CRITICAL: Do NOT use numeric downstream references until artifacts exist.

# INVALID - Numeric references to non-existent artifacts
Downstream: BDD-01, ADR-02, REQ-03

# VALID - Generic downstream names
Downstream: BDD, ADR, SYS, REQ, SPEC

File Size Limits and Splitting

Limits:

  • Target: 800 lines per file
  • Maximum: 1200 lines per file (absolute)

When to Split:

  • Document approaches 1200 lines
  • Sections cover distinct capability areas

Splitting Process:

  1. Create EARS-{NN}.0_index.md using EARS-SECTION-0-TEMPLATE.md
  2. Create section files EARS-{NN}.{S}_{slug}.md using EARS-SECTION-TEMPLATE.md
  3. Maintain Prev/Next links
  4. Update traceability

Reserved ID Exemption

Pattern: EARS-00_*.md

Scope: Documents with reserved ID 000 are FULLY EXEMPT from validation.

Document Types:

  • Index documents (EARS-00_index.md)
  • Traceability matrix templates (EARS-00_TRACEABILITY_MATRIX-TEMPLATE.md)
  • Glossaries, registries, checklists

Creation Process

Step 1: Read Upstream Artifacts

Read and understand BRD and PRD that drive these formal requirements.

Step 2: Reserve ID Number

Check docs/03_EARS/ for next available ID number (e.g., EARS-01, EARS-02).

ID Numbering Convention: Start with 2 digits and expand only as needed.

  • ✅ Correct: EARS-01, EARS-99, EARS-102
  • ❌ Incorrect: EARS-001, EARS-009 (extra leading zero not required)

Step 3: Create EARS Folder and File

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

Folder structure:

  1. Create folder: docs/03_EARS/EARS-NN_{slug}/
  2. Create EARS file(s) inside the folder

Monolithic EARS (for smaller documents ≤25KB):

docs/03_EARS/EARS-01_risk_limits/
  EARS-01_risk_limits.md

Sectioned EARS (for larger documents >25KB):

docs/03_EARS/EARS-01_risk_limits/
  EARS-01.md
  EARS-01.1_event_driven.md
  ...

CRITICAL: Even monolithic EARS MUST be in a nested folder. Never create docs/03_EARS/EARS-NN_{slug}.md directly in the 03_EARS/ directory.

Step 4: Fill Document Control Section

Complete all required metadata fields:

  • Status
  • Version
  • Dates
  • Priority
  • Source Document (single @prd: PRD.NN.EE.SS)
  • BDD-Ready Score

Step 5: Categorize Requirements

Group requirements into 4 categories:

  1. Event-Driven (triggered by events)
  2. State-Driven (triggered by system state)
  3. Unwanted Behavior (preventive)
  4. Ubiquitous (always active)

Step 6: Write WHEN-THE-SHALL-WITHIN Statements

For each requirement:

  • Use formal EARS syntax
  • Specify quantifiable constraints with @threshold tags
  • Use SHALL/SHOULD/MAY keywords correctly
  • Reference upstream PRD features

Step 7: Create Quality Attributes Section

Use tabular format for Performance, Security, Reliability requirements.

Step 8: Add Cumulative Tags

Include @brd and @prd tags (Layers 1-2) in Traceability section.

Step 9: Add Threshold References

Document all thresholds used in section 5.4.

Step 10: Create/Update Traceability Matrix

MANDATORY: Create or update docs/03_EARS/EARS-00_TRACEABILITY_MATRIX.md

Step 11: Validate EARS

Run validation scripts:

# EARS validation (must be in nested folder)
python scripts/validate_ears.py --path docs/03_EARS/EARS-01_{slug}/EARS-01_{slug}.md

# Cumulative tagging validation
python ai_dev_ssd_flow/scripts/validate_tags_against_docs.py \
  --artifact EARS-01 \
  --expected-layers brd,prd \
  --strict

Step 12: Commit Changes

Commit EARS file and traceability matrix together.

Batch Creation Checkpoint Rules

Pre-Batch Verification

Before starting batch creation:

  1. Read EARS_SCHEMA.yaml for current metadata requirements
  2. Verify tag standards: ears (not ears-requirements)
  3. Verify document_type: ears
  4. Verify architecture format: architecture_approaches: [value] (array)

Every 5-Document Checkpoint

After creating every 5 EARS documents:

  1. Run validation: python scripts/validate_ears.py --path docs/03_EARS/
  2. Check for tag consistency, document_type, Source Document format
  3. Fix any errors before continuing

End-of-Session Validation

Before ending session:

  1. Run full validation: python scripts/validate_ears.py
  2. Verify 0 errors
  3. Update EARS-00_index.md if document counts changed

Validation

Validation Error Codes Reference

CodeDescriptionSeverity
E001YAML frontmatter invalidERROR
E002Required tags missing (ears, layer-3-artifact)ERROR
E003Forbidden tag patterns (ears-requirements, etc.)ERROR
E004Missing custom_fieldsERROR
E005document_type not 'ears'ERROR
E006artifact_type not 'EARS'ERROR
E007layer not 3ERROR
E008architecture_approaches not arrayERROR
E010Required sections missingERROR
E011Section numbering starts with 0ERROR
E013Document Control not in table formatERROR
E020Malformed table syntaxERROR
E030Requirement ID format invalidERROR
E040Source Document missing @prd: prefixERROR
E041Traceability tags missing pipe separatorsERROR
E042Duplicate requirement IDsERROR
E044Source Document has multiple @prd valuesERROR
E045Numeric downstream referencesERROR

Manual Checklist

  • Document Control section uses table format
  • All required metadata fields completed
  • Source Document has single @prd: PRD.NN.EE.SS value
  • All statements use WHEN-THE-SHALL-WITHIN format
  • Requirements categorized (Event, State, Unwanted, Ubiquitous)
  • Element IDs use EARS.NN.25.SS format
  • SHALL/SHOULD/MAY keywords used correctly
  • Quantifiable constraints with @threshold tags
  • No ambiguous terms ("fast", "efficient")
  • Cumulative tags: @brd, @prd included
  • Traceability tags use pipe separators
  • No numeric downstream references
  • Quality Attributes in tabular format
  • Thresholds documented in section 5.4
  • File size <1200 lines

Common Pitfalls

MistakeCorrection
ears-requirements tagUse ears
document_type: engineering-requirementsUse document_type: ears
architecture_approach: valueUse architecture_approaches: [value]
#### Event-001: TitleUse #### EARS.01.2501: Title
Source Document: PRD-NNUse Source Document: @prd: PRD.NN.EE.SS
Multiple @prd in Source DocumentUse single @prd, list others in Upstream Sources
@brd: X @prd: Y (no separators)Use `@brd: X \@prd: Y`
Downstream: BDD-01, ADR-02Use Downstream: BDD, ADR
Status: Approved (with 50% score)Use Status: Draft
## 0. Document ControlUse ## Document Control (no numbering)

Post-Creation Validation (MANDATORY)

CRITICAL: Execute validation loop IMMEDIATELY after document creation.

Automatic Validation Loop

LOOP:
  1. Run: python scripts/validate_ears.py --path {doc_path}
  2. IF errors fixed: GOTO LOOP (re-validate)
  3. IF warnings fixed: GOTO LOOP (re-validate)
  4. IF unfixable issues: Log for manual review
  5. IF clean: Mark VALIDATED, proceed

Quality Gate

Blocking: YES - Cannot proceed to BDD creation until validation passes with 0 errors.


Next Skill

After creating EARS, use:

doc-bdd - Create BDD test scenarios (Layer 4)

The BDD will:

  • Reference this EARS as upstream source
  • Include @brd, @prd, @ears tags (cumulative)
  • Use Gherkin Given-When-Then format
  • Validate EARS formal requirements with executable tests

Related Resources

  • Template: ai_dev_ssd_flow/03_EARS/EARS-MVP-TEMPLATE.md (Template Version 3.0, primary authority)
  • Schema: ai_dev_ssd_flow/03_EARS/EARS_MVP_SCHEMA.yaml (machine-readable validation)
  • Creation Rules: ai_dev_ssd_flow/03_EARS/EARS-MVP-TEMPLATE.md
  • Validation Rules: ai_dev_ssd_flow/03_EARS/EARS_MVP_SCHEMA.yaml
  • Shared Standards: .claude/skills/doc-flow/SHARED_CONTENT.md
  • ID Standards: ai_dev_ssd_flow/ID_NAMING_STANDARDS.md
  • Threshold Naming: ai_dev_ssd_flow/THRESHOLD_NAMING_RULES.md

Section Templates (for documents >800 lines):

  • Index template: ai_dev_ssd_flow/03_EARS/EARS-SECTION-0-TEMPLATE.md
  • Content template: ai_dev_ssd_flow/03_EARS/EARS-SECTION-TEMPLATE.md

Quick Reference

ItemValue
PurposeFormalize requirements with WHEN-THE-SHALL-WITHIN syntax
Layer3
Tags Required@brd, @prd (2 tags)
BDD-Ready Score≥90% required for "Approved" status
Element ID FormatEARS.NN.25.SS (3-segment unified format)
Source DocumentSingle @prd: PRD.NN.EE.SS value
Downstream ReferencesGeneric names only (no numeric IDs)
File Size Limit1200 lines maximum
Next Skilldoc-bdd

Version History

VersionDateChangesAuthor
1.12026-02-26Migrated frontmatter to metadata schema; updated validation and standards references to ai_dev_ssd_flow pathsSystem
1.02026-02-08Initial skill definition with YAML frontmatter standardizationSystem

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Gemini CLI

27.7%
按下载量换算109

Claude Code

22.85%
按下载量换算90

OpenCode

19.92%
按下载量换算78

Antigravity

12.69%
按下载量换算50

Codex

7.57%
按下载量换算30

windsurf

3.52%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills