Skip to content

PranavNagrecha/AwesomeSalesforceSkills / skills/admin/acceptance-criteria-given-when-then

acceptance-criteria-given-when-then

Verified

Use 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.

scripts/check_acceptance_criteria_given_when_then.py

View on GitHub
#!/usr/bin/env python3
"""Compatibility wrapper — delegates to ``check_ac_format.py``.

The canonical lint script for this skill is ``check_ac_format.py``. This
wrapper exists so the auto-generated ``check_<skill_name>.py`` filename
expected by the scaffold continues to resolve. Both entry points lint the
same way.

Usage:
    python3 check_acceptance_criteria_given_when_then.py <story.md>
"""

from __future__ import annotations

import sys
from pathlib import Path

# Delegate to the canonical implementation in this same scripts/ folder.
HERE = Path(__file__).resolve().parent
sys.path.insert(0, str(HERE))

from check_ac_format import main  # noqa: E402


def run() -> int:
    """Run the canonical AC-format lint and surface its issues.

    Exits with code 1 (ERROR) when issues are found, 0 when clean.
    """
    try:
        return main()
    except SystemExit as exc:
        # Propagate the underlying script's exit code so callers see ERRORs.
        return int(exc.code) if exc.code is not None else 0
    except Exception as exc:  # pragma: no cover - defensive
        print(f"ERROR: AC-format wrapper failed: {exc}", file=sys.stderr)
        return 1


if __name__ == "__main__":
    sys.exit(run())
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 323kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 323kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 323kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall