From 84ece37aae4eade9227217deb8770ffcbf2a74f1 Mon Sep 17 00:00:00 2001 From: A386official Date: Sat, 28 Feb 2026 08:00:48 +0000 Subject: [PATCH] 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