Writing Requirements
A guide for writing effective requirements.
Requirement Structure
markdown
### REQ-01: Requirement Title
- The system SHALL [action] [result] under [condition]ID Format
REQ-XX- REQ: Requirement prefix
- XX: 2-digit number (01, 02, ...)
Characteristics of Good Requirements
1. Clear
Bad example:
markdown
The system should respond quicklyGood example:
markdown
The system SHALL respond within 200ms for 95% of requests2. Verifiable
Bad example:
markdown
The system should be easy to useGood example:
markdown
The system SHALL allow access to main features within 3 steps3. Independent
Each requirement should be implementable/testable independently.
4. Traceable
Reference requirement IDs in code and tests:
typescript
/**
* @spec REQ-01
*/
function login() {}Requirements by Category
Functional Requirements
markdown
### REQ-01: User Login
- The system SHALL support email/password loginSecurity Requirements
markdown
### REQ-02: Password Storage
- The system SHALL hash passwords using bcrypt before storing
- The system SHALL NOT log plaintext passwordsPerformance Requirements
markdown
### REQ-03: Response Time
- The system SHALL return API responses within 500ms
- The system SHOULD support 1000 concurrent usersAccessibility Requirements
markdown
### REQ-04: Keyboard Accessibility
- The system SHALL make all features accessible via keyboardPriority Notation
markdown
### REQ-01: Login [HIGH]
### REQ-02: Social Login [MEDIUM]
### REQ-03: Biometric Auth [LOW]Dependency Notation
markdown
### REQ-03: Password Reset
- The system SHALL send reset link via email
- **Dependency**: REQ-01 (Login)Validation Checklist
- [ ] RFC 2119 keywords used?
- [ ] Verifiable conditions?
- [ ] Specific numbers/criteria?
- [ ] Clear subject and verb?
- [ ] ID format followed?