From 061b7d94c4e21e1667ce309fad0fa220e78baa37 Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Sat, 25 Oct 2025 15:41:13 -0500 Subject: [PATCH] status normalization --- .../4-implementation/create-story/template.md | 2 +- .../create-story/workflow.yaml | 3 +- .../dev-story/instructions.md | 86 ++++++++++++------- .../4-implementation/dev-story/workflow.yaml | 22 ++--- .../epic-tech-context/template.md | 2 +- .../review-story/instructions.md | 2 +- .../review-story/workflow.yaml | 7 +- .../story-context/instructions.md | 38 +++++--- .../story-context/workflow.yaml | 9 +- .../story-done/instructions.md | 4 +- .../story-ready/instructions.md | 6 +- 11 files changed, 101 insertions(+), 80 deletions(-) diff --git a/src/modules/bmm/workflows/4-implementation/create-story/template.md b/src/modules/bmm/workflows/4-implementation/create-story/template.md index ba75cbed..6aa80bad 100644 --- a/src/modules/bmm/workflows/4-implementation/create-story/template.md +++ b/src/modules/bmm/workflows/4-implementation/create-story/template.md @@ -1,6 +1,6 @@ # Story {{epic_num}}.{{story_num}}: {{story_title}} -Status: Draft +Status: drafted ## Story diff --git a/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml b/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml index 64ac4c80..ffad133d 100644 --- a/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml +++ b/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml @@ -37,7 +37,8 @@ variables: non_interactive: true # Generate without elicitation; avoid interactive prompts # Output configuration -default_output_file: "{story_dir}/story-{{epic_num}}.{{story_num}}.md" +# Uses story_key from sprint-status.yaml (e.g., "1-2-user-authentication") +default_output_file: "{story_dir}/{{story_key}}.md" recommended_inputs: - epics: "Epic breakdown (epics.md)" diff --git a/src/modules/bmm/workflows/4-implementation/dev-story/instructions.md b/src/modules/bmm/workflows/4-implementation/dev-story/instructions.md index 697575e4..7f1e1094 100644 --- a/src/modules/bmm/workflows/4-implementation/dev-story/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/dev-story/instructions.md @@ -7,8 +7,7 @@ Generate all documents in {document_output_language} Only modify the story file in these areas: Tasks/Subtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status Execute ALL steps in exact order; do NOT skip steps -If {{run_until_complete}} == true, run non-interactively: do not pause between steps unless a HALT condition is reached or explicit user approval is required for unapproved dependencies. -Absolutely DO NOT stop because of "milestones", "significant progress", or "session boundaries". Continue in a single execution until the story is COMPLETE (all ACs satisfied and all tasks/subtasks checked) or a HALT condition is triggered. +Absolutely DO NOT stop because of "milestones", "significant progress", or "session boundaries". Continue in a single execution until the story is COMPLETE (all ACs satisfied and all tasks/subtasks checked) UNLESS a HALT condition is triggered or the USER gives other instruction. Do NOT schedule a "next session" or request review pauses unless a HALT condition applies. Only Step 6 decides completion. User skill level ({user_skill_level}) affects conversation style ONLY, not code updates. @@ -34,29 +33,43 @@ - Status value equals "ready-for-dev" - + 📋 No ready-for-dev stories found in sprint-status.yaml - **Options:** -1. Run `story-ready` to mark drafted stories as ready -2. Run `create-story` if no stories are drafted yet -3. Check sprint-status.yaml to see current story states +1. Run `story-context` to generate context file and mark drafted stories as ready +2. Run `story-ready` to quickly mark drafted stories as ready without generating context +3. Run `create-story` if no incomplete stories are drafted yet +4. Check {output-folder}/sprint-status.yaml to see current sprint status HALT Store the found story_key (e.g., "1-2-user-authentication") for later status updates - Find matching story file in {{story_dir}} using story_key pattern + Find matching story file in {{story_dir}} using story_key pattern: {{story_key}}.md Read COMPLETE story file from discovered path Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Notes, Dev Agent Record, File List, Change Log, Status + + Check if context file exists at: {{story_dir}}/{{story_key}}.context.md + + Read COMPLETE context file + Parse all sections: story details, artifacts (docs, code, dependencies), interfaces, constraints, tests + Use this context to inform implementation decisions and approaches + + + â„šī¸ No context file found for {{story_key}} + +Proceeding with story file only. For better context, consider running `story-context` workflow first. + + + Identify first incomplete task (unchecked [ ]) in Tasks/Subtasks Completion sequence HALT: "Cannot develop story without access to story file" - ASK user to clarify or HALT + ASK user to clarify or HALT @@ -65,8 +78,7 @@ Get current status value for development_status[{{story_key}}] - Update development_status[{{story_key}}] = "in-progress" - Save file, preserving ALL comments and structure including STATUS DEFINITIONS + Update the story in the sprint status report to = "in-progress" 🚀 Starting work on story {{story_key}} Status updated: ready-for-dev → in-progress @@ -88,9 +100,9 @@ Expected ready-for-dev or in-progress. Continuing anyway... Review acceptance criteria and dev notes for the selected task Plan implementation steps and edge cases; write down a brief plan in Dev Agent Record → Debug Log - Implement the task COMPLETELY including all subtasks, following architecture patterns and coding standards in this repo + Implement the task COMPLETELY including all subtasks, critically following best practices, coding patterns and coding standards in this repo you have learned about from the story and context file or your own critical agent instructions Handle error conditions and edge cases appropriately - ASK user for approval before adding + ASK user for approval before adding HALT and request guidance HALT: "Cannot proceed without necessary configuration files" Do not stop after partial progress; continue iterating tasks until all ACs are satisfied or a HALT condition triggers @@ -110,7 +122,7 @@ Expected ready-for-dev or in-progress. Continuing anyway... Run the new tests to verify implementation correctness Run linting and code quality checks if configured Validate implementation meets ALL story acceptance criteria; if ACs include quantitative thresholds (e.g., test pass rate), ensure they are met before marking complete - STOP and fix before continuing + STOP and fix before continuing, consider how current changes made broke regression STOP and fix before continuing @@ -118,10 +130,9 @@ Expected ready-for-dev or in-progress. Continuing anyway... ONLY mark the task (and subtasks) checkbox with [x] if ALL tests pass and validation succeeds Update File List section with any new, modified, or deleted files (paths relative to repo root) Add completion notes to Dev Agent Record if significant changes were made (summarize intent, approach, and any follow-ups) - Append a brief entry to Change Log describing the change Save the story file Determine if more incomplete tasks remain - Next task + Next task Completion @@ -130,7 +141,7 @@ Expected ready-for-dev or in-progress. Continuing anyway... Run the full regression suite (do not skip) Confirm File List includes every changed file Execute story definition-of-done checklist, if the story includes one - Update the story Status to: Ready for Review + Update the story Status to: review Load the FULL file: {{output_folder}}/sprint-status.yaml @@ -151,25 +162,36 @@ Story is marked Ready for Review in file, but sprint-status.yaml may be out of s Update it before completing - + Optionally run the workflow validation task against the story using {project-root}/bmad/core/tasks/validate-workflow.xml Prepare a concise summary in Dev Agent Record → Completion Notes - Communicate that the story is Ready for Review - **✅ Story Implementation Complete, {user_name}!** -**Story Details:** -- Story ID: {{current_story_id}} -- Story Key: {{story_key}} -- Title: {{current_story_title}} -- File: {{story_path}} -- Status: review (was in-progress) + Communicate to {user_name} that story implementation is complete and ready for review + Summarize key accomplishments: story ID, story key, title, key changes made, tests added, files modified + Provide the story file path and current status (now "review", was "in-progress") -**Next Steps:** -1. Review the implemented story and test the changes -2. Verify all acceptance criteria are met -3. Run `review-story` workflow for senior developer review -4. When review passes, run `story-done` to mark complete - + Based on {user_skill_level}, ask if user needs any explanations about: + - What was implemented and how it works + - Why certain technical decisions were made + - How to test or verify the changes + - Any patterns, libraries, or approaches used + - Anything else they'd like clarified + + + + Provide clear, contextual explanations tailored to {user_skill_level} + Use examples and references to specific code when helpful + + + Once explanations are complete (or user indicates no questions), suggest logical next steps + Common next steps to suggest (but allow user flexibility): + - Review the implemented story yourself and test the changes + - Verify all acceptance criteria are met + - Ensure deployment readiness if applicable + - Run `review-story` workflow for peer review + - Check sprint-status.yaml to see project progress + + Remain flexible - allow user to choose their own path or ask for other assistance diff --git a/src/modules/bmm/workflows/4-implementation/dev-story/workflow.yaml b/src/modules/bmm/workflows/4-implementation/dev-story/workflow.yaml index 05cab538..4598aefb 100644 --- a/src/modules/bmm/workflows/4-implementation/dev-story/workflow.yaml +++ b/src/modules/bmm/workflows/4-implementation/dev-story/workflow.yaml @@ -7,27 +7,17 @@ config_source: "{project-root}/bmad/bmm/config.yaml" output_folder: "{config_source}:output_folder" user_name: "{config_source}:user_name" communication_language: "{config_source}:communication_language" +story_dir: "{config_source}:dev_story_location" +context_path: "{config_source}:dev_story_location" date: system-generated +story_file: "" # Explicit story path; auto-discovered if empty +# Context file uses same story_key as story file (e.g., "1-2-user-authentication.context.md") +context_file: "{story_dir}/{{story_key}}.context.md" + # Workflow components installed_path: "{project-root}/bmad/bmm/workflows/4-implementation/dev-story" instructions: "{installed_path}/instructions.md" validation: "{installed_path}/checklist.md" -template: false - -# Variables (can be provided by caller) -variables: - story_path: "" - run_tests_command: "auto" # 'auto' = infer from repo, or override with explicit command - strict: true # if true, halt on validation failures - story_dir: "{config_source}:dev_story_location" # Directory containing story markdown files - story_selection_limit: 10 - run_until_complete: false # Continue through all tasks without pausing except on HALT conditions - force_yolo: false # Hint executor to activate #yolo: skip optional prompts and elicitation - -# Recommended inputs -recommended_inputs: - - story_markdown: "Path to the story markdown file (Tasks/Subtasks, Acceptance Criteria present)" - web_bundle: false diff --git a/src/modules/bmm/workflows/4-implementation/epic-tech-context/template.md b/src/modules/bmm/workflows/4-implementation/epic-tech-context/template.md index 8c799577..dfffc203 100644 --- a/src/modules/bmm/workflows/4-implementation/epic-tech-context/template.md +++ b/src/modules/bmm/workflows/4-implementation/epic-tech-context/template.md @@ -1,4 +1,4 @@ -# Technical Specification: {{epic_title}} +# Epic Technical Specification: {{epic_title}} Date: {{date}} Author: {{user_name}} diff --git a/src/modules/bmm/workflows/4-implementation/review-story/instructions.md b/src/modules/bmm/workflows/4-implementation/review-story/instructions.md index b6e2b0e9..06ad8597 100644 --- a/src/modules/bmm/workflows/4-implementation/review-story/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/review-story/instructions.md @@ -64,7 +64,7 @@ Extract {{epic_num}} and {{story_num}} from filename (e.g., story-2.3.*.md) and story metadata if available Parse sections: Status, Story, Acceptance Criteria, Tasks/Subtasks (and completion states), Dev Notes, Dev Agent Record (Context Reference, Completion Notes, File List), Change Log - HALT with message: "Story status must be 'Ready for Review' to proceed" (accept 'Review' as equivalent). + HALT with message: "Story status must be 'review' to proceed". HALT. diff --git a/src/modules/bmm/workflows/4-implementation/review-story/workflow.yaml b/src/modules/bmm/workflows/4-implementation/review-story/workflow.yaml index 49a8cbc9..e318631b 100644 --- a/src/modules/bmm/workflows/4-implementation/review-story/workflow.yaml +++ b/src/modules/bmm/workflows/4-implementation/review-story/workflow.yaml @@ -24,8 +24,7 @@ variables: story_dir: "{config_source}:dev_story_location" # Directory containing story markdown files story_selection_limit: 10 allow_status_values: | - - Ready for Review - - Review + - review auto_discover_context: true auto_discover_tech_spec: true tech_spec_search_dir: "{project-root}/docs" @@ -38,8 +37,8 @@ variables: enable_mcp_doc_search: true # Prefer enabled MCP servers for doc/best-practice lookup enable_web_fallback: true # Fallback to web search/read-url if MCP not available update_status_on_result: true # If true, update story Status based on review outcome - status_on_approve: "Review Passed" - status_on_changes_requested: "InProgress" + status_on_approve: "done" + status_on_changes_requested: "in-progress" # Persistence controls for review action items and notes persist_action_items: true # Valid targets: story_tasks, story_review_section, backlog_file, epic_followups diff --git a/src/modules/bmm/workflows/4-implementation/story-context/instructions.md b/src/modules/bmm/workflows/4-implementation/story-context/instructions.md index 8cb1d1a6..af59e9ea 100644 --- a/src/modules/bmm/workflows/4-implementation/story-context/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/story-context/instructions.md @@ -134,7 +134,7 @@ All stories are either still in backlog or already marked ready/in-progress/done Open {{story_path}} Find the "Status:" line (usually at the top) - Update story file: Change Status to "Ready" + Update story file: Change Status to "ready-for-dev" Under 'Dev Agent Record' → 'Context Reference' (create if missing), add or update a list item for {default_output_file}. Save the story file. @@ -152,21 +152,31 @@ You may need to run sprint-planning to refresh tracking. - **✅ Story Context Generated Successfully, {user_name}!** + Communicate to {user_name} that story context has been successfully generated + Summarize what was accomplished: story ID, story key, title, context file location + Explain that story status is now "ready-for-dev" (was "drafted") and sprint status is "ready-for-dev" (was "drafted") + Highlight the value of the generated context: provides docs, code references, interfaces, constraints, and test guidance -**Story Details:** -- Story ID: {{story_id}} -- Story Key: {{story_key}} -- Title: {{story_title}} -- Context File: {{default_output_file}} -- Story Status: Ready (was Draft) -- Sprint Status: ready-for-dev (was drafted) + Based on {user_skill_level}, ask if user would like to understand: + - What information was gathered in the context file + - How the context file will help during implementation + - What the next steps are + - Anything else about the context generation process + -**Next Steps:** -1. Load DEV agent (bmad/bmm/agents/dev.md) -2. Run `dev-story` workflow to implement the story -3. The context file will provide comprehensive implementation guidance - + + Provide clear explanations tailored to {user_skill_level} + Reference specific sections of the generated context when helpful + + + Once explanations are complete (or user indicates no questions), suggest logical next steps + Common next steps to suggest (but allow user flexibility): + - Review the generated context file to understand implementation guidance + - Load DEV agent and run `dev-story` workflow to implement the story + - Check sprint-status.yaml to see which stories are ready for development + - Generate context for additional drafted stories if needed + + Remain flexible - allow user to choose their own path or ask for other assistance diff --git a/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml b/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml index 589b18b4..2e4977f8 100644 --- a/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml +++ b/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml @@ -8,6 +8,8 @@ config_source: "{project-root}/bmad/bmm/config.yaml" output_folder: "{config_source}:output_folder" user_name: "{config_source}:user_name" communication_language: "{config_source}:communication_language" +story_path: "{config_source}:dev_story_location" +context_path: "{config_source}:dev_story_location" date: system-generated # Workflow components @@ -26,10 +28,7 @@ variables: non_interactive: true # Output configuration -default_output_file: "{story_dir}/story-context-{{epic_id}}.{{story_id}}.xml" - -# Recommended inputs -recommended_inputs: - - story_markdown: "Path to a story markdown file to build context for" +# Uses story_key from sprint-status.yaml (e.g., "1-2-user-authentication") +default_output_file: "{story_dir}/{{story_key}}.context.md" web_bundle: false diff --git a/src/modules/bmm/workflows/4-implementation/story-done/instructions.md b/src/modules/bmm/workflows/4-implementation/story-done/instructions.md index 2e1b7318..948fa347 100644 --- a/src/modules/bmm/workflows/4-implementation/story-done/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/story-done/instructions.md @@ -62,7 +62,7 @@ All stories are either still in development or already done. Extract story_id and story_title from the file Find the "Status:" line (usually at the top) -Update story file: Change Status to "Done" +Update story file: Change Status to "done" Add completion notes to Dev Agent Record section: Find "## Dev Agent Record" section and add: @@ -98,7 +98,7 @@ Story is marked Done in file, but sprint-status.yaml may be out of sync. **Story Approved and Marked Done, {user_name}!** -✅ Story file updated: `{{story_file}}` → Status: Done +✅ Story file updated: `{{story_file}}` → Status: done ✅ Sprint status updated: review → done **Completed Story:** diff --git a/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md b/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md index 159c3278..59b0fddd 100644 --- a/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/story-ready/instructions.md @@ -62,7 +62,7 @@ All stories are either still in backlog or already marked ready/in-progress/done Extract story_id and story_title from the file Find the "Status:" line (usually at the top) -Update story file: Change Status to "Ready" +Update story file: Change Status to "ready-for-dev" Save the story file @@ -86,7 +86,7 @@ You may need to run sprint-planning to refresh tracking. **Story Marked Ready for Development, {user_name}!** -✅ Story file updated: `{{story_file}}` → Status: Ready +✅ Story file updated: `{{story_file}}` → Status: ready-for-dev ✅ Sprint status updated: drafted → ready-for-dev **Story Details:** @@ -95,7 +95,7 @@ You may need to run sprint-planning to refresh tracking. - **Key:** {{story_key}} - **Title:** {{story_title}} - **File:** `{{story_file}}` -- **Status:** Ready for development +- **Status:** ready-for-dev **Next Steps:**