agentleFS
mmccallammccalla/coding-agent-skill-library/skills/bdd-practice/SKILL.md

bdd-practice

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Applies behaviour-driven development with business-readable scenarios linked to executable acceptance tests. Use when defining externally visible behaviour, acceptance criteria, or user-facing workflows before implementation.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    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:

    Use this skill when the task involves user journeys, acceptance criteria, cross-role collaboration, product behaviour, APIs, workflows, …

    line 13
  2. Distinctive:

    Keep scenario language aligned with the domain vocabulary and DDD ubiquitous language where applicable.

    line 27
  3. Distinctive:

    Run acceptance tests and report evidence.

    line 28
  4. Distinctive:

    Do not use BDD scenarios as vague documentation.

    line 45
  5. Distinctive:

    Do not expose internal implementation details in scenario steps.

    line 46
  6. Distinctive:

    Avoid combinatorial explosion.

    line 47
  7. Distinctive:

    Keep business terminology consistent across scenarios, code and documentation.

    line 48
  8. Distinctive:

    When scenarios reveal ambiguity, stop and ask for clarification or encode the assumption explicitly.

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

Behaviour-Driven Development (BDD)

When to use

Use this skill when the task involves user journeys, acceptance criteria, cross-role collaboration, product behaviour, APIs, workflows, domain rules, or tests that must be understandable by business and technical stakeholders.

Objective

Translate requirements into clear, testable behaviour using examples. Ensure implementation satisfies externally visible outcomes rather than internal design assumptions.

Procedure

  1. Identify the actor, goal, business rule, preconditions and expected outcome.
  2. Express behaviour as concrete examples, preferably in Given/When/Then form.
  3. Separate acceptance scenarios from implementation details.
  4. Cover the main success path, meaningful alternatives, boundary cases and failure paths.
  5. Automate scenarios where practical using the repository's acceptance-test framework.
  6. Implement only the behaviour required to satisfy the scenarios.
  7. Keep scenario language aligned with the domain vocabulary and DDD ubiquitous language where applicable.
  8. Run acceptance tests and report evidence.

Scenario format

Feature: <capability>

  Scenario: <specific behaviour>
    Given <initial context>
    And <relevant precondition>
    When <action or event>
    Then <observable outcome>
    And <important postcondition>

Rules

  • Do not use BDD scenarios as vague documentation; they must be specific enough to verify.
  • Do not expose internal implementation details in scenario steps.
  • Avoid combinatorial explosion; use representative examples and supplement with lower-level tests.
  • Keep business terminology consistent across scenarios, code and documentation.
  • When scenarios reveal ambiguity, stop and ask for clarification or encode the assumption explicitly.

Related skills

  • spec-driven-development — spec before scenarios
  • tdd-practice — executable tests from scenarios
  • ddd-practice — domain language in scenarios

References

Verification

  • Scenarios added or updated in business-readable form.
  • Acceptance tests run with results stated.
  • Implemented behaviour matches scenarios.
  • Stakeholder confirmation gaps noted.

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.