gherkin-authoring
Authors `.feature` files that stay business-readable, translate cleanly from PRD acceptance criteria, and reuse a shared step-definition library. Use when writing or editing scenarios — the SSOT enforcement rules live in `.agents/rules/gherkin-standards.md`; this skill shows authors how to apply them.
- License 许可
- MIT
- 所属仓库
- dsj1984/mandrel
- 最近更新
- 2026-11-13
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- gherkin-authoring
- description
- Authors `.feature` files that stay business-readable, translate cleanly from PRD acceptance criteria, and reuse a shared step-definition library. Use when writing or editing scenarios — the SSOT enforcement rules live in `.agents/rules/gherkin-standards.md`; this skill shows authors how to apply them.
02 资源文件 5
- 其他examples/invoice-issue.feature1.5 KB
- 许可证LICENSE1.0 KB
- 参考文档reference.md2.5 KB
- 参考文档SOURCE.md343 B
- 参考文档TRUST.auto.yaml2.1 KB
03 SKILL.md 正文
Skill: gherkin-authoring
Policy Capsule
- Write
Givenclauses as stative preconditions,Whenas a single business action, andThenas a user-visible outcome. - Allow exactly one
Whenper scenario; if you need two, split into two scenarios. - Never assert on HTTP status codes, SQL state, DOM selectors, URLs, or JSON payloads inside
.featureprose — push those to contract tests. - Tag every Scenario or Outline with exactly one canonical
@domain-*tag and the appropriate risk/platform tags from the gherkin-standards taxonomy. - Use
Backgroundonly when every scenario in the file genuinely shares the precondition with no per-scenario variation. - Complete the step-reuse sequence in
gherkin-standards.md§ Step Reuse before authoring any scenario text; that rule is the only home for it. - Author one scenario per PRD acceptance criterion; for bounded matrices, use a Scenario Outline with ≤12 Examples rows.
- Use third-person present-tense, role-qualified actors (
the billing-admin), never first person.
The enforcement rules — tag taxonomy, forbidden patterns, Outline conventions,
selector discipline, step reuse — live in
.agents/rules/gherkin-standards.md,
which is the SSOT. This skill shows authors how to apply those rules; read
the rule for the what.
Long-form reference — read on demand
The step-definition library layout and the pre-PR authoring checklist live in
the on-demand sibling reference.md. Open a section only when
the task engages it.
Cross-References
- SSOT rules:
.agents/rules/gherkin-standards.md. - Runtime wiring:
playwright-bdd. - Browser-level conventions:
playwright. - Test-layer scope:
testing-standards.md. - Example feature:
examples/invoice-issue.feature.
04 同仓库更多 Skills
no-capsule-skill
Fixture without a Policy Capsule section.
qa-harness
Conventions for agent-driven QA driving — the one driving-conventions reference behind both `/qa-run` (the known-scenario sweep through a real browser) and `/qa-explore` (agent-led exploratory driving). Use when instrumenting a live surface — covers navigation-first execution, per-surface console and network capture, design-token visual checks, the `F#` finding shape, per-environment resolution, and static driving as the documented interim. The run procedures live in `.agents/workflows/qa-run.md` and `.agents/workflows/qa-explore.md`; this skill is the conventions reference they lean on.
playwright
Robust E2E browser testing with Playwright. Use when writing browser-driven tests — leverage auto-waiting (no `waitForTimeout`), prefer user-visible locators (`getByRole`, `getByText`, `getByLabel`) over CSS/XPath, reuse `storageState` for auth, and enable trace-on-first-retry for CI debugging. Also carries the `data-testid` contract a UI change states in its acceptance criteria.
playwright-bdd
Wires Gherkin `.feature` files to Playwright via the `playwright-bdd` library. Use when running BDD scenarios on a Playwright runtime — pairs with the `gherkin-authoring` skill (scenario prose) and the `playwright` skill (browser conventions). Drives execution by tag expression with trace-first debugging and Playwright-native sharding.
security-and-hardening
Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. The non-negotiable security MUSTs live in `.agents/rules/security-baseline.md`; this skill shows how to apply them, with the project's surfacing and validation-response process.
idea-refinement
Refines ideas iteratively. Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.