requirements-gathering
(opencode-project - Skill) Template and guidelines for creating comprehensive requirements specifications
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Requirements Gathering Skill
Use this skill when creating requirements specifications for new features. This follows the Kiro spec-driven development format with EARS (Easy Approach to Requirements Syntax) acceptance criteria.
Directory Structure
Each feature gets its own directory under specs/:
specs/
├── <feature-name>/
│ ├── requirements.md # This document
│ ├── design.md # Technical design (created by /dev/design)
│ └── tasks.md # Implementation tasks (created by /dev/tasks)
Feature Name Format (CRITICAL): Feature names MUST be lowercase with dashes (kebab-case):
- ✅
user-authentication - ✅
api-rate-limiting - ✅
budget-owner-implementation - ❌
User Authentication - ❌
API_Rate_Limiting - ❌
BudgetOwnerImplementation
Requirements Document Template
Create the document at specs/<feature-name>/requirements.md with this structure:
# Requirements Document: <Feature Name>
## Introduction
<2-4 paragraph description of the feature, its purpose, and why it is critical. Include context about where this fits in the overall system.>
## Glossary
Define key terms used throughout this specification. Use underscores in term names for clarity.
- **Term_One**: <Definition of the first key term>
- **Term_Two**: <Definition of the second key term>
- **Term_Three**: <Definition of the third key term>
## Requirements
### Requirement 1: <Requirement Title>
**User Story:** As a <user type>, I want <goal>, so that <benefit>.
#### Acceptance Criteria
Use EARS (Easy Approach to Requirements Syntax) format for acceptance criteria:
1. WHEN <trigger condition>, THE System SHALL <expected behavior>
2. WHEN <trigger condition>, THE System SHALL <expected behavior>
3. THE <Component> SHALL <constraint or capability>
4. IF <condition>, THE System SHALL <behavior>
5. WHILE <state>, THE System SHALL <maintain behavior>
### Requirement 2: <Requirement Title>
**User Story:** As a <user type>, I want <goal>, so that <benefit>.
#### Acceptance Criteria
1. WHEN <trigger condition>, THE System SHALL <expected behavior>
2. WHEN <trigger condition>, THE System SHALL <expected behavior>
### Requirement 3: <Requirement Title>
...
EARS Syntax Patterns
Use these patterns for acceptance criteria:
| Pattern | Template | Example |
|---|---|---|
| Ubiquitous | THE <system> SHALL <requirement> | THE System SHALL log all API requests |
| Event-Driven | WHEN <trigger>, THE <system> SHALL <response> | WHEN a user submits a form, THE System SHALL validate all fields |
| State-Driven | WHILE <state>, THE <system> SHALL <behavior> | WHILE in maintenance mode, THE System SHALL reject new connections |
| Optional | WHERE <feature> is enabled, THE <system> SHALL <behavior> | WHERE audit logging is enabled, THE System SHALL record timestamps |
| Unwanted | IF <condition>, THE <system> SHALL <response> | IF database connection fails, THE System SHALL retry 3 times |
| Complex | WHEN <trigger> AND WHILE <state>, THE <system> SHALL | WHEN timeout occurs AND WHILE processing, THE System SHALL rollback |
Best Practices
- Start with Introduction: Provide 2-4 paragraphs of context before diving into requirements
- Define Glossary: Define ALL domain-specific terms before using them
- Use EARS Format: Every acceptance criterion follows EARS syntax (WHEN/THE/SHALL)
- Be Specific: Avoid vague terms like "fast" or "user-friendly" - quantify when possible
- Be Testable: Every criterion should have clear pass/fail conditions
- Number Criteria: Number acceptance criteria for easy reference (1.1, 1.2, etc.)
-
Reference Glossary Terms: Use defined terms consistently (with underscores:
Budget_Owner)
Acceptance Criteria Quality Checklist
Before finalizing, verify each acceptance criterion:
- Uses EARS format (WHEN/WHILE/IF + THE System SHALL)
- Is testable with clear pass/fail
- References glossary terms correctly
- Is atomic (tests one thing)
- Is traceable to a user story
Example: Budget Owner Requirements (Reference)
See .kiro/specs/budget-owner-implementation/requirements.md for a comprehensive example of this format in action.
Questions to Ask When Gathering Requirements
When gathering requirements, consider:
- Who are the users of this feature?
- What problem does this solve?
- What does success look like?
- What are the constraints (time, tech, etc.)?
- How does this integrate with existing features?
- What could go wrong?
- What domain terms need to be defined?
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-30
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!