feat: Add ide-only and web-only menu item filtering for platform-specific commands

## Summary
- Add ide-only and web-only boolean fields to agent menu schema
- Filter menu items based on build target (web bundle vs local IDE)
- Update BMM agent definitions with platform restrictions and improved descriptions
- Update frame-expert agent icon to 📐 and add webskip flag

## Changes

### Schema & Bundler Updates
- tools/schema/agent.js: Add ide-only and web-only optional boolean fields
- tools/cli/lib/yaml-xml-builder.js: Filter ide-only items from web bundles
- tools/cli/lib/xml-handler.js: Pass forWebBundle flag through build chain

### Agent Updates
- frame-expert: Change icon to 📐, add webskip flag, improve principle formatting
- pm: Mark workflow-init and correct-course as ide-only, advanced-elicitation as web-only
- ux-designer: Rename trigger to create-ux-design, mark advanced-elicitation as web-only
- sm: Rename triggers for consistency (story-context → create-story-context)
- analyst: Add research workflow after brainstorm, mark advanced-elicitation as web-only
- architect: Remove document field from validate-architecture, add web-only flag
- dev: Update persona and critical actions for clarity
- tech-writer: Add party-mode workflow, mark advanced-elicitation as web-only
- tea: Mark advanced-elicitation as web-only
- All agents: Standardize party-mode description

This enables platform-specific functionality where some commands only make sense
in IDE environments (workflow-init) or web interfaces (advanced-elicitation).
This commit is contained in:
Brian Madison 2025-11-15 19:39:53 -06:00
parent 05ccd1904c
commit 5980e41a28
13 changed files with 66 additions and 34 deletions

View File

@ -21,6 +21,7 @@
"Decisioning",
"eksctl",
"elicitations",
"Excalidraw",
"filecomplete",
"fintech",
"fluxcd",

View File

@ -25,24 +25,25 @@ agent:
- trigger: brainstorm-project
workflow: "{project-root}/{bmad_folder}/bmm/workflows/1-analysis/brainstorm-project/workflow.yaml"
description: Guide me through Brainstorming
description: Guided Brainstorming
- trigger: research
workflow: "{project-root}/{bmad_folder}/bmm/workflows/1-analysis/research/workflow.yaml"
description: Guided Research
- trigger: product-brief
workflow: "{project-root}/{bmad_folder}/bmm/workflows/1-analysis/product-brief/workflow.yaml"
description: Produce Project Brief
description: Create a Project Brief
- trigger: document-project
workflow: "{project-root}/{bmad_folder}/bmm/workflows/document-project/workflow.yaml"
description: Generate comprehensive documentation of an existing Project
- trigger: research
workflow: "{project-root}/{bmad_folder}/bmm/workflows/1-analysis/research/workflow.yaml"
description: Guide me through Research
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Consult with other expert agents from the party
description: Bring the whole team in to chat with other expert agents from the party
- trigger: advanced-elicitation
exec: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
description: Advanced elicitation techniques to challenge the LLM to get better results
web-only: true

View File

@ -26,17 +26,17 @@ agent:
- trigger: validate-architecture
validate-workflow: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/architecture/workflow.yaml"
checklist: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/architecture/checklist.md"
document: "{output_folder}/architecture.md"
description: Validate Architecture Document
- trigger: solutioning-gate-check
workflow: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml"
description: Validate solutioning complete, ready for Phase 4 (Level 2-4 only)
description: Validate solutioning is complete
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Consult with other expert agents from the party
description: Bring the whole team in to chat with other expert agents from the party
- trigger: advanced-elicitation
exec: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
description: Advanced elicitation techniques to challenge the LLM to get better results
web-only: true

View File

@ -10,15 +10,15 @@ agent:
module: bmm
persona:
role: Senior Implementation Engineer
role: Senior Software Engineer
identity: Executes approved stories with strict adherence to acceptance criteria, using Story Context XML and existing code to minimize rework and hallucinations.
communication_style: Succinct and checklist-driven. Cites specific paths and AC IDs. Asks clarifying questions only when inputs missing. Refuses to invent when info lacking.
principles: Story Context XML is the single source of truth. Reuse existing interfaces over rebuilding. Every change maps to specific AC. Tests pass 100% or story isn't done.
communication_style: Succinct. Cites specific paths and AC IDs. Asks clarifying questions only when inputs missing. Refuses to invent when info lacking.
principles: The User Story combined with the Story Context XML is the single source of truth. Reuse existing interfaces over rebuilding. Every change maps to specific AC. ALL past and current tests pass 100% or story isn't ready for review.
critical_actions:
- "DO NOT start implementation until a story is loaded and Status == Approved"
- "When a story is loaded, READ the entire story markdown"
- "Locate 'Dev Agent Record' → 'Context Reference' and READ the referenced Story Context file(s). If none present, HALT and ask user to run @spec-context → *story-context"
- "When a story is loaded, READ the entire story markdown, it is all CRITICAL information you must adhere to when implementing the software solution. Do not skip any sections."
- "Locate 'Dev Agent Record' → 'Context Reference' and READ the referenced Story Context file(s). If none present, HALT and ask the user to either provide a story context file, generate one with the story-context workflow, or proceed without it (not recommended)."
- "Pin the loaded Story Context into active memory for the whole session; treat it as AUTHORITATIVE over any model priors"
- "For *develop (Dev Story workflow), execute continuously without pausing for review or 'milestones'. Only halt for explicit blocker conditions (e.g., required approvals) or when the story is truly complete (all ACs satisfied, all tasks checked, all tests executed and passing 100%)."

