bdd-specs

bdd-specs is a cursor rule for Cursor from EvilFreelancer/zaezd. It costs 1,493 tokens per session, scanned A, original, MIT.

A set of executable Gherkin specifications, where Gherkin is a plain-language format for describing software behavior with Given, When, and Then steps.

In plain words
What is it for?
Use it to describe user-visible use cases, connect them to step definitions, and run the scenarios with npm run bdd.
Why use it?
It keeps the product contract written before the tests and implementation, while allowing all scenarios to be run automatically offline.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to describe user-visible use cases, connect them to step definitions, and run the scenarios with npm run bdd.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/evilfreelancer/zaezd/bdd-specs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/EvilFreelancer/zaezd

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bdd-specs

README.md
[![agentmods](https://agentmods.dev/badge/rules/evilfreelancer/zaezd/bdd-specs/github.svg)](https://agentmods.dev/rules/evilfreelancer/zaezd/bdd-specs)
Your own site
<a href="https://agentmods.dev/rules/evilfreelancer/zaezd/bdd-specs"><img src="https://agentmods.dev/badge/rules/evilfreelancer/zaezd/bdd-specs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bdd-specs

Your own site · 80×15
<a href="https://agentmods.dev/rules/evilfreelancer/zaezd/bdd-specs"><img src="https://agentmods.dev/badge/rules/evilfreelancer/zaezd/bdd-specs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,493 This file is loaded in full into every session.
When invoked 1,493 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01493 $0.01493
Opus 5.5 $0.00597 $0.00597
Sonnet 5.5 $0.00299 $0.00299
Haiku 4.5 $0.00149 $0.00149

Measured 1mo ago against content hash e649f3dc67ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bdd-specs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/bdd-specs.mdc · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Executable Gherkin specifications

features/ holds the product contract. Every use case is written here in Gherkin before the unit tests and before the implementation, and every scenario is executable: npm run bdd runs them all.

Layout

features/
├── <use-case>.feature        # Gherkin, business language
├── steps/<use-case>.steps.ts # thin translation layer, Given/When/Then
└── support/world.ts          # per-scenario state, hooks, fixture loading

One .feature per use case, named after the user-visible outcome (trip-from-topic.feature, stay-dates.feature, checkout-links.feature), not after a module. Step definitions may be shared across features; put reusable steps in the file whose feature owns them and import nothing between step files.

How a scenario is written

  • Business language only. No HTTP verbs, no tool names, no function names, no CSS selectors inside a .feature. A step describes what a traveller or an agent observes. Bad: When I call search_multitransport with origin Москва. Good: When the trip is assembled from Москва.
  • Given sets up recorded world state, When performs exactly one action, Then asserts one observable outcome. Chain with And rather than stuffing two actions into one When.
  • Scenario Outline for rule tables. The date algorithm, the feasibility checks and the three package rules are naturally tabular and must be specified that way, so the spec itself becomes the readable statement of the algorithm.
  • Honesty scenarios are first-class. Missing venue coordinates, a checkout link that is not a cart, an unparsed event price, a source that timed out: each is a specified behavior with its own scenario, not an edge case to be discovered later.
  • Keep Gherkin keywords in English; the narrative inside a step may name Russian cities and events verbatim, because that is the real data.

Rules for step definitions

  • Steps are thin: translate the sentence into a call into src/, then assert. No business logic, no date arithmetic, no price arithmetic inside a step.
  • Scenario state lives on the World (features/support/world.ts), never in module-level variables. Cucumber builds one World per scenario, which is what keeps scenarios isolated.
  • Assertions use node:assert/strict.
  • Ambiguous or duplicate step definitions are a hard error (strict: true in cucumber.mjs). Reuse an existing step instead of writing a near-copy.
  • Run npm run bdd after adding a step to a feature; Cucumber prints a ready snippet for every undefined step (snippetInterface: 'async-await').

Read the full file on GitHub · 126 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 126 lines · 1,493 tokens per session scan A e649f3dc67ca

Subscribe to this mod's changes

bdd-specs is a cursor rule published in the GitHub repository EvilFreelancer/zaezd (1 stars, last pushed 1mo ago), licensed MIT. It adds 1,493 tokens to every session, about $0.0060 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.