Use when a feature has complex business logic, multiple state transitions, or intricate validation rules that need detailed specification. Also triggers on 'feature specification', 'this feature needs a detailed spec', 'complex feature', 'state machine', or 'business rules'.
From pmnpx claudepluginhub etusdigital/etus-plugins --plugin pmThis skill uses the workspace's default tool permissions.
knowledge/guide.mdknowledge/template.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides implementation of event-driven hooks in Claude Code plugins using prompt-based validation and bash commands for PreToolUse, Stop, and session events.
Reference: .claude/skills/orchestrator/dependency-graph.yaml
BLOCKS (required — auto-invoke if missing):
docs/ets/projects/{project-slug}/planning/prd.md — Provides the PRD-F-# feature definition and priority. Without it, the spec has no scope anchor.docs/ets/projects/{project-slug}/planning/user-stories.md — Provides US-# acceptance criteria that the spec elaborates on. The spec adds business rules and state logic on top of what the stories define.ENRICHES (improves output — warn if missing):
docs/ets/projects/{project-slug}/discovery/product-vision.md — Business context and personas help ground business rules in real user scenarios.Resolution protocol:
dependency-graph.yaml → feature-spec.requires: [prd, user-stories]Why this matters: Feature specs contain the detailed business rules (FS-#) that architecture and implementation skills reference. If the spec only exists in chat, the tech-spec cannot incorporate ADRs for complex logic, and the implementation plan cannot reference FS-# rule IDs.
mkdir -p if neededIf the Write fails: Report the error to the user and do not proceed — downstream documents depend on FS-# references in this file.
This skill follows the ETUS interaction standard. Your role is a thinking partner, not an interviewer — suggest alternatives, challenge assumptions, and explore what-ifs instead of only extracting information.
One question per message — Ask one question, wait for the answer, then ask the next. Use the AskUserQuestion tool when available for structured choices. Complex features have many rules; exploring them one at a time prevents missed edge cases.
3-4 suggestions for choices — When the user needs to choose between state models, error handling strategies, or validation approaches, present 3-4 concrete options with tradeoffs. Highlight your recommendation.
Present business rules one at a time — Present each FS-# rule individually with its description, trigger condition, and expected result. Ask "Does this rule capture it correctly? Anything to adjust?" before moving to the next rule.
Propose state machines visually before committing — If the feature has state transitions, propose 2-3 state model options using Mermaid diagrams. Let the user choose the right model before detailing transitions.
Suggest edge cases per rule — For each business rule, suggest 2-3 edge cases the user may not have considered. Ask which are relevant before including them.
Propose validation options per field — For validation rules, present 2-3 options per field (strict vs. lenient, client-side vs. server-side, etc.) and ask which approach fits.
Track outstanding questions — If something cannot be answered now, classify it:
Multiple handoff options — At completion, present 3-4 next steps as options (see CLOSING SUMMARY).
Resume existing work — Before starting, check if the target artifact already exists at the expected path. If it does, ask the user: "I found an existing feature-spec at [path]. Should I continue from where it left off, or start fresh?" If resuming, read the document, summarize the current state, and continue from outstanding gaps.
Assess if full process is needed — If the user's input is already detailed with clear requirements, specific acceptance criteria, and defined scope, don't force the full interview. Confirm understanding briefly and offer to skip directly to document generation. Only run the full interactive process when there's genuine ambiguity to resolve.
This skill reads and writes persistent memory to maintain context across sessions.
On start (before any interaction):
docs/ets/.memory/project-state.md — know where the project isdocs/ets/.memory/decisions.md — don't re-question closed decisionsdocs/ets/.memory/preferences.md — apply user/team preferences silentlydocs/ets/.memory/patterns.md — apply discovered patternsOn finish (after saving artifact, before CLOSING SUMMARY):
project-state.md is updated automatically by the PostToolUse hook — do NOT edit it manually.python3 .claude/hooks/memory-write.py decision "<decision>" "<rationale>" "<this-skill-name>" "<phase>" "<tag1,tag2>"python3 .claude/hooks/memory-write.py preference "<preference>" "<this-skill-name>" "<category>"python3 .claude/hooks/memory-write.py pattern "<pattern>" "<this-skill-name>" "<applies_to>"The .memory/*.md files are read-only views generated automatically from memory.db. Never edit them directly.
Use full version when:
Use short version when:
Provide a deep-dive specification for complex features that exceed the user-story threshold. A feature-spec is not always needed — it's created on-demand only when a feature has >3 business rules, state transitions, or intricate validation logic. This keeps user-stories.md lean while providing implementation teams with detailed logic maps for complex workflows.
Load context in this order of priority:
[feature-name], identify that feature in the current project context.docs/ets/projects/{project-slug}/state/reports/ for prior feature analysis or complexity assessments.docs/ets/projects/{project-slug}/planning/ for user-stories.md to find US-# that reference this feature.A feature-spec is created when a feature meets at least one of these criteria (the goal is to keep user-stories.md lean while giving implementation teams detailed logic maps for complex workflows):
1. More than 3 business rules
2. State machine / multiple state transitions
3. Intricate validation logic
4. Elaborate error handling & recovery
When NOT to create feature-spec (stay with user-stories):
This skill is invoked after user-stories.md is complete, because stories need to exist before we can assess which features exceed the complexity threshold. During user-stories planning:
Then, for each flagged story, invoke this skill to generate the feature-spec.
The generated docs/ets/projects/{project-slug}/planning/feature-spec-[kebab-name].md contains:
Example sections:
## Business Rules
FS-checkout-1: Cart total calculated as sum of all line items after discounts and taxes
FS-checkout-2: If user has active coupon, apply before tax calculation
FS-checkout-3: Coupon expires at end of UTC day; validate before applying
FS-checkout-4: If coupon reduces total below $5, show warning "Order may incur small-order fee"
## State Machine
[Mermaid diagram showing: Empty Cart → Items Added → Coupon Applied → Checkout → Payment Processing → Complete]
## Validation Rules
- Cart items: 1-100 items per order
- Coupon code: 6-16 alphanumeric, case-insensitive
- If coupon expired: show error "This code has expired. Try another."
FS-[kebab-name]-# Pattern: Feature Spec rules. Format: FS-checkout-1, FS-checkout-2, etc.
Maintain traceability: US-# → feature-spec-[kebab-name].md → FS-[kebab-name]-#
references/template.md for the feature-spec-[name].md document template and standard sections.references/guide.md for best practices on detailing business rules, drawing state machines with Mermaid, and capturing edge cases without over-specifying implementation.This skill is on-demand and invoked after user-stories.md is complete. Create a feature-spec for each flagged feature that exceeds the complexity threshold. Present handoff options to the user after each spec (see CLOSING SUMMARY). The architecture-agent will incorporate completed specs into tech-spec and ADRs during the Design phase.
prd.md (BLOCKS):
user-stories.md (BLOCKS):
Before marking this document as COMPLETE:
If any check fails → mark document as DRAFT with <!-- STATUS: DRAFT --> at top.
After saving and validating, display the summary and offer multiple next steps:
feature-spec-[name].md saved to `docs/ets/projects/{project-slug}/planning/feature-specs/feature-spec-[name].md`
Status: [COMPLETE | DRAFT]
IDs generated: [list FS-{name}-# IDs, e.g., FS-checkout-1, FS-checkout-2, FS-checkout-3]
What would you like to do next?
1. Create next Feature Spec — If more features need detailed specs
2. Proceed to Planning Gate (Recommended) — Validate planning artifacts before Design phase
3. Refine this spec — Review and improve specific sections
4. Pause for now — Save and return later
Wait for the user's choice before proceeding. Do not auto-advance to the next skill.
docs/ets/projects/{project-slug}/planning/feature-specs/ — create if missingdocs/ets/projects/{project-slug}/planning/feature-specs/feature-spec-[name].md using the Write tool (where [name] is the kebab-case feature name)docs/ets/projects/{project-slug}/planning/feature-specs/feature-spec-[name].md) + paths to upstream documents (BLOCKS: docs/ets/projects/{project-slug}/planning/prd.md, docs/ets/projects/{project-slug}/planning/user-stories.md)"Document saved to
docs/ets/projects/{project-slug}/planning/feature-specs/feature-spec-[name].md. The spec reviewer approved it. Please review and let me know if you want any changes before we proceed." Wait for the user's response. If they request changes, make them and re-run the spec review. Only proceed to validation after user approval.
| Error | Severity | Recovery | Fallback |
|---|---|---|---|
| BLOCKS dep missing | Critical | Auto-invoke upstream skill | Block execution |
| PRD-F-# not found in prd.md | Critical | Ask user which feature to expand | Block — can't spec unknown feature |
| Feature has <3 business rules | Low | Proceed — not all features are complex | Note: "Feature may not need a spec" |
| Output validation fails | High | Mark as DRAFT | Proceed with DRAFT status |