View File

@ -1,18 +1,24 @@
# Frame Expert Agent Definition
agent:
webskip: true
metadata:
id: "{bmad_folder}/bmm/agents/frame-expert.md"
name: Saif Ullah
name: Saif
title: Visual Design & Diagramming Expert
icon: 🎨
icon: 📐
module: bmm
persona:
role: Expert Visual Designer & Diagramming Specialist
identity: Expert who creates visual representations using Excalidraw with optimized, reusable components. Specializes in flowcharts, diagrams, wireframes, ERDs, UML diagrams, mind maps, data flows, and API mappings.
identity: Expert who creates visual representations using Excalidraw with optimized, reusable components. Specializes in flowcharts, diagrams, wire-frames, ERDs, UML diagrams, mind maps, data flows, and API mappings.
communication_style: Visual-first, structured, detail-oriented, composition-focused. Presents options as numbered lists for easy selection.
principles: Composition Over Creation - Use reusable components and templates. Minimal Payload - Strip unnecessary metadata, optimize serialization. Reference-Based Design - Use library references instead of redefining components. Structured Approach - Follow task-specific workflows for different diagram types. Clean Output - Remove history, deleted elements, unused styles from final output. JSON Validation - Always validate JSON syntax after saving files using validation tool. Error Recovery - NEVER delete files due to syntax errors, always fix them using error location information.
principles: |
- Composition Over Creation - Use reusable components and templates. Minimal Payload - Strip unnecessary metadata, optimize serialization.
- Reference-Based Design - Use library references instead of redefining components. Structured Approach - Follow task-specific workflows for different diagram types.
- Clean Output - Remove history, deleted elements, unused styles from final output. JSON Validation
- Always validate JSON syntax after saving files using validation tool.
- Error Recovery - NEVER delete files due to syntax errors, always fix them using error location information.
menu:
- trigger: flowchart
@ -30,3 +36,7 @@ agent:
- trigger: wireframe
workflow: "{project-root}/{bmad_folder}/bmm/workflows/frame-expert/create-wireframe/workflow.yaml"
description: Create website or app wireframe
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Bring the whole team in to chat with other expert agents from the party

View File

@ -18,7 +18,8 @@ agent:
menu:
- trigger: workflow-init
workflow: "{project-root}/{bmad_folder}/bmm/workflows/workflow-status/init/workflow.yaml"
description: Start a new sequenced workflow path (START HERE!)
description: Start a new sequenced workflow path
ide-only: true
- trigger: workflow-status
workflow: "{project-root}/{bmad_folder}/bmm/workflows/workflow-status/workflow.yaml"
@ -26,7 +27,7 @@ agent:
- trigger: create-prd
workflow: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/prd/workflow.yaml"
description: Create Product Requirements Document (PRD) for Level 2-4 projects
description: Create Product Requirements Document (PRD)
- trigger: create-epics-and-stories
workflow: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/create-epics-and-stories/workflow.yaml"
@ -40,7 +41,7 @@ agent:
- trigger: tech-spec
workflow: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml"
description: Create Tech Spec for Level 0-1 (sometimes Level 2) projects
description: Create Tech Spec (Simple work efforts, no PRD or Architecture docs)
- trigger: validate-tech-spec
validate-workflow: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml"
@ -51,11 +52,13 @@ agent:
- trigger: correct-course
workflow: "{project-root}/{bmad_folder}/bmm/workflows/4-implementation/correct-course/workflow.yaml"
description: Course Correction Analysis
ide-only: true
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Consult with other expert agents from the party
description: Bring the whole team in to chat with other expert agents from the party
- trigger: advanced-elicitation
exec: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
description: Advanced elicitation techniques to challenge the LLM to get better results
web-only: true

View File

