Agent skill
feature-design
Guide users through feature specification development using EARS patterns and INCOSE quality rules. Creates requirements documents and technical design specifications with iterative user feedback.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/feature-design
SKILL.md
Feature Design
Transform rough feature ideas into detailed requirements and technical design documents through an iterative, user-collaborative process.
Overview
This skill implements a Spec-Driven Development (SDD) workflow that systematically:
- Captures and refines feature requirements using EARS (Easy Approach to Requirements Syntax)
- Validates requirements against INCOSE semantic quality rules
- Creates technical design documents with architecture, components, and implementation plans
Glossaries
EARS (Easy Approach to Requirements Syntax)
EARS provides standardized templates for writing clear, unambiguous requirements:
| Pattern | Template | Example |
|---|---|---|
| Ubiquitous | The <system> SHALL <function> |
The system SHALL provide user login functionality |
| Event-Driven | WHEN <trigger>, the <system> SHALL <function> |
WHEN user clicks "Login", the system SHALL validate credentials |
| State-Driven | WHILE <state>, the <system> SHALL <function> |
WHILE user is logged in, the system SHALL display dashboard |
| Unwanted-Behavior | IF <condition>, the <system> SHALL <function> |
IF password fails 3 times, the system SHALL lock account for 30 minutes |
| Complex | [WHERE] [WHILE] [WHEN/IF] THE <system> SHALL <function> |
Clause order: WHERE → WHILE → WHEN/IF → THE → SHALL |
INCOSE Semantic Quality Rules
Requirements must comply with these quality rules:
- Active voice - Clearly state who does what
- No vague terms - Avoid "quickly", "adequate", "user-friendly"
- No escape clauses - Avoid "where possible", "if feasible"
- No negative statements - Avoid "SHALL NOT" (rephrase positively)
- One thought per requirement - Single, testable concept
- Explicit conditions - Measurable criteria and thresholds
- Consistent terminology - Use defined terms from glossary
- No pronouns - Avoid "it", "them", "this"
- No absolutes - Avoid "never", "always", "100%"
- Solution-free - Focus on what, not how
Document Templates
Requirements Document (requirements.md)
# Requirements Document
## Introduction
[Summary of the feature/system]
## Glossary
- **System/Term**: [Definition]
## Requirements
### Requirement 1
**User Story:** AS [role], I want [feature], so that [benefit]
#### Acceptance Criteria
1. WHEN [event], [system] SHALL [response]
2. WHILE [state], [system] SHALL [response]
3. IF [unwanted event], [system] SHALL [response]
... (2-5 EARS definitions per requirement)
[Repeat for other requirements]
Design Document (design.md)
# [Feature Title]
Feature Name: feature-name
Updated: yyyy-mm-dd
## Description
[Feature description]
## Architecture
[Mermaid diagrams as needed]
[Architecture explanation]
## Components and Interfaces
[Component and interface descriptions]
## Data Models
[Data structure descriptions]
## Correctness Properties
[Invariants and constraints]
## Error Handling
[Error scenarios and handling strategies]
## Test Strategy
[Testing approach and coverage]
## References
[^1]: (Website) - [Page description](URL)
[^2]: (Filename#Lnnn) - [File link](relative/path)
Workflow
Phase 1: Requirements Generation
-
Initialize Feature
- Generate a short feature name in
kebab-caseformat (e.g.,user-authentication) - Create directory
.monkeycode/specs/{FEATURE_NAME}/
- Generate a short feature name in
-
Gather Context
- Read project documentation from
.monkeycode/docs/if available:INDEX.md- Project overviewARCHITECTURE.md- System architecture
- Scan
.monkeycode/specs/*/for related historical requirements - Understand existing code structure
- Read project documentation from
-
Generate Initial Requirements
- Decompose the feature idea into user stories
- Apply EARS patterns to each acceptance criterion
- Validate against INCOSE quality rules
- Write to
.monkeycode/specs/{FEATURE_NAME}/requirements.md
-
Iterate with User
- Present requirements document to user
- Ask clarifying questions (maximum 3 questions per round)
- Provide options with reasonable defaults
- Update document based on feedback
-
Special Handling for Parsers/Serializers
- Explicitly list all parsers and serializers as requirements
- Add pretty-printer requirements for each parser
- Include round-trip validation in acceptance criteria
Phase 2: Technical Design
-
Initialize Design Document
- Get current date via
date '+%Y-%m-%d' - Create feature name with date prefix (e.g.,
2025-01-15-user-authentication) - Create initial design outline in
.monkeycode/specs/{FEATURE_NAME}/design.md
- Get current date via
-
Gather Technical Context
- Read
.monkeycode/docs/INDEX.mdand.monkeycode/docs/ARCHITECTURE.md - Analyze project structure and existing patterns
- Review related specifications in
.monkeycode/specs/
- Read
-
Generate Design Document
- Include all required sections:
- Description
- Architecture (with Mermaid diagrams)
- Components and Interfaces
- Data Models
- Correctness Properties
- Error Handling
- Test Strategy
- Ensure design addresses all requirements from Phase 1
- Highlight design decisions and rationale
- Include all required sections:
-
Iterate with User
- Present design document to user
- Ask technical questions (maximum 3 per round)
- Update based on feedback
-
Finalize
- Commit changes with
git commit - Push to remote with
git push - Summarize deliverables to user
- Commit changes with
Decision Points
During the workflow, ask the user about:
| Topic | Example Questions |
|---|---|
| Scope | Which user roles need this feature? |
| Integration | Should this integrate with existing systems? |
| Performance | What are the expected load requirements? |
| Security | What authentication/authorization is needed? |
| Data | What data needs to be persisted? |
| Error Handling | How should failures be communicated to users? |
Output Files
.monkeycode/specs/{FEATURE_NAME}/
├── requirements.md # EARS-compliant requirements
└── design.md # Technical design specification
Notes
- All communication with users must use the project's configured language
- Maximum 3 clarifying questions per iteration round
- Always validate requirements against both EARS and INCOSE rules
- Correct non-compliant user inputs and explain corrections
- Design documents should be solution-agnostic where possible
- Include Mermaid diagrams for complex architectures
- Reference specific files with line numbers when applicable
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?