write-acceptance
Write Acceptance Criteria Command
Generate clear, testable acceptance criteria in Given-When-Then format for user stories.
Process
Step 1: Parse User Story
Accept input as:
- Complete user story text
- User story ID (US-001) - look up in docs
- File path to story specification
Extract the user story format:
As a [role]
I want to [action]
So that [benefit]
Step 2: Load Skills
Invoke the test-strategy:acceptance-criteria-authoring skill for BDD patterns.
Step 3: Identify Scenarios
For the user story, identify:
- Happy Path: Primary success scenario
- Alternate Paths: Valid variations
- Error Scenarios: What can go wrong
- Edge Cases: Boundary conditions
- Security Scenarios: Access control, validation
Step 4: Write Scenarios
Use Given-When-Then format:
Feature: [Feature name from story]
Background:
Given [common precondition]
And [another common setup]
@happy-path
Scenario: Successfully [action] as [role]
Given [specific context]
And [additional context]
When [action taken]
Then [expected outcome]
And [additional verification]
@error-handling
Scenario: Fail to [action] when [condition]
Given [error-inducing context]
When [action taken]
Then [error handling behavior]
And [system state preserved]
@edge-case
Scenario: [Action] with boundary condition
Given [edge condition]
When [action at boundary]
Then [expected boundary behavior]
Step 5: Apply INVEST Validation
Check scenarios against INVEST:
- Independent: Can run alone
- Negotiable: Details can be discussed
- Valuable: Delivers user value
- Estimable: Can be sized
- Small: Fits in sprint
- Testable: Clear pass/fail
Step 6: Generate SpecFlow (Optional)
For .NET projects, create step definition stubs:
[Binding]
public class [Feature]Steps
{
[Given(@"I am logged in as a (.*)")]
public void GivenIAmLoggedInAs(string role)
{
// TODO: Implement step
}
[When(@"I (.*)")]
public void WhenI(string action)
{
// TODO: Implement step
}
[Then(@"I should see (.*)")]
public void ThenIShouldSee(string expected)
{
// TODO: Implement step
}
}
Step 7: Output
## Acceptance Criteria Created
**User Story**: [Story ID/Title]
### Scenarios Generated
| Scenario | Type | Priority |
|----------|------|----------|
| Successfully checkout | Happy Path | P1 |
| Payment declined | Error | P1 |
| Cart expires | Edge Case | P2 |
### Files Created
- `features/[feature].feature` - Gherkin scenarios
- `steps/[Feature]Steps.cs` - Step stubs (if .NET)
### Coverage Checklist
- [x] Happy path covered
- [x] Validation errors covered
- [x] Authorization failures covered
- [x] Boundary conditions covered
- [ ] Concurrency scenarios (if applicable)
### Notes
- [Any assumptions made]
- [Questions for product owner]
Examples
From story text:
/test-strategy:write-acceptance "As a customer, I want to checkout with saved payment so I can complete purchases quickly"
From story ID:
/test-strategy:write-acceptance US-042
From file:
/test-strategy:write-acceptance docs/stories/checkout.md
More from melodic-software/claude-code-plugins
design-thinking
Design Thinking methodology for human-centered innovation. Covers the 5-phase IDEO/Stanford d.school approach (Empathize, Define, Ideate, Prototype, Test) with workshop facilitation and exercise templates.
191plantuml-syntax
Authoritative reference for PlantUML diagram syntax. Provides UML and non-UML diagram types, syntax patterns, examples, and setup guidance for generating accurate PlantUML diagrams.
161system-prompt-engineering
Design effective system prompts for custom agents. Use when creating agent system prompts, defining agent identity and rules, or designing high-impact prompts that shape agent behavior.
141architecture-documentation
Generate architecture documents using templates with diagram integration. Use for creating C4 diagrams, viewpoint documents, and technical overviews.
126data-modeling
Data modeling with Entity-Relationship Diagrams (ERDs), data dictionaries, and conceptual/logical/physical models. Documents data structures, relationships, and attributes.
101resume-optimization
Resume structure, achievement bullet formulas, ATS optimization, and job-targeted tailoring for software engineers. Use when reviewing resumes, crafting achievement bullets, extracting keywords from job descriptions, or tailoring content for specific roles.
93