feature-spec

Analyze one Gherkin feature spec into a gated BA/SA design document with BDD acceptance criteria.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/keefhub/travel-expense --skill feature-spec-keefhub
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-spec
Source: https://github.com/keefhub/travel-expense/tree/main/.claude/skills/feature-spec
Command: npx skills add https://github.com/keefhub/travel-expense --skill feature-spec-keefhub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning a raw Gherkin feature file into an implementation-ready specification is error-prone: requirements get lost, acceptance criteria go untested, and design drifts from the spec. This Skill enforces a gated, two-role (Business Analyst and Solution Architect) analysis pipeline that produces a fully traceable design document for exactly one feature at a time. ## Core Features & Use Cases - Gated multi-phase analysis: Seven phases (scope, business analysis, technical specification, BDD acceptance criteria, Playwright scenario mapping, AC verification matrix, contrarian review), each with a pass/fail gate and revision limits. - Full traceability: Numbered business rules (BR-), design elements (TS-), acceptance criteria (AC-), and Playwright tests (E2E-) cross-referenced in a verification matrix with orphan detection. - Thin-feature shortcut: Features with two or fewer scenarios and no new storage key or module boundary skip the full document and go straight to planning. - Use Case: Given features/005.record-expense.md, run the Skill to produce doc/features/005-record-expense/spec.md containing sourced business rules, a TypeScript data model, Gherkin acceptance criteria, and a Playwright test mapping ready for the implementation loop. ## Quick Start Ask the AI to run /feature-spec 005 to analyze the record-expense feature and write its gated specification document.

Frequently Asked Questions about feature-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a Gherkin feature file into an implementation-ready specification?

Run /feature-spec with the feature number, such as /feature-spec 005. It reads the single feature file plus OVERVIEW sections 1-3, then produces a gated spec document with business rules, technical design, BDD acceptance criteria, and a Playwright test mapping.

How do I generate BDD acceptance criteria from feature specs?

Phase 3 of the pipeline rewrites the feature's Gherkin into verification-ready acceptance criteria with AC IDs, splitting compound scenarios and adding derived edge cases. Every criterion must be observable from outside the implementation.

Can I analyze multiple feature files in one run?

No. The skill enforces exactly one feature per invocation to prevent cross-contamination of requirements. For multiple features, run it sequentially once per feature, completing and writing each spec before starting the next.

When does a feature skip the full specification document?

Features with two or fewer Gherkin scenarios and no new storage key or module boundary use the thin-feature shortcut: only a short handoff note is emitted, and planning proceeds directly from the feature file.

What happens when a quality gate fails during analysis?

A failed gate blocks advancement and allows up to two revision passes. If it still fails, the unresolved item is recorded in Open Questions and Risks, the gate is marked PASSED WITH OPEN ITEMS, and the run continues.