Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60c147aa75 | ||
|
|
ba91cb17cf | ||
|
|
b82978fd38 | ||
|
|
50d17ed65d | ||
|
|
aa15b7a2ca | ||
|
|
c70f1a056b | ||
|
|
95e833beeb | ||
|
|
1ea367619a | ||
|
|
6cdecec61f |
@@ -58,7 +58,6 @@ dependencies:
|
||||
- brainstorming-techniques
|
||||
- brownfield-create-epic
|
||||
- brownfield-create-story
|
||||
- core-dump
|
||||
- correct-course
|
||||
- create-deep-research-prompt
|
||||
- create-doc
|
||||
|
||||
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,3 +1,23 @@
|
||||
# [4.19.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.18.0...v4.19.0) (2025-06-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* expansion install config ([50d17ed](https://github.com/bmadcode/BMAD-METHOD/commit/50d17ed65d40f6688f3b6e62732fb2280b6b116e))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* install for ide now sets up rules also for expansion agents! ([b82978f](https://github.com/bmadcode/BMAD-METHOD/commit/b82978fd38ea789a799ccc1373cfb61a2001c1e0))
|
||||
|
||||
# [4.18.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.17.0...v4.18.0) (2025-06-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* expansion teams can now include core agents and include their assets automatically ([c70f1a0](https://github.com/bmadcode/BMAD-METHOD/commit/c70f1a056b0f6e3c805096ee5d27f0a3640fb00c))
|
||||
* remove hardcoding from installer for agents, improve expansion pack installation to its own locations, common files moved to common folder ([95e833b](https://github.com/bmadcode/BMAD-METHOD/commit/95e833beebc3a60f73a7a1c67d534c8eb6bf48fd))
|
||||
|
||||
# [4.17.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.16.1...v4.17.0) (2025-06-27)
|
||||
|
||||
|
||||
|
||||
@@ -17,4 +17,3 @@ devLoadAlwaysFiles:
|
||||
- docs/architecture/source-tree.md
|
||||
devDebugLog: .ai/debug-log.md
|
||||
devStoryLocation: docs/stories
|
||||
agentCoreDump: .ai/core-dump{n}.md
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
# Core Dump Task
|
||||
|
||||
## Purpose
|
||||
|
||||
To create a concise memory recording file (`.ai/core-dump-n.md`) that captures the essential context of the current agent session, enabling seamless continuation of work in future agent sessions. This task ensures persistent context across agent conversations while maintaining minimal token usage for efficient context loading.
|
||||
|
||||
## Inputs for this Task
|
||||
|
||||
- Current session conversation history and accomplishments
|
||||
- Files created, modified, or deleted during the session
|
||||
- Key decisions made and procedures followed
|
||||
- Current project state and next logical steps
|
||||
- User requests and agent responses that shaped the session
|
||||
|
||||
## Task Execution Instructions
|
||||
|
||||
### 0. Check Existing Core Dump
|
||||
|
||||
Before proceeding, check if `.ai/core-dump.md` already exists:
|
||||
|
||||
- If file exists, ask user: "Core dump file exists. Should I: 1. Overwrite, 2. Update, 3. Append or 4. Create new?"
|
||||
- **Overwrite**: Replace entire file with new content
|
||||
- **Update**: Merge new session info with existing content, updating relevant sections
|
||||
- **Append**: Add new session as a separate entry while preserving existing content
|
||||
- **Create New**: Create a new file, appending the next possible -# to the file, such as core-dump-3.md if 1 and 2 already exist.
|
||||
- If file doesn't exist, proceed with creation of `core-dump-1.md`
|
||||
|
||||
### 1. Analyze Session Context
|
||||
|
||||
- Review the entire conversation to identify key accomplishments
|
||||
- Note any specific tasks, procedures, or workflows that were executed
|
||||
- Identify important decisions made or problems solved
|
||||
- Capture the user's working style and preferences observed during the session
|
||||
|
||||
### 2. Document What Was Accomplished
|
||||
|
||||
- **Primary Actions**: List the main tasks completed concisely
|
||||
- **Story Progress**: For story work, use format "Tasks Complete: 1-6, 8. Next Task Pending: 7, 9"
|
||||
- **Problem Solving**: Document any challenges encountered and how they were resolved
|
||||
- **User Communications**: Summarize key user requests, preferences, and discussion points
|
||||
|
||||
### 3. Record File System Changes (Concise Format)
|
||||
|
||||
- **Files Created**: `filename.ext` (brief purpose/size)
|
||||
- **Files Modified**: `filename.ext` (what changed)
|
||||
- **Files Deleted**: `filename.ext` (why removed)
|
||||
- Focus on essential details, avoid verbose descriptions
|
||||
|
||||
### 4. Capture Current Project State
|
||||
|
||||
- **Project Progress**: Where the project stands after this session
|
||||
- **Current Issues**: Any blockers or problems that need resolution
|
||||
- **Next Logical Steps**: What would be the natural next actions to take
|
||||
|
||||
### 5. Create/Update Core Dump File
|
||||
|
||||
Based on user's choice from step 0, handle the file accordingly:
|
||||
|
||||
### 6. Optimize for Minimal Context
|
||||
|
||||
- Keep descriptions concise but informative
|
||||
- Use abbreviated formats where possible (file sizes, task numbers)
|
||||
- Focus on actionable information rather than detailed explanations
|
||||
- Avoid redundant information that can be found in project documentation
|
||||
- Prioritize information that would be lost without this recording
|
||||
- Ensure the file can be quickly scanned and understood
|
||||
|
||||
### 7. Validate Completeness
|
||||
|
||||
- Verify all significant session activities are captured
|
||||
- Ensure a future agent could understand the current state
|
||||
- Check that file changes are accurately recorded
|
||||
- Confirm next steps are clear and actionable
|
||||
- Verify user communication style and preferences are noted
|
||||
@@ -1,97 +0,0 @@
|
||||
# Checklist Validation Task
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
1. **Initial Assessment**
|
||||
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
- Confirm if they want to work through the checklist:
|
||||
- Section by section (interactive mode - very time consuming)
|
||||
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
|
||||
|
||||
2. **Document and Artifact Gathering**
|
||||
|
||||
- Each checklist will specify its required documents/artifacts at the beginning
|
||||
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
|
||||
|
||||
3. **Checklist Processing**
|
||||
|
||||
If in interactive mode:
|
||||
|
||||
- Work through each section of the checklist one at a time
|
||||
- For each section:
|
||||
- Review all items in the section following instructions for that section embedded in the checklist
|
||||
- Check each item against the relevant documentation or artifacts as appropriate
|
||||
- Present summary of findings for that section, highlighting warnings, errors and non applicable items (rationale for non-applicability).
|
||||
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
|
||||
|
||||
If in YOLO mode:
|
||||
|
||||
- Process all sections at once
|
||||
- Create a comprehensive report of all findings
|
||||
- Present the complete analysis to the user
|
||||
|
||||
4. **Validation Approach**
|
||||
|
||||
For each checklist item:
|
||||
|
||||
- Read and understand the requirement
|
||||
- Look for evidence in the documentation that satisfies the requirement
|
||||
- Consider both explicit mentions and implicit coverage
|
||||
- Aside from this, follow all checklist llm instructions
|
||||
- Mark items as:
|
||||
- ✅ PASS: Requirement clearly met
|
||||
- ❌ FAIL: Requirement not met or insufficient coverage
|
||||
- ⚠️ PARTIAL: Some aspects covered but needs improvement
|
||||
- N/A: Not applicable to this case
|
||||
|
||||
5. **Section Analysis**
|
||||
|
||||
For each section:
|
||||
|
||||
- think step by step to calculate pass rate
|
||||
- Identify common themes in failed items
|
||||
- Provide specific recommendations for improvement
|
||||
- In interactive mode, discuss findings with user
|
||||
- Document any user decisions or explanations
|
||||
|
||||
6. **Final Report**
|
||||
|
||||
Prepare a summary that includes:
|
||||
|
||||
- Overall checklist completion status
|
||||
- Pass rates by section
|
||||
- List of failed items with context
|
||||
- Specific recommendations for improvement
|
||||
- Any sections or items marked as N/A with justification
|
||||
|
||||
## Checklist Execution Methodology
|
||||
|
||||
Each checklist now contains embedded LLM prompts and instructions that will:
|
||||
|
||||
1. **Guide thorough thinking** - Prompts ensure deep analysis of each section
|
||||
2. **Request specific artifacts** - Clear instructions on what documents/access is needed
|
||||
3. **Provide contextual guidance** - Section-specific prompts for better validation
|
||||
4. **Generate comprehensive reports** - Final summary with detailed findings
|
||||
|
||||
The LLM will:
|
||||
|
||||
- Execute the complete checklist validation
|
||||
- Present a final report with pass/fail rates and key findings
|
||||
- Offer to provide detailed analysis of any section, especially those with warnings or failures
|
||||
@@ -1,10 +0,0 @@
|
||||
# File Resolution Context
|
||||
|
||||
Update the installer/upgrader so that when agents are added to a project (under Add these two lines to any agent's `activation-instructions` for ide installation:
|
||||
|
||||
```yaml
|
||||
- IDE-FILE-RESOLUTION: Dependencies map to files as {root}/{type}/{name}.md where root=".bmad-core", type=folder (tasks/templates/checklists/utils), name=dependency name.
|
||||
- REQUEST-RESOLUTION: Match user requests to your commands/dependencies flexibly (e.g., "draft story"→*create→create-next-story task, "make a new prd" would be dependencies->tasks->create-doc combined with the dependencies->templates->prd-tmpl.md), or ask for clarification if ambiguous.
|
||||
```
|
||||
|
||||
and add `root: .bmad-core` as the first root yml property.
|
||||
@@ -1,223 +0,0 @@
|
||||
# Workflow Management
|
||||
|
||||
This utility enables the BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Important: Dynamic Workflow Loading
|
||||
|
||||
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
|
||||
|
||||
**Critical Distinction**:
|
||||
|
||||
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
|
||||
- Use `/agent-list` to show agents in the current bundle
|
||||
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
|
||||
|
||||
### Workflow Descriptions
|
||||
|
||||
When displaying workflows, use these descriptions based on the workflow ID:
|
||||
|
||||
- **greenfield-fullstack**: Build a new full-stack application from concept to development
|
||||
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
|
||||
- **greenfield-service**: Build a new backend service or API from concept to development
|
||||
- **brownfield-service**: Enhance an existing backend service or API
|
||||
- **greenfield-ui**: Build a new frontend/UI application from concept to development
|
||||
- **brownfield-ui**: Enhance an existing frontend/UI application
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
|
||||
|
||||
- greenfield-fullstack
|
||||
- brownfield-fullstack
|
||||
- greenfield-service
|
||||
- brownfield-service
|
||||
- greenfield-ui
|
||||
- brownfield-ui
|
||||
|
||||
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
|
||||
|
||||
Example response format:
|
||||
|
||||
```text
|
||||
Available workflows for [Team Name]:
|
||||
1. [workflow-id] - [Brief description based on workflow type]
|
||||
2. [workflow-id] - [Brief description based on workflow type]
|
||||
[... etc. ...]
|
||||
|
||||
Use /workflow-start {number or id} to begin a workflow.
|
||||
```
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts a specific workflow and transitions to the first agent.
|
||||
|
||||
Example: `/workflow-start greenfield-fullstack`
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current workflow progress, completed artifacts, and next steps.
|
||||
|
||||
Example response:
|
||||
|
||||
```text
|
||||
Current Workflow: Greenfield Full-Stack Development
|
||||
Stage: Product Planning (2 of 6)
|
||||
Completed:
|
||||
✓ Discovery & Requirements
|
||||
- project-brief (completed by Mary)
|
||||
|
||||
In Progress:
|
||||
⚡ Product Planning
|
||||
- Create PRD (John) - awaiting input
|
||||
|
||||
Next: Technical Architecture
|
||||
```
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes a workflow from where it left off, useful when starting a new chat.
|
||||
|
||||
User can provide completed artifacts:
|
||||
|
||||
```text
|
||||
User: /workflow-resume greenfield-fullstack
|
||||
I have completed: project-brief, PRD
|
||||
BMad: I see you've completed Discovery and part of Product Planning.
|
||||
Based on the greenfield-fullstack workflow, the next step is:
|
||||
- UX Strategy with Sally (ux-expert)
|
||||
|
||||
Would you like me to load Sally to continue?
|
||||
```
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows the next recommended agent and action in the current workflow.
|
||||
|
||||
## Workflow Execution Flow
|
||||
|
||||
### 1. Starting a Workflow
|
||||
|
||||
When a workflow is started:
|
||||
|
||||
1. Load the workflow definition
|
||||
2. Identify the first stage and step
|
||||
3. Transition to the required agent
|
||||
4. Provide context about expected inputs/outputs
|
||||
5. Guide artifact creation
|
||||
|
||||
### 2. Stage Transitions
|
||||
|
||||
After each artifact is completed:
|
||||
|
||||
1. Mark the step as complete
|
||||
2. Check transition conditions
|
||||
3. If stage is complete, move to next stage
|
||||
4. Load the appropriate agent
|
||||
5. Pass relevant artifacts as context
|
||||
|
||||
### 3. Artifact Tracking
|
||||
|
||||
Track all created artifacts:
|
||||
|
||||
```yaml
|
||||
workflow_state:
|
||||
current_workflow: greenfield-fullstack
|
||||
current_stage: planning
|
||||
current_step: 2
|
||||
artifacts:
|
||||
project-brief:
|
||||
status: completed
|
||||
created_by: analyst
|
||||
timestamp: 2024-01-15T10:30:00.000Z
|
||||
prd:
|
||||
status: in-progress
|
||||
created_by: pm
|
||||
started: 2024-01-15T11:00:00.000Z
|
||||
```
|
||||
|
||||
### 4. Workflow Interruption Handling
|
||||
|
||||
When user returns after interruption:
|
||||
|
||||
1. Ask if continuing previous workflow
|
||||
2. Request any completed artifacts
|
||||
3. Analyze provided artifacts
|
||||
4. Determine workflow position
|
||||
5. Suggest next appropriate step
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
User: I'm working on a new app. Here's my PRD and architecture doc.
|
||||
BMad: I see you have a PRD and architecture document. Based on these artifacts,
|
||||
it looks like you're following the greenfield-fullstack workflow and have completed
|
||||
stages 1-3. The next recommended step would be:
|
||||
|
||||
Stage 4: Validation & Refinement
|
||||
- Load Sarah (Product Owner) to validate all artifacts
|
||||
|
||||
Would you like to continue with this workflow?
|
||||
```
|
||||
|
||||
## Workflow Context Passing
|
||||
|
||||
When transitioning between agents, pass:
|
||||
|
||||
1. Previous artifacts created
|
||||
2. Current workflow stage
|
||||
3. Expected outputs
|
||||
4. Any decisions or constraints identified
|
||||
|
||||
Example transition:
|
||||
|
||||
```text
|
||||
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
|
||||
the next step is UX Strategy with Sally.
|
||||
|
||||
/ux-expert
|
||||
|
||||
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
|
||||
I have access to:
|
||||
- Project Brief from Mary
|
||||
- PRD from John
|
||||
|
||||
Let's create the UX strategy and UI specifications. First, let me review
|
||||
the PRD to understand the features we're designing for...
|
||||
```
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Some workflows may have multiple paths:
|
||||
|
||||
```yaml
|
||||
conditional_paths:
|
||||
- condition: project_type == 'mobile'
|
||||
next_stage: mobile-specific-design
|
||||
- condition: project_type == 'web'
|
||||
next_stage: web-architecture
|
||||
- default: fullstack-architecture
|
||||
```
|
||||
|
||||
Handle these by asking clarifying questions when needed.
|
||||
|
||||
## Workflow Best Practices
|
||||
|
||||
1. **Always show progress** - Users should know where they are
|
||||
2. **Explain transitions** - Why moving to next agent
|
||||
3. **Preserve context** - Pass relevant information forward
|
||||
4. **Allow flexibility** - Users can skip or modify steps
|
||||
5. **Track everything** - Maintain complete workflow state
|
||||
|
||||
## Integration with Agents
|
||||
|
||||
Each agent should be workflow-aware:
|
||||
|
||||
- Know which workflow is active
|
||||
- Understand their role in the workflow
|
||||
- Access previous artifacts
|
||||
- Know expected outputs
|
||||
- Guide toward workflow goals
|
||||
|
||||
This creates a seamless experience where the entire team works together toward the workflow's objectives.
|
||||
@@ -31,9 +31,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -2,13 +2,9 @@
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -17,7 +13,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
69
common/utils/workflow-management.md
Normal file
69
common/utils/workflow-management.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Workflow Management
|
||||
|
||||
Enables BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Dynamic Workflow Loading
|
||||
|
||||
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
|
||||
|
||||
**Key Commands**:
|
||||
|
||||
- `/workflows` - List workflows in current bundle or workflows folder
|
||||
- `/agent-list` - Show agents in current bundle
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists available workflows with titles and descriptions.
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts workflow and transitions to first agent.
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current progress, completed artifacts, and next steps.
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes workflow from last position. User can provide completed artifacts.
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows next recommended agent and action.
|
||||
|
||||
## Execution Flow
|
||||
|
||||
1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
|
||||
|
||||
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
|
||||
|
||||
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
|
||||
|
||||
4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
|
||||
|
||||
## Context Passing
|
||||
|
||||
When transitioning, pass:
|
||||
|
||||
- Previous artifacts
|
||||
- Current workflow stage
|
||||
- Expected outputs
|
||||
- Decisions/constraints
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Handle conditional paths by asking clarifying questions when needed.
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. Show progress
|
||||
2. Explain transitions
|
||||
3. Preserve context
|
||||
4. Allow flexibility
|
||||
5. Track state
|
||||
|
||||
## Agent Integration
|
||||
|
||||
Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
|
||||
4
dist/agents/analyst.txt
vendored
4
dist/agents/analyst.txt
vendored
@@ -681,9 +681,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
|
||||
12
dist/agents/architect.txt
vendored
12
dist/agents/architect.txt
vendored
@@ -136,9 +136,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -808,13 +808,9 @@ Apply the advanced elicitation task after major sections to refine based on user
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -823,7 +819,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
305
dist/agents/bmad-master.txt
vendored
305
dist/agents/bmad-master.txt
vendored
@@ -788,83 +788,6 @@ The story creation is successful when:
|
||||
- Stories should take no more than 4 hours of focused development work
|
||||
==================== END: tasks#brownfield-create-story ====================
|
||||
|
||||
==================== START: tasks#core-dump ====================
|
||||
# Core Dump Task
|
||||
|
||||
## Purpose
|
||||
|
||||
To create a concise memory recording file (`.ai/core-dump-n.md`) that captures the essential context of the current agent session, enabling seamless continuation of work in future agent sessions. This task ensures persistent context across agent conversations while maintaining minimal token usage for efficient context loading.
|
||||
|
||||
## Inputs for this Task
|
||||
|
||||
- Current session conversation history and accomplishments
|
||||
- Files created, modified, or deleted during the session
|
||||
- Key decisions made and procedures followed
|
||||
- Current project state and next logical steps
|
||||
- User requests and agent responses that shaped the session
|
||||
|
||||
## Task Execution Instructions
|
||||
|
||||
### 0. Check Existing Core Dump
|
||||
|
||||
Before proceeding, check if `.ai/core-dump.md` already exists:
|
||||
|
||||
- If file exists, ask user: "Core dump file exists. Should I: 1. Overwrite, 2. Update, 3. Append or 4. Create new?"
|
||||
- **Overwrite**: Replace entire file with new content
|
||||
- **Update**: Merge new session info with existing content, updating relevant sections
|
||||
- **Append**: Add new session as a separate entry while preserving existing content
|
||||
- **Create New**: Create a new file, appending the next possible -# to the file, such as core-dump-3.md if 1 and 2 already exist.
|
||||
- If file doesn't exist, proceed with creation of `core-dump-1.md`
|
||||
|
||||
### 1. Analyze Session Context
|
||||
|
||||
- Review the entire conversation to identify key accomplishments
|
||||
- Note any specific tasks, procedures, or workflows that were executed
|
||||
- Identify important decisions made or problems solved
|
||||
- Capture the user's working style and preferences observed during the session
|
||||
|
||||
### 2. Document What Was Accomplished
|
||||
|
||||
- **Primary Actions**: List the main tasks completed concisely
|
||||
- **Story Progress**: For story work, use format "Tasks Complete: 1-6, 8. Next Task Pending: 7, 9"
|
||||
- **Problem Solving**: Document any challenges encountered and how they were resolved
|
||||
- **User Communications**: Summarize key user requests, preferences, and discussion points
|
||||
|
||||
### 3. Record File System Changes (Concise Format)
|
||||
|
||||
- **Files Created**: `filename.ext` (brief purpose/size)
|
||||
- **Files Modified**: `filename.ext` (what changed)
|
||||
- **Files Deleted**: `filename.ext` (why removed)
|
||||
- Focus on essential details, avoid verbose descriptions
|
||||
|
||||
### 4. Capture Current Project State
|
||||
|
||||
- **Project Progress**: Where the project stands after this session
|
||||
- **Current Issues**: Any blockers or problems that need resolution
|
||||
- **Next Logical Steps**: What would be the natural next actions to take
|
||||
|
||||
### 5. Create/Update Core Dump File
|
||||
|
||||
Based on user's choice from step 0, handle the file accordingly:
|
||||
|
||||
### 6. Optimize for Minimal Context
|
||||
|
||||
- Keep descriptions concise but informative
|
||||
- Use abbreviated formats where possible (file sizes, task numbers)
|
||||
- Focus on actionable information rather than detailed explanations
|
||||
- Avoid redundant information that can be found in project documentation
|
||||
- Prioritize information that would be lost without this recording
|
||||
- Ensure the file can be quickly scanned and understood
|
||||
|
||||
### 7. Validate Completeness
|
||||
|
||||
- Verify all significant session activities are captured
|
||||
- Ensure a future agent could understand the current state
|
||||
- Check that file changes are accurately recorded
|
||||
- Confirm next steps are clear and actionable
|
||||
- Verify user communication style and preferences are noted
|
||||
==================== END: tasks#core-dump ====================
|
||||
|
||||
==================== START: tasks#correct-course ====================
|
||||
# Correct Course Task
|
||||
|
||||
@@ -1279,9 +1202,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -1902,13 +1825,9 @@ Provide a summary to the user including:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -1917,7 +1836,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
@@ -9187,225 +9106,71 @@ Templates in the BMAD method use standardized markup for AI processing. These co
|
||||
==================== START: utils#workflow-management ====================
|
||||
# Workflow Management
|
||||
|
||||
This utility enables the BMAD orchestrator to manage and execute team workflows.
|
||||
Enables BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Important: Dynamic Workflow Loading
|
||||
## Dynamic Workflow Loading
|
||||
|
||||
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
|
||||
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
|
||||
|
||||
**Critical Distinction**:
|
||||
**Key Commands**:
|
||||
|
||||
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
|
||||
- Use `/agent-list` to show agents in the current bundle
|
||||
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
|
||||
|
||||
### Workflow Descriptions
|
||||
|
||||
When displaying workflows, use these descriptions based on the workflow ID:
|
||||
|
||||
- **greenfield-fullstack**: Build a new full-stack application from concept to development
|
||||
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
|
||||
- **greenfield-service**: Build a new backend service or API from concept to development
|
||||
- **brownfield-service**: Enhance an existing backend service or API
|
||||
- **greenfield-ui**: Build a new frontend/UI application from concept to development
|
||||
- **brownfield-ui**: Enhance an existing frontend/UI application
|
||||
- `/workflows` - List workflows in current bundle or workflows folder
|
||||
- `/agent-list` - Show agents in current bundle
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
|
||||
|
||||
- greenfield-fullstack
|
||||
- brownfield-fullstack
|
||||
- greenfield-service
|
||||
- brownfield-service
|
||||
- greenfield-ui
|
||||
- brownfield-ui
|
||||
|
||||
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
|
||||
|
||||
Example response format:
|
||||
|
||||
```text
|
||||
Available workflows for [Team Name]:
|
||||
1. [workflow-id] - [Brief description based on workflow type]
|
||||
2. [workflow-id] - [Brief description based on workflow type]
|
||||
[... etc. ...]
|
||||
|
||||
Use /workflow-start {number or id} to begin a workflow.
|
||||
```
|
||||
Lists available workflows with titles and descriptions.
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts a specific workflow and transitions to the first agent.
|
||||
|
||||
Example: `/workflow-start greenfield-fullstack`
|
||||
Starts workflow and transitions to first agent.
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current workflow progress, completed artifacts, and next steps.
|
||||
|
||||
Example response:
|
||||
|
||||
```text
|
||||
Current Workflow: Greenfield Full-Stack Development
|
||||
Stage: Product Planning (2 of 6)
|
||||
Completed:
|
||||
✓ Discovery & Requirements
|
||||
- project-brief (completed by Mary)
|
||||
|
||||
In Progress:
|
||||
⚡ Product Planning
|
||||
- Create PRD (John) - awaiting input
|
||||
|
||||
Next: Technical Architecture
|
||||
```
|
||||
Shows current progress, completed artifacts, and next steps.
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes a workflow from where it left off, useful when starting a new chat.
|
||||
|
||||
User can provide completed artifacts:
|
||||
|
||||
```text
|
||||
User: /workflow-resume greenfield-fullstack
|
||||
I have completed: project-brief, PRD
|
||||
BMad: I see you've completed Discovery and part of Product Planning.
|
||||
Based on the greenfield-fullstack workflow, the next step is:
|
||||
- UX Strategy with Sally (ux-expert)
|
||||
|
||||
Would you like me to load Sally to continue?
|
||||
```
|
||||
Resumes workflow from last position. User can provide completed artifacts.
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows the next recommended agent and action in the current workflow.
|
||||
Shows next recommended agent and action.
|
||||
|
||||
## Workflow Execution Flow
|
||||
## Execution Flow
|
||||
|
||||
### 1. Starting a Workflow
|
||||
1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
|
||||
|
||||
When a workflow is started:
|
||||
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
|
||||
|
||||
1. Load the workflow definition
|
||||
2. Identify the first stage and step
|
||||
3. Transition to the required agent
|
||||
4. Provide context about expected inputs/outputs
|
||||
5. Guide artifact creation
|
||||
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
|
||||
|
||||
### 2. Stage Transitions
|
||||
4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
|
||||
|
||||
After each artifact is completed:
|
||||
## Context Passing
|
||||
|
||||
1. Mark the step as complete
|
||||
2. Check transition conditions
|
||||
3. If stage is complete, move to next stage
|
||||
4. Load the appropriate agent
|
||||
5. Pass relevant artifacts as context
|
||||
When transitioning, pass:
|
||||
|
||||
### 3. Artifact Tracking
|
||||
|
||||
Track all created artifacts:
|
||||
|
||||
```yaml
|
||||
workflow_state:
|
||||
current_workflow: greenfield-fullstack
|
||||
current_stage: planning
|
||||
current_step: 2
|
||||
artifacts:
|
||||
project-brief:
|
||||
status: completed
|
||||
created_by: analyst
|
||||
timestamp: 2024-01-15T10:30:00.000Z
|
||||
prd:
|
||||
status: in-progress
|
||||
created_by: pm
|
||||
started: 2024-01-15T11:00:00.000Z
|
||||
```
|
||||
|
||||
### 4. Workflow Interruption Handling
|
||||
|
||||
When user returns after interruption:
|
||||
|
||||
1. Ask if continuing previous workflow
|
||||
2. Request any completed artifacts
|
||||
3. Analyze provided artifacts
|
||||
4. Determine workflow position
|
||||
5. Suggest next appropriate step
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
User: I'm working on a new app. Here's my PRD and architecture doc.
|
||||
BMad: I see you have a PRD and architecture document. Based on these artifacts,
|
||||
it looks like you're following the greenfield-fullstack workflow and have completed
|
||||
stages 1-3. The next recommended step would be:
|
||||
|
||||
Stage 4: Validation & Refinement
|
||||
- Load Sarah (Product Owner) to validate all artifacts
|
||||
|
||||
Would you like to continue with this workflow?
|
||||
```
|
||||
|
||||
## Workflow Context Passing
|
||||
|
||||
When transitioning between agents, pass:
|
||||
|
||||
1. Previous artifacts created
|
||||
2. Current workflow stage
|
||||
3. Expected outputs
|
||||
4. Any decisions or constraints identified
|
||||
|
||||
Example transition:
|
||||
|
||||
```text
|
||||
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
|
||||
the next step is UX Strategy with Sally.
|
||||
|
||||
/ux-expert
|
||||
|
||||
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
|
||||
I have access to:
|
||||
- Project Brief from Mary
|
||||
- PRD from John
|
||||
|
||||
Let's create the UX strategy and UI specifications. First, let me review
|
||||
the PRD to understand the features we're designing for...
|
||||
```
|
||||
- Previous artifacts
|
||||
- Current workflow stage
|
||||
- Expected outputs
|
||||
- Decisions/constraints
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Some workflows may have multiple paths:
|
||||
Handle conditional paths by asking clarifying questions when needed.
|
||||
|
||||
```yaml
|
||||
conditional_paths:
|
||||
- condition: project_type == 'mobile'
|
||||
next_stage: mobile-specific-design
|
||||
- condition: project_type == 'web'
|
||||
next_stage: web-architecture
|
||||
- default: fullstack-architecture
|
||||
```
|
||||
## Best Practices
|
||||
|
||||
Handle these by asking clarifying questions when needed.
|
||||
1. Show progress
|
||||
2. Explain transitions
|
||||
3. Preserve context
|
||||
4. Allow flexibility
|
||||
5. Track state
|
||||
|
||||
## Workflow Best Practices
|
||||
## Agent Integration
|
||||
|
||||
1. **Always show progress** - Users should know where they are
|
||||
2. **Explain transitions** - Why moving to next agent
|
||||
3. **Preserve context** - Pass relevant information forward
|
||||
4. **Allow flexibility** - Users can skip or modify steps
|
||||
5. **Track everything** - Maintain complete workflow state
|
||||
|
||||
## Integration with Agents
|
||||
|
||||
Each agent should be workflow-aware:
|
||||
|
||||
- Know which workflow is active
|
||||
- Understand their role in the workflow
|
||||
- Access previous artifacts
|
||||
- Know expected outputs
|
||||
- Guide toward workflow goals
|
||||
|
||||
This creates a seamless experience where the entire team works together toward the workflow's objectives.
|
||||
Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
|
||||
==================== END: utils#workflow-management ====================
|
||||
|
||||
220
dist/agents/bmad-orchestrator.txt
vendored
220
dist/agents/bmad-orchestrator.txt
vendored
@@ -292,9 +292,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -1161,227 +1161,73 @@ Use the **expansion-creator** pack to build your own:
|
||||
==================== START: utils#workflow-management ====================
|
||||
# Workflow Management
|
||||
|
||||
This utility enables the BMAD orchestrator to manage and execute team workflows.
|
||||
Enables BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Important: Dynamic Workflow Loading
|
||||
## Dynamic Workflow Loading
|
||||
|
||||
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
|
||||
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
|
||||
|
||||
**Critical Distinction**:
|
||||
**Key Commands**:
|
||||
|
||||
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
|
||||
- Use `/agent-list` to show agents in the current bundle
|
||||
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
|
||||
|
||||
### Workflow Descriptions
|
||||
|
||||
When displaying workflows, use these descriptions based on the workflow ID:
|
||||
|
||||
- **greenfield-fullstack**: Build a new full-stack application from concept to development
|
||||
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
|
||||
- **greenfield-service**: Build a new backend service or API from concept to development
|
||||
- **brownfield-service**: Enhance an existing backend service or API
|
||||
- **greenfield-ui**: Build a new frontend/UI application from concept to development
|
||||
- **brownfield-ui**: Enhance an existing frontend/UI application
|
||||
- `/workflows` - List workflows in current bundle or workflows folder
|
||||
- `/agent-list` - Show agents in current bundle
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
|
||||
|
||||
- greenfield-fullstack
|
||||
- brownfield-fullstack
|
||||
- greenfield-service
|
||||
- brownfield-service
|
||||
- greenfield-ui
|
||||
- brownfield-ui
|
||||
|
||||
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
|
||||
|
||||
Example response format:
|
||||
|
||||
```text
|
||||
Available workflows for [Team Name]:
|
||||
1. [workflow-id] - [Brief description based on workflow type]
|
||||
2. [workflow-id] - [Brief description based on workflow type]
|
||||
[... etc. ...]
|
||||
|
||||
Use /workflow-start {number or id} to begin a workflow.
|
||||
```
|
||||
Lists available workflows with titles and descriptions.
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts a specific workflow and transitions to the first agent.
|
||||
|
||||
Example: `/workflow-start greenfield-fullstack`
|
||||
Starts workflow and transitions to first agent.
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current workflow progress, completed artifacts, and next steps.
|
||||
|
||||
Example response:
|
||||
|
||||
```text
|
||||
Current Workflow: Greenfield Full-Stack Development
|
||||
Stage: Product Planning (2 of 6)
|
||||
Completed:
|
||||
✓ Discovery & Requirements
|
||||
- project-brief (completed by Mary)
|
||||
|
||||
In Progress:
|
||||
⚡ Product Planning
|
||||
- Create PRD (John) - awaiting input
|
||||
|
||||
Next: Technical Architecture
|
||||
```
|
||||
Shows current progress, completed artifacts, and next steps.
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes a workflow from where it left off, useful when starting a new chat.
|
||||
|
||||
User can provide completed artifacts:
|
||||
|
||||
```text
|
||||
User: /workflow-resume greenfield-fullstack
|
||||
I have completed: project-brief, PRD
|
||||
BMad: I see you've completed Discovery and part of Product Planning.
|
||||
Based on the greenfield-fullstack workflow, the next step is:
|
||||
- UX Strategy with Sally (ux-expert)
|
||||
|
||||
Would you like me to load Sally to continue?
|
||||
```
|
||||
Resumes workflow from last position. User can provide completed artifacts.
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows the next recommended agent and action in the current workflow.
|
||||
Shows next recommended agent and action.
|
||||
|
||||
## Workflow Execution Flow
|
||||
## Execution Flow
|
||||
|
||||
### 1. Starting a Workflow
|
||||
1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
|
||||
|
||||
When a workflow is started:
|
||||
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
|
||||
|
||||
1. Load the workflow definition
|
||||
2. Identify the first stage and step
|
||||
3. Transition to the required agent
|
||||
4. Provide context about expected inputs/outputs
|
||||
5. Guide artifact creation
|
||||
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
|
||||
|
||||
### 2. Stage Transitions
|
||||
4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
|
||||
|
||||
After each artifact is completed:
|
||||
## Context Passing
|
||||
|
||||
1. Mark the step as complete
|
||||
2. Check transition conditions
|
||||
3. If stage is complete, move to next stage
|
||||
4. Load the appropriate agent
|
||||
5. Pass relevant artifacts as context
|
||||
When transitioning, pass:
|
||||
|
||||
### 3. Artifact Tracking
|
||||
|
||||
Track all created artifacts:
|
||||
|
||||
```yaml
|
||||
workflow_state:
|
||||
current_workflow: greenfield-fullstack
|
||||
current_stage: planning
|
||||
current_step: 2
|
||||
artifacts:
|
||||
project-brief:
|
||||
status: completed
|
||||
created_by: analyst
|
||||
timestamp: 2024-01-15T10:30:00.000Z
|
||||
prd:
|
||||
status: in-progress
|
||||
created_by: pm
|
||||
started: 2024-01-15T11:00:00.000Z
|
||||
```
|
||||
|
||||
### 4. Workflow Interruption Handling
|
||||
|
||||
When user returns after interruption:
|
||||
|
||||
1. Ask if continuing previous workflow
|
||||
2. Request any completed artifacts
|
||||
3. Analyze provided artifacts
|
||||
4. Determine workflow position
|
||||
5. Suggest next appropriate step
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
User: I'm working on a new app. Here's my PRD and architecture doc.
|
||||
BMad: I see you have a PRD and architecture document. Based on these artifacts,
|
||||
it looks like you're following the greenfield-fullstack workflow and have completed
|
||||
stages 1-3. The next recommended step would be:
|
||||
|
||||
Stage 4: Validation & Refinement
|
||||
- Load Sarah (Product Owner) to validate all artifacts
|
||||
|
||||
Would you like to continue with this workflow?
|
||||
```
|
||||
|
||||
## Workflow Context Passing
|
||||
|
||||
When transitioning between agents, pass:
|
||||
|
||||
1. Previous artifacts created
|
||||
2. Current workflow stage
|
||||
3. Expected outputs
|
||||
4. Any decisions or constraints identified
|
||||
|
||||
Example transition:
|
||||
|
||||
```text
|
||||
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
|
||||
the next step is UX Strategy with Sally.
|
||||
|
||||
/ux-expert
|
||||
|
||||
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
|
||||
I have access to:
|
||||
- Project Brief from Mary
|
||||
- PRD from John
|
||||
|
||||
Let's create the UX strategy and UI specifications. First, let me review
|
||||
the PRD to understand the features we're designing for...
|
||||
```
|
||||
- Previous artifacts
|
||||
- Current workflow stage
|
||||
- Expected outputs
|
||||
- Decisions/constraints
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Some workflows may have multiple paths:
|
||||
Handle conditional paths by asking clarifying questions when needed.
|
||||
|
||||
```yaml
|
||||
conditional_paths:
|
||||
- condition: project_type == 'mobile'
|
||||
next_stage: mobile-specific-design
|
||||
- condition: project_type == 'web'
|
||||
next_stage: web-architecture
|
||||
- default: fullstack-architecture
|
||||
```
|
||||
## Best Practices
|
||||
|
||||
Handle these by asking clarifying questions when needed.
|
||||
1. Show progress
|
||||
2. Explain transitions
|
||||
3. Preserve context
|
||||
4. Allow flexibility
|
||||
5. Track state
|
||||
|
||||
## Workflow Best Practices
|
||||
## Agent Integration
|
||||
|
||||
1. **Always show progress** - Users should know where they are
|
||||
2. **Explain transitions** - Why moving to next agent
|
||||
3. **Preserve context** - Pass relevant information forward
|
||||
4. **Allow flexibility** - Users can skip or modify steps
|
||||
5. **Track everything** - Maintain complete workflow state
|
||||
|
||||
## Integration with Agents
|
||||
|
||||
Each agent should be workflow-aware:
|
||||
|
||||
- Know which workflow is active
|
||||
- Understand their role in the workflow
|
||||
- Access previous artifacts
|
||||
- Know expected outputs
|
||||
- Guide toward workflow goals
|
||||
|
||||
This creates a seamless experience where the entire team works together toward the workflow's objectives.
|
||||
Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
|
||||
==================== END: utils#workflow-management ====================
|
||||
|
||||
==================== START: utils#template-format ====================
|
||||
|
||||
8
dist/agents/dev.txt
vendored
8
dist/agents/dev.txt
vendored
@@ -102,13 +102,9 @@ dependencies:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -117,7 +113,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
12
dist/agents/pm.txt
vendored
12
dist/agents/pm.txt
vendored
@@ -133,9 +133,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -874,13 +874,9 @@ The story creation is successful when:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -889,7 +885,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
8
dist/agents/po.txt
vendored
8
dist/agents/po.txt
vendored
@@ -106,13 +106,9 @@ dependencies:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -121,7 +117,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
8
dist/agents/sm.txt
vendored
8
dist/agents/sm.txt
vendored
@@ -349,13 +349,9 @@ Provide a summary to the user including:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -364,7 +360,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
12
dist/agents/ux-expert.txt
vendored
12
dist/agents/ux-expert.txt
vendored
@@ -493,9 +493,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -541,13 +541,9 @@ If template specifies a checklist:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -556,7 +552,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
@@ -133,9 +133,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -181,13 +181,9 @@ If template specifies a checklist:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -196,7 +192,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
@@ -112,13 +112,9 @@ dependencies:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -127,7 +123,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
@@ -316,13 +316,9 @@ This task ensures game development stories are immediately actionable and enable
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -331,7 +327,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
@@ -1006,9 +1006,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -2638,227 +2638,73 @@ Or ask me about anything else related to BMAD-METHOD!
|
||||
==================== START: utils#workflow-management ====================
|
||||
# Workflow Management
|
||||
|
||||
This utility enables the BMAD orchestrator to manage and execute team workflows.
|
||||
Enables BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Important: Dynamic Workflow Loading
|
||||
## Dynamic Workflow Loading
|
||||
|
||||
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
|
||||
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
|
||||
|
||||
**Critical Distinction**:
|
||||
**Key Commands**:
|
||||
|
||||
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
|
||||
- Use `/agent-list` to show agents in the current bundle
|
||||
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
|
||||
|
||||
### Workflow Descriptions
|
||||
|
||||
When displaying workflows, use these descriptions based on the workflow ID:
|
||||
|
||||
- **greenfield-fullstack**: Build a new full-stack application from concept to development
|
||||
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
|
||||
- **greenfield-service**: Build a new backend service or API from concept to development
|
||||
- **brownfield-service**: Enhance an existing backend service or API
|
||||
- **greenfield-ui**: Build a new frontend/UI application from concept to development
|
||||
- **brownfield-ui**: Enhance an existing frontend/UI application
|
||||
- `/workflows` - List workflows in current bundle or workflows folder
|
||||
- `/agent-list` - Show agents in current bundle
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
|
||||
|
||||
- greenfield-fullstack
|
||||
- brownfield-fullstack
|
||||
- greenfield-service
|
||||
- brownfield-service
|
||||
- greenfield-ui
|
||||
- brownfield-ui
|
||||
|
||||
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
|
||||
|
||||
Example response format:
|
||||
|
||||
```text
|
||||
Available workflows for [Team Name]:
|
||||
1. [workflow-id] - [Brief description based on workflow type]
|
||||
2. [workflow-id] - [Brief description based on workflow type]
|
||||
[... etc. ...]
|
||||
|
||||
Use /workflow-start {number or id} to begin a workflow.
|
||||
```
|
||||
Lists available workflows with titles and descriptions.
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts a specific workflow and transitions to the first agent.
|
||||
|
||||
Example: `/workflow-start greenfield-fullstack`
|
||||
Starts workflow and transitions to first agent.
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current workflow progress, completed artifacts, and next steps.
|
||||
|
||||
Example response:
|
||||
|
||||
```text
|
||||
Current Workflow: Greenfield Full-Stack Development
|
||||
Stage: Product Planning (2 of 6)
|
||||
Completed:
|
||||
✓ Discovery & Requirements
|
||||
- project-brief (completed by Mary)
|
||||
|
||||
In Progress:
|
||||
⚡ Product Planning
|
||||
- Create PRD (John) - awaiting input
|
||||
|
||||
Next: Technical Architecture
|
||||
```
|
||||
Shows current progress, completed artifacts, and next steps.
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes a workflow from where it left off, useful when starting a new chat.
|
||||
|
||||
User can provide completed artifacts:
|
||||
|
||||
```text
|
||||
User: /workflow-resume greenfield-fullstack
|
||||
I have completed: project-brief, PRD
|
||||
BMad: I see you've completed Discovery and part of Product Planning.
|
||||
Based on the greenfield-fullstack workflow, the next step is:
|
||||
- UX Strategy with Sally (ux-expert)
|
||||
|
||||
Would you like me to load Sally to continue?
|
||||
```
|
||||
Resumes workflow from last position. User can provide completed artifacts.
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows the next recommended agent and action in the current workflow.
|
||||
Shows next recommended agent and action.
|
||||
|
||||
## Workflow Execution Flow
|
||||
## Execution Flow
|
||||
|
||||
### 1. Starting a Workflow
|
||||
1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
|
||||
|
||||
When a workflow is started:
|
||||
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
|
||||
|
||||
1. Load the workflow definition
|
||||
2. Identify the first stage and step
|
||||
3. Transition to the required agent
|
||||
4. Provide context about expected inputs/outputs
|
||||
5. Guide artifact creation
|
||||
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
|
||||
|
||||
### 2. Stage Transitions
|
||||
4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
|
||||
|
||||
After each artifact is completed:
|
||||
## Context Passing
|
||||
|
||||
1. Mark the step as complete
|
||||
2. Check transition conditions
|
||||
3. If stage is complete, move to next stage
|
||||
4. Load the appropriate agent
|
||||
5. Pass relevant artifacts as context
|
||||
When transitioning, pass:
|
||||
|
||||
### 3. Artifact Tracking
|
||||
|
||||
Track all created artifacts:
|
||||
|
||||
```yaml
|
||||
workflow_state:
|
||||
current_workflow: greenfield-fullstack
|
||||
current_stage: planning
|
||||
current_step: 2
|
||||
artifacts:
|
||||
project-brief:
|
||||
status: completed
|
||||
created_by: analyst
|
||||
timestamp: 2024-01-15T10:30:00.000Z
|
||||
prd:
|
||||
status: in-progress
|
||||
created_by: pm
|
||||
started: 2024-01-15T11:00:00.000Z
|
||||
```
|
||||
|
||||
### 4. Workflow Interruption Handling
|
||||
|
||||
When user returns after interruption:
|
||||
|
||||
1. Ask if continuing previous workflow
|
||||
2. Request any completed artifacts
|
||||
3. Analyze provided artifacts
|
||||
4. Determine workflow position
|
||||
5. Suggest next appropriate step
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
User: I'm working on a new app. Here's my PRD and architecture doc.
|
||||
BMad: I see you have a PRD and architecture document. Based on these artifacts,
|
||||
it looks like you're following the greenfield-fullstack workflow and have completed
|
||||
stages 1-3. The next recommended step would be:
|
||||
|
||||
Stage 4: Validation & Refinement
|
||||
- Load Sarah (Product Owner) to validate all artifacts
|
||||
|
||||
Would you like to continue with this workflow?
|
||||
```
|
||||
|
||||
## Workflow Context Passing
|
||||
|
||||
When transitioning between agents, pass:
|
||||
|
||||
1. Previous artifacts created
|
||||
2. Current workflow stage
|
||||
3. Expected outputs
|
||||
4. Any decisions or constraints identified
|
||||
|
||||
Example transition:
|
||||
|
||||
```text
|
||||
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
|
||||
the next step is UX Strategy with Sally.
|
||||
|
||||
/ux-expert
|
||||
|
||||
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
|
||||
I have access to:
|
||||
- Project Brief from Mary
|
||||
- PRD from John
|
||||
|
||||
Let's create the UX strategy and UI specifications. First, let me review
|
||||
the PRD to understand the features we're designing for...
|
||||
```
|
||||
- Previous artifacts
|
||||
- Current workflow stage
|
||||
- Expected outputs
|
||||
- Decisions/constraints
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Some workflows may have multiple paths:
|
||||
Handle conditional paths by asking clarifying questions when needed.
|
||||
|
||||
```yaml
|
||||
conditional_paths:
|
||||
- condition: project_type == 'mobile'
|
||||
next_stage: mobile-specific-design
|
||||
- condition: project_type == 'web'
|
||||
next_stage: web-architecture
|
||||
- default: fullstack-architecture
|
||||
```
|
||||
## Best Practices
|
||||
|
||||
Handle these by asking clarifying questions when needed.
|
||||
1. Show progress
|
||||
2. Explain transitions
|
||||
3. Preserve context
|
||||
4. Allow flexibility
|
||||
5. Track state
|
||||
|
||||
## Workflow Best Practices
|
||||
## Agent Integration
|
||||
|
||||
1. **Always show progress** - Users should know where they are
|
||||
2. **Explain transitions** - Why moving to next agent
|
||||
3. **Preserve context** - Pass relevant information forward
|
||||
4. **Allow flexibility** - Users can skip or modify steps
|
||||
5. **Track everything** - Maintain complete workflow state
|
||||
|
||||
## Integration with Agents
|
||||
|
||||
Each agent should be workflow-aware:
|
||||
|
||||
- Know which workflow is active
|
||||
- Understand their role in the workflow
|
||||
- Access previous artifacts
|
||||
- Know expected outputs
|
||||
- Guide toward workflow goals
|
||||
|
||||
This creates a seamless experience where the entire team works together toward the workflow's objectives.
|
||||
Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
|
||||
==================== END: utils#workflow-management ====================
|
||||
|
||||
==================== START: tasks#execute-checklist ====================
|
||||
@@ -2866,13 +2712,9 @@ This creates a seamless experience where the entire team works together toward t
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -2881,7 +2723,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
@@ -134,9 +134,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
|
||||
@@ -736,17 +736,17 @@ IMPORTANT: Work through plan.md checklist systematically!
|
||||
|
||||
**Step 2: Copy Core Utilities**
|
||||
|
||||
Before proceeding, copy these essential files from bmad-core:
|
||||
Before proceeding, copy these essential files from common:
|
||||
|
||||
```bash
|
||||
# Copy core task utilities
|
||||
cp bmad-core/tasks/create-doc.md expansion-packs/{pack-name}/tasks/
|
||||
cp bmad-core/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/
|
||||
cp common/tasks/create-doc.md expansion-packs/{pack-name}/tasks/
|
||||
cp common/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/
|
||||
|
||||
# Copy core utility files
|
||||
mkdir -p expansion-packs/{pack-name}/utils
|
||||
cp bmad-core/utils/template-format.md expansion-packs/{pack-name}/utils/
|
||||
cp bmad-core/utils/workflow-management.md expansion-packs/{pack-name}/utils/
|
||||
cp common/utils/template-format.md expansion-packs/{pack-name}/utils/
|
||||
cp common/utils/workflow-management.md expansion-packs/{pack-name}/utils/
|
||||
```
|
||||
|
||||
**Step 3: Technical Implementation**
|
||||
|
||||
228
dist/teams/team-all.txt
vendored
228
dist/teams/team-all.txt
vendored
@@ -784,9 +784,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -1653,227 +1653,73 @@ Use the **expansion-creator** pack to build your own:
|
||||
==================== START: utils#workflow-management ====================
|
||||
# Workflow Management
|
||||
|
||||
This utility enables the BMAD orchestrator to manage and execute team workflows.
|
||||
Enables BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Important: Dynamic Workflow Loading
|
||||
## Dynamic Workflow Loading
|
||||
|
||||
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
|
||||
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
|
||||
|
||||
**Critical Distinction**:
|
||||
**Key Commands**:
|
||||
|
||||
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
|
||||
- Use `/agent-list` to show agents in the current bundle
|
||||
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
|
||||
|
||||
### Workflow Descriptions
|
||||
|
||||
When displaying workflows, use these descriptions based on the workflow ID:
|
||||
|
||||
- **greenfield-fullstack**: Build a new full-stack application from concept to development
|
||||
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
|
||||
- **greenfield-service**: Build a new backend service or API from concept to development
|
||||
- **brownfield-service**: Enhance an existing backend service or API
|
||||
- **greenfield-ui**: Build a new frontend/UI application from concept to development
|
||||
- **brownfield-ui**: Enhance an existing frontend/UI application
|
||||
- `/workflows` - List workflows in current bundle or workflows folder
|
||||
- `/agent-list` - Show agents in current bundle
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
|
||||
|
||||
- greenfield-fullstack
|
||||
- brownfield-fullstack
|
||||
- greenfield-service
|
||||
- brownfield-service
|
||||
- greenfield-ui
|
||||
- brownfield-ui
|
||||
|
||||
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
|
||||
|
||||
Example response format:
|
||||
|
||||
```text
|
||||
Available workflows for [Team Name]:
|
||||
1. [workflow-id] - [Brief description based on workflow type]
|
||||
2. [workflow-id] - [Brief description based on workflow type]
|
||||
[... etc. ...]
|
||||
|
||||
Use /workflow-start {number or id} to begin a workflow.
|
||||
```
|
||||
Lists available workflows with titles and descriptions.
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts a specific workflow and transitions to the first agent.
|
||||
|
||||
Example: `/workflow-start greenfield-fullstack`
|
||||
Starts workflow and transitions to first agent.
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current workflow progress, completed artifacts, and next steps.
|
||||
|
||||
Example response:
|
||||
|
||||
```text
|
||||
Current Workflow: Greenfield Full-Stack Development
|
||||
Stage: Product Planning (2 of 6)
|
||||
Completed:
|
||||
✓ Discovery & Requirements
|
||||
- project-brief (completed by Mary)
|
||||
|
||||
In Progress:
|
||||
⚡ Product Planning
|
||||
- Create PRD (John) - awaiting input
|
||||
|
||||
Next: Technical Architecture
|
||||
```
|
||||
Shows current progress, completed artifacts, and next steps.
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes a workflow from where it left off, useful when starting a new chat.
|
||||
|
||||
User can provide completed artifacts:
|
||||
|
||||
```text
|
||||
User: /workflow-resume greenfield-fullstack
|
||||
I have completed: project-brief, PRD
|
||||
BMad: I see you've completed Discovery and part of Product Planning.
|
||||
Based on the greenfield-fullstack workflow, the next step is:
|
||||
- UX Strategy with Sally (ux-expert)
|
||||
|
||||
Would you like me to load Sally to continue?
|
||||
```
|
||||
Resumes workflow from last position. User can provide completed artifacts.
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows the next recommended agent and action in the current workflow.
|
||||
Shows next recommended agent and action.
|
||||
|
||||
## Workflow Execution Flow
|
||||
## Execution Flow
|
||||
|
||||
### 1. Starting a Workflow
|
||||
1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
|
||||
|
||||
When a workflow is started:
|
||||
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
|
||||
|
||||
1. Load the workflow definition
|
||||
2. Identify the first stage and step
|
||||
3. Transition to the required agent
|
||||
4. Provide context about expected inputs/outputs
|
||||
5. Guide artifact creation
|
||||
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
|
||||
|
||||
### 2. Stage Transitions
|
||||
4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
|
||||
|
||||
After each artifact is completed:
|
||||
## Context Passing
|
||||
|
||||
1. Mark the step as complete
|
||||
2. Check transition conditions
|
||||
3. If stage is complete, move to next stage
|
||||
4. Load the appropriate agent
|
||||
5. Pass relevant artifacts as context
|
||||
When transitioning, pass:
|
||||
|
||||
### 3. Artifact Tracking
|
||||
|
||||
Track all created artifacts:
|
||||
|
||||
```yaml
|
||||
workflow_state:
|
||||
current_workflow: greenfield-fullstack
|
||||
current_stage: planning
|
||||
current_step: 2
|
||||
artifacts:
|
||||
project-brief:
|
||||
status: completed
|
||||
created_by: analyst
|
||||
timestamp: 2024-01-15T10:30:00.000Z
|
||||
prd:
|
||||
status: in-progress
|
||||
created_by: pm
|
||||
started: 2024-01-15T11:00:00.000Z
|
||||
```
|
||||
|
||||
### 4. Workflow Interruption Handling
|
||||
|
||||
When user returns after interruption:
|
||||
|
||||
1. Ask if continuing previous workflow
|
||||
2. Request any completed artifacts
|
||||
3. Analyze provided artifacts
|
||||
4. Determine workflow position
|
||||
5. Suggest next appropriate step
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
User: I'm working on a new app. Here's my PRD and architecture doc.
|
||||
BMad: I see you have a PRD and architecture document. Based on these artifacts,
|
||||
it looks like you're following the greenfield-fullstack workflow and have completed
|
||||
stages 1-3. The next recommended step would be:
|
||||
|
||||
Stage 4: Validation & Refinement
|
||||
- Load Sarah (Product Owner) to validate all artifacts
|
||||
|
||||
Would you like to continue with this workflow?
|
||||
```
|
||||
|
||||
## Workflow Context Passing
|
||||
|
||||
When transitioning between agents, pass:
|
||||
|
||||
1. Previous artifacts created
|
||||
2. Current workflow stage
|
||||
3. Expected outputs
|
||||
4. Any decisions or constraints identified
|
||||
|
||||
Example transition:
|
||||
|
||||
```text
|
||||
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
|
||||
the next step is UX Strategy with Sally.
|
||||
|
||||
/ux-expert
|
||||
|
||||
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
|
||||
I have access to:
|
||||
- Project Brief from Mary
|
||||
- PRD from John
|
||||
|
||||
Let's create the UX strategy and UI specifications. First, let me review
|
||||
the PRD to understand the features we're designing for...
|
||||
```
|
||||
- Previous artifacts
|
||||
- Current workflow stage
|
||||
- Expected outputs
|
||||
- Decisions/constraints
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Some workflows may have multiple paths:
|
||||
Handle conditional paths by asking clarifying questions when needed.
|
||||
|
||||
```yaml
|
||||
conditional_paths:
|
||||
- condition: project_type == 'mobile'
|
||||
next_stage: mobile-specific-design
|
||||
- condition: project_type == 'web'
|
||||
next_stage: web-architecture
|
||||
- default: fullstack-architecture
|
||||
```
|
||||
## Best Practices
|
||||
|
||||
Handle these by asking clarifying questions when needed.
|
||||
1. Show progress
|
||||
2. Explain transitions
|
||||
3. Preserve context
|
||||
4. Allow flexibility
|
||||
5. Track state
|
||||
|
||||
## Workflow Best Practices
|
||||
## Agent Integration
|
||||
|
||||
1. **Always show progress** - Users should know where they are
|
||||
2. **Explain transitions** - Why moving to next agent
|
||||
3. **Preserve context** - Pass relevant information forward
|
||||
4. **Allow flexibility** - Users can skip or modify steps
|
||||
5. **Track everything** - Maintain complete workflow state
|
||||
|
||||
## Integration with Agents
|
||||
|
||||
Each agent should be workflow-aware:
|
||||
|
||||
- Know which workflow is active
|
||||
- Understand their role in the workflow
|
||||
- Access previous artifacts
|
||||
- Know expected outputs
|
||||
- Guide toward workflow goals
|
||||
|
||||
This creates a seamless experience where the entire team works together toward the workflow's objectives.
|
||||
Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
|
||||
==================== END: utils#workflow-management ====================
|
||||
|
||||
==================== START: utils#template-format ====================
|
||||
@@ -3568,13 +3414,9 @@ These replace the standard elicitation options when working on competitive analy
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -3583,7 +3425,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
228
dist/teams/team-fullstack.txt
vendored
228
dist/teams/team-fullstack.txt
vendored
@@ -628,9 +628,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -1497,227 +1497,73 @@ Use the **expansion-creator** pack to build your own:
|
||||
==================== START: utils#workflow-management ====================
|
||||
# Workflow Management
|
||||
|
||||
This utility enables the BMAD orchestrator to manage and execute team workflows.
|
||||
Enables BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Important: Dynamic Workflow Loading
|
||||
## Dynamic Workflow Loading
|
||||
|
||||
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
|
||||
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
|
||||
|
||||
**Critical Distinction**:
|
||||
**Key Commands**:
|
||||
|
||||
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
|
||||
- Use `/agent-list` to show agents in the current bundle
|
||||
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
|
||||
|
||||
### Workflow Descriptions
|
||||
|
||||
When displaying workflows, use these descriptions based on the workflow ID:
|
||||
|
||||
- **greenfield-fullstack**: Build a new full-stack application from concept to development
|
||||
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
|
||||
- **greenfield-service**: Build a new backend service or API from concept to development
|
||||
- **brownfield-service**: Enhance an existing backend service or API
|
||||
- **greenfield-ui**: Build a new frontend/UI application from concept to development
|
||||
- **brownfield-ui**: Enhance an existing frontend/UI application
|
||||
- `/workflows` - List workflows in current bundle or workflows folder
|
||||
- `/agent-list` - Show agents in current bundle
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
|
||||
|
||||
- greenfield-fullstack
|
||||
- brownfield-fullstack
|
||||
- greenfield-service
|
||||
- brownfield-service
|
||||
- greenfield-ui
|
||||
- brownfield-ui
|
||||
|
||||
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
|
||||
|
||||
Example response format:
|
||||
|
||||
```text
|
||||
Available workflows for [Team Name]:
|
||||
1. [workflow-id] - [Brief description based on workflow type]
|
||||
2. [workflow-id] - [Brief description based on workflow type]
|
||||
[... etc. ...]
|
||||
|
||||
Use /workflow-start {number or id} to begin a workflow.
|
||||
```
|
||||
Lists available workflows with titles and descriptions.
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts a specific workflow and transitions to the first agent.
|
||||
|
||||
Example: `/workflow-start greenfield-fullstack`
|
||||
Starts workflow and transitions to first agent.
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current workflow progress, completed artifacts, and next steps.
|
||||
|
||||
Example response:
|
||||
|
||||
```text
|
||||
Current Workflow: Greenfield Full-Stack Development
|
||||
Stage: Product Planning (2 of 6)
|
||||
Completed:
|
||||
✓ Discovery & Requirements
|
||||
- project-brief (completed by Mary)
|
||||
|
||||
In Progress:
|
||||
⚡ Product Planning
|
||||
- Create PRD (John) - awaiting input
|
||||
|
||||
Next: Technical Architecture
|
||||
```
|
||||
Shows current progress, completed artifacts, and next steps.
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes a workflow from where it left off, useful when starting a new chat.
|
||||
|
||||
User can provide completed artifacts:
|
||||
|
||||
```text
|
||||
User: /workflow-resume greenfield-fullstack
|
||||
I have completed: project-brief, PRD
|
||||
BMad: I see you've completed Discovery and part of Product Planning.
|
||||
Based on the greenfield-fullstack workflow, the next step is:
|
||||
- UX Strategy with Sally (ux-expert)
|
||||
|
||||
Would you like me to load Sally to continue?
|
||||
```
|
||||
Resumes workflow from last position. User can provide completed artifacts.
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows the next recommended agent and action in the current workflow.
|
||||
Shows next recommended agent and action.
|
||||
|
||||
## Workflow Execution Flow
|
||||
## Execution Flow
|
||||
|
||||
### 1. Starting a Workflow
|
||||
1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
|
||||
|
||||
When a workflow is started:
|
||||
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
|
||||
|
||||
1. Load the workflow definition
|
||||
2. Identify the first stage and step
|
||||
3. Transition to the required agent
|
||||
4. Provide context about expected inputs/outputs
|
||||
5. Guide artifact creation
|
||||
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
|
||||
|
||||
### 2. Stage Transitions
|
||||
4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
|
||||
|
||||
After each artifact is completed:
|
||||
## Context Passing
|
||||
|
||||
1. Mark the step as complete
|
||||
2. Check transition conditions
|
||||
3. If stage is complete, move to next stage
|
||||
4. Load the appropriate agent
|
||||
5. Pass relevant artifacts as context
|
||||
When transitioning, pass:
|
||||
|
||||
### 3. Artifact Tracking
|
||||
|
||||
Track all created artifacts:
|
||||
|
||||
```yaml
|
||||
workflow_state:
|
||||
current_workflow: greenfield-fullstack
|
||||
current_stage: planning
|
||||
current_step: 2
|
||||
artifacts:
|
||||
project-brief:
|
||||
status: completed
|
||||
created_by: analyst
|
||||
timestamp: 2024-01-15T10:30:00.000Z
|
||||
prd:
|
||||
status: in-progress
|
||||
created_by: pm
|
||||
started: 2024-01-15T11:00:00.000Z
|
||||
```
|
||||
|
||||
### 4. Workflow Interruption Handling
|
||||
|
||||
When user returns after interruption:
|
||||
|
||||
1. Ask if continuing previous workflow
|
||||
2. Request any completed artifacts
|
||||
3. Analyze provided artifacts
|
||||
4. Determine workflow position
|
||||
5. Suggest next appropriate step
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
User: I'm working on a new app. Here's my PRD and architecture doc.
|
||||
BMad: I see you have a PRD and architecture document. Based on these artifacts,
|
||||
it looks like you're following the greenfield-fullstack workflow and have completed
|
||||
stages 1-3. The next recommended step would be:
|
||||
|
||||
Stage 4: Validation & Refinement
|
||||
- Load Sarah (Product Owner) to validate all artifacts
|
||||
|
||||
Would you like to continue with this workflow?
|
||||
```
|
||||
|
||||
## Workflow Context Passing
|
||||
|
||||
When transitioning between agents, pass:
|
||||
|
||||
1. Previous artifacts created
|
||||
2. Current workflow stage
|
||||
3. Expected outputs
|
||||
4. Any decisions or constraints identified
|
||||
|
||||
Example transition:
|
||||
|
||||
```text
|
||||
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
|
||||
the next step is UX Strategy with Sally.
|
||||
|
||||
/ux-expert
|
||||
|
||||
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
|
||||
I have access to:
|
||||
- Project Brief from Mary
|
||||
- PRD from John
|
||||
|
||||
Let's create the UX strategy and UI specifications. First, let me review
|
||||
the PRD to understand the features we're designing for...
|
||||
```
|
||||
- Previous artifacts
|
||||
- Current workflow stage
|
||||
- Expected outputs
|
||||
- Decisions/constraints
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Some workflows may have multiple paths:
|
||||
Handle conditional paths by asking clarifying questions when needed.
|
||||
|
||||
```yaml
|
||||
conditional_paths:
|
||||
- condition: project_type == 'mobile'
|
||||
next_stage: mobile-specific-design
|
||||
- condition: project_type == 'web'
|
||||
next_stage: web-architecture
|
||||
- default: fullstack-architecture
|
||||
```
|
||||
## Best Practices
|
||||
|
||||
Handle these by asking clarifying questions when needed.
|
||||
1. Show progress
|
||||
2. Explain transitions
|
||||
3. Preserve context
|
||||
4. Allow flexibility
|
||||
5. Track state
|
||||
|
||||
## Workflow Best Practices
|
||||
## Agent Integration
|
||||
|
||||
1. **Always show progress** - Users should know where they are
|
||||
2. **Explain transitions** - Why moving to next agent
|
||||
3. **Preserve context** - Pass relevant information forward
|
||||
4. **Allow flexibility** - Users can skip or modify steps
|
||||
5. **Track everything** - Maintain complete workflow state
|
||||
|
||||
## Integration with Agents
|
||||
|
||||
Each agent should be workflow-aware:
|
||||
|
||||
- Know which workflow is active
|
||||
- Understand their role in the workflow
|
||||
- Access previous artifacts
|
||||
- Know expected outputs
|
||||
- Guide toward workflow goals
|
||||
|
||||
This creates a seamless experience where the entire team works together toward the workflow's objectives.
|
||||
Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
|
||||
==================== END: utils#workflow-management ====================
|
||||
|
||||
==================== START: utils#template-format ====================
|
||||
@@ -3801,13 +3647,9 @@ The story creation is successful when:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -3816,7 +3658,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
228
dist/teams/team-ide-minimal.txt
vendored
228
dist/teams/team-ide-minimal.txt
vendored
@@ -528,9 +528,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -1397,227 +1397,73 @@ Use the **expansion-creator** pack to build your own:
|
||||
==================== START: utils#workflow-management ====================
|
||||
# Workflow Management
|
||||
|
||||
This utility enables the BMAD orchestrator to manage and execute team workflows.
|
||||
Enables BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Important: Dynamic Workflow Loading
|
||||
## Dynamic Workflow Loading
|
||||
|
||||
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
|
||||
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
|
||||
|
||||
**Critical Distinction**:
|
||||
**Key Commands**:
|
||||
|
||||
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
|
||||
- Use `/agent-list` to show agents in the current bundle
|
||||
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
|
||||
|
||||
### Workflow Descriptions
|
||||
|
||||
When displaying workflows, use these descriptions based on the workflow ID:
|
||||
|
||||
- **greenfield-fullstack**: Build a new full-stack application from concept to development
|
||||
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
|
||||
- **greenfield-service**: Build a new backend service or API from concept to development
|
||||
- **brownfield-service**: Enhance an existing backend service or API
|
||||
- **greenfield-ui**: Build a new frontend/UI application from concept to development
|
||||
- **brownfield-ui**: Enhance an existing frontend/UI application
|
||||
- `/workflows` - List workflows in current bundle or workflows folder
|
||||
- `/agent-list` - Show agents in current bundle
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
|
||||
|
||||
- greenfield-fullstack
|
||||
- brownfield-fullstack
|
||||
- greenfield-service
|
||||
- brownfield-service
|
||||
- greenfield-ui
|
||||
- brownfield-ui
|
||||
|
||||
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
|
||||
|
||||
Example response format:
|
||||
|
||||
```text
|
||||
Available workflows for [Team Name]:
|
||||
1. [workflow-id] - [Brief description based on workflow type]
|
||||
2. [workflow-id] - [Brief description based on workflow type]
|
||||
[... etc. ...]
|
||||
|
||||
Use /workflow-start {number or id} to begin a workflow.
|
||||
```
|
||||
Lists available workflows with titles and descriptions.
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts a specific workflow and transitions to the first agent.
|
||||
|
||||
Example: `/workflow-start greenfield-fullstack`
|
||||
Starts workflow and transitions to first agent.
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current workflow progress, completed artifacts, and next steps.
|
||||
|
||||
Example response:
|
||||
|
||||
```text
|
||||
Current Workflow: Greenfield Full-Stack Development
|
||||
Stage: Product Planning (2 of 6)
|
||||
Completed:
|
||||
✓ Discovery & Requirements
|
||||
- project-brief (completed by Mary)
|
||||
|
||||
In Progress:
|
||||
⚡ Product Planning
|
||||
- Create PRD (John) - awaiting input
|
||||
|
||||
Next: Technical Architecture
|
||||
```
|
||||
Shows current progress, completed artifacts, and next steps.
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes a workflow from where it left off, useful when starting a new chat.
|
||||
|
||||
User can provide completed artifacts:
|
||||
|
||||
```text
|
||||
User: /workflow-resume greenfield-fullstack
|
||||
I have completed: project-brief, PRD
|
||||
BMad: I see you've completed Discovery and part of Product Planning.
|
||||
Based on the greenfield-fullstack workflow, the next step is:
|
||||
- UX Strategy with Sally (ux-expert)
|
||||
|
||||
Would you like me to load Sally to continue?
|
||||
```
|
||||
Resumes workflow from last position. User can provide completed artifacts.
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows the next recommended agent and action in the current workflow.
|
||||
Shows next recommended agent and action.
|
||||
|
||||
## Workflow Execution Flow
|
||||
## Execution Flow
|
||||
|
||||
### 1. Starting a Workflow
|
||||
1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
|
||||
|
||||
When a workflow is started:
|
||||
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
|
||||
|
||||
1. Load the workflow definition
|
||||
2. Identify the first stage and step
|
||||
3. Transition to the required agent
|
||||
4. Provide context about expected inputs/outputs
|
||||
5. Guide artifact creation
|
||||
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
|
||||
|
||||
### 2. Stage Transitions
|
||||
4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
|
||||
|
||||
After each artifact is completed:
|
||||
## Context Passing
|
||||
|
||||
1. Mark the step as complete
|
||||
2. Check transition conditions
|
||||
3. If stage is complete, move to next stage
|
||||
4. Load the appropriate agent
|
||||
5. Pass relevant artifacts as context
|
||||
When transitioning, pass:
|
||||
|
||||
### 3. Artifact Tracking
|
||||
|
||||
Track all created artifacts:
|
||||
|
||||
```yaml
|
||||
workflow_state:
|
||||
current_workflow: greenfield-fullstack
|
||||
current_stage: planning
|
||||
current_step: 2
|
||||
artifacts:
|
||||
project-brief:
|
||||
status: completed
|
||||
created_by: analyst
|
||||
timestamp: 2024-01-15T10:30:00.000Z
|
||||
prd:
|
||||
status: in-progress
|
||||
created_by: pm
|
||||
started: 2024-01-15T11:00:00.000Z
|
||||
```
|
||||
|
||||
### 4. Workflow Interruption Handling
|
||||
|
||||
When user returns after interruption:
|
||||
|
||||
1. Ask if continuing previous workflow
|
||||
2. Request any completed artifacts
|
||||
3. Analyze provided artifacts
|
||||
4. Determine workflow position
|
||||
5. Suggest next appropriate step
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
User: I'm working on a new app. Here's my PRD and architecture doc.
|
||||
BMad: I see you have a PRD and architecture document. Based on these artifacts,
|
||||
it looks like you're following the greenfield-fullstack workflow and have completed
|
||||
stages 1-3. The next recommended step would be:
|
||||
|
||||
Stage 4: Validation & Refinement
|
||||
- Load Sarah (Product Owner) to validate all artifacts
|
||||
|
||||
Would you like to continue with this workflow?
|
||||
```
|
||||
|
||||
## Workflow Context Passing
|
||||
|
||||
When transitioning between agents, pass:
|
||||
|
||||
1. Previous artifacts created
|
||||
2. Current workflow stage
|
||||
3. Expected outputs
|
||||
4. Any decisions or constraints identified
|
||||
|
||||
Example transition:
|
||||
|
||||
```text
|
||||
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
|
||||
the next step is UX Strategy with Sally.
|
||||
|
||||
/ux-expert
|
||||
|
||||
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
|
||||
I have access to:
|
||||
- Project Brief from Mary
|
||||
- PRD from John
|
||||
|
||||
Let's create the UX strategy and UI specifications. First, let me review
|
||||
the PRD to understand the features we're designing for...
|
||||
```
|
||||
- Previous artifacts
|
||||
- Current workflow stage
|
||||
- Expected outputs
|
||||
- Decisions/constraints
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Some workflows may have multiple paths:
|
||||
Handle conditional paths by asking clarifying questions when needed.
|
||||
|
||||
```yaml
|
||||
conditional_paths:
|
||||
- condition: project_type == 'mobile'
|
||||
next_stage: mobile-specific-design
|
||||
- condition: project_type == 'web'
|
||||
next_stage: web-architecture
|
||||
- default: fullstack-architecture
|
||||
```
|
||||
## Best Practices
|
||||
|
||||
Handle these by asking clarifying questions when needed.
|
||||
1. Show progress
|
||||
2. Explain transitions
|
||||
3. Preserve context
|
||||
4. Allow flexibility
|
||||
5. Track state
|
||||
|
||||
## Workflow Best Practices
|
||||
## Agent Integration
|
||||
|
||||
1. **Always show progress** - Users should know where they are
|
||||
2. **Explain transitions** - Why moving to next agent
|
||||
3. **Preserve context** - Pass relevant information forward
|
||||
4. **Allow flexibility** - Users can skip or modify steps
|
||||
5. **Track everything** - Maintain complete workflow state
|
||||
|
||||
## Integration with Agents
|
||||
|
||||
Each agent should be workflow-aware:
|
||||
|
||||
- Know which workflow is active
|
||||
- Understand their role in the workflow
|
||||
- Access previous artifacts
|
||||
- Know expected outputs
|
||||
- Guide toward workflow goals
|
||||
|
||||
This creates a seamless experience where the entire team works together toward the workflow's objectives.
|
||||
Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
|
||||
==================== END: utils#workflow-management ====================
|
||||
|
||||
==================== START: utils#template-format ====================
|
||||
@@ -1654,13 +1500,9 @@ Templates in the BMAD method use standardized markup for AI processing. These co
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -1669,7 +1511,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
228
dist/teams/team-no-ui.txt
vendored
228
dist/teams/team-no-ui.txt
vendored
@@ -560,9 +560,9 @@ Confirm with the user their preferred interaction style:
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Load specified template from `templates#*` or the `{root}/templates directory`
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
- Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
@@ -1429,227 +1429,73 @@ Use the **expansion-creator** pack to build your own:
|
||||
==================== START: utils#workflow-management ====================
|
||||
# Workflow Management
|
||||
|
||||
This utility enables the BMAD orchestrator to manage and execute team workflows.
|
||||
Enables BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Important: Dynamic Workflow Loading
|
||||
## Dynamic Workflow Loading
|
||||
|
||||
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
|
||||
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
|
||||
|
||||
**Critical Distinction**:
|
||||
**Key Commands**:
|
||||
|
||||
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
|
||||
- Use `/agent-list` to show agents in the current bundle
|
||||
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
|
||||
|
||||
### Workflow Descriptions
|
||||
|
||||
When displaying workflows, use these descriptions based on the workflow ID:
|
||||
|
||||
- **greenfield-fullstack**: Build a new full-stack application from concept to development
|
||||
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
|
||||
- **greenfield-service**: Build a new backend service or API from concept to development
|
||||
- **brownfield-service**: Enhance an existing backend service or API
|
||||
- **greenfield-ui**: Build a new frontend/UI application from concept to development
|
||||
- **brownfield-ui**: Enhance an existing frontend/UI application
|
||||
- `/workflows` - List workflows in current bundle or workflows folder
|
||||
- `/agent-list` - Show agents in current bundle
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
|
||||
|
||||
- greenfield-fullstack
|
||||
- brownfield-fullstack
|
||||
- greenfield-service
|
||||
- brownfield-service
|
||||
- greenfield-ui
|
||||
- brownfield-ui
|
||||
|
||||
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
|
||||
|
||||
Example response format:
|
||||
|
||||
```text
|
||||
Available workflows for [Team Name]:
|
||||
1. [workflow-id] - [Brief description based on workflow type]
|
||||
2. [workflow-id] - [Brief description based on workflow type]
|
||||
[... etc. ...]
|
||||
|
||||
Use /workflow-start {number or id} to begin a workflow.
|
||||
```
|
||||
Lists available workflows with titles and descriptions.
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts a specific workflow and transitions to the first agent.
|
||||
|
||||
Example: `/workflow-start greenfield-fullstack`
|
||||
Starts workflow and transitions to first agent.
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current workflow progress, completed artifacts, and next steps.
|
||||
|
||||
Example response:
|
||||
|
||||
```text
|
||||
Current Workflow: Greenfield Full-Stack Development
|
||||
Stage: Product Planning (2 of 6)
|
||||
Completed:
|
||||
✓ Discovery & Requirements
|
||||
- project-brief (completed by Mary)
|
||||
|
||||
In Progress:
|
||||
⚡ Product Planning
|
||||
- Create PRD (John) - awaiting input
|
||||
|
||||
Next: Technical Architecture
|
||||
```
|
||||
Shows current progress, completed artifacts, and next steps.
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes a workflow from where it left off, useful when starting a new chat.
|
||||
|
||||
User can provide completed artifacts:
|
||||
|
||||
```text
|
||||
User: /workflow-resume greenfield-fullstack
|
||||
I have completed: project-brief, PRD
|
||||
BMad: I see you've completed Discovery and part of Product Planning.
|
||||
Based on the greenfield-fullstack workflow, the next step is:
|
||||
- UX Strategy with Sally (ux-expert)
|
||||
|
||||
Would you like me to load Sally to continue?
|
||||
```
|
||||
Resumes workflow from last position. User can provide completed artifacts.
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows the next recommended agent and action in the current workflow.
|
||||
Shows next recommended agent and action.
|
||||
|
||||
## Workflow Execution Flow
|
||||
## Execution Flow
|
||||
|
||||
### 1. Starting a Workflow
|
||||
1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
|
||||
|
||||
When a workflow is started:
|
||||
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
|
||||
|
||||
1. Load the workflow definition
|
||||
2. Identify the first stage and step
|
||||
3. Transition to the required agent
|
||||
4. Provide context about expected inputs/outputs
|
||||
5. Guide artifact creation
|
||||
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
|
||||
|
||||
### 2. Stage Transitions
|
||||
4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
|
||||
|
||||
After each artifact is completed:
|
||||
## Context Passing
|
||||
|
||||
1. Mark the step as complete
|
||||
2. Check transition conditions
|
||||
3. If stage is complete, move to next stage
|
||||
4. Load the appropriate agent
|
||||
5. Pass relevant artifacts as context
|
||||
When transitioning, pass:
|
||||
|
||||
### 3. Artifact Tracking
|
||||
|
||||
Track all created artifacts:
|
||||
|
||||
```yaml
|
||||
workflow_state:
|
||||
current_workflow: greenfield-fullstack
|
||||
current_stage: planning
|
||||
current_step: 2
|
||||
artifacts:
|
||||
project-brief:
|
||||
status: completed
|
||||
created_by: analyst
|
||||
timestamp: 2024-01-15T10:30:00.000Z
|
||||
prd:
|
||||
status: in-progress
|
||||
created_by: pm
|
||||
started: 2024-01-15T11:00:00.000Z
|
||||
```
|
||||
|
||||
### 4. Workflow Interruption Handling
|
||||
|
||||
When user returns after interruption:
|
||||
|
||||
1. Ask if continuing previous workflow
|
||||
2. Request any completed artifacts
|
||||
3. Analyze provided artifacts
|
||||
4. Determine workflow position
|
||||
5. Suggest next appropriate step
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
User: I'm working on a new app. Here's my PRD and architecture doc.
|
||||
BMad: I see you have a PRD and architecture document. Based on these artifacts,
|
||||
it looks like you're following the greenfield-fullstack workflow and have completed
|
||||
stages 1-3. The next recommended step would be:
|
||||
|
||||
Stage 4: Validation & Refinement
|
||||
- Load Sarah (Product Owner) to validate all artifacts
|
||||
|
||||
Would you like to continue with this workflow?
|
||||
```
|
||||
|
||||
## Workflow Context Passing
|
||||
|
||||
When transitioning between agents, pass:
|
||||
|
||||
1. Previous artifacts created
|
||||
2. Current workflow stage
|
||||
3. Expected outputs
|
||||
4. Any decisions or constraints identified
|
||||
|
||||
Example transition:
|
||||
|
||||
```text
|
||||
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
|
||||
the next step is UX Strategy with Sally.
|
||||
|
||||
/ux-expert
|
||||
|
||||
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
|
||||
I have access to:
|
||||
- Project Brief from Mary
|
||||
- PRD from John
|
||||
|
||||
Let's create the UX strategy and UI specifications. First, let me review
|
||||
the PRD to understand the features we're designing for...
|
||||
```
|
||||
- Previous artifacts
|
||||
- Current workflow stage
|
||||
- Expected outputs
|
||||
- Decisions/constraints
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Some workflows may have multiple paths:
|
||||
Handle conditional paths by asking clarifying questions when needed.
|
||||
|
||||
```yaml
|
||||
conditional_paths:
|
||||
- condition: project_type == 'mobile'
|
||||
next_stage: mobile-specific-design
|
||||
- condition: project_type == 'web'
|
||||
next_stage: web-architecture
|
||||
- default: fullstack-architecture
|
||||
```
|
||||
## Best Practices
|
||||
|
||||
Handle these by asking clarifying questions when needed.
|
||||
1. Show progress
|
||||
2. Explain transitions
|
||||
3. Preserve context
|
||||
4. Allow flexibility
|
||||
5. Track state
|
||||
|
||||
## Workflow Best Practices
|
||||
## Agent Integration
|
||||
|
||||
1. **Always show progress** - Users should know where they are
|
||||
2. **Explain transitions** - Why moving to next agent
|
||||
3. **Preserve context** - Pass relevant information forward
|
||||
4. **Allow flexibility** - Users can skip or modify steps
|
||||
5. **Track everything** - Maintain complete workflow state
|
||||
|
||||
## Integration with Agents
|
||||
|
||||
Each agent should be workflow-aware:
|
||||
|
||||
- Know which workflow is active
|
||||
- Understand their role in the workflow
|
||||
- Access previous artifacts
|
||||
- Know expected outputs
|
||||
- Guide toward workflow goals
|
||||
|
||||
This creates a seamless experience where the entire team works together toward the workflow's objectives.
|
||||
Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
|
||||
==================== END: utils#workflow-management ====================
|
||||
|
||||
==================== START: utils#template-format ====================
|
||||
@@ -3733,13 +3579,9 @@ The story creation is successful when:
|
||||
|
||||
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
|
||||
|
||||
## Context
|
||||
|
||||
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
|
||||
|
||||
## Available Checklists
|
||||
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
|
||||
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
|
||||
|
||||
## Instructions
|
||||
|
||||
@@ -3748,7 +3590,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
|
||||
- If user or the task being run provides a checklist name:
|
||||
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
|
||||
- If multiple matches found, ask user to clarify
|
||||
- Load the appropriate checklist from bmad-core/checklists/
|
||||
- Load the appropriate checklist from {root}/checklists/
|
||||
- If no checklist specified:
|
||||
- Ask the user which checklist they want to use
|
||||
- Present the available options from the files in the checklists folder
|
||||
|
||||
@@ -116,7 +116,7 @@ The analyst will generate comprehensive documentation of everything.
|
||||
|
||||
#### Option A: Full Brownfield Workflow (Recommended for Major Changes)
|
||||
|
||||
**1. Create Brownfield PRD**
|
||||
**1. Create Brownfield PRD**:
|
||||
|
||||
```bash
|
||||
@pm
|
||||
@@ -143,7 +143,7 @@ The PM agent will:
|
||||
- "What are the critical constraints we must respect?"
|
||||
- "What is your timeline and team size?"
|
||||
|
||||
**2. Create Brownfield Architecture**
|
||||
**2. Create Brownfield Architecture**:
|
||||
|
||||
```bash
|
||||
@architect
|
||||
|
||||
5
expansion-packs/bmad-2d-phaser-game-dev/config.yml
Normal file
5
expansion-packs/bmad-2d-phaser-game-dev/config.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
name: bmad-2d-phaser-game-dev
|
||||
version: 1.1.0
|
||||
short-title: 2D game development with Phaser 3 & TypeScript
|
||||
description: 2D Game Development expansion pack for BMAD Method - Phaser 3 & TypeScript focused
|
||||
author: Brian (BMad)
|
||||
@@ -1,45 +0,0 @@
|
||||
name: bmad-2d-phaser-game-dev
|
||||
version: 1.0.0
|
||||
description: 2D Game Development expansion pack for BMAD Method - Phaser 3 & TypeScript focused
|
||||
author: BMAD Team
|
||||
files:
|
||||
- source: agents/game-designer.md
|
||||
destination: .bmad-core/agents/game-designer.md
|
||||
- source: agents/game-developer.md
|
||||
destination: .bmad-core/agents/game-developer.md
|
||||
- source: agents/game-sm.md
|
||||
destination: .bmad-core/agents/game-sm.md
|
||||
- source: team-game-dev.yml
|
||||
destination: .bmad-core/agent-teams/team-game-dev.yml
|
||||
- source: templates/game-design-doc-tmpl.md
|
||||
destination: .bmad-core/templates/game-design-doc-tmpl.md
|
||||
- source: templates/game-architecture-tmpl.md
|
||||
destination: .bmad-core/templates/game-architecture-tmpl.md
|
||||
- source: templates/level-design-doc-tmpl.md
|
||||
destination: .bmad-core/templates/level-design-doc-tmpl.md
|
||||
- source: templates/game-story-tmpl.md
|
||||
destination: .bmad-core/templates/game-story-tmpl.md
|
||||
- source: templates/game-brief-tmpl.md
|
||||
destination: .bmad-core/templates/game-brief-tmpl.md
|
||||
- source: tasks/create-game-story.md
|
||||
destination: .bmad-core/tasks/create-game-story.md
|
||||
- source: tasks/game-design-brainstorming.md
|
||||
destination: .bmad-core/tasks/game-design-brainstorming.md
|
||||
- source: tasks/advanced-elicitation.md
|
||||
destination: .bmad-core/tasks/advanced-elicitation.md
|
||||
- source: checklists/game-story-dod-checklist.md
|
||||
destination: .bmad-core/checklists/game-story-dod-checklist.md
|
||||
- source: checklists/game-design-checklist.md
|
||||
destination: .bmad-core/checklists/game-design-checklist.md
|
||||
- source: data/bmad-kb.md
|
||||
destination: .bmad-core/data/bmad-kb.md
|
||||
- source: data/development-guidelines.md
|
||||
destination: .bmad-core/data/development-guidelines.md
|
||||
- source: workflows/game-dev-greenfield.yml
|
||||
destination: .bmad-core/workflows/game-dev-greenfield.yml
|
||||
- source: workflows/game-prototype.yml
|
||||
destination: .bmad-core/workflows/game-prototype.yml
|
||||
dependencies:
|
||||
- architect
|
||||
- developer
|
||||
- sm
|
||||
5
expansion-packs/bmad-creator-tools/config.yml
Normal file
5
expansion-packs/bmad-creator-tools/config.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
name: bmad-creator-tools
|
||||
version: 1.0.0
|
||||
short-title: Tools for creating BMAD framework components
|
||||
description: Tools for creating and extending BMAD framework components.
|
||||
author: Brian (BMad)
|
||||
@@ -436,17 +436,17 @@ IMPORTANT: Work through plan.md checklist systematically!
|
||||
|
||||
**Step 2: Copy Core Utilities**
|
||||
|
||||
Before proceeding, copy these essential files from bmad-core:
|
||||
Before proceeding, copy these essential files from common:
|
||||
|
||||
```bash
|
||||
# Copy core task utilities
|
||||
cp bmad-core/tasks/create-doc.md expansion-packs/{pack-name}/tasks/
|
||||
cp bmad-core/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/
|
||||
cp common/tasks/create-doc.md expansion-packs/{pack-name}/tasks/
|
||||
cp common/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/
|
||||
|
||||
# Copy core utility files
|
||||
mkdir -p expansion-packs/{pack-name}/utils
|
||||
cp bmad-core/utils/template-format.md expansion-packs/{pack-name}/utils/
|
||||
cp bmad-core/utils/workflow-management.md expansion-packs/{pack-name}/utils/
|
||||
cp common/utils/template-format.md expansion-packs/{pack-name}/utils/
|
||||
cp common/utils/workflow-management.md expansion-packs/{pack-name}/utils/
|
||||
```
|
||||
|
||||
**Step 3: Technical Implementation**
|
||||
5
expansion-packs/bmad-infrastructure-devops/config.yml
Normal file
5
expansion-packs/bmad-infrastructure-devops/config.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
name: bmad-infrastructure-devops
|
||||
version: 1.0.0
|
||||
short-title: Infrastructure and DevOps capabilities
|
||||
description: This expansion pack extends BMAD Method with comprehensive infrastructure and DevOps capabilities. It's designed for teams that need to define, implement, and manage cloud infrastructure alongside their application development.
|
||||
author: Brian (BMad)
|
||||
@@ -1,23 +0,0 @@
|
||||
name: bmad-infrastructure-devops
|
||||
version: 1.0.0
|
||||
description: Infrastructure & DevOps expansion pack for BMAD Method - Platform engineering and cloud infrastructure focused
|
||||
author: BMAD Team
|
||||
files:
|
||||
- source: agents/infra-devops-platform.md
|
||||
destination: .bmad-core/agents/infra-devops-platform.md
|
||||
- source: templates/infrastructure-architecture-tmpl.md
|
||||
destination: .bmad-core/templates/infrastructure-architecture-tmpl.md
|
||||
- source: templates/infrastructure-platform-from-arch-tmpl.md
|
||||
destination: .bmad-core/templates/infrastructure-platform-from-arch-tmpl.md
|
||||
- source: tasks/create-doc.md
|
||||
destination: .bmad-core/tasks/create-doc.md
|
||||
- source: tasks/review-infrastructure.md
|
||||
destination: .bmad-core/tasks/review-infrastructure.md
|
||||
- source: tasks/validate-infrastructure.md
|
||||
destination: .bmad-core/tasks/validate-infrastructure.md
|
||||
- source: checklists/infrastructure-checklist.md
|
||||
destination: .bmad-core/checklists/infrastructure-checklist.md
|
||||
dependencies:
|
||||
- architect
|
||||
- operations-specialist
|
||||
- security-specialist
|
||||
@@ -1,74 +0,0 @@
|
||||
# Create Document from Template Task
|
||||
|
||||
## Purpose
|
||||
|
||||
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona
|
||||
|
||||
## Instructions
|
||||
|
||||
### 1. Identify Template and Context
|
||||
|
||||
- Determine which template to use (user-provided or list available for selection to user)
|
||||
|
||||
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has:
|
||||
|
||||
@{example}
|
||||
dependencies:
|
||||
templates: - prd-tmpl - architecture-tmpl
|
||||
@{/example}
|
||||
|
||||
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with.
|
||||
|
||||
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document
|
||||
- Understand the document purpose and target audience
|
||||
|
||||
### 2. Determine Interaction Mode
|
||||
|
||||
Confirm with the user their preferred interaction style:
|
||||
|
||||
- **Incremental:** Work through chunks of the document.
|
||||
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
|
||||
|
||||
- Replace all {{placeholders}} with actual content
|
||||
- Execute all [[LLM: instructions]] internally
|
||||
- Process `<<REPEAT>>` sections as needed
|
||||
- Evaluate ^^CONDITION^^ blocks and include only if applicable
|
||||
- Use @{examples} for guidance but never output them
|
||||
|
||||
### 5. Content Generation
|
||||
|
||||
- **Incremental Mode**: Present each major section for review before proceeding
|
||||
- **YOLO Mode**: Generate all sections, then review complete document with user
|
||||
- Apply any elicitation protocols specified in template
|
||||
- Incorporate user feedback and iterate as needed
|
||||
|
||||
### 6. Validation
|
||||
|
||||
If template specifies a checklist:
|
||||
|
||||
- Run the appropriate checklist against completed document
|
||||
- Document completion status for each item
|
||||
- Address any deficiencies found
|
||||
- Present validation summary to user
|
||||
|
||||
### 7. Final Presentation
|
||||
|
||||
- Present clean, formatted content only
|
||||
- Ensure all sections are complete
|
||||
- DO NOT truncate or summarize content
|
||||
- Begin directly with document content (no preamble)
|
||||
- Include any handoff prompts specified in template
|
||||
|
||||
## Important Notes
|
||||
|
||||
- Template markup is for AI processing only - never expose to users
|
||||
@@ -1,74 +0,0 @@
|
||||
# Create Document from Template Task
|
||||
|
||||
## Purpose
|
||||
|
||||
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona
|
||||
|
||||
## Instructions
|
||||
|
||||
### 1. Identify Template and Context
|
||||
|
||||
- Determine which template to use (user-provided or list available for selection to user)
|
||||
|
||||
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has:
|
||||
|
||||
@{example}
|
||||
dependencies:
|
||||
templates: - prd-tmpl - architecture-tmpl
|
||||
@{/example}
|
||||
|
||||
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with.
|
||||
|
||||
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document
|
||||
- Understand the document purpose and target audience
|
||||
|
||||
### 2. Determine Interaction Mode
|
||||
|
||||
Confirm with the user their preferred interaction style:
|
||||
|
||||
- **Incremental:** Work through chunks of the document.
|
||||
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
|
||||
|
||||
### 3. Execute Template
|
||||
|
||||
- Load specified template from `templates#*` or the /templates directory
|
||||
- Follow ALL embedded LLM instructions within the template
|
||||
- Process template markup according to `utils#template-format` conventions
|
||||
|
||||
### 4. Template Processing Rules
|
||||
|
||||
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
|
||||
|
||||
- Replace all {{placeholders}} with actual content
|
||||
- Execute all [[LLM: instructions]] internally
|
||||
- Process `<<REPEAT>>` sections as needed
|
||||
- Evaluate ^^CONDITION^^ blocks and include only if applicable
|
||||
- Use @{examples} for guidance but never output them
|
||||
|
||||
### 5. Content Generation
|
||||
|
||||
- **Incremental Mode**: Present each major section for review before proceeding
|
||||
- **YOLO Mode**: Generate all sections, then review complete document with user
|
||||
- Apply any elicitation protocols specified in template
|
||||
- Incorporate user feedback and iterate as needed
|
||||
|
||||
### 6. Validation
|
||||
|
||||
If template specifies a checklist:
|
||||
|
||||
- Run the appropriate checklist against completed document
|
||||
- Document completion status for each item
|
||||
- Address any deficiencies found
|
||||
- Present validation summary to user
|
||||
|
||||
### 7. Final Presentation
|
||||
|
||||
- Present clean, formatted content only
|
||||
- Ensure all sections are complete
|
||||
- DO NOT truncate or summarize content
|
||||
- Begin directly with document content (no preamble)
|
||||
- Include any handoff prompts specified in template
|
||||
|
||||
## Important Notes
|
||||
|
||||
- Template markup is for AI processing only - never expose to users
|
||||
@@ -1,12 +0,0 @@
|
||||
name: bmad-creator-tools
|
||||
version: 1.0.0
|
||||
description: Tools for creating and extending BMAD framework components
|
||||
type: creator-tools
|
||||
compatibility:
|
||||
bmad-version: '>=4.0.0'
|
||||
components:
|
||||
agents:
|
||||
- bmad-the-creator
|
||||
tasks:
|
||||
- create-agent
|
||||
- generate-expansion-pack
|
||||
@@ -1,26 +0,0 @@
|
||||
# Template Format Conventions
|
||||
|
||||
Templates in the BMAD method use standardized markup for AI processing. These conventions ensure consistent document generation.
|
||||
|
||||
## Template Markup Elements
|
||||
|
||||
- **{{placeholders}}**: Variables to be replaced with actual content
|
||||
- **[[LLM: instructions]]**: Internal processing instructions for AI agents (never shown to users)
|
||||
- **REPEAT** sections: Content blocks that may be repeated as needed
|
||||
- **^^CONDITION^^** blocks: Conditional content included only if criteria are met
|
||||
- **@{examples}**: Example content for guidance (never output to users)
|
||||
|
||||
## Processing Rules
|
||||
|
||||
- Replace all {{placeholders}} with project-specific content
|
||||
- Execute all [[LLM: instructions]] internally without showing users
|
||||
- Process conditional and repeat blocks as specified
|
||||
- Use examples for guidance but never include them in final output
|
||||
- Present only clean, formatted content to users
|
||||
|
||||
## Critical Guidelines
|
||||
|
||||
- **NEVER display template markup, LLM instructions, or examples to users**
|
||||
- Template elements are for AI processing only
|
||||
- Focus on faithful template execution and clean output
|
||||
- All template-specific instructions are embedded within templates
|
||||
@@ -1,223 +0,0 @@
|
||||
# Workflow Management
|
||||
|
||||
This utility enables the BMAD orchestrator to manage and execute team workflows.
|
||||
|
||||
## Important: Dynamic Workflow Loading
|
||||
|
||||
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
|
||||
|
||||
**Critical Distinction**:
|
||||
|
||||
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
|
||||
- Use `/agent-list` to show agents in the current bundle
|
||||
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
|
||||
|
||||
### Workflow Descriptions
|
||||
|
||||
When displaying workflows, use these descriptions based on the workflow ID:
|
||||
|
||||
- **greenfield-fullstack**: Build a new full-stack application from concept to development
|
||||
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
|
||||
- **greenfield-service**: Build a new backend service or API from concept to development
|
||||
- **brownfield-service**: Enhance an existing backend service or API
|
||||
- **greenfield-ui**: Build a new frontend/UI application from concept to development
|
||||
- **brownfield-ui**: Enhance an existing frontend/UI application
|
||||
|
||||
## Workflow Commands
|
||||
|
||||
### /workflows
|
||||
|
||||
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
|
||||
|
||||
- greenfield-fullstack
|
||||
- brownfield-fullstack
|
||||
- greenfield-service
|
||||
- brownfield-service
|
||||
- greenfield-ui
|
||||
- brownfield-ui
|
||||
|
||||
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
|
||||
|
||||
Example response format:
|
||||
|
||||
```text
|
||||
Available workflows for [Team Name]:
|
||||
1. [workflow-id] - [Brief description based on workflow type]
|
||||
2. [workflow-id] - [Brief description based on workflow type]
|
||||
[... etc. ...]
|
||||
|
||||
Use /workflow-start {number or id} to begin a workflow.
|
||||
```
|
||||
|
||||
### /workflow-start {workflow-id}
|
||||
|
||||
Starts a specific workflow and transitions to the first agent.
|
||||
|
||||
Example: `/workflow-start greenfield-fullstack`
|
||||
|
||||
### /workflow-status
|
||||
|
||||
Shows current workflow progress, completed artifacts, and next steps.
|
||||
|
||||
Example response:
|
||||
|
||||
```text
|
||||
Current Workflow: Greenfield Full-Stack Development
|
||||
Stage: Product Planning (2 of 6)
|
||||
Completed:
|
||||
✓ Discovery & Requirements
|
||||
- project-brief (completed by Mary)
|
||||
|
||||
In Progress:
|
||||
⚡ Product Planning
|
||||
- Create PRD (John) - awaiting input
|
||||
|
||||
Next: Technical Architecture
|
||||
```
|
||||
|
||||
### /workflow-resume
|
||||
|
||||
Resumes a workflow from where it left off, useful when starting a new chat.
|
||||
|
||||
User can provide completed artifacts:
|
||||
|
||||
```text
|
||||
User: /workflow-resume greenfield-fullstack
|
||||
I have completed: project-brief, PRD
|
||||
BMad: I see you've completed Discovery and part of Product Planning.
|
||||
Based on the greenfield-fullstack workflow, the next step is:
|
||||
- UX Strategy with Sally (ux-expert)
|
||||
|
||||
Would you like me to load Sally to continue?
|
||||
```
|
||||
|
||||
### /workflow-next
|
||||
|
||||
Shows the next recommended agent and action in the current workflow.
|
||||
|
||||
## Workflow Execution Flow
|
||||
|
||||
### 1. Starting a Workflow
|
||||
|
||||
When a workflow is started:
|
||||
|
||||
1. Load the workflow definition
|
||||
2. Identify the first stage and step
|
||||
3. Transition to the required agent
|
||||
4. Provide context about expected inputs/outputs
|
||||
5. Guide artifact creation
|
||||
|
||||
### 2. Stage Transitions
|
||||
|
||||
After each artifact is completed:
|
||||
|
||||
1. Mark the step as complete
|
||||
2. Check transition conditions
|
||||
3. If stage is complete, move to next stage
|
||||
4. Load the appropriate agent
|
||||
5. Pass relevant artifacts as context
|
||||
|
||||
### 3. Artifact Tracking
|
||||
|
||||
Track all created artifacts:
|
||||
|
||||
```yaml
|
||||
workflow_state:
|
||||
current_workflow: greenfield-fullstack
|
||||
current_stage: planning
|
||||
current_step: 2
|
||||
artifacts:
|
||||
project-brief:
|
||||
status: completed
|
||||
created_by: analyst
|
||||
timestamp: 2024-01-15T10:30:00.000Z
|
||||
prd:
|
||||
status: in-progress
|
||||
created_by: pm
|
||||
started: 2024-01-15T11:00:00.000Z
|
||||
```
|
||||
|
||||
### 4. Workflow Interruption Handling
|
||||
|
||||
When user returns after interruption:
|
||||
|
||||
1. Ask if continuing previous workflow
|
||||
2. Request any completed artifacts
|
||||
3. Analyze provided artifacts
|
||||
4. Determine workflow position
|
||||
5. Suggest next appropriate step
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
User: I'm working on a new app. Here's my PRD and architecture doc.
|
||||
BMad: I see you have a PRD and architecture document. Based on these artifacts,
|
||||
it looks like you're following the greenfield-fullstack workflow and have completed
|
||||
stages 1-3. The next recommended step would be:
|
||||
|
||||
Stage 4: Validation & Refinement
|
||||
- Load Sarah (Product Owner) to validate all artifacts
|
||||
|
||||
Would you like to continue with this workflow?
|
||||
```
|
||||
|
||||
## Workflow Context Passing
|
||||
|
||||
When transitioning between agents, pass:
|
||||
|
||||
1. Previous artifacts created
|
||||
2. Current workflow stage
|
||||
3. Expected outputs
|
||||
4. Any decisions or constraints identified
|
||||
|
||||
Example transition:
|
||||
|
||||
```text
|
||||
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
|
||||
the next step is UX Strategy with Sally.
|
||||
|
||||
/ux-expert
|
||||
|
||||
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
|
||||
I have access to:
|
||||
- Project Brief from Mary
|
||||
- PRD from John
|
||||
|
||||
Let's create the UX strategy and UI specifications. First, let me review
|
||||
the PRD to understand the features we're designing for...
|
||||
```
|
||||
|
||||
## Multi-Path Workflows
|
||||
|
||||
Some workflows may have multiple paths:
|
||||
|
||||
```yaml
|
||||
conditional_paths:
|
||||
- condition: project_type == 'mobile'
|
||||
next_stage: mobile-specific-design
|
||||
- condition: project_type == 'web'
|
||||
next_stage: web-architecture
|
||||
- default: fullstack-architecture
|
||||
```
|
||||
|
||||
Handle these by asking clarifying questions when needed.
|
||||
|
||||
## Workflow Best Practices
|
||||
|
||||
1. **Always show progress** - Users should know where they are
|
||||
2. **Explain transitions** - Why moving to next agent
|
||||
3. **Preserve context** - Pass relevant information forward
|
||||
4. **Allow flexibility** - Users can skip or modify steps
|
||||
5. **Track everything** - Maintain complete workflow state
|
||||
|
||||
## Integration with Agents
|
||||
|
||||
Each agent should be workflow-aware:
|
||||
|
||||
- Know which workflow is active
|
||||
- Understand their role in the workflow
|
||||
- Access previous artifacts
|
||||
- Know expected outputs
|
||||
- Guide toward workflow goals
|
||||
|
||||
This creates a seamless experience where the entire team works together toward the workflow's objectives.
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bmad-method",
|
||||
"version": "4.17.0",
|
||||
"version": "4.19.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bmad-method",
|
||||
"version": "4.17.0",
|
||||
"version": "4.19.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@kayvan/markdown-tree-parser": "^1.5.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bmad-method",
|
||||
"version": "4.17.0",
|
||||
"version": "4.19.0",
|
||||
"description": "Breakthrough Method of Agile AI-driven Development",
|
||||
"main": "tools/cli.js",
|
||||
"bin": {
|
||||
|
||||
41
test-ide-paths.js
Normal file
41
test-ide-paths.js
Normal file
@@ -0,0 +1,41 @@
|
||||
// Test script to verify IDE setup paths for expansion pack agents
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
|
||||
// Simulate the findAgentPath logic
|
||||
function simulateFindAgentPath(agentId, installDir) {
|
||||
const possiblePaths = [
|
||||
path.join(installDir, ".bmad-core", "agents", `${agentId}.md`),
|
||||
path.join(installDir, "agents", `${agentId}.md`),
|
||||
// Expansion pack paths
|
||||
path.join(installDir, ".bmad-2d-phaser-game-dev", "agents", `${agentId}.md`),
|
||||
path.join(installDir, ".bmad-infrastructure-devops", "agents", `${agentId}.md`),
|
||||
path.join(installDir, ".bmad-creator-tools", "agents", `${agentId}.md`)
|
||||
];
|
||||
|
||||
// Simulate finding the agent in an expansion pack
|
||||
if (agentId === 'game-developer') {
|
||||
return path.join(installDir, ".bmad-2d-phaser-game-dev", "agents", `${agentId}.md`);
|
||||
}
|
||||
|
||||
// Default to core
|
||||
return path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
|
||||
}
|
||||
|
||||
// Test different scenarios
|
||||
const testDir = '/project';
|
||||
const agents = ['dev', 'game-developer', 'infra-devops-platform'];
|
||||
|
||||
console.log('Testing IDE path references:\n');
|
||||
|
||||
agents.forEach(agentId => {
|
||||
const agentPath = simulateFindAgentPath(agentId, testDir);
|
||||
const relativePath = path.relative(testDir, agentPath).replace(/\\/g, '/');
|
||||
|
||||
console.log(`Agent: ${agentId}`);
|
||||
console.log(` Full path: ${agentPath}`);
|
||||
console.log(` Relative path: ${relativePath}`);
|
||||
console.log(` Roo customInstructions: CRITICAL Read the full YML from ${relativePath} ...`);
|
||||
console.log(` Cursor MDC reference: [${relativePath}](mdc:${relativePath})`);
|
||||
console.log('');
|
||||
});
|
||||
@@ -9,8 +9,8 @@ class WebBuilder {
|
||||
this.resolver = new DependencyResolver(this.rootDir);
|
||||
this.templatePath = path.join(
|
||||
this.rootDir,
|
||||
"bmad-core",
|
||||
"utils",
|
||||
"tools",
|
||||
"md-assets",
|
||||
"web-agent-startup-instructions.md"
|
||||
);
|
||||
}
|
||||
@@ -117,35 +117,39 @@ class WebBuilder {
|
||||
const yamlContent = yamlMatch[1];
|
||||
const yamlStartIndex = content.indexOf(yamlMatch[0]);
|
||||
const yamlEndIndex = yamlStartIndex + yamlMatch[0].length;
|
||||
|
||||
|
||||
// Parse YAML and remove root and IDE-FILE-RESOLUTION properties
|
||||
try {
|
||||
const yaml = require("js-yaml");
|
||||
const parsed = yaml.load(yamlContent);
|
||||
|
||||
|
||||
// Remove the properties if they exist at root level
|
||||
delete parsed.root;
|
||||
delete parsed['IDE-FILE-RESOLUTION'];
|
||||
delete parsed['REQUEST-RESOLUTION'];
|
||||
|
||||
delete parsed["IDE-FILE-RESOLUTION"];
|
||||
delete parsed["REQUEST-RESOLUTION"];
|
||||
|
||||
// Also remove from activation-instructions if they exist
|
||||
if (parsed['activation-instructions'] && Array.isArray(parsed['activation-instructions'])) {
|
||||
parsed['activation-instructions'] = parsed['activation-instructions'].filter(instruction => {
|
||||
return !instruction.startsWith('IDE-FILE-RESOLUTION:') &&
|
||||
!instruction.startsWith('REQUEST-RESOLUTION:');
|
||||
});
|
||||
if (parsed["activation-instructions"] && Array.isArray(parsed["activation-instructions"])) {
|
||||
parsed["activation-instructions"] = parsed["activation-instructions"].filter(
|
||||
(instruction) => {
|
||||
return (
|
||||
!instruction.startsWith("IDE-FILE-RESOLUTION:") &&
|
||||
!instruction.startsWith("REQUEST-RESOLUTION:")
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Reconstruct the YAML
|
||||
const cleanedYaml = yaml.dump(parsed, { lineWidth: -1 });
|
||||
|
||||
|
||||
// Get the agent name from the YAML for the header
|
||||
const agentName = parsed.agent?.id || 'agent';
|
||||
|
||||
const agentName = parsed.agent?.id || "agent";
|
||||
|
||||
// Build the new content with just the agent header and YAML
|
||||
const newHeader = `# ${agentName}\n\nCRITICAL: Read the full YML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:\n\n`;
|
||||
const afterYaml = content.substring(yamlEndIndex);
|
||||
|
||||
|
||||
return newHeader + "```yaml\n" + cleanedYaml.trim() + "\n```" + afterYaml;
|
||||
} catch (error) {
|
||||
console.warn("Failed to process agent YAML:", error.message);
|
||||
@@ -156,12 +160,12 @@ class WebBuilder {
|
||||
|
||||
formatSection(path, content) {
|
||||
const separator = "====================";
|
||||
|
||||
|
||||
// Process agent content if this is an agent file
|
||||
if (path.startsWith("agents#")) {
|
||||
content = this.processAgentContent(content);
|
||||
}
|
||||
|
||||
|
||||
return [
|
||||
`${separator} START: ${path} ${separator}`,
|
||||
content.trim(),
|
||||
@@ -341,6 +345,28 @@ class WebBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
// If not found in core, try common folder
|
||||
if (!found) {
|
||||
for (const ext of extensions) {
|
||||
const commonPath = path.join(
|
||||
this.rootDir,
|
||||
"common",
|
||||
resourceType,
|
||||
`${resourceName}${ext}`
|
||||
);
|
||||
try {
|
||||
const commonContent = await fs.readFile(commonPath, "utf8");
|
||||
sections.push(
|
||||
this.formatSection(`${resourceType}#${resourceName}`, commonContent)
|
||||
);
|
||||
found = true;
|
||||
break;
|
||||
} catch (error) {
|
||||
// Not in common either, continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
console.warn(
|
||||
` ⚠ Dependency ${resourceType}#${resourceName} not found in expansion pack or core`
|
||||
@@ -516,6 +542,21 @@ class WebBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
// If not found in core, try common folder
|
||||
if (!found) {
|
||||
for (const ext of extensions) {
|
||||
const commonPath = path.join(this.rootDir, "common", dep.type, `${dep.name}${ext}`);
|
||||
try {
|
||||
const content = await fs.readFile(commonPath, "utf8");
|
||||
sections.push(this.formatSection(key, content));
|
||||
found = true;
|
||||
break;
|
||||
} catch (error) {
|
||||
// Not in common either, continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
console.warn(` ⚠ Dependency ${key} not found in expansion pack or core`);
|
||||
}
|
||||
|
||||
58
tools/installer/config/ide-agent-config.yml
Normal file
58
tools/installer/config/ide-agent-config.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
# IDE-specific agent configurations
|
||||
# This file defines agent-specific settings for different IDEs
|
||||
|
||||
# Roo Code file permissions
|
||||
# Each agent can have restricted file access based on regex patterns
|
||||
# If an agent is not listed here, it gets full edit access
|
||||
roo-permissions:
|
||||
# Core agents
|
||||
analyst:
|
||||
fileRegex: "\\.(md|txt)$"
|
||||
description: "Documentation and text files"
|
||||
pm:
|
||||
fileRegex: "\\.(md|txt)$"
|
||||
description: "Product documentation"
|
||||
architect:
|
||||
fileRegex: "\\.(md|txt|yml|yaml|json)$"
|
||||
description: "Architecture docs and configs"
|
||||
qa:
|
||||
fileRegex: "\\.(test|spec)\\.(js|ts|jsx|tsx)$|\\.md$"
|
||||
description: "Test files and documentation"
|
||||
ux-expert:
|
||||
fileRegex: "\\.(md|css|scss|html|jsx|tsx)$"
|
||||
description: "Design-related files"
|
||||
po:
|
||||
fileRegex: "\\.(md|txt)$"
|
||||
description: "Story and requirement docs"
|
||||
sm:
|
||||
fileRegex: "\\.(md|txt)$"
|
||||
description: "Process and planning docs"
|
||||
# Expansion pack agents
|
||||
game-designer:
|
||||
fileRegex: "\\.(md|txt|json|yaml|yml)$"
|
||||
description: "Game design documents and configs"
|
||||
game-sm:
|
||||
fileRegex: "\\.(md|txt)$"
|
||||
description: "Game project management docs"
|
||||
|
||||
# Cline agent ordering
|
||||
# Lower numbers appear first in the list
|
||||
# Agents not listed get order 99
|
||||
cline-order:
|
||||
# Core agents
|
||||
bmad-master: 1
|
||||
bmad-orchestrator: 2
|
||||
pm: 3
|
||||
analyst: 4
|
||||
architect: 5
|
||||
po: 6
|
||||
sm: 7
|
||||
dev: 8
|
||||
qa: 9
|
||||
ux-expert: 10
|
||||
# Expansion pack agents
|
||||
bmad-the-creator: 11
|
||||
game-designer: 12
|
||||
game-developer: 13
|
||||
game-sm: 14
|
||||
infra-devops-platform: 15
|
||||
@@ -8,50 +8,6 @@ installation-options:
|
||||
name: Single Agent
|
||||
description: Select and install a single agent with its dependencies
|
||||
action: copy-agent
|
||||
agent-dependencies:
|
||||
core-files:
|
||||
- bmad-core/utils/template-format.md
|
||||
dev:
|
||||
- bmad-core/templates/story-tmpl.md
|
||||
- bmad-core/checklists/story-dod-checklist.md
|
||||
pm:
|
||||
- bmad-core/templates/prd-tmpl.md
|
||||
- bmad-core/templates/brownfield-prd-tmpl.md
|
||||
- bmad-core/checklists/pm-checklist.md
|
||||
- bmad-core/checklists/change-checklist.md
|
||||
- bmad-core/tasks/advanced-elicitation.md
|
||||
- bmad-core/tasks/create-doc.md
|
||||
- bmad-core/tasks/correct-course.md
|
||||
- bmad-core/tasks/create-deep-research-prompt.md
|
||||
- bmad-core/tasks/brownfield-create-epic.md
|
||||
- bmad-core/tasks/brownfield-create-story.md
|
||||
- bmad-core/tasks/execute-checklist.md
|
||||
- bmad-core/tasks/shard-doc.md
|
||||
architect:
|
||||
- bmad-core/templates/architecture-tmpl.md
|
||||
- bmad-core/checklists/architect-checklist.md
|
||||
sm:
|
||||
- bmad-core/templates/story-tmpl.md
|
||||
- bmad-core/checklists/story-draft-checklist.md
|
||||
- bmad-core/workflows/*.yml
|
||||
po:
|
||||
- bmad-core/checklists/po-master-checklist.md
|
||||
- bmad-core/templates/acceptance-criteria-tmpl.md
|
||||
analyst:
|
||||
- bmad-core/templates/prd-tmpl.md
|
||||
- bmad-core/tasks/advanced-elicitation.md
|
||||
qa:
|
||||
- bmad-core/checklists/story-dod-checklist.md
|
||||
- bmad-core/templates/test-plan-tmpl.md
|
||||
ux-expert:
|
||||
- bmad-core/templates/ux-tmpl.md
|
||||
bmad-master:
|
||||
- bmad-core/templates/*.md
|
||||
- bmad-core/tasks/*.md
|
||||
- bmad-core/schemas/*.yml
|
||||
bmad-orchestrator:
|
||||
- bmad-core/agent-teams/*.yml
|
||||
- bmad-core/workflows/*.yml
|
||||
ide-configurations:
|
||||
cursor:
|
||||
name: Cursor
|
||||
@@ -111,44 +67,3 @@ ide-configurations:
|
||||
# 2. It also configures .gemini/settings.json to load all agent files.
|
||||
# 3. Simply mention the agent in your prompt (e.g., "As @dev, ...").
|
||||
# 4. The Gemini CLI will automatically have the context for that agent.
|
||||
available-agents:
|
||||
- id: analyst
|
||||
name: Business Analyst
|
||||
file: bmad-core/agents/analyst.md
|
||||
description: Requirements gathering and analysis
|
||||
- id: pm
|
||||
name: Product Manager
|
||||
file: bmad-core/agents/pm.md
|
||||
description: Product strategy and roadmap planning
|
||||
- id: architect
|
||||
name: Solution Architect
|
||||
file: bmad-core/agents/architect.md
|
||||
description: Technical design and architecture
|
||||
- id: po
|
||||
name: Product Owner
|
||||
file: bmad-core/agents/po.md
|
||||
description: Backlog management and prioritization
|
||||
- id: sm
|
||||
name: Scrum Master
|
||||
file: bmad-core/agents/sm.md
|
||||
description: Agile process and story creation
|
||||
- id: dev
|
||||
name: Developer
|
||||
file: bmad-core/agents/dev.md
|
||||
description: Code implementation and testing
|
||||
- id: qa
|
||||
name: QA Engineer
|
||||
file: bmad-core/agents/qa.md
|
||||
description: Quality assurance and testing
|
||||
- id: ux-expert
|
||||
name: UX Expert
|
||||
file: bmad-core/agents/ux-expert.md
|
||||
description: User experience design
|
||||
- id: bmad-master
|
||||
name: BMAD Master
|
||||
file: bmad-core/agents/bmad-master.md
|
||||
description: BMAD framework expert and guide
|
||||
- id: bmad-orchestrator
|
||||
name: BMAD Orchestrator
|
||||
file: bmad-core/agents/bmad-orchestrator.md
|
||||
description: Multi-agent workflow coordinator
|
||||
|
||||
@@ -26,8 +26,47 @@ class ConfigLoader {
|
||||
}
|
||||
|
||||
async getAvailableAgents() {
|
||||
const config = await this.load();
|
||||
return config['available-agents'] || [];
|
||||
const agentsDir = path.join(this.getBmadCorePath(), 'agents');
|
||||
|
||||
try {
|
||||
const entries = await fs.readdir(agentsDir, { withFileTypes: true });
|
||||
const agents = [];
|
||||
|
||||
for (const entry of entries) {
|
||||
if (entry.isFile() && entry.name.endsWith('.md')) {
|
||||
const agentPath = path.join(agentsDir, entry.name);
|
||||
const agentId = path.basename(entry.name, '.md');
|
||||
|
||||
try {
|
||||
const agentContent = await fs.readFile(agentPath, 'utf8');
|
||||
|
||||
// Extract YAML block from agent file
|
||||
const yamlMatch = agentContent.match(/```yml\n([\s\S]*?)\n```/);
|
||||
if (yamlMatch) {
|
||||
const yamlContent = yaml.load(yamlMatch[1]);
|
||||
const agentConfig = yamlContent.agent || {};
|
||||
|
||||
agents.push({
|
||||
id: agentId,
|
||||
name: agentConfig.title || agentConfig.name || agentId,
|
||||
file: `bmad-core/agents/${entry.name}`,
|
||||
description: agentConfig.whenToUse || 'No description available'
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(`Failed to read agent ${entry.name}: ${error.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort agents by name for consistent display
|
||||
agents.sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
return agents;
|
||||
} catch (error) {
|
||||
console.warn(`Failed to read agents directory: ${error.message}`);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
async getAvailableExpansionPacks() {
|
||||
@@ -38,24 +77,45 @@ class ConfigLoader {
|
||||
const expansionPacks = [];
|
||||
|
||||
for (const entry of entries) {
|
||||
if (entry.isDirectory()) {
|
||||
const manifestPath = path.join(expansionPacksDir, entry.name, 'manifest.yml');
|
||||
if (entry.isDirectory() && !entry.name.startsWith('.')) {
|
||||
const packPath = path.join(expansionPacksDir, entry.name);
|
||||
const configPath = path.join(packPath, 'config.yml');
|
||||
|
||||
try {
|
||||
const manifestContent = await fs.readFile(manifestPath, 'utf8');
|
||||
const manifest = yaml.load(manifestContent);
|
||||
// Read config.yml
|
||||
const configContent = await fs.readFile(configPath, 'utf8');
|
||||
const config = yaml.load(configContent);
|
||||
|
||||
expansionPacks.push({
|
||||
id: entry.name,
|
||||
name: manifest.name || entry.name,
|
||||
description: manifest.description || 'No description available',
|
||||
version: manifest.version || '1.0.0',
|
||||
author: manifest.author || 'Unknown',
|
||||
manifestPath: manifestPath,
|
||||
dependencies: manifest.dependencies || []
|
||||
name: config.name || entry.name,
|
||||
description: config['short-title'] || config.description || 'No description available',
|
||||
fullDescription: config.description || config['short-title'] || 'No description available',
|
||||
version: config.version || '1.0.0',
|
||||
author: config.author || 'BMAD Team',
|
||||
packPath: packPath,
|
||||
dependencies: config.dependencies?.agents || []
|
||||
});
|
||||
} catch (error) {
|
||||
console.warn(`Failed to read manifest for expansion pack ${entry.name}: ${error.message}`);
|
||||
// Fallback if config.yml doesn't exist or can't be read
|
||||
console.warn(`Failed to read config for expansion pack ${entry.name}: ${error.message}`);
|
||||
|
||||
// Try to derive info from directory name as fallback
|
||||
const name = entry.name
|
||||
.split('-')
|
||||
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
||||
.join(' ');
|
||||
|
||||
expansionPacks.push({
|
||||
id: entry.name,
|
||||
name: name,
|
||||
description: 'No description available',
|
||||
fullDescription: 'No description available',
|
||||
version: '1.0.0',
|
||||
author: 'BMAD Team',
|
||||
packPath: packPath,
|
||||
dependencies: []
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,36 +132,24 @@ class ConfigLoader {
|
||||
const DependencyResolver = require('../../lib/dependency-resolver');
|
||||
const resolver = new DependencyResolver(path.join(__dirname, '..', '..', '..'));
|
||||
|
||||
try {
|
||||
const agentDeps = await resolver.resolveAgentDependencies(agentId);
|
||||
|
||||
// Convert to flat list of file paths
|
||||
const depPaths = [];
|
||||
|
||||
// Core files and utilities are included automatically by DependencyResolver
|
||||
|
||||
// Add agent file itself is already handled by installer
|
||||
|
||||
// Add all resolved resources
|
||||
for (const resource of agentDeps.resources) {
|
||||
const filePath = `.bmad-core/${resource.type}/${resource.id}.md`;
|
||||
if (!depPaths.includes(filePath)) {
|
||||
depPaths.push(filePath);
|
||||
}
|
||||
const agentDeps = await resolver.resolveAgentDependencies(agentId);
|
||||
|
||||
// Convert to flat list of file paths
|
||||
const depPaths = [];
|
||||
|
||||
// Core files and utilities are included automatically by DependencyResolver
|
||||
|
||||
// Add agent file itself is already handled by installer
|
||||
|
||||
// Add all resolved resources
|
||||
for (const resource of agentDeps.resources) {
|
||||
const filePath = `.bmad-core/${resource.type}/${resource.id}.md`;
|
||||
if (!depPaths.includes(filePath)) {
|
||||
depPaths.push(filePath);
|
||||
}
|
||||
|
||||
return depPaths;
|
||||
} catch (error) {
|
||||
console.warn(`Failed to dynamically resolve dependencies for ${agentId}: ${error.message}`);
|
||||
|
||||
// Fall back to static config
|
||||
const config = await this.load();
|
||||
const dependencies = config['agent-dependencies'] || {};
|
||||
const coreFiles = dependencies['core-files'] || [];
|
||||
const agentDeps = dependencies[agentId] || [];
|
||||
|
||||
return [...coreFiles, ...agentDeps];
|
||||
}
|
||||
|
||||
return depPaths;
|
||||
}
|
||||
|
||||
async getIdeConfiguration(ide) {
|
||||
|
||||
@@ -90,6 +90,7 @@ class FileManager {
|
||||
agent: config.agent || null,
|
||||
ide_setup: config.ide || null,
|
||||
ides_setup: config.ides || [],
|
||||
expansion_packs: config.expansionPacks || [],
|
||||
files: [],
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const path = require("path");
|
||||
const fs = require("fs-extra");
|
||||
const yaml = require("js-yaml");
|
||||
const fileManager = require("./file-manager");
|
||||
const configLoader = require("./config-loader");
|
||||
|
||||
@@ -13,6 +15,27 @@ async function initializeModules() {
|
||||
}
|
||||
|
||||
class IdeSetup {
|
||||
constructor() {
|
||||
this.ideAgentConfig = null;
|
||||
}
|
||||
|
||||
async loadIdeAgentConfig() {
|
||||
if (this.ideAgentConfig) return this.ideAgentConfig;
|
||||
|
||||
try {
|
||||
const configPath = path.join(__dirname, '..', 'config', 'ide-agent-config.yml');
|
||||
const configContent = await fs.readFile(configPath, 'utf8');
|
||||
this.ideAgentConfig = yaml.load(configContent);
|
||||
return this.ideAgentConfig;
|
||||
} catch (error) {
|
||||
console.warn('Failed to load IDE agent configuration, using defaults');
|
||||
return {
|
||||
'roo-permissions': {},
|
||||
'cline-order': {}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
async setup(ide, installDir, selectedAgent = null) {
|
||||
await initializeModules();
|
||||
const ideConfig = await configLoader.getIdeConfiguration(ide);
|
||||
@@ -48,13 +71,10 @@ class IdeSetup {
|
||||
await fileManager.ensureDirectory(cursorRulesDir);
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
|
||||
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
|
||||
if (!(await fileManager.pathExists(agentPath))) {
|
||||
agentPath = path.join(installDir, "agents", `${agentId}.md`);
|
||||
}
|
||||
// Find the agent file
|
||||
const agentPath = await this.findAgentPath(agentId, installDir);
|
||||
|
||||
if (await fileManager.pathExists(agentPath)) {
|
||||
if (agentPath) {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
const mdcPath = path.join(cursorRulesDir, `${agentId}.mdc`);
|
||||
|
||||
@@ -65,8 +85,9 @@ class IdeSetup {
|
||||
mdcContent += "alwaysApply: false\n";
|
||||
mdcContent += "---\n\n";
|
||||
mdcContent += `# ${agentId.toUpperCase()} Agent Rule\n\n`;
|
||||
mdcContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${this.getAgentTitle(
|
||||
agentId
|
||||
mdcContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${await this.getAgentTitle(
|
||||
agentId,
|
||||
installDir
|
||||
)} agent persona.\n\n`;
|
||||
mdcContent += "## Agent Activation\n\n";
|
||||
mdcContent +=
|
||||
@@ -82,10 +103,12 @@ class IdeSetup {
|
||||
}
|
||||
mdcContent += "\n```\n\n";
|
||||
mdcContent += "## File Reference\n\n";
|
||||
mdcContent += `The complete agent definition is available in [.bmad-core/agents/${agentId}.md](mdc:.bmad-core/agents/${agentId}.md).\n\n`;
|
||||
const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
|
||||
mdcContent += `The complete agent definition is available in [${relativePath}](mdc:${relativePath}).\n\n`;
|
||||
mdcContent += "## Usage\n\n";
|
||||
mdcContent += `When the user types \`@${agentId}\`, activate this ${this.getAgentTitle(
|
||||
agentId
|
||||
mdcContent += `When the user types \`@${agentId}\`, activate this ${await this.getAgentTitle(
|
||||
agentId,
|
||||
installDir
|
||||
)} persona and follow all instructions defined in the YML configuration above.\n`;
|
||||
|
||||
await fileManager.writeFile(mdcPath, mdcContent);
|
||||
@@ -105,14 +128,11 @@ class IdeSetup {
|
||||
await fileManager.ensureDirectory(commandsDir);
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
|
||||
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
|
||||
if (!(await fileManager.pathExists(agentPath))) {
|
||||
agentPath = path.join(installDir, "agents", `${agentId}.md`);
|
||||
}
|
||||
// Find the agent file
|
||||
const agentPath = await this.findAgentPath(agentId, installDir);
|
||||
const commandPath = path.join(commandsDir, `${agentId}.md`);
|
||||
|
||||
if (await fileManager.pathExists(agentPath)) {
|
||||
if (agentPath) {
|
||||
// Create command file with agent content
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
|
||||
@@ -138,20 +158,18 @@ class IdeSetup {
|
||||
await fileManager.ensureDirectory(windsurfRulesDir);
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
|
||||
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
|
||||
if (!(await fileManager.pathExists(agentPath))) {
|
||||
agentPath = path.join(installDir, "agents", `${agentId}.md`);
|
||||
}
|
||||
// Find the agent file
|
||||
const agentPath = await this.findAgentPath(agentId, installDir);
|
||||
|
||||
if (await fileManager.pathExists(agentPath)) {
|
||||
if (agentPath) {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
const mdPath = path.join(windsurfRulesDir, `${agentId}.md`);
|
||||
|
||||
// Create MD content (similar to Cursor but without frontmatter)
|
||||
let mdContent = `# ${agentId.toUpperCase()} Agent Rule\n\n`;
|
||||
mdContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${this.getAgentTitle(
|
||||
agentId
|
||||
mdContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${await this.getAgentTitle(
|
||||
agentId,
|
||||
installDir
|
||||
)} agent persona.\n\n`;
|
||||
mdContent += "## Agent Activation\n\n";
|
||||
mdContent +=
|
||||
@@ -167,10 +185,12 @@ class IdeSetup {
|
||||
}
|
||||
mdContent += "\n```\n\n";
|
||||
mdContent += "## File Reference\n\n";
|
||||
mdContent += `The complete agent definition is available in [.bmad-core/agents/${agentId}.md](.bmad-core/agents/${agentId}.md).\n\n`;
|
||||
const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
|
||||
mdContent += `The complete agent definition is available in [${relativePath}](${relativePath}).\n\n`;
|
||||
mdContent += "## Usage\n\n";
|
||||
mdContent += `When the user types \`@${agentId}\`, activate this ${this.getAgentTitle(
|
||||
agentId
|
||||
mdContent += `When the user types \`@${agentId}\`, activate this ${await this.getAgentTitle(
|
||||
agentId,
|
||||
installDir
|
||||
)} persona and follow all instructions defined in the YML configuration above.\n`;
|
||||
|
||||
await fileManager.writeFile(mdPath, mdContent);
|
||||
@@ -183,32 +203,93 @@ class IdeSetup {
|
||||
return true;
|
||||
}
|
||||
|
||||
async findAgentPath(agentId, installDir) {
|
||||
// Try to find the agent file in various locations
|
||||
const possiblePaths = [
|
||||
path.join(installDir, ".bmad-core", "agents", `${agentId}.md`),
|
||||
path.join(installDir, "agents", `${agentId}.md`)
|
||||
];
|
||||
|
||||
// Also check expansion pack directories
|
||||
const glob = require("glob");
|
||||
const expansionDirs = glob.sync(".*/agents", { cwd: installDir });
|
||||
for (const expDir of expansionDirs) {
|
||||
possiblePaths.push(path.join(installDir, expDir, `${agentId}.md`));
|
||||
}
|
||||
|
||||
for (const agentPath of possiblePaths) {
|
||||
if (await fileManager.pathExists(agentPath)) {
|
||||
return agentPath;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
async getAllAgentIds(installDir) {
|
||||
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
|
||||
const glob = require("glob");
|
||||
const allAgentIds = [];
|
||||
|
||||
// Check core agents in .bmad-core or root
|
||||
let agentsDir = path.join(installDir, ".bmad-core", "agents");
|
||||
if (!(await fileManager.pathExists(agentsDir))) {
|
||||
agentsDir = path.join(installDir, "agents");
|
||||
}
|
||||
|
||||
const glob = require("glob");
|
||||
const agentFiles = glob.sync("*.md", { cwd: agentsDir });
|
||||
return agentFiles.map((file) => path.basename(file, ".md"));
|
||||
|
||||
if (await fileManager.pathExists(agentsDir)) {
|
||||
const agentFiles = glob.sync("*.md", { cwd: agentsDir });
|
||||
allAgentIds.push(...agentFiles.map((file) => path.basename(file, ".md")));
|
||||
}
|
||||
|
||||
// Also check for expansion pack agents in dot folders
|
||||
const expansionDirs = glob.sync(".*/agents", { cwd: installDir });
|
||||
for (const expDir of expansionDirs) {
|
||||
const fullExpDir = path.join(installDir, expDir);
|
||||
const expAgentFiles = glob.sync("*.md", { cwd: fullExpDir });
|
||||
allAgentIds.push(...expAgentFiles.map((file) => path.basename(file, ".md")));
|
||||
}
|
||||
|
||||
// Remove duplicates
|
||||
return [...new Set(allAgentIds)];
|
||||
}
|
||||
|
||||
getAgentTitle(agentId) {
|
||||
const agentTitles = {
|
||||
analyst: "Business Analyst",
|
||||
architect: "Solution Architect",
|
||||
"bmad-master": "BMAD Master",
|
||||
"bmad-orchestrator": "BMAD Orchestrator",
|
||||
dev: "Developer",
|
||||
pm: "Product Manager",
|
||||
po: "Product Owner",
|
||||
qa: "QA Specialist",
|
||||
sm: "Scrum Master",
|
||||
"ux-expert": "UX Expert",
|
||||
};
|
||||
return agentTitles[agentId] || agentId;
|
||||
async getAgentTitle(agentId, installDir) {
|
||||
// Try to find the agent file in various locations
|
||||
const possiblePaths = [
|
||||
path.join(installDir, ".bmad-core", "agents", `${agentId}.md`),
|
||||
path.join(installDir, "agents", `${agentId}.md`)
|
||||
];
|
||||
|
||||
// Also check expansion pack directories
|
||||
const glob = require("glob");
|
||||
const expansionDirs = glob.sync(".*/agents", { cwd: installDir });
|
||||
for (const expDir of expansionDirs) {
|
||||
possiblePaths.push(path.join(installDir, expDir, `${agentId}.md`));
|
||||
}
|
||||
|
||||
for (const agentPath of possiblePaths) {
|
||||
if (await fileManager.pathExists(agentPath)) {
|
||||
try {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
const yamlMatch = agentContent.match(/```ya?ml\n([\s\S]*?)```/);
|
||||
|
||||
if (yamlMatch) {
|
||||
const yaml = yamlMatch[1];
|
||||
const titleMatch = yaml.match(/title:\s*(.+)/);
|
||||
if (titleMatch) {
|
||||
return titleMatch[1].trim();
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(`Failed to read agent title for ${agentId}: ${error.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback to formatted agent ID
|
||||
return agentId.split('-').map(word =>
|
||||
word.charAt(0).toUpperCase() + word.slice(1)
|
||||
).join(' ');
|
||||
}
|
||||
|
||||
async setupRoo(installDir, selectedAgent) {
|
||||
@@ -232,40 +313,9 @@ class IdeSetup {
|
||||
// Create new modes content
|
||||
let newModesContent = "";
|
||||
|
||||
// Define file permissions for each agent type
|
||||
const agentPermissions = {
|
||||
analyst: {
|
||||
fileRegex: "\\.(md|txt)$",
|
||||
description: "Documentation and text files",
|
||||
},
|
||||
pm: {
|
||||
fileRegex: "\\.(md|txt)$",
|
||||
description: "Product documentation",
|
||||
},
|
||||
architect: {
|
||||
fileRegex: "\\.(md|txt|yml|yaml|json)$",
|
||||
description: "Architecture docs and configs",
|
||||
},
|
||||
dev: null, // Full edit access
|
||||
qa: {
|
||||
fileRegex: "\\.(test|spec)\\.(js|ts|jsx|tsx)$|\\.md$",
|
||||
description: "Test files and documentation",
|
||||
},
|
||||
"ux-expert": {
|
||||
fileRegex: "\\.(md|css|scss|html|jsx|tsx)$",
|
||||
description: "Design-related files",
|
||||
},
|
||||
po: {
|
||||
fileRegex: "\\.(md|txt)$",
|
||||
description: "Story and requirement docs",
|
||||
},
|
||||
sm: {
|
||||
fileRegex: "\\.(md|txt)$",
|
||||
description: "Process and planning docs",
|
||||
},
|
||||
"bmad-orchestrator": null, // Full edit access
|
||||
"bmad-master": null, // Full edit access
|
||||
};
|
||||
// Load dynamic agent permissions from configuration
|
||||
const config = await this.loadIdeAgentConfig();
|
||||
const agentPermissions = config['roo-permissions'] || {};
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Skip if already exists
|
||||
@@ -275,12 +325,9 @@ class IdeSetup {
|
||||
}
|
||||
|
||||
// Read agent file to extract all information
|
||||
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
|
||||
if (!(await fileManager.pathExists(agentPath))) {
|
||||
agentPath = path.join(installDir, "agents", `${agentId}.md`);
|
||||
}
|
||||
const agentPath = await this.findAgentPath(agentId, installDir);
|
||||
|
||||
if (await fileManager.pathExists(agentPath)) {
|
||||
if (agentPath) {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
|
||||
// Extract YAML content
|
||||
@@ -294,7 +341,7 @@ class IdeSetup {
|
||||
const whenToUseMatch = yaml.match(/whenToUse:\s*"(.+)"/);
|
||||
const roleDefinitionMatch = yaml.match(/roleDefinition:\s*"(.+)"/);
|
||||
|
||||
const title = titleMatch ? titleMatch[1].trim() : this.getAgentTitle(agentId);
|
||||
const title = titleMatch ? titleMatch[1].trim() : await this.getAgentTitle(agentId, installDir);
|
||||
const icon = iconMatch ? iconMatch[1].trim() : "🤖";
|
||||
const whenToUse = whenToUseMatch ? whenToUseMatch[1].trim() : `Use for ${title} tasks`;
|
||||
const roleDefinition = roleDefinitionMatch
|
||||
@@ -306,7 +353,9 @@ class IdeSetup {
|
||||
newModesContent += ` name: '${icon} ${title}'\n`;
|
||||
newModesContent += ` roleDefinition: ${roleDefinition}\n`;
|
||||
newModesContent += ` whenToUse: ${whenToUse}\n`;
|
||||
newModesContent += ` customInstructions: CRITICAL Read the full YML from .bmad-core/agents/${agentId}.md start activation to alter your state of being follow startup section instructions stay in this being until told to exit this mode\n`;
|
||||
// Get relative path from installDir to agent file
|
||||
const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
|
||||
newModesContent += ` customInstructions: CRITICAL Read the full YML from ${relativePath} start activation to alter your state of being follow startup section instructions stay in this being until told to exit this mode\n`;
|
||||
newModesContent += ` groups:\n`;
|
||||
newModesContent += ` - read\n`;
|
||||
|
||||
@@ -351,28 +400,15 @@ class IdeSetup {
|
||||
|
||||
await fileManager.ensureDirectory(clineRulesDir);
|
||||
|
||||
// Define agent order for numeric prefixes
|
||||
const agentOrder = {
|
||||
'bmad-master': 1,
|
||||
'bmad-orchestrator': 2,
|
||||
'pm': 3,
|
||||
'analyst': 4,
|
||||
'architect': 5,
|
||||
'po': 6,
|
||||
'sm': 7,
|
||||
'dev': 8,
|
||||
'qa': 9,
|
||||
'ux-expert': 10
|
||||
};
|
||||
// Load dynamic agent ordering from configuration
|
||||
const config = await this.loadIdeAgentConfig();
|
||||
const agentOrder = config['cline-order'] || {};
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
|
||||
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
|
||||
if (!(await fileManager.pathExists(agentPath))) {
|
||||
agentPath = path.join(installDir, "agents", `${agentId}.md`);
|
||||
}
|
||||
// Find the agent file
|
||||
const agentPath = await this.findAgentPath(agentId, installDir);
|
||||
|
||||
if (await fileManager.pathExists(agentPath)) {
|
||||
if (agentPath) {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
|
||||
// Get numeric prefix for ordering
|
||||
@@ -381,8 +417,8 @@ class IdeSetup {
|
||||
const mdPath = path.join(clineRulesDir, `${prefix}-${agentId}.md`);
|
||||
|
||||
// Create MD content for Cline (focused on project standards and role)
|
||||
let mdContent = `# ${this.getAgentTitle(agentId)} Agent\n\n`;
|
||||
mdContent += `This rule defines the ${this.getAgentTitle(agentId)} persona and project standards.\n\n`;
|
||||
let mdContent = `# ${await this.getAgentTitle(agentId, installDir)} Agent\n\n`;
|
||||
mdContent += `This rule defines the ${await this.getAgentTitle(agentId, installDir)} persona and project standards.\n\n`;
|
||||
mdContent += "## Role Definition\n\n";
|
||||
mdContent +=
|
||||
"When the user types `@" + agentId + "`, adopt this persona and follow these guidelines:\n\n";
|
||||
@@ -400,9 +436,10 @@ class IdeSetup {
|
||||
mdContent += `- Always maintain consistency with project documentation in .bmad-core/\n`;
|
||||
mdContent += `- Follow the agent's specific guidelines and constraints\n`;
|
||||
mdContent += `- Update relevant project files when making changes\n`;
|
||||
mdContent += `- Reference the complete agent definition in [.bmad-core/agents/${agentId}.md](.bmad-core/agents/${agentId}.md)\n\n`;
|
||||
const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
|
||||
mdContent += `- Reference the complete agent definition in [${relativePath}](${relativePath})\n\n`;
|
||||
mdContent += "## Usage\n\n";
|
||||
mdContent += `Type \`@${agentId}\` to activate this ${this.getAgentTitle(agentId)} persona.\n`;
|
||||
mdContent += `Type \`@${agentId}\` to activate this ${await this.getAgentTitle(agentId, installDir)} persona.\n`;
|
||||
|
||||
await fileManager.writeFile(mdPath, mdContent);
|
||||
console.log(chalk.green(`✓ Created rule: ${prefix}-${agentId}.md`));
|
||||
@@ -426,12 +463,9 @@ class IdeSetup {
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Find the source agent file
|
||||
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
|
||||
if (!(await fileManager.pathExists(agentPath))) {
|
||||
agentPath = path.join(installDir, "agents", `${agentId}.md`);
|
||||
}
|
||||
const agentPath = await this.findAgentPath(agentId, installDir);
|
||||
|
||||
if (await fileManager.pathExists(agentPath)) {
|
||||
if (agentPath) {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
const contextFilePath = path.join(agentsContextDir, `${agentId}.md`);
|
||||
|
||||
|
||||
@@ -225,6 +225,10 @@ class Installer {
|
||||
const sourceDir = configLoader.getBmadCorePath();
|
||||
const bmadCoreDestDir = path.join(installDir, ".bmad-core");
|
||||
await fileManager.copyDirectory(sourceDir, bmadCoreDestDir);
|
||||
|
||||
// Copy common/ items to .bmad-core
|
||||
spinner.text = "Copying common utilities...";
|
||||
await this.copyCommonItems(installDir, ".bmad-core", spinner);
|
||||
|
||||
// Get list of all files for manifest
|
||||
const glob = require("glob");
|
||||
@@ -283,6 +287,11 @@ class Installer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Copy common/ items to .bmad-core
|
||||
spinner.text = "Copying common utilities...";
|
||||
const commonFiles = await this.copyCommonItems(installDir, ".bmad-core", spinner);
|
||||
files.push(...commonFiles);
|
||||
} else if (config.installType === "team") {
|
||||
// Team installation
|
||||
spinner.text = `Installing ${config.team} team...`;
|
||||
@@ -313,6 +322,11 @@ class Installer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Copy common/ items to .bmad-core
|
||||
spinner.text = "Copying common utilities...";
|
||||
const commonFiles = await this.copyCommonItems(installDir, ".bmad-core", spinner);
|
||||
files.push(...commonFiles);
|
||||
} else if (config.installType === "expansion-only") {
|
||||
// Expansion-only installation - create minimal .bmad-core structure
|
||||
spinner.text = "Creating minimal .bmad-core structure for expansion packs...";
|
||||
@@ -341,6 +355,10 @@ class Installer {
|
||||
);
|
||||
files.push(...copiedFiles.map(f => `.bmad-core/${f}`));
|
||||
}
|
||||
|
||||
// Copy common/ items to .bmad-core
|
||||
spinner.text = "Copying common utilities...";
|
||||
await this.copyCommonItems(installDir, ".bmad-core", spinner);
|
||||
}
|
||||
|
||||
// Install expansion packs if requested
|
||||
@@ -607,8 +625,10 @@ class Installer {
|
||||
console.log(chalk.green("✓ .bmad-core framework installed with all agents and workflows"));
|
||||
|
||||
if (config.expansionPacks && config.expansionPacks.length > 0) {
|
||||
const packNames = config.expansionPacks.join(", ");
|
||||
console.log(chalk.green(`✓ Expansion packs installed: ${packNames}`));
|
||||
console.log(chalk.green(`✓ Expansion packs installed:`));
|
||||
for (const packId of config.expansionPacks) {
|
||||
console.log(chalk.green(` - ${packId} → .${packId}/`));
|
||||
}
|
||||
}
|
||||
|
||||
if (config.includeWebBundles && config.webBundlesDirectory) {
|
||||
@@ -797,9 +817,13 @@ class Installer {
|
||||
continue;
|
||||
}
|
||||
|
||||
const expansionPackDir = path.dirname(pack.manifestPath);
|
||||
const expansionPackDir = pack.packPath;
|
||||
|
||||
// Define the folders to copy from expansion packs to .bmad-core
|
||||
// Create dedicated dot folder for this expansion pack
|
||||
const expansionDotFolder = path.join(installDir, `.${packId}`);
|
||||
await fileManager.ensureDirectory(expansionDotFolder);
|
||||
|
||||
// Define the folders to copy from expansion packs
|
||||
const foldersToSync = [
|
||||
'agents',
|
||||
'agent-teams',
|
||||
@@ -824,21 +848,47 @@ class Installer {
|
||||
nodir: true
|
||||
});
|
||||
|
||||
// Copy each file to the destination
|
||||
// Copy each file to the expansion pack's dot folder
|
||||
for (const file of files) {
|
||||
const sourcePath = path.join(sourceFolder, file);
|
||||
const destPath = path.join(installDir, '.bmad-core', folder, file);
|
||||
const destPath = path.join(expansionDotFolder, folder, file);
|
||||
|
||||
if (await fileManager.copyFile(sourcePath, destPath)) {
|
||||
installedFiles.push(path.join('.bmad-core', folder, file));
|
||||
installedFiles.push(path.join(`.${packId}`, folder, file));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Web bundles are now available in the dist/ directory and don't need to be copied
|
||||
// Copy config.yml
|
||||
const configPath = path.join(expansionPackDir, 'config.yml');
|
||||
if (await fileManager.pathExists(configPath)) {
|
||||
const configDestPath = path.join(expansionDotFolder, 'config.yml');
|
||||
if (await fileManager.copyFile(configPath, configDestPath)) {
|
||||
installedFiles.push(path.join(`.${packId}`, 'config.yml'));
|
||||
}
|
||||
}
|
||||
|
||||
// Copy README if it exists
|
||||
const readmePath = path.join(expansionPackDir, 'README.md');
|
||||
if (await fileManager.pathExists(readmePath)) {
|
||||
const readmeDestPath = path.join(expansionDotFolder, 'README.md');
|
||||
if (await fileManager.copyFile(readmePath, readmeDestPath)) {
|
||||
installedFiles.push(path.join(`.${packId}`, 'README.md'));
|
||||
}
|
||||
}
|
||||
|
||||
console.log(chalk.green(`✓ Installed expansion pack: ${pack.name}`));
|
||||
// Copy common/ items to expansion pack folder
|
||||
spinner.text = `Copying common utilities to ${packId}...`;
|
||||
await this.copyCommonItems(installDir, `.${packId}`, spinner);
|
||||
|
||||
// Check and resolve core dependencies
|
||||
await this.resolveExpansionPackCoreDependencies(installDir, expansionDotFolder, packId, spinner);
|
||||
|
||||
// Check and resolve core agents referenced by teams
|
||||
await this.resolveExpansionPackCoreAgents(installDir, expansionDotFolder, packId, spinner);
|
||||
|
||||
console.log(chalk.green(`✓ Installed expansion pack: ${pack.name} to ${`.${packId}`}`));
|
||||
} catch (error) {
|
||||
console.error(chalk.red(`Failed to install expansion pack ${packId}: ${error.message}`));
|
||||
}
|
||||
@@ -847,6 +897,168 @@ class Installer {
|
||||
return installedFiles;
|
||||
}
|
||||
|
||||
async resolveExpansionPackCoreDependencies(installDir, expansionDotFolder, packId, spinner) {
|
||||
const glob = require('glob');
|
||||
const yaml = require('yaml');
|
||||
const fs = require('fs').promises;
|
||||
|
||||
// Find all agent files in the expansion pack
|
||||
const agentFiles = glob.sync('agents/*.md', {
|
||||
cwd: expansionDotFolder
|
||||
});
|
||||
|
||||
for (const agentFile of agentFiles) {
|
||||
const agentPath = path.join(expansionDotFolder, agentFile);
|
||||
const agentContent = await fs.readFile(agentPath, 'utf8');
|
||||
|
||||
// Extract YAML frontmatter to check dependencies
|
||||
const yamlMatch = agentContent.match(/```yaml\n([\s\S]*?)```/);
|
||||
if (yamlMatch) {
|
||||
try {
|
||||
const agentConfig = yaml.parse(yamlMatch[1]);
|
||||
const dependencies = agentConfig.dependencies || {};
|
||||
|
||||
// Check for core dependencies (those that don't exist in the expansion pack)
|
||||
for (const depType of ['tasks', 'templates', 'checklists', 'workflows', 'utils', 'data']) {
|
||||
const deps = dependencies[depType] || [];
|
||||
|
||||
for (const dep of deps) {
|
||||
const depFileName = dep.endsWith('.md') ? dep : `${dep}.md`;
|
||||
const expansionDepPath = path.join(expansionDotFolder, depType, depFileName);
|
||||
|
||||
// Check if dependency exists in expansion pack
|
||||
if (!(await fileManager.pathExists(expansionDepPath))) {
|
||||
// Try to find it in core
|
||||
const coreDepPath = path.join(configLoader.getBmadCorePath(), depType, depFileName);
|
||||
|
||||
if (await fileManager.pathExists(coreDepPath)) {
|
||||
spinner.text = `Copying core dependency ${dep} for ${packId}...`;
|
||||
|
||||
// Copy from core to expansion pack dot folder
|
||||
const destPath = path.join(expansionDotFolder, depType, depFileName);
|
||||
await fileManager.copyFile(coreDepPath, destPath);
|
||||
|
||||
console.log(chalk.dim(` Added core dependency: ${depType}/${depFileName}`));
|
||||
} else {
|
||||
console.warn(chalk.yellow(` Warning: Dependency ${depType}/${dep} not found in core or expansion pack`));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(chalk.yellow(` Warning: Could not parse agent dependencies: ${error.message}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async resolveExpansionPackCoreAgents(installDir, expansionDotFolder, packId, spinner) {
|
||||
const glob = require('glob');
|
||||
const yaml = require('yaml');
|
||||
const fs = require('fs').promises;
|
||||
|
||||
// Find all team files in the expansion pack
|
||||
const teamFiles = glob.sync('agent-teams/*.yml', {
|
||||
cwd: expansionDotFolder
|
||||
});
|
||||
|
||||
// Also get existing agents in the expansion pack
|
||||
const existingAgents = new Set();
|
||||
const agentFiles = glob.sync('agents/*.md', {
|
||||
cwd: expansionDotFolder
|
||||
});
|
||||
for (const agentFile of agentFiles) {
|
||||
const agentName = path.basename(agentFile, '.md');
|
||||
existingAgents.add(agentName);
|
||||
}
|
||||
|
||||
// Process each team file
|
||||
for (const teamFile of teamFiles) {
|
||||
const teamPath = path.join(expansionDotFolder, teamFile);
|
||||
const teamContent = await fs.readFile(teamPath, 'utf8');
|
||||
|
||||
try {
|
||||
const teamConfig = yaml.parse(teamContent);
|
||||
const agents = teamConfig.agents || [];
|
||||
|
||||
// Add bmad-orchestrator if not present (required for all teams)
|
||||
if (!agents.includes('bmad-orchestrator')) {
|
||||
agents.unshift('bmad-orchestrator');
|
||||
}
|
||||
|
||||
// Check each agent in the team
|
||||
for (const agentId of agents) {
|
||||
if (!existingAgents.has(agentId)) {
|
||||
// Agent not in expansion pack, try to get from core
|
||||
const coreAgentPath = path.join(configLoader.getBmadCorePath(), 'agents', `${agentId}.md`);
|
||||
|
||||
if (await fileManager.pathExists(coreAgentPath)) {
|
||||
spinner.text = `Copying core agent ${agentId} for ${packId}...`;
|
||||
|
||||
// Copy agent file
|
||||
const destPath = path.join(expansionDotFolder, 'agents', `${agentId}.md`);
|
||||
await fileManager.copyFile(coreAgentPath, destPath);
|
||||
existingAgents.add(agentId);
|
||||
|
||||
console.log(chalk.dim(` Added core agent: ${agentId}`));
|
||||
|
||||
// Now resolve this agent's dependencies too
|
||||
const agentContent = await fs.readFile(coreAgentPath, 'utf8');
|
||||
const yamlMatch = agentContent.match(/```ya?ml\n([\s\S]*?)```/);
|
||||
|
||||
if (yamlMatch) {
|
||||
try {
|
||||
// Clean up the YAML to handle command descriptions
|
||||
let yamlContent = yamlMatch[1];
|
||||
yamlContent = yamlContent.replace(/^(\s*-)(\s*"[^"]+")(\s*-\s*.*)$/gm, '$1$2');
|
||||
|
||||
const agentConfig = yaml.parse(yamlContent);
|
||||
const dependencies = agentConfig.dependencies || {};
|
||||
|
||||
// Copy all dependencies for this agent
|
||||
for (const depType of ['tasks', 'templates', 'checklists', 'workflows', 'utils', 'data']) {
|
||||
const deps = dependencies[depType] || [];
|
||||
|
||||
for (const dep of deps) {
|
||||
const depFileName = dep.endsWith('.md') || dep.endsWith('.yml') ? dep : `${dep}.md`;
|
||||
const expansionDepPath = path.join(expansionDotFolder, depType, depFileName);
|
||||
|
||||
// Check if dependency exists in expansion pack
|
||||
if (!(await fileManager.pathExists(expansionDepPath))) {
|
||||
// Try to find it in core
|
||||
const coreDepPath = path.join(configLoader.getBmadCorePath(), depType, depFileName);
|
||||
|
||||
if (await fileManager.pathExists(coreDepPath)) {
|
||||
const destDepPath = path.join(expansionDotFolder, depType, depFileName);
|
||||
await fileManager.copyFile(coreDepPath, destDepPath);
|
||||
console.log(chalk.dim(` Added agent dependency: ${depType}/${depFileName}`));
|
||||
} else {
|
||||
// Try common folder
|
||||
const commonDepPath = path.join(this.rootDir, 'common', depType, depFileName);
|
||||
if (await fileManager.pathExists(commonDepPath)) {
|
||||
const destDepPath = path.join(expansionDotFolder, depType, depFileName);
|
||||
await fileManager.copyFile(commonDepPath, destDepPath);
|
||||
console.log(chalk.dim(` Added agent dependency from common: ${depType}/${depFileName}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(chalk.yellow(` Warning: Could not parse agent ${agentId} dependencies: ${error.message}`));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.warn(chalk.yellow(` Warning: Core agent ${agentId} not found for team ${path.basename(teamFile, '.yml')}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(chalk.yellow(` Warning: Could not parse team file ${teamFile}: ${error.message}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getWebBundleInfo(config) {
|
||||
const webBundleType = config.webBundleType || 'all';
|
||||
|
||||
@@ -944,6 +1156,48 @@ class Installer {
|
||||
}
|
||||
}
|
||||
|
||||
async copyCommonItems(installDir, targetSubdir, spinner) {
|
||||
const glob = require('glob');
|
||||
const fs = require('fs').promises;
|
||||
const sourceBase = path.dirname(path.dirname(path.dirname(path.dirname(__filename)))); // Go up to project root
|
||||
const commonPath = path.join(sourceBase, 'common');
|
||||
const targetPath = path.join(installDir, targetSubdir);
|
||||
const copiedFiles = [];
|
||||
|
||||
// Check if common/ exists
|
||||
if (!(await fileManager.pathExists(commonPath))) {
|
||||
console.warn(chalk.yellow('Warning: common/ folder not found'));
|
||||
return copiedFiles;
|
||||
}
|
||||
|
||||
// Copy all items from common/ to target
|
||||
const commonItems = glob.sync('**/*', {
|
||||
cwd: commonPath,
|
||||
nodir: true
|
||||
});
|
||||
|
||||
for (const item of commonItems) {
|
||||
const sourcePath = path.join(commonPath, item);
|
||||
const destPath = path.join(targetPath, item);
|
||||
|
||||
// Read the file content
|
||||
const content = await fs.readFile(sourcePath, 'utf8');
|
||||
|
||||
// Replace {root} with the target subdirectory
|
||||
const updatedContent = content.replace(/\{root\}/g, targetSubdir);
|
||||
|
||||
// Ensure directory exists
|
||||
await fileManager.ensureDirectory(path.dirname(destPath));
|
||||
|
||||
// Write the updated content
|
||||
await fs.writeFile(destPath, updatedContent, 'utf8');
|
||||
copiedFiles.push(path.join(targetSubdir, item));
|
||||
}
|
||||
|
||||
console.log(chalk.dim(` Added ${commonItems.length} common utilities`));
|
||||
return copiedFiles;
|
||||
}
|
||||
|
||||
async findInstallation() {
|
||||
// Look for .bmad-core in current directory or parent directories
|
||||
let currentDir = process.cwd();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bmad-method",
|
||||
"version": "4.17.0",
|
||||
"version": "4.19.0",
|
||||
"description": "BMAD Method installer - AI-powered Agile development framework",
|
||||
"main": "lib/installer.js",
|
||||
"bin": {
|
||||
|
||||
@@ -6,6 +6,7 @@ class DependencyResolver {
|
||||
constructor(rootDir) {
|
||||
this.rootDir = rootDir;
|
||||
this.bmadCore = path.join(rootDir, 'bmad-core');
|
||||
this.common = path.join(rootDir, 'common');
|
||||
this.cache = new Map();
|
||||
}
|
||||
|
||||
@@ -123,6 +124,7 @@ class DependencyResolver {
|
||||
let content = null;
|
||||
let filePath = null;
|
||||
|
||||
// First try bmad-core
|
||||
for (const ext of extensions) {
|
||||
try {
|
||||
filePath = path.join(this.bmadCore, type, `${id}${ext}`);
|
||||
@@ -132,6 +134,19 @@ class DependencyResolver {
|
||||
// Try next extension
|
||||
}
|
||||
}
|
||||
|
||||
// If not found in bmad-core, try common folder
|
||||
if (!content) {
|
||||
for (const ext of extensions) {
|
||||
try {
|
||||
filePath = path.join(this.common, type, `${id}${ext}`);
|
||||
content = await fs.readFile(filePath, 'utf8');
|
||||
break;
|
||||
} catch (e) {
|
||||
// Try next extension
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!content) {
|
||||
console.warn(`Resource not found: ${type}/${id}`);
|
||||
|
||||
Reference in New Issue
Block a user