Compare commits
13 Commits
7c6cf6aa67
...
b576cb74d6
| Author | SHA1 | Date |
|---|---|---|
|
|
b576cb74d6 | |
|
|
2ef410c726 | |
|
|
1665ad68df | |
|
|
6af79165d8 | |
|
|
bdcd8afa42 | |
|
|
d45eff15bf | |
|
|
0a7329ff23 | |
|
|
7afe018f82 | |
|
|
74b9f22f20 | |
|
|
f334f66164 | |
|
|
9e50f015a3 | |
|
|
c0f51350c2 | |
|
|
91b2d84ff8 |
|
|
@ -1,14 +1,7 @@
|
|||
---
|
||||
name: 'generate-project-context'
|
||||
description: 'Scan existing codebase to generate a lean LLM-optimized project-context.md with critical implementation rules and patterns for AI agents'
|
||||
description: 'Creates a concise project-context.md file with critical rules and patterns that AI agents must follow when implementing code. Optimized for LLM context efficiency.'
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
|
||||
|
||||
<steps CRITICAL="TRUE">
|
||||
1. Always LOAD the FULL @{project-root}/_bmad/core/tasks/workflow.xml
|
||||
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config @{project-root}/_bmad/bmm/workflows/generate-project-context/workflow.md
|
||||
3. Pass the yaml path @{project-root}/_bmad/bmm/workflows/generate-project-context/workflow.md as 'workflow-config' parameter to the workflow.xml instructions
|
||||
4. Follow workflow.xml instructions EXACTLY as written to process and follow the specific workflow config and its instructions
|
||||
5. Save outputs after EACH section when generating any documents from templates
|
||||
</steps>
|
||||
IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/_bmad/bmm/workflows/generate-project-context/workflow.md, READ its entire contents and follow its directions exactly!
|
||||
|
|
|
|||
|
|
@ -0,0 +1,158 @@
|
|||
---
|
||||
name: gh-triage
|
||||
description: Fetch all GitHub issues via gh CLI and use AI agents to deeply analyze, cluster, and prioritize issues with actual understanding. Use for issue triage, backlog cleanup, or when user mentions "issues", "triage", or "backlog".
|
||||
license: MIT
|
||||
disable-model-invocation: true
|
||||
metadata:
|
||||
author: bmad-code-org
|
||||
version: "3.0.0"
|
||||
anthropic-internal: Core team issue triage tool for BMad Method repositories
|
||||
min-github-cli-version: "2.0"
|
||||
compatibility: Requires gh CLI, git repository, and BMad Method with Task tool support
|
||||
---
|
||||
|
||||
# GitHub Issue Triage with AI Analysis
|
||||
|
||||
**CRITICAL RULES:**
|
||||
- NEVER include time or effort estimates in output or recommendations
|
||||
- Focus on WHAT needs to be done, not HOW LONG it takes
|
||||
- Use Bash tool with gh CLI for all GitHub operations
|
||||
|
||||
## Execution Plan
|
||||
|
||||
You will perform GitHub issue triage using AI agents for deep analysis:
|
||||
|
||||
### Step 1: Fetch Issues
|
||||
Use `gh issue list` to fetch all open issues from the current repository in JSON format.
|
||||
|
||||
### Step 2: Batch Creation
|
||||
Split issues into batches of ~10 issues each for parallel analysis.
|
||||
|
||||
### Step 3: Parallel Agent Analysis
|
||||
For EACH batch, use the Task tool with `subagent_type=general-purpose` to launch an agent with this prompt:
|
||||
|
||||
```
|
||||
You are analyzing a batch of GitHub issues for deep understanding and triage.
|
||||
|
||||
**YOUR TASK:**
|
||||
Read the issues in your batch and provide DEEP analysis:
|
||||
|
||||
1. **For EACH issue, analyze:**
|
||||
- What is this ACTUALLY about? (beyond keywords)
|
||||
- What component/system does it affect?
|
||||
- What's the impact and severity?
|
||||
- Is it a bug, feature request, or something else?
|
||||
- What specific theme does it belong to?
|
||||
|
||||
2. **PRIORITY ASSESSMENT:**
|
||||
- CRITICAL: Blocks users, security issues, data loss, broken installers
|
||||
- HIGH: Major functionality broken, important features missing
|
||||
- MEDIUM: Workarounds available, minor bugs, nice-to-have features
|
||||
- LOW: Edge cases, cosmetic issues, questions
|
||||
|
||||
3. **RELATIONSHIPS:**
|
||||
- Duplicates: Near-identical issues about the same problem
|
||||
- Related: Issues connected by theme or root cause
|
||||
- Dependencies: One issue blocks or requires another
|
||||
|
||||
**YOUR BATCH:**
|
||||
[Paste the batch of issues here - each with number, title, body, labels]
|
||||
|
||||
**OUTPUT FORMAT (JSON only, no markdown):**
|
||||
{
|
||||
"issues": [
|
||||
{
|
||||
"number": 123,
|
||||
"title": "issue title",
|
||||
"deep_understanding": "2-3 sentences explaining what this is really about",
|
||||
"affected_components": ["installer", "workflows", "docs"],
|
||||
"issue_type": "bug/feature/question/tech-debt",
|
||||
"priority": "CRITICAL/HIGH/MEDIUM/LOW",
|
||||
"priority_rationale": "Why this priority level",
|
||||
"theme": "installation/workflow/integration/docs/ide-support/etc",
|
||||
"relationships": {
|
||||
"duplicates_of": [456],
|
||||
"related_to": [789, 101],
|
||||
"blocks": [111]
|
||||
}
|
||||
}
|
||||
],
|
||||
"cross_repo_issues": [
|
||||
{"number": 123, "target_repo": "bmad-builder", "reason": "about agent builder"}
|
||||
],
|
||||
"cleanup_candidates": [
|
||||
{"number": 456, "reason": "v4-related/outdated/duplicate"}
|
||||
],
|
||||
"themes_found": {
|
||||
"Installation Blockers": {
|
||||
"count": 5,
|
||||
"root_cause": "Common pattern if identifiable"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return ONLY valid JSON. No explanations outside the JSON structure.
|
||||
```
|
||||
|
||||
### Step 4: Consolidate & Generate Report
|
||||
After all agents complete, create a comprehensive markdown report saved to `_bmad-output/triage-reports/triage-YYYY-MM-DD.md` with:
|
||||
|
||||
## Report Structure
|
||||
|
||||
### Executive Summary
|
||||
- Total issues analyzed
|
||||
- Issue count by priority (CRITICAL, HIGH, MEDIUM, LOW)
|
||||
- Major themes discovered
|
||||
- Top 5 critical issues requiring immediate attention
|
||||
|
||||
### Critical Issues (CRITICAL Priority)
|
||||
For each CRITICAL issue:
|
||||
- **#123 - [Issue Title](url)**
|
||||
- **What it's about:** [Deep understanding]
|
||||
- **Affected:** [Components]
|
||||
- **Why Critical:** [Rationale]
|
||||
- **Suggested Action:** [Specific action]
|
||||
|
||||
### High Priority Issues (HIGH Priority)
|
||||
Same format as Critical, grouped by theme.
|
||||
|
||||
### Theme Clusters
|
||||
For each major theme:
|
||||
- **Theme Name** (N issues)
|
||||
- **What connects these:** [Pattern]
|
||||
- **Root cause:** [If identifiable]
|
||||
- **Consolidated actions:** [Bulk actions if applicable]
|
||||
- **Issues:** #123, #456, #789
|
||||
|
||||
### Relationships & Dependencies
|
||||
- **Duplicates:** List pairs with `gh issue close` commands
|
||||
- **Related Issues:** Groups of related issues
|
||||
- **Dependencies:** Blocking relationships
|
||||
|
||||
### Cross-Repo Issues
|
||||
Issues that should be migrated to other repositories (bmad-builder, bmad-module-creative-intelligence-suite, bmad-module-game-dev-studio, bmad-method-test-architecture-enterprise).
|
||||
|
||||
For each, provide:
|
||||
```
|
||||
gh issue close XXX --repo CURRENT_REPO --comment "This issue belongs in REPO. Please report at https://github.com/TARGET_REPO/issues/new"
|
||||
```
|
||||
|
||||
### Cleanup Candidates
|
||||
- **v4-related:** Deprecated version issues with close commands
|
||||
- **Stale:** No activity >30 days
|
||||
- **Low priority + old:** Low priority issues >60 days old
|
||||
|
||||
### Actionable Next Steps
|
||||
Specific, prioritized actions:
|
||||
1. [CRITICAL] Fix broken installer - affects all new users
|
||||
2. [HIGH] Resolve Windows path escaping issues
|
||||
3. [HIGH] Address workflow integration bugs
|
||||
etc.
|
||||
|
||||
Include `gh` commands where applicable for bulk actions.
|
||||
|
||||
---
|
||||
|
||||
## Execute Now
|
||||
|
||||
Begin by fetching issues from the current repository and follow the plan above.
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
name: Bug Report
|
||||
description: File a bug report to help us improve BMad Method
|
||||
title: "[BUG] "
|
||||
labels: bug
|
||||
assignees: []
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for filing a bug report! Please fill out the information below to help us reproduce and fix the issue.
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: Clear and concise description of what the bug is
|
||||
placeholder: e.g., When I run /dev-story, it crashes on step 3
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Step-by-step instructions to reproduce the behavior
|
||||
placeholder: |
|
||||
1. Run 'npx bmad-method install'
|
||||
2. Select option X
|
||||
3. Run workflow Y
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: What you expected to happen
|
||||
placeholder: The workflow should complete successfully
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: actual
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
description: What actually happened
|
||||
placeholder: The workflow crashed with error "..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: screenshots
|
||||
attributes:
|
||||
label: Screenshots
|
||||
description: Add screenshots if applicable (paste images directly)
|
||||
placeholder: Paste any relevant screenshots here
|
||||
|
||||
- type: dropdown
|
||||
id: module
|
||||
attributes:
|
||||
label: Which module is this for?
|
||||
description: Select the BMad module this issue relates to
|
||||
options:
|
||||
- BMad Method (BMM) - Core Framework
|
||||
- BMad Builder (BMB) - Agent Builder Tool
|
||||
- Test Architect (TEA) - Test Strategy Module
|
||||
- Game Dev Studio (BMGD) - Game Development Module
|
||||
- Creative Intelligence Suite (CIS) - Innovation Module
|
||||
- Not sure / Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: BMad Version
|
||||
description: "Check with: npx bmad-method --version or check package.json"
|
||||
placeholder: e.g., 6.0.0-Beta.4
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: ide
|
||||
attributes:
|
||||
label: Which AI IDE are you using?
|
||||
options:
|
||||
- Claude Code
|
||||
- Cursor
|
||||
- Windsurf
|
||||
- Copilot CLI / GitHub Copilot
|
||||
- Kilo Code
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: platform
|
||||
attributes:
|
||||
label: Operating System
|
||||
options:
|
||||
- macOS
|
||||
- Windows
|
||||
- Linux
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: Copy and paste any relevant log output
|
||||
render: shell
|
||||
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Confirm
|
||||
options:
|
||||
- label: I've searched for existing issues
|
||||
required: true
|
||||
- label: I'm using the latest version
|
||||
required: false
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
name: Documentation
|
||||
description: Report issues or suggest improvements to documentation
|
||||
title: "[DOCS] "
|
||||
labels: documentation
|
||||
assignees: []
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Help us improve the BMad Method documentation!
|
||||
|
||||
- type: dropdown
|
||||
id: doc-type
|
||||
attributes:
|
||||
label: What type of documentation issue is this?
|
||||
options:
|
||||
- Error or inaccuracy
|
||||
- Missing information
|
||||
- Unclear or confusing
|
||||
- Outdated content
|
||||
- Request for new documentation
|
||||
- Typo or grammar
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: location
|
||||
attributes:
|
||||
label: Documentation location
|
||||
description: Where is the documentation that needs improvement?
|
||||
placeholder: e.g., http://docs.bmad-method.org/tutorials/getting-started/ or "In the README"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: issue
|
||||
attributes:
|
||||
label: What's the issue?
|
||||
description: Describe the documentation issue in detail
|
||||
placeholder: e.g., Step 3 says to run command X but it should be command Y
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: suggestion
|
||||
attributes:
|
||||
label: Suggested improvement
|
||||
description: How would you like to see this improved?
|
||||
placeholder: e.g., Change the command to X and add an example
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: BMad Version (if applicable)
|
||||
placeholder: e.g., 6.0.0-Beta.4
|
||||
|
|
@ -50,7 +50,7 @@ _bmad-output
|
|||
.qwen
|
||||
.rovodev
|
||||
.kilocodemodes
|
||||
.claude
|
||||
.claude/commands
|
||||
.codex
|
||||
.github/chatmodes
|
||||
.github/agents
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ agent:
|
|||
- Specs are for building, not bureaucracy. Code that ships is better than perfect code that doesn't.
|
||||
|
||||
menu:
|
||||
- trigger: TS or fuzzy match on tech-spec
|
||||
- trigger: QS or fuzzy match on quick-spec
|
||||
exec: "{project-root}/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md"
|
||||
description: "[TS] Tech Spec: Architect a quick but complete technical spec with implementation-ready stories/specs"
|
||||
description: "[QS] Quick Spec: Architect a quick but complete technical spec with implementation-ready stories/specs"
|
||||
|
||||
- trigger: QD or fuzzy match on quick-dev
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ agent:
|
|||
- Focus on realistic user scenarios
|
||||
|
||||
menu:
|
||||
- trigger: QA
|
||||
- trigger: qa
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/qa/automate/workflow.yaml"
|
||||
description: "[QA] Automate - Generate tests for existing features (simplified)"
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ agent:
|
|||
action: "Engage in multi-turn conversation until you fully understand the ask, use subprocess if available for any web search, research or document review required to extract and return only relevant info to parent context. Author final document following all `_bmad/_memory/tech-writer-sidecar/documentation-standards.md`. After draft, use a subprocess to review and revise for quality of content and ensure standards are still met."
|
||||
description: "[WD] Write Document: Describe in detail what you want, and the agent will follow the documentation best practices defined in agent memory."
|
||||
|
||||
- trigger: WD or fuzzy match on write-document
|
||||
- trigger: US or fuzzy match on update-standards
|
||||
action: "Update `_bmad/_memory/tech-writer-sidecar/documentation-standards.md` adding user preferences to User Specified CRITICAL Rules section. Remove any contradictory rules as needed. Share with user the updates made."
|
||||
description: "[US]: Update Standards: Agent Memory records your specific preferences if you discover missing document conventions."
|
||||
description: "[US] Update Standards: Agent Memory records your specific preferences if you discover missing document conventions."
|
||||
|
||||
- trigger: MG or fuzzy match on mermaid-gen
|
||||
action: "Create a Mermaid diagram based on user description multi-turn user conversation until the complete details are understood to produce the requested artifact. If not specified, suggest diagram types based on ask. Strictly follow Mermaid syntax and CommonMark fenced code block standards."
|
||||
|
|
|
|||
|
|
@ -1,23 +1,28 @@
|
|||
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
|
||||
bmm,anytime,Document Project,DP,10,_bmad/bmm/workflows/document-project/workflow.yaml,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze an existing project to produce useful documentation",project-knowledge,*,
|
||||
bmm,anytime,Generate Project Context,GPC,15,_bmad/bmm/workflows/generate-project-context/workflow.md,bmad-bmm-generate-project-context,false,analyst,Create Mode,"Scan existing codebase to generate a lean LLM-optimized project-context.md containing critical implementation rules patterns and conventions for AI agents. Essential for brownfield projects and quick-flow.",output_folder,"project context",
|
||||
bmm,anytime,Quick Spec,TS,20,_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md,bmad-bmm-quick-spec,false,quick-flow-solo-dev,Create Mode,"Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method. Quick one-off tasks small changes simple apps utilities without extensive planning",planning_artifacts,"tech spec",
|
||||
bmm,anytime,Quick Dev,QD,30,_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md,bmad-bmm-quick-dev,false,quick-flow-solo-dev,Create Mode,"Quick one-off tasks small changes simple apps utilities without extensive planning - Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method, unless the user is already working through the implementation phase and just requests a 1 off things not already in the plan",,,
|
||||
bmm,anytime,Correct Course,CC,40,_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml,bmad-bmm-correct-course,false,sm,Create Mode,"Anytime: Navigate significant changes. May recommend start over update PRD redo architecture sprint planning or correct epics and stories",planning_artifacts,"change proposal",
|
||||
bmm,anytime,Document Project,DP,,_bmad/bmm/workflows/document-project/workflow.yaml,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze an existing project to produce useful documentation",project-knowledge,*,
|
||||
bmm,anytime,Generate Project Context,GPC,,_bmad/bmm/workflows/generate-project-context/workflow.md,bmad-bmm-generate-project-context,false,analyst,Create Mode,"Scan existing codebase to generate a lean LLM-optimized project-context.md containing critical implementation rules patterns and conventions for AI agents. Essential for brownfield projects and quick-flow.",output_folder,"project context",
|
||||
bmm,anytime,Quick Spec,QS,,_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md,bmad-bmm-quick-spec,false,quick-flow-solo-dev,Create Mode,"Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method. Quick one-off tasks small changes simple apps brownfield additions to well established patterns utilities without extensive planning",planning_artifacts,"tech spec",
|
||||
bmm,anytime,Quick Dev,QD,,_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md,bmad-bmm-quick-dev,false,quick-flow-solo-dev,Create Mode,"Quick one-off tasks small changes simple apps utilities without extensive planning - Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method, unless the user is already working through the implementation phase and just requests a 1 off things not already in the plan",,,
|
||||
bmm,anytime,Correct Course,CC,,_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml,bmad-bmm-correct-course,false,sm,Create Mode,"Anytime: Navigate significant changes. May recommend start over update PRD redo architecture sprint planning or correct epics and stories",planning_artifacts,"change proposal",
|
||||
bmm,anytime,Create Dataflow,CDF,,_bmad/bmm/workflows/excalidraw-diagrams/create-dataflow/workflow.yaml,bmad-bmm-create-excalidraw-dataflow,false,ux-designer,Create Mode,"Create data flow diagrams (DFD) in Excalidraw format - can be called standalone or during any workflow to add visual documentation",planning_artifacts,"dataflow diagram",
|
||||
bmm,anytime,Create Diagram,CED,,_bmad/bmm/workflows/excalidraw-diagrams/create-diagram/workflow.yaml,bmad-bmm-create-excalidraw-diagram,false,ux-designer,Create Mode,"Create system architecture diagrams ERDs UML diagrams or general technical diagrams in Excalidraw format - use anytime or call from architecture workflow to add visual documentation",planning_artifacts,"diagram",
|
||||
bmm,anytime,Create Flowchart,CFC,,_bmad/bmm/workflows/excalidraw-diagrams/create-flowchart/workflow.yaml,bmad-bmm-create-excalidraw-flowchart,false,ux-designer,Create Mode,"Create a flowchart visualization in Excalidraw format for processes pipelines or logic flows - use anytime or during architecture to add process documentation",planning_artifacts,"flowchart",
|
||||
bmm,anytime,Create Wireframe,CEW,,_bmad/bmm/workflows/excalidraw-diagrams/create-wireframe/workflow.yaml,bmad-bmm-create-excalidraw-wireframe,false,ux-designer,Create Mode,"Create website or app wireframes in Excalidraw format - use anytime standalone or call from UX workflow to add UI mockups",planning_artifacts,"wireframe",
|
||||
bmm,anytime,Write Document,WD,,_bmad/bmm/agents/tech-writer/tech-writer.agent.yaml,bmad-bmm-write-document,false,tech-writer,,"Describe in detail what you want, and the agent will follow the documentation best practices defined in agent memory. Multi-turn conversation with subprocess for research/review.",project-knowledge,"document",
|
||||
bmm,anytime,Update Standards,US,,_bmad/bmm/agents/tech-writer/tech-writer.agent.yaml,bmad-bmm-update-standards,false,tech-writer,,"Update agent memory documentation-standards.md with your specific preferences if you discover missing document conventions.",_bmad/_memory/tech-writer-sidecar,"standards",
|
||||
bmm,anytime,Mermaid Generate,MG,,_bmad/bmm/agents/tech-writer/tech-writer.agent.yaml,bmad-bmm-mermaid-generate,false,tech-writer,,"Create a Mermaid diagram based on user description. Will suggest diagram types if not specified.",planning_artifacts,"mermaid diagram",
|
||||
bmm,anytime,Validate Document,VD,,_bmad/bmm/agents/tech-writer/tech-writer.agent.yaml,bmad-bmm-validate-document,false,tech-writer,,"Review the specified document against documentation standards and best practices. Returns specific actionable improvement suggestions organized by priority.",planning_artifacts,"validation report",
|
||||
bmm,anytime,Explain Concept,EC,,_bmad/bmm/agents/tech-writer/tech-writer.agent.yaml,bmad-bmm-explain-concept,false,tech-writer,,"Create clear technical explanations with examples and diagrams for complex concepts. Breaks down into digestible sections using task-oriented approach.",project_knowledge,"explanation",
|
||||
bmm,1-analysis,Brainstorm Project,BP,10,_bmad/core/workflows/brainstorming/workflow.md,bmad-brainstorming,false,analyst,data=_bmad/bmm/data/project-context-template.md,"Expert Guided Facilitation through a single or multiple techniques",planning_artifacts,"brainstorming session",
|
||||
bmm,1-analysis,Market Research,MR,20,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad-bmm-research,false,analyst,Create Mode research_type=market,"Market analysis competitive landscape customer needs and trends","planning_artifacts|project-knowledge","research documents"
|
||||
bmm,1-analysis,Domain Research,DR,21,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad-bmm-research,false,analyst,Create Mode research_type=domain,"Industry domain deep dive subject matter expertise and terminology","planning_artifacts|project-knowledge","research documents"
|
||||
bmm,1-analysis,Technical Research,TR,22,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad-bmm-research,false,analyst,Create Mode research_type=technical,"Technical feasibility architecture options and implementation approaches","planning_artifacts|project-knowledge","research documents"
|
||||
bmm,1-analysis,Market Research,MR,20,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad-bmm-research,false,analyst,Create Mode research_type=market,"Market analysis competitive landscape customer needs and trends","planning_artifacts|project-knowledge","research documents",
|
||||
bmm,1-analysis,Domain Research,DR,21,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad-bmm-research,false,analyst,Create Mode research_type=domain,"Industry domain deep dive subject matter expertise and terminology","planning_artifacts|project_knowledge","research documents",
|
||||
bmm,1-analysis,Technical Research,TR,22,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad-bmm-research,false,analyst,Create Mode research_type=technical,"Technical feasibility architecture options and implementation approaches","planning_artifacts|project_knowledge","research documents",
|
||||
bmm,1-analysis,Create Brief,CB,30,_bmad/bmm/workflows/1-analysis/create-product-brief/workflow.md,bmad-bmm-create-brief,false,analyst,Create Mode,"A guided experience to nail down your product idea",planning_artifacts,"product brief",
|
||||
bmm,1-analysis,Validate Brief,VB,40,_bmad/bmm/workflows/1-analysis/create-product-brief/workflow.md,bmad-bmm-validate-brief,false,analyst,Validate Mode,"Validates product brief completeness",planning_artifacts,"brief validation report",
|
||||
bmm,2-planning,Create PRD,CP,10,_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md,bmad-bmm-prd,true,pm,Create Mode,"Expert led facilitation to produce your Product Requirements Document",planning_artifacts,prd,
|
||||
bmm,2-planning,Validate PRD,VP,20,_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md,bmad-bmm-prd,false,pm,Validate Mode,"Validate PRD is comprehensive lean well organized and cohesive",planning_artifacts,"prd validation report",
|
||||
bmm,2-planning,Create PRD,CP,10,_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md,bmad-bmm-create-prd,true,pm,Create Mode,"Expert led facilitation to produce your Product Requirements Document",planning_artifacts,prd,
|
||||
bmm,2-planning,Validate PRD,VP,20,_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md,bmad-bmm-validate-prd,false,pm,Validate Mode,"Validate PRD is comprehensive lean well organized and cohesive",planning_artifacts,"prd validation report",
|
||||
bmm,2-planning,Create UX,CU,30,_bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md,bmad-bmm-create-ux-design,false,ux-designer,Create Mode,"Guidance through realizing the plan for your UX, strongly recommended if a UI is a primary piece of the proposed project",planning_artifacts,"ux design",
|
||||
bmm,2-planning,Validate UX,VU,40,_bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md,bmad-bmm-create-ux-design,false,ux-designer,Validate Mode,"Validates UX design deliverables",planning_artifacts,"ux validation report",
|
||||
,anytime,Create Dataflow,CDF,50,_bmad/bmm/workflows/excalidraw-diagrams/create-dataflow/workflow.yaml,bmad-bmm-create-excalidraw-dataflow,false,ux-designer,Create Mode,"Create data flow diagrams (DFD) in Excalidraw format - can be called standalone or during any workflow to add visual documentation",planning_artifacts,"dataflow diagram",
|
||||
,anytime,Create Diagram,CED,51,_bmad/bmm/workflows/excalidraw-diagrams/create-diagram/workflow.yaml,bmad-bmm-create-excalidraw-diagram,false,ux-designer,Create Mode,"Create system architecture diagrams ERDs UML diagrams or general technical diagrams in Excalidraw format - use anytime or call from architecture workflow to add visual documentation",planning_artifacts,"diagram",
|
||||
,anytime,Create Flowchart,CFC,52,_bmad/bmm/workflows/excalidraw-diagrams/create-flowchart/workflow.yaml,bmad-bmm-create-excalidraw-flowchart,false,ux-designer,Create Mode,"Create a flowchart visualization in Excalidraw format for processes pipelines or logic flows - use anytime or during architecture to add process documentation",planning_artifacts,"flowchart",
|
||||
,anytime,Create Wireframe,CEW,53,_bmad/bmm/workflows/excalidraw-diagrams/create-wireframe/workflow.yaml,bmad-bmm-create-excalidraw-wireframe,false,ux-designer,Create Mode,"Create website or app wireframes in Excalidraw format - use anytime standalone or call from UX workflow to add UI mockups",planning_artifacts,"wireframe",
|
||||
bmm,3-solutioning,Create Architecture,CA,10,_bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md,bmad-bmm-create-architecture,true,architect,Create Mode,"Guided Workflow to document technical decisions",planning_artifacts,architecture,
|
||||
bmm,3-solutioning,Validate Architecture,VA,20,_bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md,bmad-bmm-create-architecture,false,architect,Validate Mode,"Validates architecture completeness",planning_artifacts,"architecture validation report",
|
||||
bmm,3-solutioning,Create Epics and Stories,CE,30,_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md,bmad-bmm-create-epics-and-stories,true,pm,Create Mode,"Create the Epics and Stories Listing",planning_artifacts,"epics and stories",
|
||||
|
|
@ -25,9 +30,9 @@ bmm,3-solutioning,Validate Epics and Stories,VE,40,_bmad/bmm/workflows/3-solutio
|
|||
bmm,3-solutioning,Check Implementation Readiness,IR,70,_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md,bmad-bmm-check-implementation-readiness,true,architect,Validate Mode,"Ensure PRD UX Architecture and Epics Stories are aligned",planning_artifacts,"readiness report",
|
||||
bmm,4-implementation,Sprint Planning,SP,10,_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml,bmad-bmm-sprint-planning,true,sm,Create Mode,"Generate sprint plan for development tasks - this kicks off the implementation phase by producing a plan the implementation agents will follow in sequence for every story in the plan.",implementation_artifacts,"sprint status",
|
||||
bmm,4-implementation,Sprint Status,SS,20,_bmad/bmm/workflows/4-implementation/sprint-status/workflow.yaml,bmad-bmm-sprint-status,false,sm,Create Mode,"Anytime: Summarize sprint status and route to next workflow",,,
|
||||
bmm,4-implementation,Create Story,CS,30,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad-bmm-create-story,true,sm,Create Mode,"Story cycle start: Prepare first found story in the sprint plan that is next, or if the command is run with a specific epic and story designation with context. Once complete, then VS then DS then CR then back to DS if needed or next CS or ER",implementation_artifacts,story,
|
||||
bmm,4-implementation,Validate Story,VS,35,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad-bmm-create-story,false,sm,Validate Mode,"Validates story readiness and completeness before development work begins",implementation_artifacts,"story validation report",
|
||||
bmm,4-implementation,Create Story,CS,30,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad-bmm-create-story,true,sm,Create Mode,"Story cycle start: Prepare first found story in the sprint plan that is next, or if the command is run with a specific epic and story designation with context. Once complete, then VS then DS then CR then back to DS if needed or next CS or ER",implementation_artifacts,story,
|
||||
bmm,4-implementation,Dev Story,DS,40,_bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml,bmad-bmm-dev-story,true,dev,Create Mode,"Story cycle: Execute story implementation tasks and tests then CR then back to DS if fixes needed",,,
|
||||
bmm,4-implementation,Code Review,CR,50,_bmad/bmm/workflows/4-implementation/code-review/workflow.yaml,bmad-bmm-code-review,false,dev,Create Mode,"Story cycle: If issues back to DS if approved then next CS or ER if epic complete",,,
|
||||
bmm,4-implementation,QA Automation Test,QA,45,_bmad/bmm/workflows/qa/automate/workflow.yaml,bmad-bmm-qa-automate,false,quinn,Create Mode,"Generate automated API and E2E tests for implemented code using the project's existing test framework (detects existing well known in use test frameworks). Use after implementation to add test coverage. NOT for code review or story validation - use CR for that.",implementation_artifacts,"test suite",
|
||||
bmm,4-implementation,Retrospective,ER,60,_bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml,bmad-bmm-retrospective,false,sm,Create Mode,"Optional at epic end: Review completed work lessons learned and next epic or if major issues consider CC",implementation_artifacts,retrospective,
|
||||
bmm,4-implementation,Automate,QA,45,_bmad/bmm/workflows/qa/automate/workflow.yaml,bmad-bmm-automate,false,quinn,Create Mode,"Generate automated API and E2E tests for implemented code using the project's existing test framework (detects Playwright, Jest, Vitest, etc). Use after implementation to add test coverage. NOT for code review or story validation - use CR for that.",implementation_artifacts,"test suite",
|
||||
|
|
|
|||
|
Can't render this file because it has a wrong number of fields in line 8.
|
|
|
@ -5,7 +5,7 @@ description: 'Optimize and polish the complete PRD document for flow, coherence,
|
|||
# File References
|
||||
nextStepFile: './step-12-complete.md'
|
||||
outputFile: '{planning_artifacts}/prd.md'
|
||||
purposeFile: './data/prd-purpose.md'
|
||||
purposeFile: '../data/prd-purpose.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ description: 'Complete & Validate - Present options for next steps including ful
|
|||
|
||||
# File references (ONLY variables used in this step)
|
||||
prdFile: '{prd_file_path}'
|
||||
validationWorkflow: './steps-v/step-v-01-discovery.md'
|
||||
validationWorkflow: '../steps-v/step-v-01-discovery.md'
|
||||
---
|
||||
|
||||
# Step E-4: Complete & Validate
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs
|
||||
core,,Brainstorming,BS,20,_bmad/core/workflows/brainstorming/workflow.md,bmad-brainstorming,false,analyst,,Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods,{output_folder}/brainstorming/brainstorming-session-{{date}}.md,,
|
||||
core,,Party Mode,PM,30,_bmad/core/workflows/party-mode/workflow.md,bmad-party-mode,false,party-mode facilitator,,Orchestrates group discussions between all installed BMAD agents enabling natural multi-agent conversations,,
|
||||
core,,bmad-help,BH,40,_bmad/core/tasks/help.md,bmad-help,false,,,Get unstuck by showing what workflow steps come next or answering questions about what to do in the BMad Method,,
|
||||
core,,Index Docs,ID,50,_bmad/core/tasks/index-docs.xml,bmad-index-docs,false,,,Generates or updates an index.md of all documents in the specified directory,,
|
||||
core,,Shard Document,SD,70,_bmad/core/tasks/shard-doc.xml,bmad-shard-doc,false,,,Splits large markdown documents into smaller organized files based on level 2 sections,,
|
||||
core,,Editorial Review - Prose,EP,80,_bmad/core/tasks/editorial-review-prose.xml,bmad-editorial-review-prose,false,,,Clinical copy-editor that reviews text for communication issues,,"three-column markdown table with suggested fixes",
|
||||
core,,Editorial Review - Structure,ES,90,_bmad/core/tasks/editorial-review-structure.xml,bmad-editorial-review-structure,false,,,Structural editor that proposes cuts reorganization and simplification while preserving comprehension,,
|
||||
core,,Adversarial Review (General),AR,100,_bmad/core/tasks/review-adversarial-general.xml,bmad-review-adversarial-general,false,,,Cynically review content and produce findings,,
|
||||
core,anytime,Brainstorming,BS,,_bmad/core/workflows/brainstorming/workflow.md,bmad-brainstorming,false,analyst,,"Generate diverse ideas through interactive techniques. Use early in ideation phase or when stuck generating ideas.",{output_folder}/brainstorming/brainstorming-session-{{date}}.md,,
|
||||
core,anytime,Party Mode,PM,,_bmad/core/workflows/party-mode/workflow.md,bmad-party-mode,false,party-mode facilitator,,"Orchestrate multi-agent discussions. Use when you need multiple agent perspectives or want agents to collaborate.",,
|
||||
core,anytime,bmad-help,BH,,_bmad/core/tasks/help.md,bmad-help,false,,,"Get unstuck by showing what workflow steps come next or answering BMad Method questions.",,
|
||||
core,anytime,Index Docs,ID,,_bmad/core/tasks/index-docs.xml,bmad-index-docs,false,,,"Create lightweight index for quick LLM scanning. Use when LLM needs to understand available docs without loading everything.",,
|
||||
core,anytime,Shard Document,SD,,_bmad/core/tasks/shard-doc.xml,bmad-shard-doc,false,,,"Split large documents into smaller files by sections. Use when doc becomes too large (>500 lines) to manage effectively.",,
|
||||
core,anytime,Editorial Review - Prose,EP,,_bmad/core/tasks/editorial-review-prose.xml,bmad-editorial-review-prose,false,,,"Review prose for clarity, tone, and communication issues. Use after drafting to polish written content.",report located with target document,"three-column markdown table with suggested fixes",
|
||||
core,anytime,Editorial Review - Structure,ES,,_bmad/core/tasks/editorial-review-structure.xml,bmad-editorial-review-structure,false,,,"Propose cuts, reorganization, and simplification while preserving comprehension. Use when doc produced from multiple subprocesses or needs structural improvement.",report located with target document,
|
||||
core,anytime,Adversarial Review (General),AR,,_bmad/core/tasks/review-adversarial-general.xml,bmad-review-adversarial-general,false,,,"Review content critically to find issues and weaknesses. Use for quality assurance or before finalizing deliverables. Code Review in other modules run this automatically, but its useful also for document reviews",,
|
||||
|
|
|
|||
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
|
@ -146,7 +146,7 @@ class DependencyResolver {
|
|||
const content = await fs.readFile(file.path, 'utf8');
|
||||
|
||||
// Parse YAML frontmatter for explicit dependencies
|
||||
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
||||
const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
||||
if (frontmatterMatch) {
|
||||
try {
|
||||
// Pre-process to handle backticks in YAML values
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ class ManifestGenerator {
|
|||
workflow = yaml.parse(content);
|
||||
} else {
|
||||
// Parse MD workflow with YAML frontmatter
|
||||
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
||||
const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
||||
if (!frontmatterMatch) {
|
||||
if (debug) {
|
||||
console.log(`[DEBUG] Skipped (no frontmatter): ${fullPath}`);
|
||||
|
|
@ -392,7 +392,7 @@ class ManifestGenerator {
|
|||
|
||||
if (file.endsWith('.md')) {
|
||||
// Parse YAML frontmatter for .md tasks
|
||||
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
||||
const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
||||
if (frontmatterMatch) {
|
||||
try {
|
||||
const frontmatter = yaml.parse(frontmatterMatch[1]);
|
||||
|
|
@ -481,7 +481,7 @@ class ManifestGenerator {
|
|||
|
||||
if (file.endsWith('.md')) {
|
||||
// Parse YAML frontmatter for .md tools
|
||||
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
||||
const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
||||
if (frontmatterMatch) {
|
||||
try {
|
||||
const frontmatter = yaml.parse(frontmatterMatch[1]);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class BaseIdeSetup {
|
|||
this.configFile = null; // Override in subclasses when detection is file-based
|
||||
this.detectionPaths = []; // Additional paths that indicate the IDE is configured
|
||||
this.xmlHandler = new XmlHandler();
|
||||
this.bmadFolderName = 'bmad'; // Default, can be overridden
|
||||
this.bmadFolderName = '_bmad'; // Default, can be overridden
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -86,10 +86,11 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup {
|
|||
results.workflows = await this.writeWorkflowArtifacts(targetPath, artifacts, template_type, config);
|
||||
}
|
||||
|
||||
// Install tasks and tools
|
||||
// Install tasks and tools using template system (supports TOML for Gemini, MD for others)
|
||||
if (!artifact_types || artifact_types.includes('tasks') || artifact_types.includes('tools')) {
|
||||
const taskToolGen = new TaskToolCommandGenerator();
|
||||
const taskToolResult = await taskToolGen.generateDashTaskToolCommands(projectDir, bmadDir, targetPath);
|
||||
const taskToolGen = new TaskToolCommandGenerator(this.bmadFolderName);
|
||||
const { artifacts } = await taskToolGen.collectTaskToolArtifacts(bmadDir);
|
||||
const taskToolResult = await this.writeTaskToolArtifacts(targetPath, artifacts, template_type, config);
|
||||
results.tasks = taskToolResult.tasks || 0;
|
||||
results.tools = taskToolResult.tools || 0;
|
||||
}
|
||||
|
|
@ -180,6 +181,53 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup {
|
|||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write task/tool artifacts to target directory using templates
|
||||
* @param {string} targetPath - Target directory path
|
||||
* @param {Array} artifacts - Task/tool artifacts
|
||||
* @param {string} templateType - Template type to use
|
||||
* @param {Object} config - Installation configuration
|
||||
* @returns {Promise<Object>} Counts of tasks and tools written
|
||||
*/
|
||||
async writeTaskToolArtifacts(targetPath, artifacts, templateType, config = {}) {
|
||||
let taskCount = 0;
|
||||
let toolCount = 0;
|
||||
|
||||
// Pre-load templates to avoid repeated file I/O in the loop
|
||||
const taskTemplate = await this.loadTemplate(templateType, 'task', config, 'default-task');
|
||||
const toolTemplate = await this.loadTemplate(templateType, 'tool', config, 'default-tool');
|
||||
|
||||
const { artifact_types } = config;
|
||||
|
||||
for (const artifact of artifacts) {
|
||||
if (artifact.type !== 'task' && artifact.type !== 'tool') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip if the specific artifact type is not requested in config
|
||||
if (artifact_types) {
|
||||
if (artifact.type === 'task' && !artifact_types.includes('tasks')) continue;
|
||||
if (artifact.type === 'tool' && !artifact_types.includes('tools')) continue;
|
||||
}
|
||||
|
||||
// Use pre-loaded template based on artifact type
|
||||
const { content: template, extension } = artifact.type === 'task' ? taskTemplate : toolTemplate;
|
||||
|
||||
const content = this.renderTemplate(template, artifact);
|
||||
const filename = this.generateFilename(artifact, artifact.type, extension);
|
||||
const filePath = path.join(targetPath, filename);
|
||||
await this.writeFile(filePath, content);
|
||||
|
||||
if (artifact.type === 'task') {
|
||||
taskCount++;
|
||||
} else {
|
||||
toolCount++;
|
||||
}
|
||||
}
|
||||
|
||||
return { tasks: taskCount, tools: toolCount };
|
||||
}
|
||||
|
||||
/**
|
||||
* Load template based on type and configuration
|
||||
* @param {string} templateType - Template type (claude, windsurf, etc.)
|
||||
|
|
@ -316,10 +364,24 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}}
|
|||
renderTemplate(template, artifact) {
|
||||
// Use the appropriate path property based on artifact type
|
||||
let pathToUse = artifact.relativePath || '';
|
||||
if (artifact.type === 'agent-launcher') {
|
||||
switch (artifact.type) {
|
||||
case 'agent-launcher': {
|
||||
pathToUse = artifact.agentPath || artifact.relativePath || '';
|
||||
} else if (artifact.type === 'workflow-command') {
|
||||
|
||||
break;
|
||||
}
|
||||
case 'workflow-command': {
|
||||
pathToUse = artifact.workflowPath || artifact.relativePath || '';
|
||||
|
||||
break;
|
||||
}
|
||||
case 'task':
|
||||
case 'tool': {
|
||||
pathToUse = artifact.path || artifact.relativePath || '';
|
||||
|
||||
break;
|
||||
}
|
||||
// No default
|
||||
}
|
||||
|
||||
let rendered = template
|
||||
|
|
@ -351,8 +413,9 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}}
|
|||
// Reuse central logic to ensure consistent naming conventions
|
||||
const standardName = toDashPath(artifact.relativePath);
|
||||
|
||||
// Clean up potential double extensions from source files (e.g. .yaml.md -> .md)
|
||||
const baseName = standardName.replace(/\.(yaml|yml)\.md$/, '.md');
|
||||
// Clean up potential double extensions from source files (e.g. .yaml.md, .xml.md -> .md)
|
||||
// This handles any extensions that might slip through toDashPath()
|
||||
const baseName = standardName.replace(/\.(md|yaml|yml|json|xml|toml)\.md$/i, '.md');
|
||||
|
||||
// If using default markdown, preserve the bmad-agent- prefix for agents
|
||||
if (extension === '.md') {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,10 @@ class CodexSetup extends BaseIdeSetup {
|
|||
);
|
||||
taskArtifacts.push({
|
||||
type: 'task',
|
||||
name: task.name,
|
||||
displayName: task.name,
|
||||
module: task.module,
|
||||
path: task.path,
|
||||
sourcePath: task.path,
|
||||
relativePath: path.join(task.module, 'tasks', `${task.name}.md`),
|
||||
content,
|
||||
|
|
@ -116,7 +119,7 @@ class CodexSetup extends BaseIdeSetup {
|
|||
const workflowCount = await workflowGenerator.writeDashArtifacts(destDir, workflowArtifacts);
|
||||
|
||||
// Also write tasks using underscore format
|
||||
const ttGen = new TaskToolCommandGenerator();
|
||||
const ttGen = new TaskToolCommandGenerator(this.bmadFolderName);
|
||||
const tasksWritten = await ttGen.writeDashArtifacts(destDir, taskArtifacts);
|
||||
|
||||
const written = agentCount + workflowCount + tasksWritten;
|
||||
|
|
@ -214,7 +217,10 @@ class CodexSetup extends BaseIdeSetup {
|
|||
|
||||
artifacts.push({
|
||||
type: 'task',
|
||||
name: task.name,
|
||||
displayName: task.name,
|
||||
module: task.module,
|
||||
path: task.path,
|
||||
sourcePath: task.path,
|
||||
relativePath: path.join(task.module, 'tasks', `${task.name}.md`),
|
||||
content,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class IdeManager {
|
|||
constructor() {
|
||||
this.handlers = new Map();
|
||||
this._initialized = false;
|
||||
this.bmadFolderName = 'bmad'; // Default, can be overridden
|
||||
this.bmadFolderName = '_bmad'; // Default, can be overridden
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -73,6 +73,7 @@ class IdeManager {
|
|||
if (HandlerClass) {
|
||||
const instance = new HandlerClass();
|
||||
if (instance.name && typeof instance.name === 'string') {
|
||||
instance.setBmadFolderName(this.bmadFolderName);
|
||||
this.handlers.set(instance.name, instance);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const { toColonPath, toDashPath, customAgentColonName, customAgentDashName } = r
|
|||
* Similar to WorkflowCommandGenerator but for agents
|
||||
*/
|
||||
class AgentCommandGenerator {
|
||||
constructor(bmadFolderName = 'bmad') {
|
||||
constructor(bmadFolderName = '_bmad') {
|
||||
this.templatePath = path.join(__dirname, '../templates/agent-command-template.md');
|
||||
this.bmadFolderName = bmadFolderName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@ function toDashPath(relativePath) {
|
|||
return 'bmad-unknown.md';
|
||||
}
|
||||
|
||||
const withoutExt = relativePath.replace('.md', '');
|
||||
// Strip common file extensions to avoid double extensions in generated filenames
|
||||
// e.g., 'create-story.xml' → 'create-story', 'workflow.yaml' → 'workflow'
|
||||
const withoutExt = relativePath.replace(/\.(md|yaml|yml|json|xml|toml)$/i, '');
|
||||
const parts = withoutExt.split(/[/\\]/);
|
||||
|
||||
const module = parts[0];
|
||||
|
|
@ -183,7 +185,8 @@ function toUnderscoreName(module, type, name) {
|
|||
* @deprecated Use toDashPath instead
|
||||
*/
|
||||
function toUnderscorePath(relativePath) {
|
||||
const withoutExt = relativePath.replace('.md', '');
|
||||
// Strip common file extensions (same as toDashPath for consistency)
|
||||
const withoutExt = relativePath.replace(/\.(md|yaml|yml|json|xml|toml)$/i, '');
|
||||
const parts = withoutExt.split(/[/\\]/);
|
||||
|
||||
const module = parts[0];
|
||||
|
|
|
|||
|
|
@ -8,6 +8,83 @@ const { toColonName, toColonPath, toDashPath } = require('./path-utils');
|
|||
* Generates command files for standalone tasks and tools
|
||||
*/
|
||||
class TaskToolCommandGenerator {
|
||||
/**
|
||||
* @param {string} bmadFolderName - Name of the BMAD folder for template rendering (default: 'bmad')
|
||||
* Note: This parameter is accepted for API consistency with AgentCommandGenerator and
|
||||
* WorkflowCommandGenerator, but is not used for path stripping. The manifest always stores
|
||||
* filesystem paths with '_bmad/' prefix (the actual folder name), while bmadFolderName is
|
||||
* used for template placeholder rendering ({{bmadFolderName}}).
|
||||
*/
|
||||
constructor(bmadFolderName = '_bmad') {
|
||||
this.bmadFolderName = bmadFolderName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect task and tool artifacts for IDE installation
|
||||
* @param {string} bmadDir - BMAD installation directory
|
||||
* @returns {Promise<Object>} Artifacts array with metadata
|
||||
*/
|
||||
async collectTaskToolArtifacts(bmadDir) {
|
||||
const tasks = await this.loadTaskManifest(bmadDir);
|
||||
const tools = await this.loadToolManifest(bmadDir);
|
||||
|
||||
// Filter to only standalone items
|
||||
const standaloneTasks = tasks ? tasks.filter((t) => t.standalone === 'true' || t.standalone === true) : [];
|
||||
const standaloneTools = tools ? tools.filter((t) => t.standalone === 'true' || t.standalone === true) : [];
|
||||
|
||||
const artifacts = [];
|
||||
|
||||
// Collect task artifacts
|
||||
for (const task of standaloneTasks) {
|
||||
let taskPath = (task.path || '').replaceAll('\\', '/');
|
||||
// Remove _bmad/ prefix if present to get relative path within bmad folder
|
||||
if (taskPath.startsWith('_bmad/')) {
|
||||
taskPath = taskPath.slice(6); // Remove '_bmad/'
|
||||
}
|
||||
|
||||
const taskExt = path.extname(taskPath) || '.md';
|
||||
artifacts.push({
|
||||
type: 'task',
|
||||
name: task.name,
|
||||
displayName: task.displayName || task.name,
|
||||
description: task.description || `Execute ${task.displayName || task.name}`,
|
||||
module: task.module,
|
||||
// Use forward slashes for cross-platform consistency (not path.join which uses backslashes on Windows)
|
||||
relativePath: `${task.module}/tasks/${task.name}${taskExt}`,
|
||||
path: taskPath,
|
||||
});
|
||||
}
|
||||
|
||||
// Collect tool artifacts
|
||||
for (const tool of standaloneTools) {
|
||||
let toolPath = (tool.path || '').replaceAll('\\', '/');
|
||||
// Remove _bmad/ prefix if present to get relative path within bmad folder
|
||||
if (toolPath.startsWith('_bmad/')) {
|
||||
toolPath = toolPath.slice(6); // Remove '_bmad/'
|
||||
}
|
||||
|
||||
const toolExt = path.extname(toolPath) || '.md';
|
||||
artifacts.push({
|
||||
type: 'tool',
|
||||
name: tool.name,
|
||||
displayName: tool.displayName || tool.name,
|
||||
description: tool.description || `Execute ${tool.displayName || tool.name}`,
|
||||
module: tool.module,
|
||||
// Use forward slashes for cross-platform consistency (not path.join which uses backslashes on Windows)
|
||||
relativePath: `${tool.module}/tools/${tool.name}${toolExt}`,
|
||||
path: toolPath,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
artifacts,
|
||||
counts: {
|
||||
tasks: standaloneTasks.length,
|
||||
tools: standaloneTools.length,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate task and tool commands from manifest CSVs
|
||||
* @param {string} projectDir - Project directory
|
||||
|
|
@ -65,9 +142,33 @@ class TaskToolCommandGenerator {
|
|||
const description = item.description || `Execute ${item.displayName || item.name}`;
|
||||
|
||||
// Convert path to use {project-root} placeholder
|
||||
// Handle undefined/missing path by constructing from module and name
|
||||
let itemPath = item.path;
|
||||
if (itemPath && typeof itemPath === 'string' && itemPath.startsWith('bmad/')) {
|
||||
itemPath = `{project-root}/${itemPath}`;
|
||||
if (!itemPath || typeof itemPath !== 'string') {
|
||||
// Fallback: construct path from module and name if path is missing
|
||||
const typePlural = type === 'task' ? 'tasks' : 'tools';
|
||||
itemPath = `{project-root}/${this.bmadFolderName}/${item.module}/${typePlural}/${item.name}.md`;
|
||||
} else {
|
||||
// Normalize path separators to forward slashes
|
||||
itemPath = itemPath.replaceAll('\\', '/');
|
||||
|
||||
// Extract relative path from absolute paths (Windows or Unix)
|
||||
// Look for _bmad/ or bmad/ in the path and extract everything after it
|
||||
// Match patterns like: /_bmad/core/tasks/... or /bmad/core/tasks/...
|
||||
const bmadMatch = itemPath.match(/\/_bmad\/(.+)$/) || itemPath.match(/\/bmad\/(.+)$/);
|
||||
if (bmadMatch) {
|
||||
// Found /_bmad/ or /bmad/ - use relative path after it
|
||||
itemPath = `{project-root}/${this.bmadFolderName}/${bmadMatch[1]}`;
|
||||
} else if (itemPath.startsWith('_bmad/')) {
|
||||
// Relative path starting with _bmad/
|
||||
itemPath = `{project-root}/${this.bmadFolderName}/${itemPath.slice(6)}`;
|
||||
} else if (itemPath.startsWith('bmad/')) {
|
||||
// Relative path starting with bmad/
|
||||
itemPath = `{project-root}/${this.bmadFolderName}/${itemPath.slice(5)}`;
|
||||
} else if (!itemPath.startsWith('{project-root}')) {
|
||||
// For other relative paths, prefix with project root and bmad folder
|
||||
itemPath = `{project-root}/${this.bmadFolderName}/${itemPath}`;
|
||||
}
|
||||
}
|
||||
|
||||
return `---
|
||||
|
|
@ -187,7 +288,7 @@ Follow all instructions in the ${type} file exactly as written.
|
|||
// Generate command files for tasks
|
||||
for (const task of standaloneTasks) {
|
||||
const commandContent = this.generateCommandContent(task, 'task');
|
||||
// Use underscore format: bmad_bmm_name.md
|
||||
// Use dash format: bmad-bmm-name.md
|
||||
const flatName = toDashPath(`${task.module}/tasks/${task.name}.md`);
|
||||
const commandPath = path.join(baseCommandsDir, flatName);
|
||||
await fs.ensureDir(path.dirname(commandPath));
|
||||
|
|
@ -198,7 +299,7 @@ Follow all instructions in the ${type} file exactly as written.
|
|||
// Generate command files for tools
|
||||
for (const tool of standaloneTools) {
|
||||
const commandContent = this.generateCommandContent(tool, 'tool');
|
||||
// Use underscore format: bmad_bmm_name.md
|
||||
// Use dash format: bmad-bmm-name.md
|
||||
const flatName = toDashPath(`${tool.module}/tools/${tool.name}.md`);
|
||||
const commandPath = path.join(baseCommandsDir, flatName);
|
||||
await fs.ensureDir(path.dirname(commandPath));
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const { toColonPath, toDashPath, customAgentColonName, customAgentDashName } = r
|
|||
* Generates command files for each workflow in the manifest
|
||||
*/
|
||||
class WorkflowCommandGenerator {
|
||||
constructor(bmadFolderName = 'bmad') {
|
||||
constructor(bmadFolderName = '_bmad') {
|
||||
this.templatePath = path.join(__dirname, '../templates/workflow-command-template.md');
|
||||
this.bmadFolderName = bmadFolderName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
name: '{{name}}'
|
||||
description: '{{description}}'
|
||||
---
|
||||
|
||||
# {{name}}
|
||||
|
||||
Read the entire task file at: {project-root}/{{bmadFolderName}}/{{path}}
|
||||
|
||||
Follow all instructions in the task file exactly as written.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
name: '{{name}}'
|
||||
description: '{{description}}'
|
||||
---
|
||||
|
||||
# {{name}}
|
||||
|
||||
Read the entire tool file at: {project-root}/{{bmadFolderName}}/{{path}}
|
||||
|
||||
Follow all instructions in the tool file exactly as written.
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
description = "Executes the {{name}} task from the BMAD Method."
|
||||
prompt = """
|
||||
Execute the BMAD '{{name}}' task.
|
||||
|
||||
TASK INSTRUCTIONS:
|
||||
1. LOAD the task file from {project-root}/{{bmadFolderName}}/{{path}}
|
||||
2. READ its entire contents
|
||||
3. FOLLOW every instruction precisely as specified
|
||||
|
||||
TASK FILE: {project-root}/{{bmadFolderName}}/{{path}}
|
||||
"""
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
description = "Executes the {{name}} tool from the BMAD Method."
|
||||
prompt = """
|
||||
Execute the BMAD '{{name}}' tool.
|
||||
|
||||
TOOL INSTRUCTIONS:
|
||||
1. LOAD the tool file from {project-root}/{{bmadFolderName}}/{{path}}
|
||||
2. READ its entire contents
|
||||
3. FOLLOW every instruction precisely as specified
|
||||
|
||||
TOOL FILE: {project-root}/{{bmadFolderName}}/{{path}}
|
||||
"""
|
||||
|
|
@ -27,7 +27,7 @@ const { ExternalModuleManager } = require('./external-manager');
|
|||
class ModuleManager {
|
||||
constructor(options = {}) {
|
||||
this.xmlHandler = new XmlHandler();
|
||||
this.bmadFolderName = 'bmad'; // Default, can be overridden
|
||||
this.bmadFolderName = '_bmad'; // Default, can be overridden
|
||||
this.customModulePaths = new Map(); // Initialize custom module paths
|
||||
this.externalModuleManager = new ExternalModuleManager(); // For external official modules
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ function findBmadConfig(startPath = process.cwd()) {
|
|||
* @returns {string} Resolved path
|
||||
*/
|
||||
function resolvePath(pathStr, context) {
|
||||
return pathStr.replaceAll('{project-root}', context.projectRoot).replaceAll('{bmad-folder}', context_bmadFolder);
|
||||
return pathStr.replaceAll('{project-root}', context.projectRoot).replaceAll('{bmad-folder}', context.bmadFolder);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ async function main(customProjectRoot) {
|
|||
const project_root = customProjectRoot || path.join(__dirname, '..');
|
||||
|
||||
// Find all agent files
|
||||
const agentFiles = await glob('src/{core,modules/*}/agents/*.agent.yaml', {
|
||||
const agentFiles = await glob('src/{core,bmm}/agents/**/*.agent.yaml', {
|
||||
cwd: project_root,
|
||||
absolute: true,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue