Loading...
Loading...
Use when extracting BDD specs from existing code — for adopting Beat in an established codebase or distilling a module into feature files
npx skill4agent add kirkchen/beat distill.feature/beat:verify.feature/beat:design/beat:design/beat:explore| Superpower | When | Priority |
|---|---|---|
| using-git-worktrees | Before first file write | MUST |
| Thought | Reality |
|---|---|
| "I don't need a worktree for just writing feature files" | Distilled artifacts flow into plan/apply/archive. Without isolation, they won't carry forward correctly. |
| "The code is simple, I can verify the scenarios myself" | Self-verification of distilled specs is explicitly forbidden. Always use |
| "I'll skip scanning existing features, this is a new area" | Existing features may already cover this behavior. Distilling duplicates creates maintenance burden. |
| "These scenarios are obviously correct, verification is overkill" | Distill extracts specs from code — the most likely error is describing aspirational behavior instead of current behavior. Verification catches this. |
| "I'll commit later, let me just generate the files first" | Uncommitted artifacts can be lost. Commit before presenting to the user, matching design's behavior. |
/beat:verifydigraph distill {
"Ask for scope" [shape=box];
"Invoke using-git-worktrees" [shape=box, style=bold];
"Read and understand code" [shape=box];
"Scan existing features" [shape=box];
"Scope already covered?" [shape=diamond];
"STOP: inform user" [shape=box, style=dashed];
"Create change container" [shape=box];
"Generate draft artifacts" [shape=box];
"Commit artifacts" [shape=box];
"Present to user" [shape=doublecircle];
"Ask for scope" -> "Invoke using-git-worktrees";
"Invoke using-git-worktrees" -> "Read and understand code";
"Read and understand code" -> "Scan existing features";
"Scan existing features" -> "Scope already covered?";
"Scope already covered?" -> "STOP: inform user" [label="yes"];
"Scope already covered?" -> "Create change container" [label="no"];
"Create change container" -> "Generate draft artifacts";
"Generate draft artifacts" -> "Commit artifacts";
"Commit artifacts" -> "Present to user";
}"What code do you want to distill into BDD specs? Specify a module, directory, or describe the functionality."
using-git-worktreesbeat/features/**/*.featurebeat/changes/*/features/*.featureFeature:Scenario:beat/changes/distill-<scope-name>/status.yamlreferences/status-schema.mdname: distill-<scope-name>
created: YYYY-MM-DD
phase: new
source: distill
pipeline:
proposal: { status: pending }
gherkin: { status: pending }
design: { status: pending }
tasks: { status: pending }beat/config.yamlreferences/config-schema.mdlanguagecontextrulesrules.gherkinrules.proposalrules.designreferences/feature-writing.md@distilled@happy-path@error-handling@edge-case@e2e@behavior@behavior## Why## What Changes## Impact## Approach## Key Decisions## Componentsstatus.yamlgit add beat/changes/distill-<scope-name>/ && git commit## Distill Complete: distill-<scope-name>
Created:
- features/*.feature (N scenarios across M files)
- proposal.md (or skipped)
- design.md (or skipped)
Uncertainties: [list any ambiguous behaviors]
Next steps:
- Review the draft feature files for accuracy
- Run `/beat:verify` to independently verify scenarios match code behavior
- Then `/beat:plan` → `/beat:apply` for future changes using the normal BDD flowNormal: Spec -> Code (write spec first, then implement)
Distill: Code -> Spec (extract spec from existing code)
|
/beat:verify confirms accuracy (source: distill → accuracy mode)
|
Future changes use normal BDD flow