Get the FREE Ultimate OpenClaw Setup Guide →

Feature Specification

Scanned
npx machina-cli add skill ruslan-korneev/python-backend-claude-plugins/feature-specification --openclaw
Files (1)
SKILL.md
3.7 KB

Feature 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:

PhasePrefixDescription
Corecore-Fundamental entities (users, products, orders)
Workflowworkflow-Business processes (checkout, approval)
Lifecyclelifecycle-State transitions, notifications
Analyticsanalytics-Reporting, metrics, dashboards
Integrationintegration-External APIs, third-party services
UIui-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:

  1. Scan models, routes, services
  2. Extract entities and operations
  3. Infer business rules from code
  4. Generate feature specifications
  5. Detect dependencies from imports

Design Mode

For new projects:

  1. Ask about project type
  2. Identify user roles
  3. Define core workflows
  4. Plan integrations
  5. 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

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 yet
  • in_progress — Code exists, tests failing
  • completed — 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

  1. Step 1: Choose Analyze Mode for an existing codebase or Design Mode for a new project
  2. Step 2: Run the scan to generate BR/US/AC specifications or answer project questions to design them
  3. 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

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers