niopd-pd-acceptance-criteria
npx machina-cli add skill 8421bit/NioPD-Skills/NioPD-PD-acceptance-criteria --openclawAcceptance Criteria Skill
This skill creates testable acceptance criteria using Given-When-Then format.
Theoretical Foundation
Gherkin Syntax
GIVEN [context/precondition]
WHEN [action/trigger]
THEN [expected outcome]
Good Criteria Are
- Testable (can verify pass/fail)
- Independent (each stands alone)
- Specific (no ambiguity)
- Complete (all scenarios covered)
Instructions
Step 1: Identify Story
What user story are we specifying?
Step 2: List Scenarios
- Happy path
- Edge cases
- Error cases
Step 3: Write Criteria
For each scenario:
GIVEN [context]
WHEN [action]
THEN [outcome]
Step 4: Validate
- All scenarios covered
- Each criterion is testable
- No ambiguity remains
Step 5: Generate Document
File path: 03-docs/[YYYYMMDD]-acceptance-criteria-v0.md
Output Specifications
- File Naming:
[YYYYMMDD]-acceptance-criteria-v0.md - Location:
03-docs/ - Template:
references/acceptance-criteria-template.md
Source
git clone https://github.com/8421bit/NioPD-Skills/blob/init/plugins/niopd/skills/NioPD-PD-acceptance-criteria/SKILL.mdView on GitHub Overview
This skill helps create detailed, testable acceptance criteria for user stories using Given-When-Then. It supports sprint planning, QA prep, and developer handoff by making criteria independent, specific, and verifiable.
How This Skill Works
It guides you through identifying the user story, listing scenarios (happy path, edge, and error cases), and writing criteria in GIVEN/WHEN/THEN format. It then validates coverage and outputs a markdown document at 03-docs/[YYYYMMDD]-acceptance-criteria-v0.md using the template references/acceptance-criteria-template.md.
When to Use It
- During sprint planning to define testable acceptance criteria for new stories
- When preparing QA to create or execute test cases
- During developer handoff to clarify expected behavior and success metrics
- When refining requirements during backlog grooming or refactors
- For auditing test coverage and ensuring criteria completeness
Quick Start
- Step 1: Identify the user story you’re specifying.
- Step 2: List scenarios (happy path, edge cases, error cases).
- Step 3: Write GIVEN/WHEN/THEN criteria for each scenario and generate the document using the 03-docs/[YYYYMMDD]-acceptance-criteria-v0.md template.
Best Practices
- Write independent criteria for each scenario so they can be tested in isolation
- Keep GIVEN, WHEN, THEN concise and unambiguous
- Cover happy path, edge cases, and error scenarios
- Validate that every criterion is testable and complete
- Use the specified file path and template to generate the documentation
Example Use Cases
- User can reset password: GIVEN a registered email, WHEN they request a reset, THEN a reset link is emailed and the user can reset their password
- User login: GIVEN a valid user, WHEN they enter correct credentials, THEN they are redirected to their dashboard
- Password policy enforcement: GIVEN a weak password, WHEN the user attempts to save, THEN an error explains the policy requirements
- Cart checkout: GIVEN items in stock and a valid address, WHEN the user completes checkout, THEN an order is created and an email receipt is sent
- Duplicate account prevention: GIVEN an email already on file, WHEN a signup is attempted, THEN the system rejects with a clear message