bmad-method 6.0.0-alpha.10 → 6.0.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/CHANGELOG.md +219 -1105
  2. package/README.md +129 -359
  3. package/docs/custom-agent-installation.md +169 -0
  4. package/{v6-open-items.md → docs/v6-open-items.md} +1 -1
  5. package/package.json +4 -2
  6. package/src/core/resources/excalidraw/README.md +160 -0
  7. package/src/core/resources/excalidraw/library-loader.md +50 -0
  8. package/src/modules/bmb/docs/agent-compilation.md +340 -0
  9. package/src/modules/bmb/docs/agent-menu-patterns.md +524 -0
  10. package/src/modules/bmb/docs/expert-agent-architecture.md +364 -0
  11. package/src/modules/bmb/docs/index.md +55 -0
  12. package/src/modules/bmb/docs/module-agent-architecture.md +367 -0
  13. package/src/modules/bmb/docs/simple-agent-architecture.md +288 -0
  14. package/src/modules/bmb/docs/understanding-agent-types.md +184 -0
  15. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/README.md +242 -0
  16. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/breakthroughs.md +24 -0
  17. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/instructions.md +108 -0
  18. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/memories.md +46 -0
  19. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/mood-patterns.md +39 -0
  20. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +152 -0
  21. package/src/modules/bmb/reference/agents/module-examples/README.md +50 -0
  22. package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +53 -0
  23. package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +57 -0
  24. package/src/modules/bmb/reference/agents/simple-examples/README.md +223 -0
  25. package/src/modules/bmb/reference/agents/simple-examples/commit-poet.agent.yaml +126 -0
  26. package/src/modules/bmb/reference/readme.md +3 -0
  27. package/src/modules/bmb/workflows/create-agent/agent-validation-checklist.md +174 -0
  28. package/src/modules/bmb/workflows/create-agent/brainstorm-context.md +99 -120
  29. package/src/modules/bmb/workflows/create-agent/communication-presets.csv +61 -0
  30. package/src/modules/bmb/workflows/create-agent/instructions.md +126 -65
  31. package/src/modules/bmb/workflows/create-agent/workflow.yaml +19 -12
  32. package/src/modules/bmb/workflows/edit-agent/README.md +174 -47
  33. package/src/modules/bmb/workflows/edit-agent/instructions.md +397 -33
  34. package/src/modules/bmb/workflows/edit-agent/workflow.yaml +24 -8
  35. package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +1 -1
  36. package/src/modules/bmm/agents/analyst.agent.yaml +2 -2
  37. package/src/modules/bmm/agents/architect.agent.yaml +10 -2
  38. package/src/modules/bmm/agents/dev.agent.yaml +2 -2
  39. package/src/modules/bmm/agents/pm.agent.yaml +7 -3
  40. package/src/modules/bmm/agents/sm.agent.yaml +2 -2
  41. package/src/modules/bmm/agents/tea.agent.yaml +2 -2
  42. package/src/modules/bmm/agents/tech-writer.agent.yaml +15 -3
  43. package/src/modules/bmm/agents/ux-designer.agent.yaml +6 -2
  44. package/src/modules/bmm/docs/README.md +4 -0
  45. package/src/modules/bmm/docs/images/workflow-method-greenfield.excalidraw +5919 -0
  46. package/src/modules/bmm/docs/images/workflow-method-greenfield.svg +2 -0
  47. package/src/modules/bmm/docs/quick-start.md +6 -0
  48. package/src/modules/bmm/docs/scale-adaptive-system.md +6 -0
  49. package/src/modules/bmm/docs/workflows-implementation.md +10 -0
  50. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.yaml +4 -4
  51. package/src/modules/bmm/workflows/{2-plan-workflows → 3-solutioning}/create-epics-and-stories/workflow.yaml +5 -5
  52. package/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml +1 -1
  53. package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-dataflow/instructions.md +7 -8
  54. package/src/modules/bmm/workflows/diagrams/create-dataflow/workflow.yaml +27 -0
  55. package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-diagram/instructions.md +9 -10
  56. package/src/modules/bmm/workflows/diagrams/create-diagram/workflow.yaml +27 -0
  57. package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-flowchart/instructions.md +4 -5
  58. package/src/modules/bmm/workflows/diagrams/create-flowchart/workflow.yaml +27 -0
  59. package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-wireframe/instructions.md +3 -3
  60. package/src/modules/bmm/workflows/diagrams/create-wireframe/workflow.yaml +27 -0
  61. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +18 -30
  62. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +2 -14
  63. package/src/modules/bmm/workflows/workflow-status/paths/method-brownfield.yaml +2 -14
  64. package/src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml +2 -14
  65. package/src/modules/cis/agents/presentation-master.agent.yaml +60 -0
  66. package/tools/cli/commands/agent-install.js +409 -0
  67. package/tools/cli/installers/lib/core/installer.js +119 -0
  68. package/tools/cli/installers/lib/ide/_base-ide.js +25 -0
  69. package/tools/cli/installers/lib/ide/antigravity.js +463 -0
  70. package/tools/cli/installers/lib/ide/claude-code.js +43 -0
  71. package/tools/cli/installers/lib/ide/codex.js +217 -32
  72. package/tools/cli/installers/lib/ide/cursor.js +48 -0
  73. package/tools/cli/installers/lib/ide/github-copilot.js +74 -0
  74. package/tools/cli/installers/lib/ide/manager.js +35 -0
  75. package/tools/cli/installers/lib/ide/opencode.js +45 -0
  76. package/tools/cli/installers/lib/ide/windsurf.js +47 -0
  77. package/tools/cli/lib/agent/compiler.js +390 -0
  78. package/tools/cli/lib/agent/installer.js +725 -0
  79. package/tools/cli/lib/agent/template-engine.js +152 -0
  80. package/docs/installers-bundlers/web-bundler-usage.md +0 -54
  81. package/src/modules/bmb/workflows/create-agent/README.md +0 -203
  82. package/src/modules/bmb/workflows/create-agent/agent-architecture.md +0 -415
  83. package/src/modules/bmb/workflows/create-agent/agent-command-patterns.md +0 -759
  84. package/src/modules/bmb/workflows/create-agent/agent-types.md +0 -292
  85. package/src/modules/bmb/workflows/create-agent/checklist.md +0 -62
  86. package/src/modules/bmb/workflows/create-agent/communication-styles.md +0 -202
  87. package/src/modules/bmb/workflows/edit-agent/checklist.md +0 -112
  88. package/src/modules/bmb/workflows/redoc/README.md +0 -87
  89. package/src/modules/bmb/workflows/redoc/checklist.md +0 -99
  90. package/src/modules/bmb/workflows/redoc/instructions.md +0 -265
  91. package/src/modules/bmb/workflows/redoc/workflow.yaml +0 -34
  92. package/src/modules/bmm/agents/frame-expert.agent.yaml +0 -42
  93. package/src/modules/bmm/workflows/frame-expert/create-dataflow/workflow.yaml +0 -24
  94. package/src/modules/bmm/workflows/frame-expert/create-diagram/workflow.yaml +0 -25
  95. package/src/modules/bmm/workflows/frame-expert/create-flowchart/workflow.yaml +0 -28
  96. package/src/modules/bmm/workflows/frame-expert/create-wireframe/workflow.yaml +0 -24
  97. package/src/modules/bmm/workflows/workflow-status/paths/game-design.yaml +0 -52
  98. /package/src/{modules/bmm/workflows/frame-expert/_shared → core/resources/excalidraw}/excalidraw-helpers.md +0 -0
  99. /package/src/{modules/bmm/workflows/frame-expert/_shared → core/resources/excalidraw}/validate-json-instructions.md +0 -0
  100. /package/src/modules/bmm/workflows/{2-plan-workflows → 3-solutioning}/create-epics-and-stories/epics-template.md +0 -0
  101. /package/src/modules/bmm/workflows/{2-plan-workflows → 3-solutioning}/create-epics-and-stories/instructions.md +0 -0
  102. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/_shared/excalidraw-library.json +0 -0
  103. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/_shared/excalidraw-templates.yaml +0 -0
  104. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-dataflow/checklist.md +0 -0
  105. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-diagram/checklist.md +0 -0
  106. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-flowchart/checklist.md +0 -0
  107. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-wireframe/checklist.md +0 -0
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Template Engine for BMAD Agent Install Configuration
3
+ * Processes {{variable}}, {{#if}}, {{#unless}}, and {{/if}} blocks
4
+ */
5
+
6
+ /**
7
+ * Process all template syntax in a string
8
+ * @param {string} content - Content with template syntax
9
+ * @param {Object} variables - Key-value pairs from install_config answers
10
+ * @returns {string} Processed content
11
+ */
12
+ function processTemplate(content, variables = {}) {
13
+ let result = content;
14
+
15
+ // Process conditionals first (they may contain variables)
16
+ result = processConditionals(result, variables);
17
+
18
+ // Then process simple variable replacements
19
+ result = processVariables(result, variables);
20
+
21
+ // Clean up any empty lines left by removed conditionals
22
+ result = cleanupEmptyLines(result);
23
+
24
+ return result;
25
+ }
26
+
27
+ /**
28
+ * Process {{#if}}, {{#unless}}, {{/if}}, {{/unless}} blocks
29
+ */
30
+ function processConditionals(content, variables) {
31
+ let result = content;
32
+
33
+ // Process {{#if variable == "value"}} blocks
34
+ // Handle both regular quotes and JSON-escaped quotes (\")
35
+ const ifEqualsPattern = /\{\{#if\s+(\w+)\s*==\s*\\?"([^"\\]+)\\?"\s*\}\}([\s\S]*?)\{\{\/if\}\}/g;
36
+ result = result.replaceAll(ifEqualsPattern, (match, varName, value, block) => {
37
+ return variables[varName] === value ? block : '';
38
+ });
39
+
40
+ // Process {{#if variable}} blocks (boolean or truthy check)
41
+ const ifBoolPattern = /\{\{#if\s+(\w+)\s*\}\}([\s\S]*?)\{\{\/if\}\}/g;
42
+ result = result.replaceAll(ifBoolPattern, (match, varName, block) => {
43
+ const val = variables[varName];
44
+ // Treat as truthy: true, non-empty string, non-zero number
45
+ const isTruthy = val === true || (typeof val === 'string' && val.length > 0) || (typeof val === 'number' && val !== 0);
46
+ return isTruthy ? block : '';
47
+ });
48
+
49
+ // Process {{#unless variable}} blocks (inverse of if)
50
+ const unlessPattern = /\{\{#unless\s+(\w+)\s*\}\}([\s\S]*?)\{\{\/unless\}\}/g;
51
+ result = result.replaceAll(unlessPattern, (match, varName, block) => {
52
+ const val = variables[varName];
53
+ const isFalsy = val === false || val === '' || val === null || val === undefined || val === 0;
54
+ return isFalsy ? block : '';
55
+ });
56
+
57
+ return result;
58
+ }
59
+
60
+ /**
61
+ * Process {{variable}} replacements
62
+ */
63
+ function processVariables(content, variables) {
64
+ let result = content;
65
+
66
+ // Replace {{variable}} with value
67
+ const varPattern = /\{\{(\w+)\}\}/g;
68
+ result = result.replaceAll(varPattern, (match, varName) => {
69
+ if (Object.hasOwn(variables, varName)) {
70
+ return String(variables[varName]);
71
+ }
72
+ // If variable not found, leave as-is (might be runtime variable like {user_name})
73
+ return match;
74
+ });
75
+
76
+ return result;
77
+ }
78
+
79
+ /**
80
+ * Clean up excessive empty lines left after removing conditional blocks
81
+ */
82
+ function cleanupEmptyLines(content) {
83
+ // Replace 3+ consecutive newlines with 2
84
+ return content.replaceAll(/\n{3,}/g, '\n\n');
85
+ }
86
+
87
+ /**
88
+ * Extract install_config from agent YAML object
89
+ * @param {Object} agentYaml - Parsed agent YAML
90
+ * @returns {Object|null} install_config section or null
91
+ */
92
+ function extractInstallConfig(agentYaml) {
93
+ return agentYaml?.agent?.install_config || null;
94
+ }
95
+
96
+ /**
97
+ * Remove install_config from agent YAML (after processing)
98
+ * @param {Object} agentYaml - Parsed agent YAML
99
+ * @returns {Object} Agent YAML without install_config
100
+ */
101
+ function stripInstallConfig(agentYaml) {
102
+ const result = structuredClone(agentYaml);
103
+ if (result.agent) {
104
+ delete result.agent.install_config;
105
+ }
106
+ return result;
107
+ }
108
+
109
+ /**
110
+ * Process entire agent YAML object with template variables
111
+ * @param {Object} agentYaml - Parsed agent YAML
112
+ * @param {Object} variables - Answers from install_config questions
113
+ * @returns {Object} Processed agent YAML
114
+ */
115
+ function processAgentYaml(agentYaml, variables) {
116
+ // Convert to JSON string, process templates, parse back
117
+ const jsonString = JSON.stringify(agentYaml, null, 2);
118
+ const processed = processTemplate(jsonString, variables);
119
+ return JSON.parse(processed);
120
+ }
121
+
122
+ /**
123
+ * Get default values from install_config questions
124
+ * @param {Object} installConfig - install_config section
125
+ * @returns {Object} Default values keyed by variable name
126
+ */
127
+ function getDefaultValues(installConfig) {
128
+ const defaults = {};
129
+
130
+ if (!installConfig?.questions) {
131
+ return defaults;
132
+ }
133
+
134
+ for (const question of installConfig.questions) {
135
+ if (question.var && question.default !== undefined) {
136
+ defaults[question.var] = question.default;
137
+ }
138
+ }
139
+
140
+ return defaults;
141
+ }
142
+
143
+ module.exports = {
144
+ processTemplate,
145
+ processConditionals,
146
+ processVariables,
147
+ extractInstallConfig,
148
+ stripInstallConfig,
149
+ processAgentYaml,
150
+ getDefaultValues,
151
+ cleanupEmptyLines,
152
+ };
@@ -1,54 +0,0 @@
1
- # Web Bundler Usage
2
-
3
- ALPHA NOTE: Bundling of individual agents might work, team bundling is being reworked and will come with Beta release soon.
4
-
5
- The web bundler creates self-contained XML bundles for BMAD agents, packaging all dependencies for web deployment.
6
-
7
- ## Quick Start
8
-
9
- ```bash
10
- # Bundle all agents from all modules
11
- npm run bundle
12
-
13
- # Clean and rebundle (removes old bundles first)
14
- npm run rebundle
15
- ```
16
-
17
- ## Custom Output Directory
18
-
19
- ```bash
20
- # Bundle to custom directory
21
- node tools/cli/bundlers/bundle-web.js all --output ./my-bundles
22
-
23
- # Rebundle to custom directory (auto-cleans first)
24
- node tools/cli/bundlers/bundle-web.js rebundle --output /absolute/path/to/custom/directory
25
-
26
- # Bundle specific module to custom directory
27
- node tools/cli/bundlers/bundle-web.js module bmm --output ./custom-folder
28
-
29
- # Bundle specific agent to custom directory
30
- node tools/cli/bundlers/bundle-web.js agent bmm analyst -o ./custom-folder
31
- ```
32
-
33
- ## Output
34
-
35
- Bundles are generated in `web-bundles/` directory by default when run from the root of the clones project:
36
-
37
- ```
38
- web-bundles/
39
- ├── [module-name]/
40
- │ └── agents/
41
- │ └── [agent-name].xml
42
- ```
43
-
44
- ## Skipping Agents
45
-
46
- Agents with `bundle="false"` attribute are automatically skipped during bundling.
47
-
48
- ## Bundle Contents
49
-
50
- Each bundle includes:
51
-
52
- - Agent definition with web activation
53
- - All resolved dependencies
54
- - Manifests for agent/team discovery
@@ -1,203 +0,0 @@
1
- # Create Agent Workflow
2
-
3
- Interactive agent builder creating BMad Core compliant agents as YAML source files that compile to .md during installation.
4
-
5
- ## Table of Contents
6
-
7
- - [Quick Start](#quick-start)
8
- - [Agent Types](#agent-types)
9
- - [Workflow Phases](#workflow-phases)
10
- - [Output Structure](#output-structure)
11
- - [Installation](#installation)
12
- - [Examples](#examples)
13
-
14
- ## Quick Start
15
-
16
- ```bash
17
- # Direct workflow
18
- workflow create-agent
19
-
20
- # Via BMad Builder
21
- *create-agent
22
- ```
23
-
24
- ## Agent Types
25
-
26
- ### Simple Agent
27
-
28
- - Self-contained functionality
29
- - Basic command structure
30
- - No external resources
31
-
32
- ### Expert Agent
33
-
34
- - Sidecar resources for domain knowledge
35
- - Extended capabilities
36
- - Knowledge base integration
37
-
38
- ### Module Agent
39
-
40
- - Full-featured with workflows
41
- - Module-specific commands
42
- - Integrated with module structure
43
-
44
- ## Workflow Phases
45
-
46
- ### Phase 0: Optional Brainstorming
47
-
48
- - Creative ideation session
49
- - Explore concepts and personalities
50
- - Generate command ideas
51
- - Output feeds into persona development
52
-
53
- ### Phase 1: Agent Setup
54
-
55
- 1. Choose agent type (Simple/Expert/Module)
56
- 2. Define identity (name, title, icon, filename)
57
- 3. Assign to module (if Module agent)
58
-
59
- ### Phase 2: Persona Development
60
-
61
- - Define role and responsibilities
62
- - Craft unique identity/backstory
63
- - Select communication style
64
- - Establish guiding principles
65
- - Add critical actions (optional)
66
-
67
- ### Phase 3: Command Building
68
-
69
- - Add required commands (*help, *exit)
70
- - Define workflow commands
71
- - Add task commands
72
- - Create action commands
73
- - Configure attributes
74
-
75
- ### Phase 4: Finalization
76
-
77
- - Generate .agent.yaml file
78
- - Create customize file (optional)
79
- - Setup sidecar resources (Expert agents)
80
- - Validate and compile
81
- - Provide usage instructions
82
-
83
- ## Output Structure
84
-
85
- ### Generated Files
86
-
87
- **Standalone Agents:**
88
-
89
- - Source: `{bmad_folder}/agents/{filename}.agent.yaml`
90
- - Compiled: `{bmad_folder}/agents/{filename}.md`
91
-
92
- **Module Agents:**
93
-
94
- - Source: `src/modules/{module}/agents/{filename}.agent.yaml`
95
- - Compiled: `{bmad_folder}/{module}/agents/{filename}.md`
96
-
97
- ### YAML Structure
98
-
99
- ```yaml
100
- agent:
101
- metadata:
102
- id: {bmad_folder}/{module}/agents/{filename}.md
103
- name: Agent Name
104
- title: Agent Title
105
- icon: 🤖
106
- module: module-name
107
- persona:
108
- role: '...'
109
- identity: '...'
110
- communication_style: '...'
111
- principles: ['...', '...']
112
- menu:
113
- - trigger: command-name
114
- workflow: path/to/workflow.yaml
115
- description: Command description
116
- ```
117
-
118
- ### Optional Customize File
119
-
120
- Location: `{bmad_folder}/_cfg/agents/{module}-{filename}.customize.yaml`
121
-
122
- Allows persona and menu overrides that persist through updates.
123
-
124
- ## Installation
125
-
126
- ### Compilation Methods
127
-
128
- **Quick Rebuild:**
129
-
130
- ```bash
131
- bmad compile-agents
132
- ```
133
-
134
- **During Module Install:**
135
- Automatic compilation when installing modules
136
-
137
- **Manual Compilation:**
138
-
139
- ```bash
140
- node tools/cli/bmad-cli.js compile-agents
141
- ```
142
-
143
- ## Examples
144
-
145
- ### Creating a Code Review Agent
146
-
147
- ```
148
- User: I need a code review agent
149
- Builder: Let's brainstorm first...
150
-
151
- [Brainstorming generates ideas for strict vs friendly reviewer]
152
-
153
- Builder: Now let's build your agent:
154
- - Type: Simple
155
- - Name: Code Reviewer
156
- - Role: Senior developer conducting thorough reviews
157
- - Style: Professional but approachable
158
- - Commands:
159
- - *review-pr: Review pull request
160
- - *review-file: Review single file
161
- - *review-standards: Check coding standards
162
- ```
163
-
164
- ### Creating a Domain Expert
165
-
166
- ```
167
- Type: Expert
168
- Name: Legal Advisor
169
- Sidecar: legal-knowledge/
170
- Commands:
171
- - *contract-review
172
- - *compliance-check
173
- - *risk-assessment
174
- ```
175
-
176
- ## Workflow Files
177
-
178
- ```
179
- create-agent/
180
- ├── workflow.yaml # Configuration
181
- ├── instructions.md # Step guide
182
- ├── checklist.md # Validation
183
- ├── README.md # This file
184
- ├── agent-types.md # Type details
185
- ├── agent-architecture.md # Patterns
186
- ├── agent-command-patterns.md # Commands
187
- └── communication-styles.md # Styles
188
- ```
189
-
190
- ## Best Practices
191
-
192
- 1. **Use brainstorming** for complex agents
193
- 2. **Start simple** - Add commands incrementally
194
- 3. **Test commands** before finalizing
195
- 4. **Document thoroughly** in descriptions
196
- 5. **Follow naming conventions** consistently
197
-
198
- ## Related Documentation
199
-
200
- - [Agent Types](./agent-types.md)
201
- - [Command Patterns](./agent-command-patterns.md)
202
- - [Communication Styles](./communication-styles.md)
203
- - [BMB Module](../../README.md)