Feature Specification
Scannednpx machina-cli add skill ruslan-korneev/python-backend-claude-plugins/feature-specification --openclawFeature Specification Skill
Generate structured feature specifications with Business Rules (BR), User Stories (US), and Acceptance Criteria (AC).
When to Use This Skill
Use this skill when the user wants to:
- Document project features systematically
- Extract feature specifications from existing code
- Design features for a new project interactively
- Create a structured requirements document
- Visualize feature dependencies
Trigger phrases:
- "Create feature list for this project"
- "Document the features"
- "What features does this codebase have?"
- "Help me plan features for..."
- "Generate requirements specification"
- "Extract business rules from code"
Core Concepts
Feature Phases
Features are organized into 6 phases based on their role:
| Phase | Prefix | Description |
|---|---|---|
| Core | core- | Fundamental entities (users, products, orders) |
| Workflow | workflow- | Business processes (checkout, approval) |
| Lifecycle | lifecycle- | State transitions, notifications |
| Analytics | analytics- | Reporting, metrics, dashboards |
| Integration | integration- | External APIs, third-party services |
| UI | ui- | User interface components |
Identifier Format
Each requirement uses a standardized identifier:
- BR-XXX-YYY — Business Rule (e.g., BR-USR-001)
- US-XXX-YYY — User Story (e.g., US-USR-001)
- AC-XXX-YYY — Acceptance Criteria (e.g., AC-USR-001)
Where:
XXX— 3-letter domain code (USR, ORD, PAY, etc.)YYY— Sequential number (001, 002, ...)
Feature Anatomy
## BR-XXX-001: Business Rule Title
**Description**: What this rule defines
**Rationale**: Why this rule exists
### User Stories
#### US-XXX-001: As a [role], I want [goal]
**Acceptance Criteria:**
- [ ] AC-XXX-001: Given [context], when [action], then [outcome]
- [ ] AC-XXX-002: Given [context], when [action], then [outcome]
Two Operating Modes
Analyze Mode
For existing codebases:
- Scan models, routes, services
- Extract entities and operations
- Infer business rules from code
- Generate feature specifications
- Detect dependencies from imports
Design Mode
For new projects:
- Ask about project type
- Identify user roles
- Define core workflows
- Plan integrations
- Generate feature specifications
Output Structure
docs/technical-requirements/features/
├── README.md # Index with dependency graph
├── 00-template.md # Feature template
├── core-01-user-management.md # Core features
├── core-02-authentication.md
├── workflow-01-order-creation.md # Workflow features
├── lifecycle-01-notifications.md # Lifecycle features
├── analytics-01-reports.md # Analytics features
├── integration-01-email.md # Integration features
└── ui-01-admin-panel.md # UI features
References
- Feature Template — Full feature file structure
- Phases — Detailed phase definitions
- ID Conventions — Identifier format rules
- Dependency Graph — Mermaid graph generation
Key Principles
Idempotency
- Check if files exist before creating
- Merge new content with existing during re-analysis
Preserve Manual Edits
<!-- manual -->
This content is preserved during regeneration
<!-- /manual -->
Cross-Reference Validation
- Warn about non-existent dependencies
- Detect circular dependencies
Status Inference
draft— File exists, no code yetin_progress— Code exists, tests failingcompleted— Code + tests passing
Source
git clone https://github.com/ruslan-korneev/python-backend-claude-plugins/blob/master/plugins/tech-lead/skills/feature-specification/SKILL.mdView on GitHub Overview
Generates structured feature specifications using Business Rules (BR), User Stories (US), and Acceptance Criteria (AC). It helps teams document features systematically, extract specifications from existing code, and design features for new projects with clear dependency visualization.
How This Skill Works
In Analyze Mode, it scans codebases (models, routes, services) to infer BRs, USs, and ACs and compiles them into standardized feature files. In Design Mode, it gathers project context (roles, core workflows, integrations) to generate complete BR/US/AC specifications. The tool emphasizes idempotency and preserves manual edits during regeneration.
When to Use It
- Document project features systematically
- Extract feature specifications from existing code
- Design features for a new project interactively
- Create a structured requirements document
- Visualize feature dependencies
Quick Start
- Step 1: Choose Analyze Mode for an existing codebase or Design Mode for a new project
- Step 2: Run the scan to generate BR/US/AC specifications or answer project questions to design them
- Step 3: Review and refine the generated docs in docs/technical-requirements/features/ and keep manual edits when needed
Best Practices
- Run analyses idempotently to merge with existing docs
- Preserve manual edits using the designated markers
- Cross-reference and validate BR/US/AC IDs for consistency
- Adhere to the identifier format (BR-XXX-YYY, US-XXX-YYY, AC-XXX-YYY)
- Organize outputs by the six feature phases: Core, Workflow, Lifecycle, Analytics, Integration, UI
Example Use Cases
- Extract BR/US/AC from an existing codebase to document features
- Plan a checkout workflow by detailing BRs, USs, and ACs
- Document core features for user management and authentication
- Define an integration with an external email service
- Generate a structured requirements document for a new project