live-verified-bdd
Skill32 starsChanged 18 days agoMITView on GitHub
Write or revise Cucumber scenarios for a feature that already runs, then walk each one in the live app with Playwright and correct it to match what the app does. Use to write test scenarios, or to check that existing scenarios still match the app. Doesn't file anything in the tracker; hand the result to create-xray-test. For a new epic that isn't built yet, use shape-epic.
In this repository22 other files it gives its agents.
- automate-testsSkill
- automate-xray-testsSkill
- bug-bashSkill
- build-epicSkill
- close-out-epicSkill
- create-xray-testSkill
- cross-repo-handoffSkill
- pair-runbookSkill
- release-notesSkill
- release-qaSkill
- retroSkill
- review-epicSkill
- roost-configSkill
- run-bugSkill
- run-sliceSkill
- setupSkill
- shape-epicSkill
- slice-handoffSkill
- stacked-prsSkill
- triage-ticketSkill
- verify-slice-testsSkill
- write-runbookSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 15 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Write Cucumber/Gherkin scenarios and check each one in the running app before calling them done.
- Distinctive: line 29
Ask the user for:
- Distinctive: line 36
Read the relevant code to understand:
- Distinctive: line 44
Write declarative Gherkin scenarios organized by feature:
- Distinctive: line 50
Scenario Outline + Examples: only for true variations of the same behavior
- Very specific: line 58
Use browser_snapshot to check each Then assertion against actual UI state
- Distinctive: line 72
Split scenarios: when one scenario turned out to cover multiple distinct behaviors
- Distinctive: line 91
When the user approves the scenarios, ask whether to file them.
- Distinctive: line 96
Leave out scenarios marked NOT TESTABLE unless the user says to file them.
- Distinctive: line 115
No UI selectors, CSS classes, test IDs, or API paths in step text
- Distinctive: line 116
Use "should" for assertions: "Then I should see..."
- Very specific: line 118
Use quotes for exact UI text: "Active", "Fetch Now", "Preview fetch failed"
- Distinctive: line 119
Keep steps at a consistent abstraction level within a scenario
- Distinctive: line 120
Use concrete values: "30 minutes ago", not "some time ago"
- Distinctive: line 121
Keep scenarios independent.
- Distinctive: line 127
The app is the authority: If code says X but the app does Y, the Gherkin says Y.
- Distinctive: line 128
One behavior per scenario: Don't overload.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Live-Verified BDD Test Writing
Write Cucumber/Gherkin scenarios and check each one in the running app before calling them done. Every scenario is walked through in the browser with Playwright. The app is the source of truth, not the code.
When to Use
- Writing scenarios for a feature that already runs
- Checking that existing scenarios still match what the app does
- The user says "write tests", "BDD", "Cucumber", "Gherkin" or "E2E test cases" for something that's built
When Not to Use
- Filing scenarios as the team's tests: the tests adapter's "Create a test" does that. This skill hands off to it at the end.
- A new epic that isn't built yet: there's no app to check against.
shape-epicwrites those scenarios from the prototype.
This file holds the Gherkin style guide that the other skills follow.
First, load the team config with roost-config. stack.services gives the app's URLs, and qa.test_account_email the pattern for test accounts.
Workflow
Phase 1: Gather Context
Ask the user for:
- What to test — feature name, ticket, or area of the app
- Scope — which vendors/entities/flows to include (avoid testing everything)
- Credentials — real credentials for live connection testing if applicable
- URLs — only if
stack.servicesdoesn't already give them - Test user — username/password for the test account
Read the relevant code to understand:
- Domain entities and their properties
- Controller endpoints and authorization policies
- Value objects, enums, and configuration descriptors
- Handler validation logic and error paths
Phase 2: Draft Gherkin from Code
Write declarative Gherkin scenarios organized by feature:
- Background for shared preconditions (signed in, tenant context). When the team's tests can't hold a
Background:, the setup goes where the tests adapter's "Shared setup" says - Given-When-Then with business language — no CSS selectors, no API paths
- Data tables for field listings (
| field | required |) - Tags:
@smokefor critical paths,@authorizationfor auth tests - One behavior per scenario — if something validates AND advances, split them
- Scenario Outline + Examples only for true variations of the same behavior
Phase 3: Verify Every Scenario in the Live App
This is the critical differentiator. If a scenario needs data the app doesn't have yet, load it first with stack.test_data (local stack only), and say in the summary what you loaded. For EACH scenario:
- Open the app in Playwright (
browser_navigate) - Perform each Given/When step literally in the UI
- Use
browser_snapshotto check each Then assertion against actual UI state - Record every discrepancy — expected vs. actual
Common things that diverge from code reading:
- Wizard steps that validate before advancing (not just navigate)
- Client-side validation messages (not visible in backend code)
- Exact field labels, placeholder text, and help text
- Error message wording
- Redirect targets after auth actions
- UI states like badges, timestamps, loading states
Phase 4: Revise Based on Observations
- Update Gherkin to match what the app actually does
- Split scenarios when one scenario turned out to cover multiple distinct behaviors
- Add scenarios for behaviors discovered during testing (validation errors, edge cases)
- Mark untestable scenarios (e.g., permission tests needing a different user role)
- Remove scenarios that proved redundant or inaccurate
Phase 5: Present and Iterate
Present the final Gherkin with a verification summary table:
| # | Scenario | Status |
|---|----------|--------|
| 1 | Description | PASS / REVISED / NOT TESTABLE |Explain what changed from the draft and why.
Phase 6: Hand Off for Filing
When the user approves the scenarios, ask whether to file them. If yes, file them as the tests adapter's "Create a test" says, following its "Write scenarios" rules, with:
- the epic key, and the story key for each test
- each test's title and its scenarios
- for scenarios that replace an existing test's, that test's key, so it's updated ("Update a test's scenarios") instead of a new one created
Leave out scenarios marked NOT TESTABLE unless the user says to file them.
Gherkin Style Guide
# DO: Declarative, business-focused
Scenario: Vendor setup wizard validates before advancing
When I click "Add Another" for "ClickHouse Cloud"
And I click "Next" without filling in any fields
Then I should see validation errors for each required field
# DON'T: Imperative, implementation-focused
Scenario: Validation check
When I click the button with data-testid "vendor-setup-btn-clickhouse"
And I click the element "#next-btn"
Then the div.error-message should contain "required"Rules:
- No UI selectors, CSS classes, test IDs, or API paths in step text
- Use "should" for assertions: "Then I should see..."
- Name things as the user sees them: "ClickHouse Cloud" not "clickhouse" vendor type
- Use quotes for exact UI text:
"Active","Fetch Now","Preview fetch failed" - Keep steps at a consistent abstraction level within a scenario
- Use concrete values: "30 minutes ago", not "some time ago"
- Keep scenarios independent; none should depend on another having run
- Include performance expectations where the feature specifies them (P99 latency, page load time)
- Cover the happy path, edge cases, error states and transitions between states
Principles
- The app is the authority. If code says X but the app does Y, the Gherkin says Y.
- One behavior per scenario. Don't overload.
- Optimize for automation AND manual testers. A human should be able to follow every step.
- Test the unhappy paths. Empty fields, invalid credentials, missing permissions, unauthenticated access.
- Iterate with the user. Present one feature at a time, verify together, then move to the next.
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
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.

