From 5bd1e8a12b29847b2fdc8b64e3bbca0dae5a8a3a Mon Sep 17 00:00:00 2001 From: Nikolas de Hor Date: Wed, 11 Mar 2026 21:34:34 -0300 Subject: [PATCH] fix: make dev-story RED phase ATDD-aware to activate pre-existing tests When TEA's ATDD workflow creates test files with test.fixme() before dev-story runs, the RED phase had no awareness of these pre-existing tests. It instructed the agent to write new failing tests from scratch, leaving all ATDD tests permanently skipped. This change adds a conditional to the RED phase: if test.fixme() or test.skip() tests exist for the current task, activate them instead of writing new tests. Falls back to the original behavior when no pre-existing tests are found. Also adds a DoD validation gate to ensure no test.fixme() calls remain after story completion. --- .../4-implementation/dev-story/workflow.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/bmm/workflows/4-implementation/dev-story/workflow.md b/src/bmm/workflows/4-implementation/dev-story/workflow.md index c2200d398..29fc1aaec 100644 --- a/src/bmm/workflows/4-implementation/dev-story/workflow.md +++ b/src/bmm/workflows/4-implementation/dev-story/workflow.md @@ -273,9 +273,17 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: Review the current task/subtask from the story file - this is your authoritative implementation guide Plan implementation following red-green-refactor cycle - - Write FAILING tests first for the task/subtask functionality - Confirm tests fail before implementation - this validates test correctness + + + Identify test files containing test.fixme() or test.skip() that map to the current task/subtask + Convert matching test.fixme()/test.skip() calls to regular test() calls to activate them + Run activated tests to confirm they FAIL due to missing implementation (RED phase verified) + If a test passes unexpectedly before implementation, investigate — it may not be validating real behavior + + + Write FAILING tests first for the task/subtask functionality + Confirm tests fail before implementation - this validates test correctness + Implement MINIMAL code to make tests pass @@ -386,6 +394,7 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - Dev Agent Record contains implementation notes - Change Log includes summary of changes - Only permitted story sections were modified + - No test.fixme() or test.skip() calls remain for completed tasks (all ATDD tests activated and passing)