Summary
A spec update added new delivery items to product_definition.md but the corresponding executable .feature files were never created. The feature-discovery flow state found existing .feature files on disk and passed silently — it does not cross-check delivery order items against the artifact inventory.
Concrete example of the gap
product_definition.md:
Phase 5:
23. [ ] payment_gateway — Stripe integration with refund support
24. [ ] payment_gateway — webhook handling for async confirmations
docs/features/on_disk:
auth.feature
dashboard.feature
settings.feature
# ← payment_gateway.feature MISSING
The product_definition line items reference a feature but no .feature file exists. The domain spec and glossary were updated with the payment gateway design, but the executable BDD specification — the .feature file with Rule: and Example: blocks that drives beehave generate → TDD → review → acceptance — was never written.
Why this is hard to catch
- Feature-discovery finds files on disk and says "done." If you already have N
.feature files from a prior cycle, a new delivery item without a corresponding file is invisible.
- Simulation validates existing
.feature files against specs. If the .feature file doesn't exist, there's nothing to validate — the gap is silent.
- The spec update was committed directly without passing through the flow states that transform prose into BDD feature files.
What to fix (developer guidance)
1. Add cross-check in feature-discovery
Before transitioning done, diff the delivery order slugs against the .feature file stems on disk:
delivery_order_slugs = {"auth", "dashboard", "settings", "payment_gateway"}
feature_files_on_disk = {"auth", "dashboard", "settings"}
gap = delivery_order_slugs - feature_files_on_disk
# → {"payment_gateway"}
If gap is non-empty, either:
- Create the missing
.feature file from the template and populate it with Rule: blocks from the domain spec, OR
- Exit via a new transition like
needs-feature-creation that routes to a state responsible for filling the gap.
2. Add artifact verification at simulation entry
Before running simulation, verify that every bounded context has a .feature file on disk. If a context described in the domain spec has no corresponding file, flag it as a simulation precondition failure — don't skip it silently.
3. Guard against untracked spec commits
Consider a check that runs before transition done in spec-creation: if new delivery order items were added to product_definition.md, confirm that at least one new .feature file exists for each before allowing the transition.
Action items
Summary
A spec update added new delivery items to
product_definition.mdbut the corresponding executable.featurefiles were never created. The feature-discovery flow state found existing.featurefiles on disk and passed silently — it does not cross-check delivery order items against the artifact inventory.Concrete example of the gap
The
product_definitionline items reference a feature but no.featurefile exists. The domain spec and glossary were updated with the payment gateway design, but the executable BDD specification — the.featurefile withRule:andExample:blocks that drivesbeehave generate→ TDD → review → acceptance — was never written.Why this is hard to catch
.featurefiles from a prior cycle, a new delivery item without a corresponding file is invisible..featurefiles against specs. If the.featurefile doesn't exist, there's nothing to validate — the gap is silent.What to fix (developer guidance)
1. Add cross-check in feature-discovery
Before transitioning
done, diff the delivery order slugs against the.featurefile stems on disk:If gap is non-empty, either:
.featurefile from the template and populate it withRule:blocks from the domain spec, ORneeds-feature-creationthat routes to a state responsible for filling the gap.2. Add artifact verification at simulation entry
Before running simulation, verify that every bounded context has a
.featurefile on disk. If a context described in the domain spec has no corresponding file, flag it as a simulation precondition failure — don't skip it silently.3. Guard against untracked spec commits
Consider a check that runs before
transition doneinspec-creation: if new delivery order items were added toproduct_definition.md, confirm that at least one new.featurefile exists for each before allowing the transition.Action items
.featurefiles for delivery items without corresponding feature files.featurefiles when domain spec rules reference them but aren't reflected in theirRule:blocks