fix: add TEA ATDD pre-check gate to dev-story initialization#2272
fix: add TEA ATDD pre-check gate to dev-story initialization#2272pablontiv wants to merge 1 commit intobmad-code-org:mainfrom
Conversation
📝 WalkthroughWalkthroughModified Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/bmm-skills/4-implementation/bmad-dev-story/workflow.md (1)
458-458: Standardize TEA automation command references across docs/workflows.Line 458 uses
[TA] bmad-testarch-automate, but other workflow guidance still references/bmad:tea:automate(seesrc/bmm-skills/4-implementation/bmad-create-story/workflow.mdLine 370-376). Please align references (and related docs/help pages) to one canonical command format to avoid user confusion. As per coding guidelines: “src/**: … changed behavior, renamed concepts, altered CLI flags … should all be reflected in the relevant doc pages.”🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/bmm-skills/4-implementation/bmad-dev-story/workflow.md` at line 458, The docs use two different TEA automation command formats—"[TA] bmad-testarch-automate" and "/bmad:tea:automate"—causing inconsistency; pick the canonical command (decide between bmad-testarch-automate or bmad:tea:automate) and update this file's line that currently reads "[TA] bmad-testarch-automate" as well as any other workflow/help pages that reference "/bmad:tea:automate" so all documentation consistently uses the chosen form (search for the tokens bmad-testarch-automate and bmad:tea:automate and replace occurrences, and update any surrounding examples or bracket notation like [TA] to match the canonical style).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/bmm-skills/4-implementation/bmad-dev-story/workflow.md`:
- Around line 163-173: The ATDD gate check "no ATDD checklist found for
{{story_key}}" assumes {{story_key}} is set; add a pre-gate fallback that, when
{{story_key}} is empty, extracts/parses the key from {{story_path}} (the same
logic used in Step 1 branches that set {{story_path}}) before performing the
checklist lookup; update the gate or preceding task_check to populate
{{story_key}} from {{story_path}} if missing so the HALT/ask logic behaves
correctly even when earlier branches only set {{story_path}}.
---
Nitpick comments:
In `@src/bmm-skills/4-implementation/bmad-dev-story/workflow.md`:
- Line 458: The docs use two different TEA automation command formats—"[TA]
bmad-testarch-automate" and "/bmad:tea:automate"—causing inconsistency; pick the
canonical command (decide between bmad-testarch-automate or bmad:tea:automate)
and update this file's line that currently reads "[TA] bmad-testarch-automate"
as well as any other workflow/help pages that reference "/bmad:tea:automate" so
all documentation consistently uses the chosen form (search for the tokens
bmad-testarch-automate and bmad:tea:automate and replace occurrences, and update
any surrounding examples or bracket notation like [TA] to match the canonical
style).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 06694ec1-7c42-4bff-a30d-94528ff11c59
📒 Files selected for processing (1)
src/bmm-skills/4-implementation/bmad-dev-story/workflow.md
| <check if="no ATDD checklist found for {{story_key}}"> | ||
| <output>⚠️ **TEA module detected — no ATDD checklist found for story {{story_key}}** | ||
|
|
||
| Running `dev-story` without `testarch-atdd` means: | ||
| - No red-phase acceptance tests will be scaffolded before implementation | ||
| - Coverage gaps won't be detected until after the story is complete | ||
|
|
||
| Recommended: run **[AT] bmad-testarch-atdd** first to generate acceptance test scaffolds.</output> | ||
| <ask>Continue without ATDD checklist? [y] to proceed anyway, [n] to halt and run ATDD first:</ask> | ||
| <check if="user says 'n' or does not confirm"> | ||
| <action>HALT — Run /bmad-testarch-atdd for story {{story_key}} before continuing</action> |
There was a problem hiding this comment.
Ensure {{story_key}} is guaranteed before running the ATDD gate.
This gate assumes {{story_key}} is already available, but some Step 1 branches jump to task_check after setting only {{story_path}} (e.g., Line 100-101 and Line 111-112). That can cause false missing-checklist warnings or incorrect HALT behavior. Add a pre-gate extraction fallback from {{story_path}} when {{story_key}} is empty.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/bmm-skills/4-implementation/bmad-dev-story/workflow.md` around lines 163
- 173, The ATDD gate check "no ATDD checklist found for {{story_key}}" assumes
{{story_key}} is set; add a pre-gate fallback that, when {{story_key}} is empty,
extracts/parses the key from {{story_path}} (the same logic used in Step 1
branches that set {{story_path}}) before performing the checklist lookup; update
the gate or preceding task_check to populate {{story_key}} from {{story_path}}
if missing so the HALT/ask logic behaves correctly even when earlier branches
only set {{story_path}}.
What
Adds an explicit TEA ATDD pre-check gate in Step 1 of
dev-storyinitialization. When TEA is installed and no ATDD checklist exists for the story, the workflow warns and asks for confirmation before proceeding.Why
When TEA module is installed,
dev-storypreviously had zero enforcement of ATDD. The only TEA reference was a Step 10 "Optional" suggestion placed after the story was already complete. Entire epics could be implemented with 0% new test coverage and no acceptance scaffolds, with no warning.Fixes #2271. Related to #2243 and PR #2260 — this targets the missing entry gate, while #2260 addresses artifact consumption inside the workflow (both fixes are complementary).
How
<anchor id="task_check" />in Step 1Testing
Verified locally with TEA 1.7.2 + BMM 6.3.0: dev-story now prompts when
testarch-atddoutput is missing. Existing behavior unchanged when TEA is not installed or checklist already exists.