EARS (Easy Approach to Requirements Syntax) format for clear requirements
Easy Approach to Requirements Syntax
Purpose: Write clear, testable requirements
Format: 5 requirement types
EARS provides templates for writing unambiguous requirements.
When: No conditions, always true.
Template: The [system] shall [action].
Examples:
When: Triggered by specific events.
Template: When [trigger], the [system] shall [action].
Examples:
When: Depends on system state.
Template: While [state], the [system] shall [action].
Examples:
When: Feature may or may not be used.
Template: Where [condition], the [system] shall [action].
Examples:
When: Multiple conditions or alternatives.
Template: If [condition], then [action], else [alternative].
Examples:
Each requirement should include measurable acceptance criteria:
Example:
Requirement: When user submits login form, the system shall validate credentials.
Acceptance Criteria:
✓ Email format verified (RFC 5322)
✓ Password length ≥8 characters
✓ Validation completes in <100ms
✓ Error messages are user-friendly
Bad: The system should work fast.
Good: The system shall respond to API requests in <500ms (p95).
Bad: When user logs in, the system shall validate credentials and send welcome email.
Good: Split into two requirements (login validation + email notification).
moai-foundation-specs: SPEC writingmoai-foundation-tags: TraceabilityLast Updated: 2025-11-20