refactor: rename workflow attribute to exec in agent menu items
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
85178ce58e
commit
61fe92a129
|
|
@ -39,5 +39,5 @@ agent:
|
|||
description: "[CB] Create Brief: A guided experience to nail down your product idea into an executive brief"
|
||||
|
||||
- trigger: DP or fuzzy match on document-project
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/document-project/workflow.md"
|
||||
description: "[DP] Document Project: Analyze an existing project to produce useful documentation for both human and LLM"
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ agent:
|
|||
|
||||
menu:
|
||||
- trigger: DS or fuzzy match on dev-story
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/dev-story/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/4-implementation/dev-story/workflow.md"
|
||||
description: "[DS] Dev Story: Write the next or specified stories tests and code."
|
||||
|
||||
- trigger: CR or fuzzy match on code-review
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/code-review/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/4-implementation/code-review/workflow.md"
|
||||
description: "[CR] Code Review: Initiate a comprehensive code review across multiple quality facets. For best results, use a fresh context and a different quality LLM if available"
|
||||
|
|
|
|||
|
|
@ -40,5 +40,5 @@ agent:
|
|||
description: "[IR] Implementation Readiness: Ensure the PRD, UX, and Architecture and Epics and Stories List are all aligned"
|
||||
|
||||
- trigger: CC or fuzzy match on correct-course
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/correct-course/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/4-implementation/correct-course/workflow.md"
|
||||
description: "[CC] Course Correction: Use this so we can determine how to proceed if major need for change is discovered mid implementation"
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ agent:
|
|||
|
||||
menu:
|
||||
- trigger: QA or fuzzy match on qa-automate
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/qa-generate-e2e-tests/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/qa-generate-e2e-tests/workflow.md"
|
||||
description: "[QA] Automate - Generate tests for existing features (simplified)"
|
||||
|
||||
prompts:
|
||||
|
|
|
|||
|
|
@ -32,5 +32,5 @@ agent:
|
|||
description: "[QQ] Quick Dev New (Preview): Unified quick flow — clarify intent, plan, implement, review, present (experimental)"
|
||||
|
||||
- trigger: CR or fuzzy match on code-review
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/code-review/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/4-implementation/code-review/workflow.md"
|
||||
description: "[CR] Code Review: Initiate a comprehensive code review across multiple quality facets. For best results, use a fresh context and a different quality LLM if available"
|
||||
|
|
|
|||
|
|
@ -20,18 +20,18 @@ agent:
|
|||
|
||||
menu:
|
||||
- trigger: SP or fuzzy match on sprint-planning
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.md"
|
||||
description: "[SP] Sprint Planning: Generate or update the record that will sequence the tasks to complete the full project that the dev agent will follow"
|
||||
|
||||
- trigger: CS or fuzzy match on create-story
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.md"
|
||||
description: "[CS] Context Story: Prepare a story with all required context for implementation for the developer agent"
|
||||
|
||||
- trigger: ER or fuzzy match on epic-retrospective
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/retrospective/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/4-implementation/retrospective/workflow.md"
|
||||
data: "{project-root}/_bmad/_config/agent-manifest.csv"
|
||||
description: "[ER] Epic Retrospective: Party Mode review of all work completed across an epic."
|
||||
|
||||
- trigger: CC or fuzzy match on correct-course
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/correct-course/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/4-implementation/correct-course/workflow.md"
|
||||
description: "[CC] Course Correction: Use this so we can determine how to proceed if major need for change is discovered mid implementation"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ agent:
|
|||
|
||||
menu:
|
||||
- trigger: DP or fuzzy match on document-project
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.md"
|
||||
exec: "{project-root}/_bmad/bmm/workflows/document-project/workflow.md"
|
||||
description: "[DP] Document Project: Generate comprehensive project documentation (brownfield analysis, architecture scanning)"
|
||||
|
||||
- trigger: WD or fuzzy match on write-document
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ agent:
|
|||
menu:
|
||||
- trigger: workflow-test
|
||||
description: Test workflow command
|
||||
workflow: path/to/workflow
|
||||
exec: path/to/workflow
|
||||
- trigger: validate-test
|
||||
description: Test validate-workflow command
|
||||
validate-workflow: path/to/validation
|
||||
|
|
|
|||
|
|
@ -19,6 +19,5 @@ agent:
|
|||
menu:
|
||||
- trigger: multi-command
|
||||
description: Menu item with multiple command targets
|
||||
workflow: path/to/workflow
|
||||
exec: npm test
|
||||
exec: path/to/workflow
|
||||
action: perform_action
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ agent:
|
|||
action: display_help
|
||||
- trigger: start-workflow
|
||||
description: Start a workflow
|
||||
workflow: path/to/workflow
|
||||
exec: path/to/workflow
|
||||
- trigger: execute
|
||||
description: Execute command
|
||||
exec: npm test
|
||||
|
|
|
|||
|
|
@ -1073,7 +1073,7 @@ class ModuleManager {
|
|||
await prompts.log.message(` Processing: ${agentFile}`);
|
||||
|
||||
for (const item of workflowInstallItems) {
|
||||
const sourceWorkflowPath = item.workflow; // Where to copy FROM
|
||||
const sourceWorkflowPath = item.exec; // Where to copy FROM
|
||||
const installWorkflowPath = item['workflow-install']; // Where to copy TO
|
||||
|
||||
// Parse SOURCE workflow path
|
||||
|
|
|
|||
|
|
@ -147,7 +147,6 @@ function buildMenuXml(menuItems) {
|
|||
const attrs = [`cmd="${trigger}"`];
|
||||
|
||||
// Add handler attributes
|
||||
if (item.workflow) attrs.push(`workflow="${item.workflow}"`);
|
||||
if (item.exec) attrs.push(`exec="${item.exec}"`);
|
||||
if (item.tmpl) attrs.push(`tmpl="${item.tmpl}"`);
|
||||
if (item.data) attrs.push(`data="${item.data}"`);
|
||||
|
|
@ -187,7 +186,6 @@ function buildNestedHandlers(triggers) {
|
|||
|
||||
// Add handler attributes based on exec data
|
||||
if (execData.route) attrs.push(`exec="${execData.route}"`);
|
||||
if (execData.workflow) attrs.push(`workflow="${execData.workflow}"`);
|
||||
if (execData['validate-workflow']) attrs.push(`validate-workflow="${execData['validate-workflow']}"`);
|
||||
if (execData.action) attrs.push(`action="${execData.action}"`);
|
||||
if (execData.data) attrs.push(`data="${execData.data}"`);
|
||||
|
|
@ -212,7 +210,6 @@ function processExecArray(execArray) {
|
|||
const result = {
|
||||
description: '',
|
||||
route: null,
|
||||
workflow: null,
|
||||
data: null,
|
||||
action: null,
|
||||
type: null,
|
||||
|
|
|
|||
|
|
@ -367,15 +367,6 @@ class YamlXmlBuilder {
|
|||
const attrs = [`cmd="${trigger}"`];
|
||||
|
||||
// Add handler attributes
|
||||
// If workflow-install exists, use its value for workflow attribute (vendoring)
|
||||
// workflow-install is build-time metadata - tells installer where to copy workflows
|
||||
// The final XML should only have workflow pointing to the install location
|
||||
if (item['workflow-install']) {
|
||||
attrs.push(`workflow="${item['workflow-install']}"`);
|
||||
} else if (item.workflow) {
|
||||
attrs.push(`workflow="${item.workflow}"`);
|
||||
}
|
||||
|
||||
if (item['validate-workflow']) attrs.push(`validate-workflow="${item['validate-workflow']}"`);
|
||||
if (item.exec) attrs.push(`exec="${item.exec}"`);
|
||||
if (item.tmpl) attrs.push(`tmpl="${item.tmpl}"`);
|
||||
|
|
@ -417,7 +408,6 @@ class YamlXmlBuilder {
|
|||
|
||||
// Add handler attributes based on exec data
|
||||
if (execData.route) attrs.push(`exec="${execData.route}"`);
|
||||
if (execData.workflow) attrs.push(`workflow="${execData.workflow}"`);
|
||||
if (execData['validate-workflow']) attrs.push(`validate-workflow="${execData['validate-workflow']}"`);
|
||||
if (execData.action) attrs.push(`action="${execData.action}"`);
|
||||
if (execData.data) attrs.push(`data="${execData.data}"`);
|
||||
|
|
@ -442,7 +432,6 @@ class YamlXmlBuilder {
|
|||
const result = {
|
||||
description: '',
|
||||
route: null,
|
||||
workflow: null,
|
||||
data: null,
|
||||
action: null,
|
||||
type: null,
|
||||
|
|
@ -459,12 +448,7 @@ class YamlXmlBuilder {
|
|||
}
|
||||
|
||||
if (exec.route) {
|
||||
// Determine if it's a workflow or exec based on file extension or context
|
||||
if (exec.route.endsWith('.yaml') || exec.route.endsWith('.yml')) {
|
||||
result.workflow = exec.route;
|
||||
} else {
|
||||
result.route = exec.route;
|
||||
}
|
||||
result.route = exec.route;
|
||||
}
|
||||
|
||||
if (exec.data !== null && exec.data !== undefined) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
const assert = require('node:assert');
|
||||
const { z } = require('zod');
|
||||
|
||||
const COMMAND_TARGET_KEYS = ['workflow', 'validate-workflow', 'exec', 'action', 'tmpl', 'data'];
|
||||
const COMMAND_TARGET_KEYS = ['validate-workflow', 'exec', 'action', 'tmpl', 'data'];
|
||||
const TRIGGER_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
||||
const COMPOUND_TRIGGER_PATTERN = /^([A-Z]{1,3}) or fuzzy match on ([a-z0-9]+(?:-[a-z0-9]+)*)$/;
|
||||
|
||||
|
|
@ -273,8 +273,6 @@ function buildMenuItemSchema() {
|
|||
.object({
|
||||
trigger: createNonEmptyString('agent.menu[].trigger'),
|
||||
description: createNonEmptyString('agent.menu[].description'),
|
||||
workflow: createNonEmptyString('agent.menu[].workflow').optional(),
|
||||
'workflow-install': createNonEmptyString('agent.menu[].workflow-install').optional(),
|
||||
'validate-workflow': createNonEmptyString('agent.menu[].validate-workflow').optional(),
|
||||
exec: createNonEmptyString('agent.menu[].exec').optional(),
|
||||
action: createNonEmptyString('agent.menu[].action').optional(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue