agentleFS
YassimbaYassimba/loom/skills/bdd/SKILL.md

bdd

Skill9 starsChanged 2 months agoApache-2.0View on GitHub

Behavior-Driven Development as a collaboration and specification practice, with pytest-bdd and behave as the bundled automation references. Use when defining behavior through concrete examples or acceptance criteria, writing or reviewing Gherkin .feature files, wiring pytest-bdd or behave step definitions, or checking that tests still express business behavior rather than implementation.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use atdd, sdd and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • swingermanSkill

    atdd

    Use to drive feature work through the Acceptance Test Driven Development workflow — Given/When/Then specs before code, a project-specific test pipeline, and two parallel test streams (acceptance + unit). Triggers — "/atdd", "build a feature", "implement a feature", "add functionality", "start development", "write acceptance tests", "write specs", "use ATDD", "use TDD with acceptance tests".

    Also in 3 projects that use this

  • liatrio-labsSkill

    sdd

    Execute the Liatrio Spec-Driven Development (SDD) workflow when explicitly invoked by the user. NOTE: this skill is NOT intended to be dynamically loaded or automatically triggered; it should only ever be explicitly called by the user.

    Also in 3 projects that use this

  • anombyte93Skill

    discover

    Phase 1 of the prd-taskmaster pipeline: brainstorm-driven discovery. Delegates to superpowers:brainstorming in Interactive Mode (one adaptive question at a time), or self-brainstorms in Autonomous Mode when no user is present. Intercepts before the brainstorming chain hands off to writing-plans — this skill owns the exit. Extracts constraints, calibrates scale (Solo / Team / Enterprise), and advances the pipeline to GENERATE.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 2

    Distinctive

    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:

    Refactor: Keep scenario language stable while extracting helpers and fixtures.

    line 24
  2. Distinctive:

    Every scenario passes all six before glue code:

    line 30

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “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

Behavior-Driven Development

BDD builds shared understanding of a problem through concrete examples, written in business language, agreed before implementation. The examples become executable specifications; running them drives the code. The order is fixed: conversation first, capture second, automation last. A team running Gherkin without the conversation has test automation, not BDD.

Two automation layers are bundled: pytest-bdd and behave. The practice and the Gherkin carry to any stack — see Other automation layers.

Preflight: does this deserve Gherkin?

Gate every "add a BDD test" impulse:

  • The behavior is stable and business-meaningful — not scaffolding, framework glue, or an implementation still finding its shape.
  • The sentence helps someone imagine a real use of this project. A scenario that reads as a natural-language translation of a technical test gets rewritten, or dropped in favor of a plain pytest test.

Workflow

  1. Discover. Write down Who / What / Why, the business rules, examples, and open questions — before touching a test framework. Done when every rule carries at least one positive and one negative example and every unknown is a recorded question rather than a guess. Working solo, simulate the Three Amigos using subagents (business, development, quality) and mark which points are inference needing user confirmation. Detail and templates: practice.md.
  2. Formulate. Invoke the write-simply skill (via the Skill tool) — the Gherkin and the prose presenting it follow its register. Draft the scenarios — Given context, When event, Then observable outcome — in domain language. Ask the user for approval, then run every scenario through the quality gate below before writing any glue code. Syntax and style: gherkin.md.
  3. Automate — only when the user asks for implementation. The framework is a project fact — check the declared dependencies for behave or pytest-bdd (a features/steps/ tree with environment.py means behave) and join what is there. Only greenfield picks, and Gherkin authorship decides: developers write it and domain experts review → pytest-bdd inside the existing pytest suite; the business writes the feature files themselves → behave, where they run standalone. Mechanics: pytest-bdd.md / behave.md. Bind scenarios, watch the run fail first, write the smallest code that passes.
  4. Refactor. Keep scenario language stable while extracting helpers and fixtures; add boundary examples and counterexamples; report the red→green evidence and unresolved questions.

A review-only request ("review this Gherkin", "is this good BDD?") stops after step 2 plus the checklist in gherkin.md: report findings and the smallest corrections, change no files.

Gherkin quality gate

Every scenario passes all six before glue code:

  1. One observable behavior — the scenario explains a rule, boundary, or outcome.
  2. Domain language — readable with business vocabulary alone; free of URLs, selectors, table columns, class names, HTTP details.
  3. Concrete, not technical — real roles, amounts, dates, states; never user1, foo, or "the result is correct".
  4. Clean semantics — Given is context, When is one event, Then asserts an externally observable result.
  5. Short and independent — 3–5 steps; runnable in any order; Background, Examples, and tables carry only necessary meaning.
  6. Failing wording goes back — a scenario that needs explanation, or is expressible only through implementation detail, returns to Discovery. Rewording beats patching it in glue.

Other automation layers

pytest-bdd and behave are reference implementations, not the definition of BDD. On another stack or language, everything except the two framework files applies unchanged: keep the workflow and the Gherkin, swap the glue layer, and pull binding mechanics from that framework's docs.

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.