spec
Create behavioral specifications with Gherkin scenarios
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create behavioral specifications with Gherkin scenarios
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create architecture decision records using MADR 4.0 format
Create effective D2/Mermaid diagrams optimized for terminal display
Add an image to a decision document — rename, move to docs/assets/, insert reference
Create blameless incident reports and post-mortems
Complete Mermaid flowchart reference — shapes, edges, subgraphs, styling
Complete Mermaid sequence diagram reference — participants, arrows, activations, control flow
| name | spec |
| description | Create behavioral specifications with Gherkin scenarios |
Capture a user story with Gherkin scenarios as a first-class decision graph document.
Before creating a spec, ask:
dg new spec "Lama milk checkout flow"
Good title: "Lama milk checkout flow" Bad title: "Checkout feature"
Use the standard user story format:
As a [role], I want [capability] so that [benefit].
Put scenarios in fenced code blocks:
```gherkin
Feature: Lama milk checkout flow
Scenario: Successful purchase with cold shipping
Given a customer with lama milk in their cart
When the customer completes checkout
Then the order is placed with cold chain shipping
And a confirmation email is sent
Scenario: Out of stock during checkout
Given a customer with lama milk in their cart
When the product goes out of stock before payment
Then the checkout is halted
And the customer sees an out-of-stock message
```
# Spec implements an opportunity
dg new spec "Lama milk checkout flow" implements OPP-001
# Spec depends on a policy
dg new spec "Lama milk checkout flow" depends_on POL-001
draft — initial capture, scenarios being writtenreview — ready for stakeholder reviewapproved — signed off, ready for implementationimplemented — behavior verified in codedeprecated — no longer relevantimplements: to show which opportunity a spec realizesdepends_on: when behavior must comply with a policy