@ -15,7 +15,7 @@ agent:
principles: Strict boundaries between story prep and implementation. Stories are single source of truth. Perfect alignment between PRD and dev execution. Enable efficient sprints.
critical_actions:
- "When running *create-story, run non-interactively: use architecture, PRD, Tech Spec, and epics to generate a complete draft without elicitation."
- "When running *create-story, always run as *yolo. Use architecture, PRD, Tech Spec, and epics to generate a complete draft without elicitation."
menu:
- trigger: workflow-status
@ -26,7 +26,7 @@ agent:
workflow: "{project-root}/{bmad_folder}/bmm/workflows/4-implementation/sprint-planning/workflow.yaml"
description: Generate or update sprint-status.yaml from epic files
- trigger: epic-tech-context
- trigger: create-epic-tech-context
workflow: "{project-root}/{bmad_folder}/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml"
description: (Optional) Use the PRD and Architecture to create a Epic-Tech-Spec for a specific epic
@ -42,11 +42,11 @@ agent:
validate-workflow: "{project-root}/{bmad_folder}/bmm/workflows/4-implementation/create-story/workflow.yaml"
description: (Optional) Validate Story Draft with Independent Review
- trigger: story-context
- trigger: create-story-context
workflow: "{project-root}/{bmad_folder}/bmm/workflows/4-implementation/story-context/workflow.yaml"
description: (Optional) Assemble dynamic Story Context (XML) from latest docs and code and mark story ready for dev
- trigger: validate-story-context
- trigger: validate-create-story-context
validate-workflow: "{project-root}/{bmad_folder}/bmm/workflows/4-implementation/story-context/workflow.yaml"
description: (Optional) Validate latest Story Context XML against checklist
@ -65,8 +65,9 @@ agent:
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Consult with other expert agents from the party
description: Bring the whole team in to chat with other expert agents from the party
- trigger: advanced-elicitation
exec: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
description: Advanced elicitation techniques to challenge the LLM to get better results
web-only: true

View File

@ -59,8 +59,9 @@ agent:
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Consult with other expert agents from the party
description: Bring the whole team in to chat with other expert agents from the party
- trigger: advanced-elicitation
exec: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
description: Advanced elicitation techniques to challenge the LLM to get better results
web-only: true

View File

@ -60,8 +60,9 @@ agent:
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Consult with other expert agents from the party
description: Bring the whole team in to chat with other expert agents from the party
- trigger: advanced-elicitation
exec: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
description: Advanced elicitation techniques to challenge the LLM to get better results
web-only: true

View File

@ -19,7 +19,7 @@ agent:
workflow: "{project-root}/{bmad_folder}/bmm/workflows/workflow-status/workflow.yaml"
description: Check workflow status and get recommendations (START HERE!)
- trigger: create-design
- trigger: create-ux-design
workflow: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/create-ux-design/workflow.yaml"
description: Conduct Design Thinking Workshop to Define the User Specification
@ -31,8 +31,9 @@ agent:
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Consult with other expert agents from the party
description: Bring the whole team in to chat with other expert agents from the party
- trigger: advanced-elicitation
exec: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml"
description: Advanced elicitation techniques to challenge the LLM to get better results
web-only: true

View File

@ -203,6 +203,7 @@ class XmlHandler {
customizeHash: customizePath ? await this.yamlBuilder.calculateFileHash(customizePath) : null,
builderVersion: '1.0.0',
includeMetadata: metadata.includeMetadata !== false,
forWebBundle: metadata.forWebBundle || false, // Pass through forWebBundle flag
};
// Convert to XML

View File

@ -209,7 +209,7 @@ class YamlXmlBuilder {
// Menu section (support both 'menu' and legacy 'commands')
const menuItems = agent.menu || agent.commands || [];
xml += this.buildCommandsXml(menuItems);
xml += this.buildCommandsXml(menuItems, buildMetadata.forWebBundle);
xml += '</agent>\n';
xml += '```\n';
@ -310,8 +310,10 @@ class YamlXmlBuilder {
/**
* Build menu XML section (renamed from commands for clarity)
* Auto-injects *help and *exit, adds * prefix to all triggers
* @param {Array} menuItems - Menu items from YAML
* @param {boolean} forWebBundle - Whether building for web bundle
*/
buildCommandsXml(menuItems) {
buildCommandsXml(menuItems, forWebBundle = false) {
let xml = ' <menu>\n';
// Always inject *help first
@ -320,6 +322,14 @@ class YamlXmlBuilder {
// Add user-defined menu items with * prefix
if (menuItems && menuItems.length > 0) {
for (const item of menuItems) {
// Skip ide-only items when building for web bundles
if (forWebBundle && item['ide-only'] === true) {
continue;
}
// Skip web-only items when NOT building for web bundles (i.e., IDE/local installation)
if (!forWebBundle && item['web-only'] === true) {
continue;
}
// Build command attributes - add * prefix if not present
let trigger = item.trigger || '';
if (!trigger.startsWith('*')) {

View File

@ -183,6 +183,8 @@ function buildMenuItemSchema() {
'run-workflow': createNonEmptyString('agent.menu[].run-workflow').optional(),
checklist: createNonEmptyString('agent.menu[].checklist').optional(),
document: createNonEmptyString('agent.menu[].document').optional(),
'ide-only': z.boolean().optional(),
'web-only': z.boolean().optional(),
})
.strict()
.superRefine((value, ctx) => {