This skill should be used when the user asks to "write requirements", "define success criteria", "identify edge cases", or mentions "functional requirements", "FR-", "SC-", "RFC 2119", "MUST SHOULD...
Write technology-agnostic functional requirements, identify edge cases, and define measurable success criteria. Focus on WHAT the system does and WHY, never HOW it's implemented.
humaninloop:patterns-api-contracts insteadhumaninloop:patterns-entity-modeling insteadhumaninloop:authoring-user-stories instead (this skill focuses on the underlying requirements)Write requirements using the FR-XXX format with RFC 2119 keywords:
## Functional Requirements
- **FR-001**: System MUST [specific capability]
- **FR-002**: Users MUST be able to [specific action]
- **FR-003**: System SHOULD [recommended behavior]
- **FR-004**: System MAY [optional capability]
| Keyword | Meaning |
|---|---|
| MUST | Absolute requirement; no exceptions |
| SHOULD | Recommended; valid exceptions may exist |
| MAY | Optional; implementation choice |
See RFC-2119-KEYWORDS.md for detailed usage guidance.
Good (what):
Bad (how):
Identify 3-5 boundary conditions that need explicit handling:
## Edge Cases
1. **System limits**: What happens at maximum capacity?
2. **Invalid input**: How are malformed requests handled?
3. **External failures**: What if dependencies are unavailable?
4. **Concurrent access**: How are race conditions prevented?
5. **Permission boundaries**: What happens with unauthorized access?
| Category | Examples |
|---|---|
| System limits | Max items, file size limits, rate limits |
| Invalid input | Empty fields, wrong types, boundary values |
| External failures | Network timeouts, service unavailable |
| Concurrency | Simultaneous edits, duplicate submissions |
| Permissions | Unauthorized access, expired tokens |
See EDGE-CASES.md for detailed patterns.
Define 3-5 measurable outcomes using SC-XXX format:
## Success Criteria
- **SC-001**: Users complete the task creation flow in under 2 minutes
- **SC-002**: 95% of users successfully create their first recurring task
- **SC-003**: Support tickets related to task scheduling decrease by 50%
Good:
Bad:
When the feature involves data, describe entities conceptually:
## Key Entities
### RecurringPattern
Represents the schedule for a repeating task.
**Attributes:**
- Frequency (how often: daily, weekly, monthly)
- Interval (every N occurrences)
- End condition (never, after N times, on date)
**Relationships:**
- Belongs to one Task
- Generates many TaskInstances
Validate requirement format with the included script:
python scripts/validate-requirements.py path/to/spec.md
The script checks:
Before finalizing, verify:
β "System MUST use PostgreSQL for storage" β "System MUST persist data durably"
β "MUST implement using the Observer pattern" β "System MUST notify relevant components when state changes"
β "System MUST be fast" or "MUST be user-friendly" β "Users MUST complete the flow in under 2 minutes"
β "System will notify users" β "System MUST notify users" (use MUST/SHOULD/MAY)
β "API latency MUST be under 100ms" β "Users MUST perceive responses as instantaneous"
β "As a user, I want to see my balance" β "System MUST display current balance to authenticated users" (FR) + separate user story
β Listing 20+ edge cases covering every hypothetical β Focus on 3-5 high-impact boundary conditions