PranavNagrecha/AwesomeSalesforceSkills / skills/admin/acceptance-criteria-given-when-then
acceptance-criteria-given-when-then
VerifiedUse this skill when writing test-first, behavior-driven acceptance criteria in Given/When/Then format for a Salesforce user story. Covers happy path, edge cases, negative paths, permission boundaries, and data-state preconditions so the AC block can drive UAT scripts and Apex test design downstream. Trigger keywords: given when then, gherkin, behavior driven AC, test first acceptance criteria, scenario outline, BDD acceptance criteria. NOT for the user-story format itself (use admin/user-story-writing-for-salesforce). NOT for UAT script writing (use admin/uat-test-case-design). NOT for Apex test method generation (use agents/test-class-generator). NOT for high-level UAT planning (use admin/uat-and-acceptance-criteria). More triggers: acceptance criteria record, ac_id, req_id on a criterion, artefact under test, negative case for a rule-type requirement, no-match fall-through criterion, oracle for a Then clause, test type apex flow manual, criteria linter, check_ac_format.py, --manifest-dir.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 27.1 KB |
| references/examples.md | markdown | 12.5 KB |
| references/gotchas.md | markdown | 15.3 KB |
| references/llm-anti-patterns.md | markdown | 9.1 KB |
| references/well-architected.md | markdown | 8.2 KB |
| references/worked-examples.md | markdown | 40.7 KB |
| scripts/check_ac_format.py | script | 37.9 KB |
| scripts/check_acceptance_criteria_given_when_then.pyexecutable | script | 1.2 KB |
| templates/ac-template.md | markdown | 6.1 KB |
| templates/acceptance-criteria-given-when-then-template.md | markdown | 2.3 KB |
templates/acceptance-criteria-given-when-then-template.md
View on GitHub# Acceptance Criteria — Given/When/Then Work Template
Use this template when activating the `acceptance-criteria-given-when-then`
skill on a new or existing user story.
## Scope
**Skill:** `acceptance-criteria-given-when-then`
**Request summary:** (fill in what the user asked for — typically "write
behavior-driven AC for story X")
**Story under work:** (paste the As a / I want / So that wrapper)
## Context Gathered
Record answers to the Before Starting questions from `SKILL.md`:
- **Persona / profile / PSG:**
- **Target object(s):**
- **Sharing-relevant? OWD?** (Private / Public RO / Public RW / Controlled by Parent)
- **Single-record or bulk path expected?**
- **Async / callout / integration boundary?**
- **Known constraints (governor limits, integration peer system, license tier):**
## Approach
Which patterns from `SKILL.md` apply?
- [ ] Background block with named users + PSGs (always when sharing-relevant)
- [ ] Happy-path Scenario(s)
- [ ] Paired negative-path Scenario(s)
- [ ] Scenario Outline with Examples (when 3+ parameterized cases)
- [ ] Bulk Scenario (when trigger / flow / validation)
- [ ] `Then eventually` async Scenario (when callout / Queueable / PE / batch)
## Output
Use `templates/ac-template.md` (sibling file) as the canonical skeleton.
Paste the filled-in AC block into the user story body, then run:
```bash
python3 scripts/check_ac_format.py --file <story.md>
```
## Checklist
Copy the Review Checklist from `SKILL.md` and tick items as you complete
them. Do not hand off to `agents/test-class-generator` until all items are
ticked.
- [ ] Every Scenario has exactly one Given, one When, one Then
- [ ] Every happy-path has a paired negative-path
- [ ] Every Scenario names the running user by PSG / profile
- [ ] Record ownership / lifecycle precondition is explicit
- [ ] No UI-chrome language
- [ ] Bulk Scenario present (when applicable)
- [ ] Async outcomes use "eventually within N seconds"
- [ ] Validation-error messages are exact strings (or marked `# TBD`)
- [ ] Integration expectations name the named credential
- [ ] Every criterion has a `req_id`, persona, sandbox, artefact and `proof`
- [ ] Every rule-type requirement has a `negative: true` no-match criterion
- [ ] `check_ac_format.py --file <record>` reports 0 errors
## Notes
Record any deviations from the standard pattern and why.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |