write-acceptance
Write acceptance criteria in Given-When-Then format for user stories following BDD best practices. Use for creating testable, clear acceptance criteria.
What this skill does
# 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:
```text
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:
1. **Happy Path**: Primary success scenario
2. **Alternate Paths**: Valid variations
3. **Error Scenarios**: What can go wrong
4. **Edge Cases**: Boundary conditions
5. **Security Scenarios**: Access control, validation
### Step 4: Write Scenarios
Use Given-When-Then format:
```gherkin
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:
- **I**ndependent: Can run alone
- **N**egotiable: Details can be discussed
- **V**aluable: Delivers user value
- **E**stimable: Can be sized
- **S**mall: Fits in sprint
- **T**estable: Clear pass/fail
### Step 6: Generate SpecFlow (Optional)
For .NET projects, create step definition stubs:
```csharp
[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
```markdown
## 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:**
```bash
/test-strategy:write-acceptance "As a customer, I want to checkout with saved payment so I can complete purchases quickly"
```
**From story ID:**
```bash
/test-strategy:write-acceptance US-042
```
**From file:**
```bash
/test-strategy:write-acceptance docs/stories/checkout.md
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.