From bfd49faf2d10a4b34272f30e1f31c88cf583be67 Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Sat, 25 Oct 2025 23:29:41 -0500 Subject: [PATCH] tech context improved --- .../create-story/instructions.md | 6 +- .../epic-tech-context/instructions.md | 72 ++++++++++++++----- 2 files changed, 57 insertions(+), 21 deletions(-) diff --git a/src/modules/bmm/workflows/4-implementation/create-story/instructions.md b/src/modules/bmm/workflows/4-implementation/create-story/instructions.md index 2a40e328..f98f26ef 100644 --- a/src/modules/bmm/workflows/4-implementation/create-story/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/create-story/instructions.md @@ -134,10 +134,12 @@ You may need to run sprint-planning to refresh tracking. - File: {{story_file}} - Status: drafted (was backlog) +**⚠️ Important:** The following workflows are context-intensive. It's recommended to clear context and restart the SM agent before running the next command. + **Next Steps:** 1. Review the drafted story in {{story_file}} -2. When satisfied, run `story-ready` to approve for development -3. Or edit the story file and re-run `create-story` to update +2. **[RECOMMENDED]** Run `story-context` to generate technical context XML and mark story ready for development (combines context + ready in one step) +3. Or run `story-ready` to manually mark the story ready without generating technical context diff --git a/src/modules/bmm/workflows/4-implementation/epic-tech-context/instructions.md b/src/modules/bmm/workflows/4-implementation/epic-tech-context/instructions.md index b32d9d15..eb477546 100644 --- a/src/modules/bmm/workflows/4-implementation/epic-tech-context/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/epic-tech-context/instructions.md @@ -8,20 +8,56 @@ If required inputs cannot be auto-discovered HALT with a clear message listing missing documents, allow user to provide them to proceed. - + Identify PRD and Architecture documents from recommended_inputs. Attempt to auto-discover at default paths. - ask the user for file paths. HALT and wait for docs to proceed with the rest of step 2 + ask the user for file paths. HALT and wait for docs to proceed - Extract {{epic_title}} and {{epic_id}} from PRD. + + MUST read COMPLETE sprint-status.yaml file to discover next epic + Load the FULL file: {{output_folder}}/sprint-status.yaml + Read ALL development_status entries + Find all epics with status "backlog" (not yet contexted) + Identify the FIRST backlog epic as the suggested default + + + 📋 **Next Epic Suggested:** Epic {{suggested_epic_id}}: {{suggested_epic_title}} + Use this epic? +- [y] Yes, use {{suggested_epic_id}} +- [n] No, let me specify a different epic_id + + + + Enter the epic_id you want to context + Store user-provided epic_id as {{epic_id}} + + + + Use {{suggested_epic_id}} as {{epic_id}} + + + + + ✅ All epics are already contexted! + +No epics with status "backlog" found in sprint-status.yaml. + + Do you want to re-context an existing epic? Enter epic_id or [q] to quit: + + + Store as {{epic_id}} + + + + HALT - No work needed + + + + Extract {{epic_title}} from PRD based on {{epic_id}}. Resolve output file path using workflow variables and initialize by writing the template. - - MUST read COMPLETE sprint-status.yaml file to find epic status - Load the FULL file: {{output_folder}}/sprint-status.yaml - Read ALL development_status entries - - Look for epic key "epic-{{epic_id}}" in development_status + + Look for epic key "epic-{{epic_id}}" in development_status (already loaded from step 1) Get current status value if epic exists @@ -41,7 +77,7 @@ Continuing to regenerate tech spec... - + Read COMPLETE PRD and Architecture files. Replace {{overview}} with a concise 1-2 paragraph summary referencing PRD context and goals @@ -50,7 +86,7 @@ Continuing to regenerate tech spec... - + Derive concrete implementation specifics from Architecture and PRD (CRITICAL: NO invention). Replace {{services_modules}} with a table or bullets listing services/modules with responsibilities, inputs/outputs, and owners @@ -60,7 +96,7 @@ Continuing to regenerate tech spec... - + Replace {{nfr_performance}} with measurable targets (latency, throughput); link to any performance requirements in PRD/Architecture Replace {{nfr_security}} with authn/z requirements, data handling, threat notes; cite source sections @@ -69,14 +105,14 @@ Continuing to regenerate tech spec... - + Scan repository for dependency manifests (e.g., package.json, pyproject.toml, go.mod, Unity Packages/manifest.json). Replace {{dependencies_integrations}} with a structured list of dependencies and integration points with version or commit constraints when known - + Extract acceptance criteria from PRD; normalize into atomic, testable statements. Replace {{acceptance_criteria}} with a numbered list of testable acceptance criteria @@ -84,14 +120,14 @@ Continuing to regenerate tech spec... - + Replace {{risks_assumptions_questions}} with explicit list (each item labeled as Risk/Assumption/Question) with mitigation or next step Replace {{test_strategy}} with a brief plan (test levels, frameworks, coverage of ACs, edge cases) - + Validate against checklist at {installed_path}/checklist.md using bmad/core/tasks/validate-workflow.xml @@ -116,9 +152,7 @@ Continuing to regenerate tech spec... **Note:** This is a JIT (Just-In-Time) workflow - run again for other epics as needed. **Next Steps:** -1. If more epics need tech specs: Run tech-spec again with different epic_id -2. If all tech specs complete: Proceed to Phase 4 implementation - - Load SM agent and run `create-story` to begin implementing stories +1. Load SM agent and run `create-story` to begin implementing the first story under this epic.