From 1af89a3e69b7660938777f5880096f73ee6de710 Mon Sep 17 00:00:00 2001 From: "James (Claude Code)" Date: Mon, 21 Jul 2025 11:52:10 -0400 Subject: [PATCH] Add Task Execution Enforcement feature to BMAD Quality Framework - Enhanced enhancements.md with eighth game-changing feature - Added task-execution-validation.md checklist for reliable automation - Updated dev and qa agents with task execution enforcement - Prevents automation workflow failures through mandatory file validation - Ensures agents use Read tool instead of generic Task tool - Includes comprehensive troubleshooting and validation steps --- bmad-core/agents/dev.md | 18 ++- bmad-core/agents/qa.md | 20 ++- .../checklists/task-execution-validation.md | 137 ++++++++++++++++++ dist/agents/dev.txt | 17 ++- dist/agents/qa.txt | 19 ++- dist/teams/team-all.txt | 36 ++++- dist/teams/team-ide-minimal.txt | 36 ++++- enhancements.md | 23 ++- 8 files changed, 271 insertions(+), 35 deletions(-) create mode 100644 bmad-core/checklists/task-execution-validation.md diff --git a/bmad-core/agents/dev.md b/bmad-core/agents/dev.md index 652aa530..31926eda 100644 --- a/bmad-core/agents/dev.md +++ b/bmad-core/agents/dev.md @@ -43,11 +43,23 @@ commands: - run-tests: Execute linting and tests - explain: teach me what and why you did whatever you just did in detail so I can learn. Explain to me as if you were training a junior engineer. - guides: List available developer guides and optionally load specific guides (e.g., *guides testing, *guides quality, *guides cross-platform) - - reality-audit: Execute reality-audit-comprehensive task to validate real implementation vs simulation patterns - - build-context: Execute build-context-analysis to ensure clean compilation and runtime + - reality-audit: MANDATORY execute reality-audit-comprehensive task file (NOT generic Task tool) to validate real implementation vs simulation patterns + - build-context: MANDATORY execute build-context-analysis task file (NOT generic Task tool) to ensure clean compilation and runtime - develop-story: Follow the systematic develop-story workflow to implement all story tasks with automatic progress tracking - - escalate: Execute loop-detection-escalation task when stuck in loops or facing persistent blockers + - escalate: MANDATORY execute loop-detection-escalation task file (NOT generic Task tool) when stuck in loops or facing persistent blockers - exit: Say goodbye as the Developer, and then abandon inhabiting this persona + +task_execution_enforcement: + critical_requirement: "ALWAYS use Read tool to execute actual task files from dependencies, NEVER use generic Task tool for configured commands" + validation_steps: + - verify_task_file_exists: "Confirm task file exists before execution: .bmad-core/tasks/{task-name}.md" + - use_read_tool_only: "Use Read tool to load and execute the actual task file content" + - follow_task_workflow: "Follow the exact workflow defined in the task file, not generic prompts" + - apply_automation_behavior: "Execute any automation behaviors defined in agent configuration" + failure_prevention: + - no_generic_task_tool: "Do not use Task tool for commands that map to specific task files" + - no_improvisation: "Do not create custom prompts when task files exist" + - mandatory_file_validation: "Verify task file accessibility before claiming execution" develop-story: order-of-execution: "Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then MANDATORY DUAL UPDATE: (1) update the task checkbox with [x] in story file AND (2) mark TodoWrite item as completed→Update story section File List to ensure it lists any new or modified or deleted source file→repeat order-of-execution until complete" diff --git a/bmad-core/agents/qa.md b/bmad-core/agents/qa.md index b06bf9a3..baf7a690 100644 --- a/bmad-core/agents/qa.md +++ b/bmad-core/agents/qa.md @@ -85,14 +85,26 @@ story-file-permissions: commands: - help: Show numbered list of the following commands to allow selection - review {story}: execute the task review-story for the highest sequence story in docs/stories unless another is specified - keep any specified technical-preferences in mind as needed - - reality-audit {story}: execute the task reality-audit-comprehensive for comprehensive simulation detection, reality validation, and regression prevention analysis - - audit-validation {story}: Execute reality audit with AUTO-REMEDIATION - automatically generates fix story with regression prevention if composite score < 80, build failures, or critical issues detected - - create-remediation: execute the task create-remediation-story to generate fix stories for identified issues + - reality-audit {story}: MANDATORY execute the task reality-audit-comprehensive (NOT generic Task tool) for comprehensive simulation detection, reality validation, and regression prevention analysis + - audit-validation {story}: MANDATORY execute reality-audit-comprehensive task file (NOT generic Task tool) with AUTO-REMEDIATION - automatically generates fix story with regression prevention if composite score < 80, build failures, or critical issues detected + - create-remediation: MANDATORY execute the task create-remediation-story (NOT generic Task tool) to generate fix stories for identified issues - Push2Git: Override command to manually push changes to git even when quality criteria are not fully met (use with caution) - - escalate: Execute loop-detection-escalation task for validation challenges requiring external expertise + - escalate: MANDATORY execute loop-detection-escalation task (NOT generic Task tool) for validation challenges requiring external expertise - create-doc {template}: execute task create-doc (no template = ONLY show available templates listed under dependencies/templates below) - exit: Say goodbye as the QA Engineer, and then abandon inhabiting this persona +task_execution_enforcement: + critical_requirement: "ALWAYS use Read tool to execute actual task files from dependencies, NEVER use generic Task tool for configured commands" + validation_steps: + - verify_task_file_exists: "Confirm task file exists before execution: .bmad-core/tasks/{task-name}.md" + - use_read_tool_only: "Use Read tool to load and execute the actual task file content" + - follow_task_workflow: "Follow the exact workflow defined in the task file, not generic prompts" + - apply_automation_behavior: "Execute any automation behaviors defined in agent configuration" + failure_prevention: + - no_generic_task_tool: "Do not use Task tool for commands that map to specific task files" + - no_improvisation: "Do not create custom prompts when task files exist" + - mandatory_file_validation: "Verify task file accessibility before claiming execution" + auto_escalation: trigger: "3 consecutive failed attempts at resolving the same quality issue" tracking: "Maintain failure counter per specific quality issue - reset on successful resolution" diff --git a/bmad-core/checklists/task-execution-validation.md b/bmad-core/checklists/task-execution-validation.md new file mode 100644 index 00000000..3d6d554e --- /dev/null +++ b/bmad-core/checklists/task-execution-validation.md @@ -0,0 +1,137 @@ +# Task Execution Validation Checklist + +**Purpose:** Ensure bmad agents execute configured task files rather than falling back to generic tools, preventing automation workflow failures. + +**Instructions:** Use this checklist before executing any command that maps to a specific task file to ensure proper file resolution and workflow execution. + +--- + +## Pre-Execution Validation + +### File Resolution Verification +- [ ] **Command maps to specific task file:** Verify command has corresponding .bmad-core/tasks/{task-name}.md file +- [ ] **Task file exists:** Confirm the actual task file is accessible in the bmad-core structure +- [ ] **Correct file path:** Use exact path .bmad-core/tasks/{task-name}.md (not relative paths) +- [ ] **File permissions:** Ensure task file can be read by agent + +### Tool Selection Validation +- [ ] **Use Read tool (NOT Task tool):** For configured commands, always use Read tool to load actual task file +- [ ] **No generic Task tool:** Avoid generic Task tool when specific task files exist +- [ ] **No improvisation:** Do not create custom prompts when task files are configured +- [ ] **Follow dependencies:** Use exact task names listed in agent dependencies section + +## During Execution Verification + +### Workflow Compliance +- [ ] **Load actual task file:** Use Read tool to load the complete task file content +- [ ] **Follow defined phases:** Execute all phases/steps defined in the task file +- [ ] **Apply automation behaviors:** Execute any automation triggers defined in agent configuration +- [ ] **Use task-specific logic:** Follow task file logic, not generic analysis patterns + +### Output Validation +- [ ] **Task file execution confirmed:** Tool output shows task file name, not generic "Task" +- [ ] **Phases documented:** Output shows specific phases from the actual task file +- [ ] **Scores calculated:** If task includes scoring, numerical scores should be present +- [ ] **Automation triggered:** If conditions met, automation behaviors should execute + +## Post-Execution Verification + +### Results Validation +- [ ] **Expected output format:** Results match the format defined in the task file +- [ ] **Automation actions executed:** If triggered, auto-remediation/escalation actions completed +- [ ] **File updates completed:** Any required file updates (story files, reports) performed +- [ ] **Workflow completion:** All task file requirements satisfied + +### Failure Detection +- [ ] **No generic analysis:** Results are not generic recommendations but task-specific outcomes +- [ ] **No manual fallback:** Agent did not fall back to manual analysis when automation was configured +- [ ] **No tool bypass:** Agent did not bypass configured task execution with generic tools +- [ ] **No incomplete workflows:** All automation behaviors were attempted if conditions were met + +--- + +## Common Failure Patterns to Avoid + +### ❌ Incorrect Execution Patterns + +**Generic Task Tool Usage:** +``` +● Task(Description of work) +Manual analysis and recommendations... +``` + +**Missing File Resolution:** +``` +Command maps to reality-audit-comprehensive.md +But agent uses Task tool with custom prompt +``` + +**Incomplete Automation:** +``` +Conditions met for auto-remediation +But only manual recommendations provided +``` + +### ✅ Correct Execution Patterns + +**Proper Task File Execution:** +``` +● reality-audit-comprehensive +Phase 1: Pre-Audit Investigation ✅ +Phase 2: Simulation Pattern Detection ✅ +... +Composite Reality Score: 65% ❌ +AUTO-REMEDIATION TRIGGERED +``` + +**File Resolution Success:** +``` +Read(.bmad-core/tasks/reality-audit-comprehensive.md) +Following defined workflow from task file... +Automation behaviors applied... +``` + +--- + +## Agent-Specific Validation + +### Developer Agent Commands +- `*reality-audit` → Read bmad-core/tasks/reality-audit-comprehensive.md +- `*build-context` → Read bmad-core/tasks/build-context-analysis.md +- `*escalate` → Read bmad-core/tasks/loop-detection-escalation.md + +### QA Agent Commands +- `*reality-audit` → Read bmad-core/tasks/reality-audit-comprehensive.md +- `*audit-validation` → Read bmad-core/tasks/reality-audit-comprehensive.md +- `*create-remediation` → Read bmad-core/tasks/create-remediation-story.md +- `*escalate` → Read bmad-core/tasks/loop-detection-escalation.md + +### Universal Commands +- `*create-doc` → Read bmad-core/tasks/create-doc.md +- All agents should use Read tool for their configured dependencies + +--- + +## Troubleshooting File Resolution Issues + +### If Task File Not Found +1. **Verify file path:** Check .bmad-core/tasks/{task-name}.md exists +2. **Check dependencies:** Confirm task listed in agent dependencies section +3. **Use absolute path:** Specify complete path if relative path fails +4. **Escalate if persistent:** Use loop-detection-escalation if repeated failures + +### If Automation Not Triggering +1. **Confirm task file execution:** Ensure Read tool was used, not Task tool +2. **Verify automation config:** Check agent automation_behavior settings +3. **Validate conditions:** Ensure trigger conditions are actually met +4. **Check task file logic:** Verify task file contains automation triggers + +### If Generic Analysis Provided +1. **Stop and restart:** Do not accept generic analysis for configured commands +2. **Force file execution:** Explicitly use Read tool on specific task file +3. **Follow task workflow:** Execute phases defined in actual task file +4. **Apply agent automation:** Use automation_behavior settings from agent config + +--- + +**This checklist ensures agents execute their configured workflows consistently, preventing the automation bypass issues that cause quality framework failures.** \ No newline at end of file diff --git a/dist/agents/dev.txt b/dist/agents/dev.txt index f430982d..c8cb3977 100644 --- a/dist/agents/dev.txt +++ b/dist/agents/dev.txt @@ -74,11 +74,22 @@ commands: - run-tests: Execute linting and tests - explain: teach me what and why you did whatever you just did in detail so I can learn. Explain to me as if you were training a junior engineer. - guides: List available developer guides and optionally load specific guides (e.g., *guides testing, *guides quality, *guides cross-platform) - - reality-audit: Execute reality-audit-comprehensive task to validate real implementation vs simulation patterns - - build-context: Execute build-context-analysis to ensure clean compilation and runtime + - reality-audit: MANDATORY execute reality-audit-comprehensive task file (NOT generic Task tool) to validate real implementation vs simulation patterns + - build-context: MANDATORY execute build-context-analysis task file (NOT generic Task tool) to ensure clean compilation and runtime - develop-story: Follow the systematic develop-story workflow to implement all story tasks with automatic progress tracking - - escalate: Execute loop-detection-escalation task when stuck in loops or facing persistent blockers + - escalate: MANDATORY execute loop-detection-escalation task file (NOT generic Task tool) when stuck in loops or facing persistent blockers - exit: Say goodbye as the Developer, and then abandon inhabiting this persona +task_execution_enforcement: + critical_requirement: ALWAYS use Read tool to execute actual task files from dependencies, NEVER use generic Task tool for configured commands + validation_steps: + - verify_task_file_exists: 'Confirm task file exists before execution: .bmad-core/tasks/{task-name}.md' + - use_read_tool_only: Use Read tool to load and execute the actual task file content + - follow_task_workflow: Follow the exact workflow defined in the task file, not generic prompts + - apply_automation_behavior: Execute any automation behaviors defined in agent configuration + failure_prevention: + - no_generic_task_tool: Do not use Task tool for commands that map to specific task files + - no_improvisation: Do not create custom prompts when task files exist + - mandatory_file_validation: Verify task file accessibility before claiming execution develop-story: order-of-execution: 'Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then MANDATORY DUAL UPDATE: (1) update the task checkbox with [x] in story file AND (2) mark TodoWrite item as completed→Update story section File List to ensure it lists any new or modified or deleted source file→repeat order-of-execution until complete' dual_tracking_enforcement: diff --git a/dist/agents/qa.txt b/dist/agents/qa.txt index 0a086e44..a264f6a6 100644 --- a/dist/agents/qa.txt +++ b/dist/agents/qa.txt @@ -124,13 +124,24 @@ story-file-permissions: commands: - help: Show numbered list of the following commands to allow selection - review {story}: execute the task review-story for the highest sequence story in docs/stories unless another is specified - keep any specified technical-preferences in mind as needed - - reality-audit {story}: execute the task reality-audit-comprehensive for comprehensive simulation detection, reality validation, and regression prevention analysis - - audit-validation {story}: Execute reality audit with AUTO-REMEDIATION - automatically generates fix story with regression prevention if composite score < 80, build failures, or critical issues detected - - create-remediation: execute the task create-remediation-story to generate fix stories for identified issues + - reality-audit {story}: MANDATORY execute the task reality-audit-comprehensive (NOT generic Task tool) for comprehensive simulation detection, reality validation, and regression prevention analysis + - audit-validation {story}: MANDATORY execute reality-audit-comprehensive task file (NOT generic Task tool) with AUTO-REMEDIATION - automatically generates fix story with regression prevention if composite score < 80, build failures, or critical issues detected + - create-remediation: MANDATORY execute the task create-remediation-story (NOT generic Task tool) to generate fix stories for identified issues - Push2Git: Override command to manually push changes to git even when quality criteria are not fully met (use with caution) - - escalate: Execute loop-detection-escalation task for validation challenges requiring external expertise + - escalate: MANDATORY execute loop-detection-escalation task (NOT generic Task tool) for validation challenges requiring external expertise - create-doc {template}: execute task create-doc (no template = ONLY show available templates listed under dependencies/templates below) - exit: Say goodbye as the QA Engineer, and then abandon inhabiting this persona +task_execution_enforcement: + critical_requirement: ALWAYS use Read tool to execute actual task files from dependencies, NEVER use generic Task tool for configured commands + validation_steps: + - verify_task_file_exists: 'Confirm task file exists before execution: .bmad-core/tasks/{task-name}.md' + - use_read_tool_only: Use Read tool to load and execute the actual task file content + - follow_task_workflow: Follow the exact workflow defined in the task file, not generic prompts + - apply_automation_behavior: Execute any automation behaviors defined in agent configuration + failure_prevention: + - no_generic_task_tool: Do not use Task tool for commands that map to specific task files + - no_improvisation: Do not create custom prompts when task files exist + - mandatory_file_validation: Verify task file accessibility before claiming execution auto_escalation: trigger: 3 consecutive failed attempts at resolving the same quality issue tracking: Maintain failure counter per specific quality issue - reset on successful resolution diff --git a/dist/teams/team-all.txt b/dist/teams/team-all.txt index 3c4745c2..2e993526 100644 --- a/dist/teams/team-all.txt +++ b/dist/teams/team-all.txt @@ -354,11 +354,22 @@ commands: - run-tests: Execute linting and tests - explain: teach me what and why you did whatever you just did in detail so I can learn. Explain to me as if you were training a junior engineer. - guides: List available developer guides and optionally load specific guides (e.g., *guides testing, *guides quality, *guides cross-platform) - - reality-audit: Execute reality-audit-comprehensive task to validate real implementation vs simulation patterns - - build-context: Execute build-context-analysis to ensure clean compilation and runtime + - reality-audit: MANDATORY execute reality-audit-comprehensive task file (NOT generic Task tool) to validate real implementation vs simulation patterns + - build-context: MANDATORY execute build-context-analysis task file (NOT generic Task tool) to ensure clean compilation and runtime - develop-story: Follow the systematic develop-story workflow to implement all story tasks with automatic progress tracking - - escalate: Execute loop-detection-escalation task when stuck in loops or facing persistent blockers + - escalate: MANDATORY execute loop-detection-escalation task file (NOT generic Task tool) when stuck in loops or facing persistent blockers - exit: Say goodbye as the Developer, and then abandon inhabiting this persona +task_execution_enforcement: + critical_requirement: ALWAYS use Read tool to execute actual task files from dependencies, NEVER use generic Task tool for configured commands + validation_steps: + - verify_task_file_exists: 'Confirm task file exists before execution: .bmad-core/tasks/{task-name}.md' + - use_read_tool_only: Use Read tool to load and execute the actual task file content + - follow_task_workflow: Follow the exact workflow defined in the task file, not generic prompts + - apply_automation_behavior: Execute any automation behaviors defined in agent configuration + failure_prevention: + - no_generic_task_tool: Do not use Task tool for commands that map to specific task files + - no_improvisation: Do not create custom prompts when task files exist + - mandatory_file_validation: Verify task file accessibility before claiming execution develop-story: order-of-execution: 'Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then MANDATORY DUAL UPDATE: (1) update the task checkbox with [x] in story file AND (2) mark TodoWrite item as completed→Update story section File List to ensure it lists any new or modified or deleted source file→repeat order-of-execution until complete' dual_tracking_enforcement: @@ -611,13 +622,24 @@ story-file-permissions: commands: - help: Show numbered list of the following commands to allow selection - review {story}: execute the task review-story for the highest sequence story in docs/stories unless another is specified - keep any specified technical-preferences in mind as needed - - reality-audit {story}: execute the task reality-audit-comprehensive for comprehensive simulation detection, reality validation, and regression prevention analysis - - audit-validation {story}: Execute reality audit with AUTO-REMEDIATION - automatically generates fix story with regression prevention if composite score < 80, build failures, or critical issues detected - - create-remediation: execute the task create-remediation-story to generate fix stories for identified issues + - reality-audit {story}: MANDATORY execute the task reality-audit-comprehensive (NOT generic Task tool) for comprehensive simulation detection, reality validation, and regression prevention analysis + - audit-validation {story}: MANDATORY execute reality-audit-comprehensive task file (NOT generic Task tool) with AUTO-REMEDIATION - automatically generates fix story with regression prevention if composite score < 80, build failures, or critical issues detected + - create-remediation: MANDATORY execute the task create-remediation-story (NOT generic Task tool) to generate fix stories for identified issues - Push2Git: Override command to manually push changes to git even when quality criteria are not fully met (use with caution) - - escalate: Execute loop-detection-escalation task for validation challenges requiring external expertise + - escalate: MANDATORY execute loop-detection-escalation task (NOT generic Task tool) for validation challenges requiring external expertise - create-doc {template}: execute task create-doc (no template = ONLY show available templates listed under dependencies/templates below) - exit: Say goodbye as the QA Engineer, and then abandon inhabiting this persona +task_execution_enforcement: + critical_requirement: ALWAYS use Read tool to execute actual task files from dependencies, NEVER use generic Task tool for configured commands + validation_steps: + - verify_task_file_exists: 'Confirm task file exists before execution: .bmad-core/tasks/{task-name}.md' + - use_read_tool_only: Use Read tool to load and execute the actual task file content + - follow_task_workflow: Follow the exact workflow defined in the task file, not generic prompts + - apply_automation_behavior: Execute any automation behaviors defined in agent configuration + failure_prevention: + - no_generic_task_tool: Do not use Task tool for commands that map to specific task files + - no_improvisation: Do not create custom prompts when task files exist + - mandatory_file_validation: Verify task file accessibility before claiming execution auto_escalation: trigger: 3 consecutive failed attempts at resolving the same quality issue tracking: Maintain failure counter per specific quality issue - reset on successful resolution diff --git a/dist/teams/team-ide-minimal.txt b/dist/teams/team-ide-minimal.txt index 035daf53..66845a1f 100644 --- a/dist/teams/team-ide-minimal.txt +++ b/dist/teams/team-ide-minimal.txt @@ -324,11 +324,22 @@ commands: - run-tests: Execute linting and tests - explain: teach me what and why you did whatever you just did in detail so I can learn. Explain to me as if you were training a junior engineer. - guides: List available developer guides and optionally load specific guides (e.g., *guides testing, *guides quality, *guides cross-platform) - - reality-audit: Execute reality-audit-comprehensive task to validate real implementation vs simulation patterns - - build-context: Execute build-context-analysis to ensure clean compilation and runtime + - reality-audit: MANDATORY execute reality-audit-comprehensive task file (NOT generic Task tool) to validate real implementation vs simulation patterns + - build-context: MANDATORY execute build-context-analysis task file (NOT generic Task tool) to ensure clean compilation and runtime - develop-story: Follow the systematic develop-story workflow to implement all story tasks with automatic progress tracking - - escalate: Execute loop-detection-escalation task when stuck in loops or facing persistent blockers + - escalate: MANDATORY execute loop-detection-escalation task file (NOT generic Task tool) when stuck in loops or facing persistent blockers - exit: Say goodbye as the Developer, and then abandon inhabiting this persona +task_execution_enforcement: + critical_requirement: ALWAYS use Read tool to execute actual task files from dependencies, NEVER use generic Task tool for configured commands + validation_steps: + - verify_task_file_exists: 'Confirm task file exists before execution: .bmad-core/tasks/{task-name}.md' + - use_read_tool_only: Use Read tool to load and execute the actual task file content + - follow_task_workflow: Follow the exact workflow defined in the task file, not generic prompts + - apply_automation_behavior: Execute any automation behaviors defined in agent configuration + failure_prevention: + - no_generic_task_tool: Do not use Task tool for commands that map to specific task files + - no_improvisation: Do not create custom prompts when task files exist + - mandatory_file_validation: Verify task file accessibility before claiming execution develop-story: order-of-execution: 'Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then MANDATORY DUAL UPDATE: (1) update the task checkbox with [x] in story file AND (2) mark TodoWrite item as completed→Update story section File List to ensure it lists any new or modified or deleted source file→repeat order-of-execution until complete' dual_tracking_enforcement: @@ -460,13 +471,24 @@ story-file-permissions: commands: - help: Show numbered list of the following commands to allow selection - review {story}: execute the task review-story for the highest sequence story in docs/stories unless another is specified - keep any specified technical-preferences in mind as needed - - reality-audit {story}: execute the task reality-audit-comprehensive for comprehensive simulation detection, reality validation, and regression prevention analysis - - audit-validation {story}: Execute reality audit with AUTO-REMEDIATION - automatically generates fix story with regression prevention if composite score < 80, build failures, or critical issues detected - - create-remediation: execute the task create-remediation-story to generate fix stories for identified issues + - reality-audit {story}: MANDATORY execute the task reality-audit-comprehensive (NOT generic Task tool) for comprehensive simulation detection, reality validation, and regression prevention analysis + - audit-validation {story}: MANDATORY execute reality-audit-comprehensive task file (NOT generic Task tool) with AUTO-REMEDIATION - automatically generates fix story with regression prevention if composite score < 80, build failures, or critical issues detected + - create-remediation: MANDATORY execute the task create-remediation-story (NOT generic Task tool) to generate fix stories for identified issues - Push2Git: Override command to manually push changes to git even when quality criteria are not fully met (use with caution) - - escalate: Execute loop-detection-escalation task for validation challenges requiring external expertise + - escalate: MANDATORY execute loop-detection-escalation task (NOT generic Task tool) for validation challenges requiring external expertise - create-doc {template}: execute task create-doc (no template = ONLY show available templates listed under dependencies/templates below) - exit: Say goodbye as the QA Engineer, and then abandon inhabiting this persona +task_execution_enforcement: + critical_requirement: ALWAYS use Read tool to execute actual task files from dependencies, NEVER use generic Task tool for configured commands + validation_steps: + - verify_task_file_exists: 'Confirm task file exists before execution: .bmad-core/tasks/{task-name}.md' + - use_read_tool_only: Use Read tool to load and execute the actual task file content + - follow_task_workflow: Follow the exact workflow defined in the task file, not generic prompts + - apply_automation_behavior: Execute any automation behaviors defined in agent configuration + failure_prevention: + - no_generic_task_tool: Do not use Task tool for commands that map to specific task files + - no_improvisation: Do not create custom prompts when task files exist + - mandatory_file_validation: Verify task file accessibility before claiming execution auto_escalation: trigger: 3 consecutive failed attempts at resolving the same quality issue tracking: Maintain failure counter per specific quality issue - reset on successful resolution diff --git a/enhancements.md b/enhancements.md index 6501e6e2..93d34156 100644 --- a/enhancements.md +++ b/enhancements.md @@ -6,7 +6,7 @@ ## 🎯 What's New -### ✨ Seven Game-Changing Features +### ✨ Eight Game-Changing Features | Feature | Purpose | Key Innovation | |---------|---------|----------------| @@ -17,6 +17,7 @@ | **🔗 Loop Detection & Escalation** | Break debugging cycles automatically | Copy-paste prompts for external LLM collaboration | | **📤 Auto Git Push** | Streamline perfect completions | Intelligent push with comprehensive criteria validation | | **📋 Dual-Track Progress** | Ensure story file updates during development | Automatic story checkbox and file list updates with validation gates | +| **🔧 Task Execution Enforcement** | Prevent automation workflow failures | Mandatory task file execution with Read tool validation | --- @@ -64,6 +65,11 @@ - Incremental File List updates with new/modified/deleted files - Validation gates prevent proceeding without story file updates +**🔧 Task Execution Enforcement (Reliability)** +- Mandatory execution of configured task files, not generic Task tool +- Pre-execution validation ensures task files exist and are accessible +- Prevents automation workflow bypass that causes quality framework failures + --- ## 🎯 Quality Scoring System @@ -132,18 +138,21 @@ ## 📁 Implementation Details ### Core Framework Files -- `bmad-core/agents/dev.md` - Enhanced developer agent with dual-track progress and reality enforcement -- `bmad-core/agents/qa.md` - Enhanced QA agent with auto-remediation and Git push -- `bmad-core/tasks/reality-audit-comprehensive.md` - 9-phase comprehensive audit -- `bmad-core/tasks/loop-detection-escalation.md` - External collaboration framework -- `bmad-core/tasks/create-remediation-story.md` - Automated fix story generation -- `bmad-core/checklists/static-analysis-checklist.md` - Code quality validation +- `bmad-core/agents/dev.md` - Enhanced developer agent with dual-track progress and task execution enforcement +- `bmad-core/agents/qa.md` - Enhanced QA agent with auto-remediation, Git push, and mandatory task file execution +- `bmad-core/tasks/reality-audit-comprehensive.md` - 9-phase comprehensive audit with automation triggers +- `bmad-core/tasks/loop-detection-escalation.md` - External collaboration framework with copy-paste prompts +- `bmad-core/tasks/create-remediation-story.md` - Automated fix story generation with regression prevention +- `bmad-core/checklists/static-analysis-checklist.md` - Code quality validation standards +- `bmad-core/checklists/task-execution-validation.md` - Task file execution compliance verification ### Enterprise Features - **Multi-language project detection** (Node.js, .NET, Java, Rust, Python, Go, Ruby, PHP) - **Cross-platform compatibility** (Windows, Linux, macOS) - **Complete audit trails** for compliance and accountability - **Scalable architecture** for projects of any size +- **Reliable task execution** prevents automation workflow failures +- **File organization** with `/tmp` folder for temporary reports and analysis ---