From ab1583fc2486828ab5aa2d12ada06fb89215a27b Mon Sep 17 00:00:00 2001 From: A386official Date: Sat, 28 Feb 2026 07:04:23 +0000 Subject: [PATCH 1/2] fix(workflow): use git output for dev-story File List instead of agent memory Closes #1789 --- .../workflows/4-implementation/create-story/template.md | 3 +++ .../workflows/4-implementation/dev-story/instructions.xml | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/bmm/workflows/4-implementation/create-story/template.md b/src/bmm/workflows/4-implementation/create-story/template.md index c4e129f5f..930eae296 100644 --- a/src/bmm/workflows/4-implementation/create-story/template.md +++ b/src/bmm/workflows/4-implementation/create-story/template.md @@ -47,3 +47,6 @@ so that {{benefit}}. ### Completion Notes List ### File List + + diff --git a/src/bmm/workflows/4-implementation/dev-story/instructions.xml b/src/bmm/workflows/4-implementation/dev-story/instructions.xml index 3c4989f39..7709fbea8 100644 --- a/src/bmm/workflows/4-implementation/dev-story/instructions.xml +++ b/src/bmm/workflows/4-implementation/dev-story/instructions.xml @@ -296,7 +296,9 @@ ONLY THEN mark the task (and subtasks) checkbox with [x] - Update File List section with ALL new, modified, or deleted files (paths relative to repo root) + Run `git diff --name-only` and `git status --porcelain` to discover ALL changed files (including infrastructure + side-effects like lock files, the story file itself, and sprint-status.yaml) + Update File List section from git output with ALL new, modified, or deleted files (paths relative to repo root) Add completion notes to Dev Agent Record summarizing what was ACTUALLY implemented and tested @@ -323,7 +325,7 @@ Verify ALL tasks and subtasks are marked [x] (re-scan the story document now) Run the full regression suite (do not skip) - Confirm File List includes every changed file + Run `git diff --name-only` and `git status --porcelain` to get actual changed files; confirm File List matches git output Execute enhanced definition-of-done validation Update the story Status to: "review" @@ -336,7 +338,7 @@ - End-to-end tests for critical flows added when story demands them - All tests pass (no regressions, new tests successful) - Code quality checks pass (linting, static analysis if configured) - - File List includes every new/modified/deleted file (relative paths) + - File List matches all git-reported changes - run `git diff --name-only` and `git status --porcelain` to verify - Dev Agent Record contains implementation notes - Change Log includes summary of changes - Only permitted story sections were modified From 84ece37aae4eade9227217deb8770ffcbf2a74f1 Mon Sep 17 00:00:00 2001 From: A386official Date: Sat, 28 Feb 2026 08:00:48 +0000 Subject: [PATCH 2/2] fix: address CodeRabbit review - save story before git inspection - Move story file save BEFORE git commands so its changes appear in working tree - Add git diff --cached --name-only to capture staged files alongside unstaged - Add _bmad/ and _bmad-output/ exclusion filtering to all git inspection steps - Clarify File List update uses full-replace semantics (not append) - Add list structure placeholder to story template - Apply consistent three-command git set across Step 8, Step 9, and DoD checklist --- .../4-implementation/create-story/template.md | 12 ++++++++++-- .../4-implementation/dev-story/instructions.xml | 14 +++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/bmm/workflows/4-implementation/create-story/template.md b/src/bmm/workflows/4-implementation/create-story/template.md index 930eae296..b15c82dad 100644 --- a/src/bmm/workflows/4-implementation/create-story/template.md +++ b/src/bmm/workflows/4-implementation/create-story/template.md @@ -48,5 +48,13 @@ so that {{benefit}}. ### File List - + + +- (list files here, one per line) diff --git a/src/bmm/workflows/4-implementation/dev-story/instructions.xml b/src/bmm/workflows/4-implementation/dev-story/instructions.xml index 7709fbea8..d2ec0cb65 100644 --- a/src/bmm/workflows/4-implementation/dev-story/instructions.xml +++ b/src/bmm/workflows/4-implementation/dev-story/instructions.xml @@ -296,10 +296,12 @@ ONLY THEN mark the task (and subtasks) checkbox with [x] - Run `git diff --name-only` and `git status --porcelain` to discover ALL changed files (including infrastructure - side-effects like lock files, the story file itself, and sprint-status.yaml) - Update File List section from git output with ALL new, modified, or deleted files (paths relative to repo root) Add completion notes to Dev Agent Record summarizing what was ACTUALLY implemented and tested + Save the story file NOW so its own changes appear in the working tree + Run `git diff --name-only`, `git diff --cached --name-only`, and `git status --porcelain` to discover ALL changed files + (including infrastructure side-effects like lock files, the story file itself, and sprint-status.yaml) + Filter out paths under `_bmad/` and `_bmad-output/` directories from the git output + REPLACE the File List section entirely with the filtered results: ALL new, modified, or deleted files (paths relative to repo root, one per line) @@ -325,7 +327,9 @@ Verify ALL tasks and subtasks are marked [x] (re-scan the story document now) Run the full regression suite (do not skip) - Run `git diff --name-only` and `git status --porcelain` to get actual changed files; confirm File List matches git output + Save the story file before inspecting the working tree + Run `git diff --name-only`, `git diff --cached --name-only`, and `git status --porcelain` to get actual changed files + (excluding paths under `_bmad/` and `_bmad-output/`); verify File List contains ALL reported paths and auto-append any missing entries Execute enhanced definition-of-done validation Update the story Status to: "review" @@ -338,7 +342,7 @@ - End-to-end tests for critical flows added when story demands them - All tests pass (no regressions, new tests successful) - Code quality checks pass (linting, static analysis if configured) - - File List matches all git-reported changes - run `git diff --name-only` and `git status --porcelain` to verify + - File List matches all git-reported changes - run `git diff --name-only`, `git diff --cached --name-only`, and `git status --porcelain` to verify (exclude `_bmad/`, `_bmad-output/`) - Dev Agent Record contains implementation notes - Change Log includes summary of changes - Only permitted story sections were modified