home / skills / yellinzero / aico / aico-pm-acceptance-criteria

aico-pm-acceptance-criteria skill

/.codex/skills/aico-pm-acceptance-criteria

This skill defines clear, testable acceptance criteria using Given/When/Then to guide QA and ensure verifiable completion.

npx playbooks add skill yellinzero/aico --skill aico-pm-acceptance-criteria

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.5 KB
---
name: aico-pm-acceptance-criteria
description: |
  Define clear, testable acceptance criteria using Given/When/Then (Gherkin) format that can be directly used for testing.

  Use this skill when:
  - User asks for "acceptance criteria", "AC", "test criteria", "done criteria"
  - User asks "how do we know it's done?", "what counts as complete?"
  - User story needs testable success conditions
  - QA needs test scenarios or test cases
  - Running /pm.plan and need to add AC to stories
  - Reviewing story and AC is missing or vague

  Format: Always use Given [context], When [action], Then [expected result] structure.
---

# Acceptance Criteria

## Language Configuration

Before generating any content, check `aico.json` in project root for `language` field to determine the output language. If not set, default to English.

## Process

1. **Review story/feature**: Understand what needs to be done
2. **Identify success scenarios**: Happy paths first
3. **Write Given/When/Then**: For each scenario
4. **Add edge cases**: Boundary conditions and errors
5. **Verify testability**: Each criterion must be independently verifiable

## Acceptance Criteria Template

```markdown
### Acceptance Criteria for [Story/Feature]

#### Scenario 1: [Scenario Name]

- **Given** [precondition/context]
- **When** [action/trigger]
- **Then** [expected outcome]

#### Scenario 2: [Scenario Name]

- **Given** [precondition/context]
- **When** [action/trigger]
- **Then** [expected outcome]

#### Edge Cases

- **Given** [edge case condition]
- **When** [action]
- **Then** [expected behavior]
```

## Criteria Categories

| Category       | Examples                    |
| -------------- | --------------------------- |
| Functional     | Feature works as specified  |
| Validation     | Input validation rules      |
| Error handling | Error messages and recovery |
| Performance    | Response time expectations  |
| Accessibility  | A11y requirements           |

## Quality Checklist

- [ ] Each criterion is independently testable
- [ ] No ambiguous language ("should", "might", "could")
- [ ] Edge cases are covered
- [ ] Error states are defined
- [ ] Performance expectations stated (if relevant)

## Key Rules

- ALWAYS use Given/When/Then structure
- MUST make each criterion independently testable
- ALWAYS include edge cases and error scenarios
- NEVER use vague language - be specific

## Common Mistakes

- ❌ Vague criteria ("works correctly") → ✅ Specific conditions
- ❌ Missing edge cases → ✅ Include boundary conditions
- ❌ Implementation details → ✅ Focus on observable behavior

Overview

This skill defines clear, testable acceptance criteria using Given/When/Then (Gherkin) format so stories can be validated directly by QA or automated tests. It produces happy-path scenarios, edge cases, and error conditions that are independently verifiable. The output is structured for immediate use in test plans and story descriptions.

How this skill works

It inspects the user story or feature description, extracts success conditions, and creates one or more Given/When/Then scenarios for each situation. The skill prioritizes happy paths, then adds validation, error handling, performance, and accessibility edge cases. Every criterion is phrased to be unambiguous and independently testable.

When to use it

  • When a user asks for "acceptance criteria", "AC", or "test criteria"
  • When someone asks "how do we know it's done?" or "what counts as complete?"
  • When a user story lacks testable success conditions
  • When QA needs test scenarios or test cases
  • When running /pm.plan and AC must be added to stories
  • When reviewing stories where acceptance criteria are missing or vague

Best practices

  • Start with a single clear user story and its primary success path
  • Write one Given/When/Then per distinct scenario to keep tests independent
  • Use concrete data and measurable expectations (counts, timestamps, response times)
  • Include validation, error, performance, and accessibility edge cases
  • Avoid implementation details; describe observable behavior only
  • Verify each criterion can be executed and results observed by QA or automation

Example use cases

  • Convert a user login story into Gherkin scenarios: successful login, invalid password, locked account
  • Produce AC for a file upload feature: valid file, oversized file, unsupported format, interrupted upload
  • Add acceptance criteria to an API endpoint: correct response, validation errors, timeouts, rate limiting
  • Create AC for an e-commerce checkout: successful purchase, payment failure, inventory shortage
  • Draft testable done criteria for a UI component including accessibility checks and performance thresholds

FAQ

Can criteria include performance targets?

Yes. Include explicit, measurable performance expectations (for example: "Then the page responds within 300ms under 95% of requests") using Given/When/Then format.

How many scenarios should I create per story?

Start with the happy path, then add 2–5 edge and error scenarios as needed so each important behavior is independently testable.