agentleFS
patonkikhpatonkikh/APES/skills/product/acceptance-criteria-generator/skill.md

acceptance-criteria-generator

Skill3 starsChanged 4 months agoMITView on GitHub

Write testable acceptance criteria for user stories using Given-When-Then (BDD) format with edge cases and negative scenarios. Use when working on product discovery, PRDs, user stories, OKRs, or backlog planning.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write testable acceptance criteria for user stories using Given-When-Then (BDD) format with edge cases and negative scenarios.

    line 14
  2. Distinctive:

    Verify criteria make the story Testable.

    line 63
  3. Distinctive:

    Use concrete values in Given clauses (specific user role, data state).

    line 107
  4. Distinctive:

    Keep 3–7 criteria per story.

    line 111

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

Acceptance Criteria Generator

Purpose

Write testable acceptance criteria for user stories using Given-When-Then (BDD) format with edge cases and negative scenarios.

Input: User story (As/Want/So format)
Output: Acceptance criteria set with happy path, edge cases, and negative scenarios Examples: See examples.md for worked input/output.


Workflow

Step 1: Parse user story

Extract:

  • Persona (actor)
  • Action (behavior)
  • Benefit (expected outcome)
  • Story ID (if provided)

Step 2: Write happy path criteria

Minimum 1 scenario in Given-When-Then:

Given [precondition]
When [action]
Then [observable outcome]

Each Then clause must be verifiable without interpretation.

Step 3: Add edge cases

Identify 2–4 edge cases:

  • Boundary values
  • Empty/null states
  • Concurrent actions
  • Permission variations

Step 4: Add negative scenarios

Identify 1–3 failure scenarios:

  • Invalid input
  • Unauthorized access
  • System unavailable
  • Timeout/error handling

Step 5: Cross-check against INVEST

Verify criteria make the story Testable. If not, flag story for revision.

Step 6: Validate

Run Validation checklist.


Decision Rules

ConditionAction
User story missing or incompleteStop; request full story or run user-story-generator
Then clause is subjectiveRewrite with observable, measurable outcome
Criteria describe implementationRewrite as behavior ("API returns 200" → "user sees confirmation")
No negative scenariosAdd at least one error/unauthorized case for user-facing stories
Criteria overlap across scenariosDeduplicate; ensure each tests distinct behavior

Validation

  • ≥1 happy path in Given-When-Then format
  • ≥2 edge case scenarios
  • ≥1 negative scenario
  • All Then clauses are observable/testable
  • No implementation details unless NFR-related
  • Scenarios cover the full "so that" benefit
  • Each scenario has unique ID (AC-001...)

Anti-patterns

  • Subjective criteria — "page loads fast", "looks good".
  • Implementation criteria — "calls endpoint X with payload Y".
  • Happy path only — no error handling scenarios.
  • Duplicate scenarios — same behavior tested multiple ways.
  • Untestable benefits — criteria don't verify the "so that" clause.

Best Practices

  • Use concrete values in Given clauses (specific user role, data state).
  • Then clauses should be verifiable by QA without code knowledge.
  • Name scenarios descriptively: AC-001-happy-login, AC-002-invalid-password.
  • Align negative scenarios with NFRs (security, performance) when relevant.
  • Keep 3–7 criteria per story; split story if more needed.

Output Structure

# Acceptance Criteria: US-XXX — [Story title]

## Story
**As a** ... **I want** ... **so that** ...

## Happy Path
### AC-001: [Scenario name]
- **Given** ...
- **When** ...
- **Then** ...

## Edge Cases
### AC-002: [Scenario name]
- **Given** ...
- **When** ...
- **Then** ...

## Negative Scenarios
### AC-003: [Scenario name]
- **Given** ...
- **When** ...
- **Then** ...

## Coverage Check
| Story benefit | Covered by |
|---------------|------------|
| [benefit] | AC-001, AC-003 |

## Open Questions
- [ ] [Ambiguity needing PO decision]

Next Skills

OutcomeRecommended Skill
Map stories on boardproduct/story-mapping
More stories neededproduct/user-story-generator
Release planningproduct/epic-generator
PRD traceabilityproduct/prd-generator

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.