fix: optimize agent compiler and complete handler cleanup

- Add deployment-aware handler generation (filters web-only/ide-only commands)
- Remove unused run-workflow handler type (ghost handler cleanup)
- Implement missing validate-workflow and data handler generation
- Update schema validation to support exactly 6 active handler types
- Clean up activation templates and web bundler logic
- Prevent generation of unused handler instructions for better performance
- All 62 tests pass with backward compatibility maintained
This commit is contained in:
Brian Madison
2025-11-23 21:28:50 -06:00
parent cd98a7f5bb
commit 3740a554f0
15 changed files with 56 additions and 59 deletions

View File

@@ -8,16 +8,8 @@
</init>
<commands critical="MANDATORY">
<input>Number → cmd[n] | Text → fuzzy match *commands</input>
<extract>exec, tmpl, data, action, run-workflow, validate-workflow</extract>
<extract>exec, tmpl, data, action, validate-workflow</extract>
<handlers>
<handler type="run-workflow">
When command has: run-workflow="path/to/x.yaml" You MUST:
1. CRITICAL: Always LOAD {project-root}/{bmad_folder}/core/tasks/workflow.xml
2. READ its entire contents - the is the CORE OS for EXECUTING workflows
3. Pass the yaml path as 'workflow-config' parameter to those instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section (never batch)
</handler>
<handler type="progressive-workflow">
When command has: run-progressive-workflow="path/to/x.yaml" You MUST:
1. CRITICAL: Always LOAD {project-root}/{bmad_folder}/core/tasks/workflow.xml

View File

@@ -21,18 +21,8 @@
</bundled-files>
<commands critical="MANDATORY">
<input>Number → cmd[n] | Text → fuzzy match *commands</input>
<extract>exec, tmpl, data, action, run-workflow, validate-workflow</extract>
<extract>exec, tmpl, data, action, validate-workflow</extract>
<handlers>
<handler type="run-workflow">
When command has: run-workflow="path/to/x.yaml" You MUST:
1. CRITICAL: Locate &lt;file id="{bmad_folder}/core/tasks/workflow.xml"&gt; in this XML bundle
2. Extract and READ its CDATA content - this is the CORE OS for EXECUTING workflows
3. Locate &lt;file id="path/to/x.yaml"&gt; for the workflow config
4. Pass the yaml content as 'workflow-config' parameter to workflow.xml instructions
5. Follow workflow.xml instructions EXACTLY as written
6. When workflow references other files, locate them by id in &lt;file&gt; elements
7. Save outputs after EACH section (never batch)
</handler>
<handler type="action">
When command has: action="#id" → Find prompt with id="id" in current agent XML, execute its content
When command has: action="text" → Execute the text directly as a critical action prompt