bdd-specification
Enforce Living Documentation through Behaviour-Driven Development by writing a language-agnostic Gherkin feature specification for any new or changed…
Skill by docs-as-code-toolkit
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/docs-as-code-toolkit-bdd-specification
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, writing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/bdd-specification
What's inside
- Skill name
bdd-specification- Description
- Enforce Living Documentation through Behaviour-Driven Development by writing a language-agnostic Gherkin feature specification for any new or changed observable behaviour and mapping each scenario to at least one automated verification, even when the target language has no native BDD framework. This is the strict default for features, behavioural enhancements, and behaviour-changing bug fixes; relax it only with an explicit recorded human waiver. Use when Codex is asked to specify feature or behaviour, write or update .feature files, add BDD or acceptance tests, keep behaviour specs and tests in sync, bridge Gherkin scenarios to classic tests, or apply a scenario-to-test naming convention with Given/When/Then structure.
- License
- MIT
- Instructions
- 183 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# BDD Specification Act as a software architect who enforces Living Documentation through Behaviour-Driven Development (BDD). For every feature, write a language-agnostic Gherkin specification that describes business behaviour, and map each scenario to at least one automated verification — regardless of whether the target language supports a BDD framework natively. A Gherkin scenario and a unit test sit at different abstraction levels: a scenario describes observable business or system behaviour, while unit tests verify its technical decomposition. Do not force a one-to-one scenario-to-unit-test mapping. One scenario may need several supporting unit tests (boundaries, error paths, persistence, events), and many legitimate unit tests do not justify a separate business-readable scenario. Keep the feature files as Living Documentation, not as technical test catalogues written in Gherkin. This skill is guidance and reusable content only. Do not implement a runner or add automation as part of using this skill. Treat AI-created specifications and tests as proposed until a human reviewer accepts them. Apply the repository contract hierarchy: this skill narrows `AGENTS.md`, and `AGENTS.md` adapts `general-semantic-contracts.md`. Do not duplicate general metadata, anchor, testing, or Docs-as-Code rules here unless the BDD workflow needs a stricter rule. This skill is the strict default for any change that adds or changes observable behaviour — new features, behavioural enhancements, and behaviour-changing bug fixes. `../architecture-impact/SKILL.md` invokes it when the behaviour change is requested, and `../implement-issue-workflow/SKILL.md` invokes it at the latest when the change is implemented. Specify the behaviour as Gherkin as early as request or analysis time; the specification and its test bridge must exist by the time the change is implemented. Use those skills for backlog, branching, verification, and PR mechanics, and use this skill for the specification and its test bridge. The only way out is an explicit, recorded human waiver. Do not skip the specification on your own judgement: relax it only when a human explicitly asks for a lighter treatment, and record that decision and its rationale where the project keeps such decisions (for example the issue, the pull request, or the Q&A document). Pure refactorings do not add behaviour, so they need no new scenarios, but they must keep the existing `.feature` specs and their bridged tests passing. ## Required Reading - `../references/bdd-writing-guide.md` before writing `.feature` files, choosing scenario names, or translating scenarios into test names. ## Core Workflow Follow three steps: decide the framework, write the feature documentation, then build the bridge into code. ### Step 1: Technology & Framework Decision Analyze the project's tech stack and decide whether to use a native BDD framework or a classic unit-test framework. - **Native BDD available** (for example Python/`pytest-bdd` or `behave`, JS/TS/Cucumber, Java/Cucumber-JVM): use the native runner so `.feature` files execute directly against step definitions. - **No native BDD, or a classic unit-test framework is preferred** (for example Ruby/Minitest, C#/xUnit, Go/`testing`): use the classic framework and apply the bridge rules in Step 3 to keep the specification coupled to the tests. Prefer the framework the repository already uses. Do not introduce a new BDD dependency when a classic framework is established; use the bridge instead. Record the decision and its rationale where the project keeps such notes (for example an ADR via `../adr/SKILL.md` when the choice is architecture-significant). ### Step 2: Documentation Duty (the Feature File) Create a `.feature` file in Gherkin style for every feature. This file is the long-lived, living project documentation, not a throwaway test artifact. - Write scenarios declaratively, focused on business behaviour, not on UI mechanics or implementation detail. - One feature per file; a clear `Feature:` intent line and focused `Scenario:` blocks with `Given` / `When` / `Then` steps. #### Where to store feature files A `.feature` file has a dual nature: it is an executable specification that the test runner must discover, and it is long-lived documentation. Resolve the tension by authoring it once and surfacing it into the docs, never by copying it. - **Authoritative location: code-side, where the runner discovers it.** Use the project convention (for example `features/`, `tests/features/`, or the language's own convention such as `spec/features/`). An executable spec that the runner never runs rots and stops being trustworthy documentation, so runner discovery wins for the source-of-truth location. - **Surface it as documentation with an AsciiDoc `include::`, do not copy it.** Gherkin is plain text, so include the `.feature` file into the architecture documentation as a source or literal block. This keeps a single source of truth: the runner executes it and the docs render it. - **Choose the arc42 location by architectural relevance, not by default.** Not every scenario is an architecture-relevant runtime scenario. Use Chapter 6 (Runtime View) when the scenario explains runtime collaboration between building blocks, Chapter 10 for quality-related behaviour, and requirement-oriented sections or references for functional acceptance behaviour. A scenario that carries no architectural significance may stay in `features/` and need not be surfaced into arc42 at all. Avoid turning Chapter 6 into a collection of validation and acceptance details. - Do not move `.feature` files under `src/docs/` and point the runner at the docs tree; that couples runner configuration to the documentation layout and is more fragile than including the spec into the docs. - When no convention exists yet, propose one and keep it consistent. ### Step 3: Technical Implementation & Naming Convention (the Bridge) When implementing in test code, keep reviewer-verifiable traceability between the documentation and the code. This bridge is a review convention, not build-time enforcement: no CI check proves the link, so a reviewer must be able to confirm it from stable identifiers or naming. 1. **Every scenario has at least one identifiable automated verification.** Prefer a one-to-one mapping to an acceptance, component, or use-case test where practical. A scenario may instead map to a test class, a nested test group, or several supporting tests. Supporting unit tests that exist only to
From docs-as-code-toolkit/architecture-knowledge-toolkit, MIT.
More from docs-as-code-toolkit/architecture-knowledge-toolkit
- 0.569score
adr
docs-as-code-toolkit
Create proposed Architecture Decision Records and analyze their impact on related architecture artifacts.
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
architecture-impact
docs-as-code-toolkit
Analyze and document architecture impact for feature requests, Epic issues, UserStory issues, refactoring tasks, issue implementation, and review tasks.
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
clock-in
docs-as-code-toolkit
Start a working session from repository evidence instead of memory, pick up one topic, and orient both the project layer and the user's private journal.
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
clock-out
docs-as-code-toolkit
End a working session by refreshing the topics touched, writing the project diary entry, and carrying the day's findings up into the user's private journal.
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
convergence-check
docs-as-code-toolkit
Check that a completed change tells one consistent story across request, behaviour specification, architecture knowledge, implementation, tests, and delivery…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
implement-issue-workflow
docs-as-code-toolkit
Implement GitHub issue work using the repository workflow: start from the latest main branch, create an issue_<number> branch, make focused changes, verify…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
pr-review
docs-as-code-toolkit
Review GitHub pull requests and proposed branch changes for correctness, regressions, missing tests, documentation-contract violations, traceability gaps, and…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
risk
docs-as-code-toolkit
Create proposed architecture risk artifacts and analyze their traceability to ADRs, quality scenarios, requirements, components, controls, and evidence.
SkillBFreshness: B★ 4Claude Code +9 - 0.524score
presentation
docs-as-code-toolkit
Create or update docs-as-code presentation material as AsciiDoc reveal.js decks rendered with docs-toolbox.
SkillCFreshness: C★ 4Claude Code +9 - 0.519score
traceability-review
docs-as-code-toolkit
Review explicit architecture traceability metadata for gaps, inconsistencies, unsupported claims, stale links, dangling references, and metamodel violations.
SkillCFreshness: C★ 4Claude Code +9 - 0.519score
quality-scenario
docs-as-code-toolkit
Create proposed quality scenarios and analyze their traceability to quality objectives, ADRs, risks, requirements, architecture artifacts, and code evidence.
SkillCFreshness: C★ 4Claude Code +9 - 0.519score
commit-message
docs-as-code-toolkit
Write repository commit messages.
SkillCFreshness: C★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 2
- Open issues
- 44
- Last commit (this folder)
- Jul 10, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from docs-as-code-toolkit
- 0.569score
architecture-impact
docs-as-code-toolkit
Analyze and document architecture impact for feature requests, Epic issues, UserStory issues, refactoring tasks, issue implementation, and review tasks.
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
clock-in
docs-as-code-toolkit
Start a working session from repository evidence instead of memory, pick up one topic, and orient both the project layer and the user's private journal.
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
clock-out
docs-as-code-toolkit
End a working session by refreshing the topics touched, writing the project diary entry, and carrying the day's findings up into the user's private journal.
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
convergence-check
docs-as-code-toolkit
Check that a completed change tells one consistent story across request, behaviour specification, architecture knowledge, implementation, tests, and delivery…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
implement-issue-workflow
docs-as-code-toolkit
Implement GitHub issue work using the repository workflow: start from the latest main branch, create an issue_<number> branch, make focused changes, verify…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
adr
docs-as-code-toolkit
Create proposed Architecture Decision Records and analyze their impact on related architecture artifacts.
SkillBFreshness: B★ 4Claude Code +9
Cite this page
bdd-specification skill. Agent Mart. https://agentmart.dev/skills/docs-as-code-toolkit-bdd-specification (last updated 2026-10-24)