From aidoc-flow
Formalizes BRD/PRD features into atomic, testable EARS requirements using WHEN-THE-SHALL-WITHIN syntax. Use after BRD and PRD exist.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aidoc-flow:doc-earsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create an **EARS (Easy Approach to Requirements Syntax)** document — Layer 3 of
Create an EARS (Easy Approach to Requirements Syntax) document — Layer 3 of the SDD flow. EARS formalizes BRD/PRD requirements into precise, atomic, testable statements using WHEN-THE-SHALL-WITHIN syntax, ready for BDD translation.
Layer: 3 — a refinement step formalizing the Context (BRD) → Container (PRD) transition; it has no C4 level of its own. Upstream: BRD (Layer 1), PRD (Layer 2). Downstream: BDD → ADR → SPEC → TDD → IPLAN → Code.
Each EARS statement must be testable (Given-When-Then derivable),
measurable (quantifiable constraints), traceable (@brd/@prd), and
atomic (one concept per statement).
Use doc-ears when:
For end-to-end generation from a PRD, a prompt, or an IPLAN, use
../doc-ears-autopilot/SKILL.md.
Before writing, read:
framework/layers/03_EARS/EARS-TEMPLATE.yamlframework/layers/03_EARS/README.mdframework/governance/ID_NAMING_STANDARDS.mdConfirm no ID collision: ls docs/03_EARS/ 2>/dev/null. Reference only upstream
documents that exist; never invent placeholders like PRD-XXX or TBD.
## Document Control comes first (status, version, dates YYYY-MM-DD,
priority, single @prd: source, @brd: reference, BDD-Ready score,
revision-history table). Then:
See EARS-TEMPLATE.yaml for per-section content and embedded authoring guidance.
| Pattern | Syntax | Use for |
|---|---|---|
| Event-Driven | WHEN [trigger], THE [component] SHALL [action] WITHIN [timing]. | user/API/timer events |
| State-Driven | WHILE [state], THE [component] SHALL [behavior] WITHIN [context]. | continuous / mode-dependent behavior |
| Unwanted | IF [error], THE [component] SHALL [recovery] WITHIN [timing]. | failures, edge cases, fallbacks |
| Ubiquitous | THE [component] SHALL [behavior] for [scope]. | global invariants, logging, audit |
Each requirement is atomic (one testable concept) and carries an element ID
plus a per-requirement @brd: … | @prd: … traceability line. Use the
Boundary Value Matrix, State Transition (with error states), and
Fallback Path patterns from the template where they apply.
Use SHALL / SHALL NOT / SHOULD / MAY correctly. Replace vague timing with
percentiles: real-time → p50<100ms/p95<300ms/p99<1000ms; immediately →
<500ms; fast/quickly → exact latency. Section 4 (Quality Attributes:
Performance, Security, Reliability) is tabular with measurable targets; all
timing uses p50/p95/p99 notation. Carry changeable values as
@threshold: PRD.NN.category.key tags (no PRD section numbers in the tag).
EARS.{doc_id}.{section_id}.{hash} (e.g.
EARS.01.03.c4d8; Requirements = section 03, Quality Attributes = section
04). hash = first 4 hex of SHA256("{doc_id}:{section_id}:{title}:{description}"),
extend to 8 on collision.@brd and @prd tags. Format
pipe-separated: @brd: BRD.01.07.a7f3 | @prd: PRD.01.09.1dbc. No ranges; one
@prd: only in Document Control (extras go in per-requirement tags).Event-XXX, State-XXX, UB-XXX,
REQ-XXX; legacy 3-segment EARS.NN.xxxx; numeric type-code EARS.NN.25.SS;
dash form EARS-NN-XXX.EARS-NN (two digits: EARS-01, EARS-99,
EARS-102).docs/03_EARS/EARS-NN_{slug}/ regardless of size. Monolithic:
EARS-NN_{slug}.md inside it; section-based (>25 KB): EARS-NN.S_{section}.md
framework/layers/03_EARS/EARS-00_index.TEMPLATE.md.@threshold: constraints.@brd/@prd).docs/03_EARS/EARS-00_index.md in the same change.The framework ships no runtime code — this skill is the validator. Apply the
checklist against framework/layers/03_EARS/README.md and
framework/governance/ID_NAMING_STANDARDS.md.
EARS.NN.SS.xxxx; no removed patterns.@brd and @prd, pipe-separated, no ranges.@prd: in Document Control; quantifiable constraints (no "fast").| Code | Meaning | Severity |
|---|---|---|
| XDOC-006 | Tag format invalid | error |
| XDOC-008 | Broken internal link | error |
| XDOC-009 | Missing traceability section | error |
Quality gate (blocking): BDD-Ready score ≥ 90/100 before moving on. If issues are found, fix and re-check; if unfixable, log for manual review.
../doc-bdd/SKILL.md — the BDD references this EARS (@ears: EARS.NN.SS.xxxx),
inherits cumulative @brd/@prd tags, and turns each statement into executable
Given-When-Then scenarios.
Before applying defaults, read the project adaptation profile
(.aidoc/profile.yaml). Honor only this skill's declared knobs:
section_toggles (include or omit template-declared optional sections)
and glossary (substitute preferred terms in generated prose). Ignore any
unknown or out-of-surface key; absent a profile, use framework defaults.
Authority: framework/governance/ADAPTATION.md.
framework/layers/03_EARS/EARS-TEMPLATE.yamlframework/layers/03_EARS/README.mdframework/layers/03_EARS/EARS-00_index.TEMPLATE.mdframework/governance/ID_NAMING_STANDARDS.md../doc-ears-audit/SKILL.md · Fixes: ../doc-ears-fixer/SKILL.md../doc-ears-autopilot/SKILL.md../charts-flow/SKILL.md| Purpose | Formalize requirements with WHEN-THE-SHALL-WITHIN syntax |
| Layer | 3 (refinement; no C4 level) |
| Upstream tags | @brd, @prd (2, cumulative) |
| Key rule | One atomic, testable, quantifiable statement each |
| Must include | Document Control (first), four patterns, 5 sections |
| Quality gate | BDD-Ready ≥ 90/100 |
| Next | doc-bdd |
npx claudepluginhub vladm3105/aidoc-flow-framework --plugin aidoc-flowAuthors and validates requirements using EARS patterns (Ubiquitous, State-Driven, Event-Driven, Unwanted, Optional, Complex). Provides templates, examples, decision tree, and syntax checks.
Generates EARS-formatted requirements documents for Spec-Driven Development (SDD) workflows. Use for new feature specifications, requirements docs, or acceptance criteria via /sdd-requirements <feature-name>.
Transforms vague feature ideas into clear, testable requirements using EARS format. Captures user stories, acceptance criteria, edge cases before design phase.