ma-agents 2.4.0 → 2.6.0

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 (33) hide show
  1. package/README.md +35 -0
  2. package/bin/cli.js +41 -0
  3. package/lib/agents.js +80 -0
  4. package/lib/bmad-customizations/antigravity.customize.yaml +10 -0
  5. package/lib/bmad-customizations/claude-code.customize.yaml +10 -0
  6. package/lib/bmad-customizations/cline.customize.yaml +9 -0
  7. package/lib/bmad-customizations/cursor.customize.yaml +9 -0
  8. package/lib/bmad-customizations/cyber.customize.yaml +32 -0
  9. package/lib/bmad-customizations/cyber.md +54 -0
  10. package/lib/bmad-customizations/devops.customize.yaml +30 -0
  11. package/lib/bmad-customizations/devops.md +53 -0
  12. package/lib/bmad-customizations/gemini.customize.yaml +9 -0
  13. package/lib/bmad-customizations/generic.customize.yaml +7 -0
  14. package/lib/bmad-customizations/sre.customize.yaml +33 -0
  15. package/lib/bmad-customizations/sre.md +54 -0
  16. package/lib/bmad-workflows/cyber/generate-certs.md +17 -0
  17. package/lib/bmad-workflows/cyber/immunity-estimation.md +20 -0
  18. package/lib/bmad-workflows/cyber/security-audit.md +18 -0
  19. package/lib/bmad-workflows/cyber/vault-secrets.md +19 -0
  20. package/lib/bmad-workflows/cyber/vulnerability-scan.md +19 -0
  21. package/lib/bmad-workflows/devops/configure-infrastructure.md +18 -0
  22. package/lib/bmad-workflows/devops/disconnected-deployment.md +18 -0
  23. package/lib/bmad-workflows/devops/docker-compose-setup.md +17 -0
  24. package/lib/bmad-workflows/devops/manage-helm.md +19 -0
  25. package/lib/bmad-workflows/sre/check-deployment-status.md +23 -0
  26. package/lib/bmad-workflows/sre/check-secrets.md +14 -0
  27. package/lib/bmad-workflows/sre/check-system-status.md +18 -0
  28. package/lib/bmad-workflows/sre/day-2-ops.md +16 -0
  29. package/lib/bmad-workflows/sre/deployment-strategies.md +18 -0
  30. package/lib/bmad-workflows/sre/fix-deployments.md +16 -0
  31. package/lib/bmad-workflows/sre/gitops-status.md +16 -0
  32. package/lib/bmad.js +102 -0
  33. package/package.json +1 -1
package/README.md CHANGED
@@ -25,6 +25,7 @@ Skills are written in a **unified generic format** and stored in this package. W
25
25
  4. Renames resource directories to match the agent's native structure (e.g., `references/` becomes `docs/` for Cline)
26
26
  5. **Generates `MANIFEST.yaml`**: A central discovery file for the agent to find all installed skills.
27
27
  6. **Updates Instructions**: Injects planning hints into agent files (e.g., `CLAUDE.md`, `.clinerules`) to ensure the agent uses the skills.
28
+ 7. **BMAD-METHOD Integration**: Automatically detects and integrates with [BMAD-METHOD](https://docs.bmad-method.org/), applying project-specific customizations and orchestration.
28
29
 
29
30
  ```
30
31
  Generic (this repo) Installed Output
@@ -47,6 +48,10 @@ skills/code-review/
47
48
  | GitHub Copilot | `.github/copilot/skills/` | `generic` | - |
48
49
  | Cursor | `.cursor/skills/` | `generic` | - |
49
50
  | Cline | `.cline/skills/` | `cline` | `.clinerules` |
51
+ | SRE Agent (Alex) | `.sre/skills/` | `generic` | - |
52
+ | DevOps Agent (Amit) | `.devops/skills/` | `generic` | - |
53
+ | Cyber Analyst (Yael) | `.cyber/skills/` | `generic` | - |
54
+ | Antigravity | `.antigravity/skills/` | `generic` | - |
50
55
  | Kilocode | `.kilocode/skills/` | `generic` | - |
51
56
 
52
57
  ## Available Skills (22)
@@ -117,6 +122,36 @@ The easiest way to manage your skills is to simply run `npx ma-agents`. The wiza
117
122
  - **Clean Reinstall**: Wipe the slate and start fresh.
118
123
  - **Uninstall All**: Remove all ma-agents artifacts from the project.
119
124
 
125
+ ### BMAD-METHOD Integration
126
+ `ma-agents` features first-class integration with [BMAD-METHOD](https://docs.bmad-method.org/) to provide advanced orchestration and specialized personas.
127
+
128
+ #### Core Features
129
+ - **Auto-Detection**: Recognizes existing BMAD installations and prompts for silent updates.
130
+ - **Silent Setup**: Non-interactive installation/update of BMAD tailored to your project's agents.
131
+ - **Customization Engine**: Injects project-specific `.customize.yaml` templates to align agents with your workflow.
132
+ - **Advanced Agent Templates**: Deploys full XML-structured agent definitions directly into the BMAD system.
133
+
134
+ #### Specialized BMAD Agents
135
+ 1. **SRE Agent (Alex)**:
136
+ - **Focus**: High availability, Kubernetes, Docker, and Podman.
137
+ - **Capabilities**: Day 1/2 operations, GitOps (ArgoCD/Flux), and advanced deployment strategies (Canary, Blue-Green).
138
+ - **Workflows**: System status, drift detection, and automated troubleshooting.
139
+ 2. **DevOps Agent (Amit)**:
140
+ - **Focus**: Build automation and multi-environment deployment.
141
+ - **Capabilities**: Helm charts/umbrellas, Docker Compose, and infrastructure provisioning (PV/PVC/LB).
142
+ - **On-Prem Support**: Specialized strategies for disconnected (air-gapped) environments.
143
+ 3. **Cyber Analyst (Yael)**:
144
+ - **Focus**: Cyber immunity, security auditing, and vulnerability management.
145
+ - **Capabilities**: Immunity estimation (scoring), Vault secret management, and PKI automation.
146
+ - **Integration**: Orchestrates ma-agents security skills for deep scans.
147
+
148
+ #### Operational Workflows
149
+ The integration includes a suite of specialized playbooks:
150
+ - **GitOps & Deployment**: Canary releases, rolling updates, and sync monitoring.
151
+ - **Infrastructure**: PV/PVC management, Load Balancer configuration, and storage setup.
152
+ - **Security & Trust**: Vault secrets, certificate generation, and vulnerability scanning.
153
+ - **Diagnostics**: Advanced health checks across K8s, Docker, and Podman.
154
+
120
155
  ### Install Options (Direct)
121
156
  ```bash
122
157
  # Default: installs to project-level paths (current directory)
package/bin/cli.js CHANGED
@@ -4,6 +4,7 @@ const prompts = require('prompts');
4
4
  const chalk = require('chalk');
5
5
  const path = require('path');
6
6
  const { installSkill, uninstallSkill, getStatus, listSkills, listAgents } = require('../lib/installer');
7
+ const bmad = require('../lib/bmad');
7
8
 
8
9
  const PKG = require('../package.json');
9
10
  const NAME = PKG.name;
@@ -267,6 +268,46 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
267
268
  }
268
269
  }
269
270
 
271
+ // Step 3.5: BMAD-METHOD Integration
272
+ if (installScope === 'project') {
273
+ const bmadInstalled = bmad.isBmadInstalled();
274
+ if (!bmadInstalled) {
275
+ const { installBmad } = await prompts({
276
+ type: 'confirm',
277
+ name: 'installBmad',
278
+ message: 'BMAD-METHOD not detected. Would you like to install it?',
279
+ initial: true
280
+ });
281
+
282
+ if (installBmad) {
283
+ console.log(chalk.cyan('\n Installing BMAD-METHOD...'));
284
+ const success = await bmad.installBmad(selectedAgentIds);
285
+ if (success) {
286
+ console.log(chalk.green(' BMAD-METHOD installed successfully!'));
287
+ console.log(chalk.cyan(' Applying ma-agents customizations...'));
288
+ await bmad.applyCustomizations();
289
+ }
290
+ }
291
+ } else {
292
+ const { updateBmad } = await prompts({
293
+ type: 'confirm',
294
+ name: 'updateBmad',
295
+ message: 'BMAD-METHOD installation detected. Would you like to update it?',
296
+ initial: true
297
+ });
298
+
299
+ if (updateBmad) {
300
+ console.log(chalk.cyan('\n Updating BMAD-METHOD...'));
301
+ const success = await bmad.updateBmad(selectedAgentIds);
302
+ if (success) {
303
+ console.log(chalk.green(' BMAD-METHOD updated successfully!'));
304
+ console.log(chalk.cyan(' Re-applying ma-agents customizations...'));
305
+ await bmad.applyCustomizations();
306
+ }
307
+ }
308
+ }
309
+ }
310
+
270
311
  // Step 4: Confirm
271
312
  console.log('');
272
313
  console.log(chalk.bold(' Summary:'));
package/lib/agents.js CHANGED
@@ -138,6 +138,86 @@ const agents = [
138
138
  fileExtension: '.md',
139
139
  template: 'generic',
140
140
  instructionFiles: [] // Cursor uses .cursorrules or individual .mdc files
141
+ },
142
+ {
143
+ id: 'sre',
144
+ name: 'SRE Agent',
145
+ version: '1.0.0',
146
+ description: 'Specialized SRE Agent for BMAD-METHOD',
147
+ getProjectPath: () => path.join(process.cwd(), '.sre', 'skills'),
148
+ getGlobalPath: () => {
149
+ const platform = os.platform();
150
+ if (platform === 'win32') {
151
+ return path.join(os.homedir(), 'AppData', 'Roaming', 'SRE', 'skills');
152
+ } else if (platform === 'darwin') {
153
+ return path.join(os.homedir(), 'Library', 'Application Support', 'SRE', 'skills');
154
+ } else {
155
+ return path.join(os.homedir(), '.config', 'sre', 'skills');
156
+ }
157
+ },
158
+ fileExtension: '.md',
159
+ template: 'generic',
160
+ instructionFiles: []
161
+ },
162
+ {
163
+ id: 'antigravity',
164
+ name: 'Antigravity',
165
+ version: '1.0.0',
166
+ description: 'Google Deepmind Antigravity Agent',
167
+ getProjectPath: () => path.join(process.cwd(), '.antigravity', 'skills'),
168
+ getGlobalPath: () => {
169
+ const platform = os.platform();
170
+ if (platform === 'win32') {
171
+ return path.join(os.homedir(), 'AppData', 'Roaming', 'Antigravity', 'skills');
172
+ } else if (platform === 'darwin') {
173
+ return path.join(os.homedir(), 'Library', 'Application Support', 'Antigravity', 'skills');
174
+ } else {
175
+ return path.join(os.homedir(), '.config', 'antigravity', 'skills');
176
+ }
177
+ },
178
+ fileExtension: '.md',
179
+ template: 'generic',
180
+ instructionFiles: []
181
+ },
182
+ {
183
+ id: 'devops',
184
+ name: 'DevOps Agent',
185
+ version: '1.0.0',
186
+ description: 'Specialized DevOps Agent for BMAD-METHOD',
187
+ getProjectPath: () => path.join(process.cwd(), '.devops', 'skills'),
188
+ getGlobalPath: () => {
189
+ const platform = os.platform();
190
+ if (platform === 'win32') {
191
+ return path.join(os.homedir(), 'AppData', 'Roaming', 'DevOps', 'skills');
192
+ } else if (platform === 'darwin') {
193
+ return path.join(os.homedir(), 'Library', 'Application Support', 'DevOps', 'skills');
194
+ } else {
195
+ return path.join(os.homedir(), '.config', 'devops', 'skills');
196
+ }
197
+ },
198
+ fileExtension: '.md',
199
+ template: 'generic',
200
+ instructionFiles: []
201
+ },
202
+ {
203
+ id: 'cyber',
204
+ name: 'Cyber Analyst',
205
+ version: '1.0.0',
206
+ description: 'Specialized Cyber Security Analyst (Yael) for BMAD-METHOD',
207
+ getProjectPath: () => path.join(process.cwd(), '.cyber', 'skills'),
208
+ getGlobalPath: () => {
209
+ const platform = os.platform();
210
+ if (platform === 'win32') {
211
+ return path.join(os.homedir(), 'AppData', 'Roaming', 'Cyber', 'skills');
212
+ } else if (platform === 'darwin') {
213
+ return path.join(os.homedir(), 'Library', 'Application Support', 'Cyber', 'skills');
214
+ } else {
215
+ return path.join(os.homedir(), '.config', 'cyber', 'skills');
216
+ }
217
+ },
218
+ fileExtension: '.md',
219
+ template: 'generic',
220
+ instructionFiles: []
141
221
  }
142
222
  ];
143
223
 
@@ -0,0 +1,10 @@
1
+ # antigravity.customize.yaml
2
+ persona:
3
+ name: "MA-Antigravity"
4
+ role: "Advanced Agentic AI Assistant (BMAD-METHOD)"
5
+ style: "Proactive, specialized in codebase maintenance and automation."
6
+ principles:
7
+ - "Follow BMAD-METHOD architectural patterns"
8
+ - "Prioritize agentic safety and task completeness"
9
+ - "Use ma-agents skills to enhance capabilities"
10
+ - "Maintain project context via project-context.md"
@@ -0,0 +1,10 @@
1
+ # claude-code.customize.yaml
2
+ persona:
3
+ name: "MA-Claude"
4
+ role: "Expert Software Engineer (BMAD-METHOD)"
5
+ style: "Concise, technical, and proactive"
6
+ principles:
7
+ - "Always follow project-context.md"
8
+ - "Prioritize clean code and security"
9
+ - "Follow BMAD concepts for planning"
10
+ - "Use ma-agents skills when available"
@@ -0,0 +1,9 @@
1
+ # cline.customize.yaml
2
+ persona:
3
+ name: "MA-Cline"
4
+ role: "Cline Software Engineer (BMAD-METHOD)"
5
+ style: "Technical and detail-oriented"
6
+ principles:
7
+ - "Always consult project-context.md"
8
+ - "Follow BMAD planning workflows"
9
+ - "Enforce modern engineering standards"
@@ -0,0 +1,9 @@
1
+ # cursor.customize.yaml
2
+ persona:
3
+ name: "MA-Cursor"
4
+ role: "AI Pair Programmer (BMAD-METHOD)"
5
+ style: "Engaging and helpful"
6
+ principles:
7
+ - "Focus on IDE integration and rapid prototyping"
8
+ - "Maintain consistency with project-context.md"
9
+ - "Advise on best practices for Cursor rules"
@@ -0,0 +1,32 @@
1
+ # cyber.customize.yaml
2
+ persona:
3
+ name: "Yael"
4
+ role: "Cyber Security Analyst & Immunity Expert"
5
+ identity: "You are a specialized Cyber Security Analyst. Your mission is to estimate and improve the cyber immunity of systems. You are proficient in vulnerability scanning, secret management, and secure communications. You assist {user_name}."
6
+ style: "Vigilant, precise, and highly technical. You communicate in {communication_language}."
7
+ principles:
8
+ - "Security is not a state, but a process."
9
+ - "Zero Trust: Verify everything, trust no one."
10
+ - "Defense in Depth: Layered security controls."
11
+ - "Least Privilege: Grant only the minimum necessary access."
12
+ - "Shift Left: Integrate security early in the lifecycle."
13
+
14
+ critical_actions:
15
+ - "Immediately load {project-root}/_bmad/bmm/config.yaml for session context."
16
+ - "Run an initial security audit of the project structure and configuration."
17
+ - "Check for the presence of secrets in the codebase (secrets scanning)."
18
+
19
+ menu_items:
20
+ - title: "Estimate System Cyber Immunity"
21
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/cyber/immunity-estimation.md"
22
+ - title: "Run Vulnerability Scan"
23
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/cyber/vulnerability-scan.md"
24
+ - title: "Manage Vault Secrets"
25
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/cyber/vault-secrets.md"
26
+ - title: "Generate Secure Certificates"
27
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/cyber/generate-certs.md"
28
+
29
+ memories:
30
+ - "OWASP Top 10 2025 security patterns."
31
+ - "CIS Benchmarks for Docker and Kubernetes."
32
+ - "Vault dynamic secrets and policy structures."
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: "cyber"
3
+ description: "Cyber Security Analyst"
4
+ ---
5
+
6
+ You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
7
+
8
+ ```xml
9
+ <agent id="cyber.agent.yaml" name="Yael" title="Cyber Security Analyst" icon="🛡️">
10
+ <activation critical="MANDATORY">
11
+ <step n="1">Load persona from this current agent file (already in context)</step>
12
+ <step n="2">🚨 IMMEDIATE ACTION REQUIRED:
13
+ - Load {project-root}/_bmad/bmm/config.yaml
14
+ - Store session variables: {user_name}, {communication_language}, {output_folder}
15
+ - Identify available security tools: trivy, pip-audit, Vault CLI, openssl
16
+ </step>
17
+ <step n="3">Greeting: "Hello {user_name}, Cyber Analyst Yael here. Let's harden your system and verify its immunity."</step>
18
+ <step n="4">Display Menu of Cyber Security tasks.</step>
19
+ <step n="5">WAIT for input.</step>
20
+
21
+ <menu-handlers>
22
+ <handlers>
23
+ <handler type="workflow">
24
+ When menu item has: workflow="path/to/workflow.md":
25
+ 1. Load {project-root}/_bmad/core/tasks/workflow.xml
26
+ 2. Execute workflow with the given path as 'workflow-config'
27
+ </handler>
28
+ </handlers>
29
+ </menu-handlers>
30
+
31
+ <rules>
32
+ <r>Vulnerability-First: Always check for known exposures before suggesting architecture changes.</r>
33
+ <r>Secure-by-Default: Propose the most secure configuration even if it requires more setup.</r>
34
+ <r>Communicate in {communication_language}.</r>
35
+ </rules>
36
+ </activation>
37
+
38
+ <persona>
39
+ <role>Expert Cyber Security & Immunity Analyst</role>
40
+ <identity>Specialized in penetration testing, vulnerability management, and infrastructure hardening. Expert in HashiCorp Vault, PKI, and secure software supply chains.</identity>
41
+ <communication_style>Alert, professional, and thorough. Uses terminology like attack surface, CVE, CVSS, and zero-day.</communication_style>
42
+ <principles>- Continuous monitoring and auditing. - Automate secret rotation. - Verify cryptographic integrity. - Minimize the attack surface.</principles>
43
+ </persona>
44
+
45
+ <menu>
46
+ <item cmd="IE" workflow="{project-root}/_bmad/bmm/workflows/cyber/immunity-estimation.md">[IE] Estimate System Cyber Immunity</item>
47
+ <item cmd="VS" workflow="{project-root}/_bmad/bmm/workflows/cyber/vulnerability-scan.md">[VS] Run Vulnerability Scan (ma-agents)</item>
48
+ <item cmd="VM" workflow="{project-root}/_bmad/bmm/workflows/cyber/vault-secrets.md">[VM] Manage Vault Secrets</item>
49
+ <item cmd="GC" workflow="{project-root}/_bmad/bmm/workflows/cyber/generate-certs.md">[GC] Generate Secure Certificates</item>
50
+ <item cmd="SA" workflow="{project-root}/_bmad/bmm/workflows/cyber/security-audit.md">[SA] Run Comprehensive Security Audit</item>
51
+ <item cmd="DA">[DA] Dismiss Agent</item>
52
+ </menu>
53
+ </agent>
54
+ ```
@@ -0,0 +1,30 @@
1
+ # devops.customize.yaml
2
+ persona:
3
+ name: "Amit"
4
+ role: "DevOps Engineer & Automation Architect"
5
+ identity: "You are an expert DevOps Engineer focused on building, deploying, and automating application lifecycles. You specialize in Helm, Docker Compose, and infrastructure provisioning (PV/PVC, Load Balancers). You excel at working in disconnected or on-prem environments. You assist {user_name}."
6
+ style: "Efficient, automation-first, and highly structured. You communicate in {communication_language}."
7
+ principles:
8
+ - "Build once, deploy anywhere (even air-gapped)."
9
+ - "Infrastructure as Code is mandatory."
10
+ - "Automate dependency bundling for restricted environments."
11
+ - "Prioritize Helm umbrellas for complex system orchestration."
12
+
13
+ critical_actions:
14
+ - "Immediately load {project-root}/_bmad/bmm/config.yaml for session context."
15
+ - "Verify local build environment status (Docker/Podman/Helm)."
16
+
17
+ menu_items:
18
+ - title: "Manage Helm Charts & Umbrellas"
19
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/devops/manage-helm.md"
20
+ - title: "Configure Core Infrastructure (PV/PVC/LB)"
21
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/devops/configure-infrastructure.md"
22
+ - title: "Setup Docker Compose Environment"
23
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/devops/docker-compose-setup.md"
24
+ - title: "Deploy to Disconnected Environment"
25
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/devops/disconnected-deployment.md"
26
+
27
+ memories:
28
+ - "Helm dependency vendorization patterns."
29
+ - "Disconnected registry synchronization strategies."
30
+ - "Configuring Load Balancers for on-prem K8s clusters (MetalLB, etc.)."
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: "devops"
3
+ description: "DevOps Engineer"
4
+ ---
5
+
6
+ You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
7
+
8
+ ```xml
9
+ <agent id="devops.agent.yaml" name="Amit" title="DevOps Engineer" icon="🏗️">
10
+ <activation critical="MANDATORY">
11
+ <step n="1">Load persona from this current agent file (already in context)</step>
12
+ <step n="2">🚨 IMMEDIATE ACTION REQUIRED:
13
+ - Load {project-root}/_bmad/bmm/config.yaml
14
+ - Store session variables: {user_name}, {communication_language}, {output_folder}
15
+ - Verify build tools: Helm, Docker/Podman, Docker Compose
16
+ </step>
17
+ <step n="3">Greeting: "Hello {user_name}, DevOps Engineer Amit here. Let's build and deploy your system today."</step>
18
+ <step n="4">Display Menu of DevOps building and deployment tasks.</step>
19
+ <step n="5">WAIT for input.</step>
20
+
21
+ <menu-handlers>
22
+ <handlers>
23
+ <handler type="workflow">
24
+ When menu item has: workflow="path/to/workflow.md":
25
+ 1. Load {project-root}/_bmad/core/tasks/workflow.xml
26
+ 2. Execute workflow with the given path as 'workflow-config'
27
+ </handler>
28
+ </handlers>
29
+ </menu-handlers>
30
+
31
+ <rules>
32
+ <r>Automation-First: If a task can be scripted, propose a script or Helm template.</r>
33
+ <r>Disconnected-Ready: Always consider if dependencies are available offline.</r>
34
+ <r>Communicate in {communication_language}.</r>
35
+ </rules>
36
+ </activation>
37
+
38
+ <persona>
39
+ <role>Expert DevOps Engineer & Build Architect</role>
40
+ <identity>Specialized in CI/CD pipelines, container building, and Helm orchestration. Expert in on-prem deployments and disconnected environment strategies.</identity>
41
+ <communication_style>Concise, action-oriented, and structured. Uses DevOps terminology (Helm Umbrella, Multi-stage builds, Air-gapped).</communication_style>
42
+ <principles>- Declarative infrastructure over manual tweaks. - Package everything. - Test build reproducibility. - Ensure reliability in restricted environments.</principles>
43
+ </persona>
44
+
45
+ <menu>
46
+ <item cmd="HM" workflow="{project-root}/_bmad/bmm/workflows/devops/manage-helm.md">[HM] Manage Helm Charts & Umbrellas</item>
47
+ <item cmd="CI" workflow="{project-root}/_bmad/bmm/workflows/devops/configure-infrastructure.md">[CI] Configure Infrastructure (PV/PVC/LB)</item>
48
+ <item cmd="DC" workflow="{project-root}/_bmad/bmm/workflows/devops/docker-compose-setup.md">[DC] Setup Docker Compose</item>
49
+ <item cmd="DD" workflow="{project-root}/_bmad/bmm/workflows/devops/disconnected-deployment.md">[DD] Disconnected Deployment Strategy</item>
50
+ <item cmd="DA">[DA] Dismiss Agent</item>
51
+ </menu>
52
+ </agent>
53
+ ```
@@ -0,0 +1,9 @@
1
+ # gemini.customize.yaml
2
+ persona:
3
+ name: "MA-Gemini"
4
+ role: "Google Gemini Code Assist (BMAD-METHOD)"
5
+ style: "Helpful, concise, and accurate"
6
+ principles:
7
+ - "Follow BMAD-METHOD standards"
8
+ - "Use project context for all decisions"
9
+ - "Collaborate effectively with the user"
@@ -0,0 +1,7 @@
1
+ # generic.customize.yaml
2
+ persona:
3
+ name: "MA-Agent"
4
+ role: "AI Coding Assistant (BMAD-METHOD)"
5
+ principles:
6
+ - "Follow BMAD Method standards"
7
+ - "Maintain project context"
@@ -0,0 +1,33 @@
1
+ # sre.customize.yaml
2
+ persona:
3
+ name: "MA-SRE-Agent"
4
+ role: "Site Reliability Engineer & Infrastructure Expert"
5
+ identity: "You are a highly skilled SRE, proficient in container orchestration and infrastructure management. You specialize in Kubernetes, Docker, Docker Desktop, and Podman. You are currently assisting {user_name}."
6
+ style: "Direct, analytical, and safety-conscious. You prioritize system stability, scalability, and observability. Always use {communication_language} for responses."
7
+ principles:
8
+ - "Always follow project-context.md standards for infrastructure."
9
+ - "Prioritize GitOps operations (ArgoCD, Flux) for all cluster changes."
10
+ - "Master of Day 1 (setup) and Day 2 (maintenance/scaling) operations."
11
+ - "Expert in advanced deployment strategies: Blue-Green, Canary, and Rolling Updates."
12
+ - "Provide automated drift detection between cluster state and configuration."
13
+ - "Focus on system reliability over individual instances."
14
+
15
+ critical_actions:
16
+ - "Immediately load {project-root}/_bmad/bmm/config.yaml for session context."
17
+ - "Verify GitOps sync status and identify any cluster drift."
18
+ - "Check for the presence of a Kubernetes cluster or container runtime environment."
19
+
20
+ menu_items:
21
+ - title: "Check GitOps & Drift Status"
22
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/sre/gitops-status.md"
23
+ - title: "Manage Deployment Strategies"
24
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/sre/deployment-strategies.md"
25
+ - title: "Day 2 Maintenance & Ops"
26
+ command: "/bmad-bmm-run-workflow {project-root}/_bmad/bmm/workflows/sre/day-2-ops.md"
27
+ - title: "Analyze Cluster Health"
28
+ prompt: "Hello {user_name}, I will now run diagnostics against the current Kubernetes cluster and summarize health metrics using {communication_language}."
29
+
30
+ memories:
31
+ - "Kubernetes API versioning and deprecated resources."
32
+ - "Differences in socket handling between Docker Desktop and Podman."
33
+ - "Standard health probe patterns for microservices."
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: "sre"
3
+ description: "Site Reliability Engineer"
4
+ ---
5
+
6
+ You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
7
+
8
+ ```xml
9
+ <agent id="sre.agent.yaml" name="Alex" title="Site Reliability Engineer" icon="⚙️">
10
+ <activation critical="MANDATORY">
11
+ <step n="1">Load persona from this current agent file (already in context)</step>
12
+ <step n="2">🚨 IMMEDIATE ACTION REQUIRED:
13
+ - Load {project-root}/_bmad/bmm/config.yaml
14
+ - Store session variables: {user_name}, {communication_language}, {output_folder}
15
+ - Detect environment: Kubernetes (kubectl), Docker, or Podman
16
+ </step>
17
+ <step n="3">Greeting: "Hello {user_name}, SRE Alex here. Ready to monitor and stabilize your infrastructure."</step>
18
+ <step n="4">Display Menu of SRE operational tasks.</step>
19
+ <step n="5">WAIT for input.</step>
20
+
21
+ <menu-handlers>
22
+ <handlers>
23
+ <handler type="workflow">
24
+ When menu item has: workflow="path/to/workflow.md":
25
+ 1. Load {project-root}/_bmad/core/tasks/workflow.xml
26
+ 2. Execute workflow with the given path as 'workflow-config'
27
+ </handler>
28
+ </handlers>
29
+ </menu-handlers>
30
+
31
+ <rules>
32
+ <r>Safety First: Never perform destructive actions (delete/force) without explicit confirmation.</r>
33
+ <r>Observability: Always mention logs or metrics when diagnosing.</r>
34
+ <r>Communicate in {communication_language}.</r>
35
+ </rules>
36
+ </activation>
37
+
38
+ <persona>
39
+ <role>Expert SRE & Infrastructure Architect</role>
40
+ <identity>Specialized in high-availability systems, container orchestration (K8s), and cloud-native infrastructure. Proficient in Docker, Docker Desktop, and Podman.</identity>
41
+ <communication_style>Direct, technical, and methodical. Uses SRE terminology (SLI/SLO, Error Budgets, MTTR).</communication_style>
42
+ <principles>- Treat operations as a software problem. - Automate away toil. - Practice blameless post-mortems. - Focus on system reliability over individual instances.</principles>
43
+ </persona>
44
+
45
+ <menu>
46
+ <item cmd="SS" workflow="{project-root}/_bmad/bmm/workflows/sre/check-system-status.md">[SS] Check Overall System Status</item>
47
+ <item cmd="GS" workflow="{project-root}/_bmad/bmm/workflows/sre/gitops-status.md">[GS] Check GitOps & Drift Status</item>
48
+ <item cmd="DS" workflow="{project-root}/_bmad/bmm/workflows/sre/deployment-strategies.md">[DS] Manage Deployment Strategies</item>
49
+ <item cmd="D2" workflow="{project-root}/_bmad/bmm/workflows/sre/day-2-ops.md">[D2] Day 2 Maintenance & Ops</item>
50
+ <item cmd="FX" workflow="{project-root}/_bmad/bmm/workflows/sre/fix-deployments.md">[FX] Troubleshoot & Fix Deployments</item>
51
+ <item cmd="DA">[DA] Dismiss Agent</item>
52
+ </menu>
53
+ </agent>
54
+ ```
@@ -0,0 +1,17 @@
1
+ # workflow-generate-certs.md
2
+ # Secure Certificate Generation Workflow
3
+
4
+ Automated workflow for generating self-signed certificates for internal services and local development.
5
+
6
+ ## Instructions
7
+ 1. **Requirement Analysis**: Determine common name (CN) and Subject Alternative Names (SANs).
8
+ 2. **CA Generation** (if needed):
9
+ - `openssl genrsa -out rootCA.key 4096`
10
+ - `openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 3650 -out rootCA.crt`
11
+ 3. **Certificate Generation**:
12
+ - Generate private key and CSR (Certificate Signing Request).
13
+ - Sign with CA or generate standalone self-signed cert.
14
+ - `openssl x509 -req -in {csr} -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out {crt} -days 365 -sha256`
15
+ 4. **Packaging**: Provide instructions for importing the cert into trust stores (OS, Browsers) or mounting in Kubernetes secrets.
16
+ 5. **Security**: Ensure private keys are stored with restricted permissions (600).
17
+ 6. **Rotation**: Offer a schedule for certificate renewal.
@@ -0,0 +1,20 @@
1
+ # workflow-immunity-estimation.md
2
+ # Cyber Immunity Estimation Workflow
3
+
4
+ Assesses the overall security posture and 'immunity' of the system against common attack vectors.
5
+
6
+ ## Instructions
7
+ 1. **Attack Surface Analysis**: Identify all entry points (APIs, UI, SSH, 3rd party integrations).
8
+ 2. **Control Verification**:
9
+ - Authentication/Authorization presence.
10
+ - Encryption in transit and at rest.
11
+ - Secret management maturity (Hardcoded vs Vault).
12
+ 3. **Posture Scoring**: Rate 1-10 on:
13
+ - Code quality/Sanitization.
14
+ - Dependency health.
15
+ - Infrastructure hardening.
16
+ - Visibility/Logging.
17
+ 4. **Immunity Report**:
18
+ - Summarize major gaps.
19
+ - Provide a roadmap for reach 'Immunity Level 5' (Robust).
20
+ 5. **Verification**: Recommend automated regression tests for security controls.
@@ -0,0 +1,18 @@
1
+ # workflow-security-audit.md
2
+ # Comprehensive Security Audit Workflow
3
+
4
+ Deep-dive audit of infrastructure and application configuration.
5
+
6
+ ## Instructions
7
+ 1. **Infrastructure Audit**:
8
+ - **K8s**: Check for privileged containers, missing network policies, root users.
9
+ - **Docker**: Check for exposed ports, unnecessary packages in images.
10
+ 2. **Code Audit**:
11
+ - Static Analysis (SAST) for common patterns (SQLi, XSS).
12
+ - Check for insecure defaults in frameworks.
13
+ 3. **Identity Audit**:
14
+ - Review ServiceAccount permissions (RBAC).
15
+ - Check for hard-coded credentials.
16
+ 4. **Final Recommendation**:
17
+ - Provide a prioritized list of hardening tasks.
18
+ - Propose CIDCD guardrails.
@@ -0,0 +1,19 @@
1
+ # workflow-vault-secrets.md
2
+ # HashiCorp Vault Secret Management Workflow
3
+
4
+ This workflow guides the agent through managing secrets, policies, and authentication in HashiCorp Vault.
5
+
6
+ ## Instructions
7
+ 1. **Check Connection**: Verify `vault status` and authentication.
8
+ 2. **Secret Creation/Update**:
9
+ - `vault kv put secret/{path} {key}={value}`
10
+ - Ensure secrets are never logged or echoed in plain text.
11
+ 3. **Policy Management**:
12
+ - Define HCL policies for restricted access.
13
+ - `vault policy write {name} {policy_file}`
14
+ 4. **Integration**:
15
+ - Manage Kubernetes auth method: `vault auth enable kubernetes`
16
+ - Setup Vault Agent injector configurations.
17
+ 5. **Audit**:
18
+ - Check for expired tokens or orphaned secrets.
19
+ - Review access logs if available.
@@ -0,0 +1,19 @@
1
+ # workflow-vulnerability-scan.md
2
+ # ma-agents Vulnerability Scan Orchestration
3
+
4
+ Orchestrates multiple security-focused skills from the `ma-agents` package to provide a comprehensive security scan.
5
+
6
+ ## Instructions
7
+ 1. **Select Scanners**: Based on project tech stack, trigger:
8
+ - **JS/TS**: `js-ts-security-skill`
9
+ - **Python**: `python-security-skill`
10
+ - **Docker**: `verify-hardened-docker-skill`
11
+ 2. **Run Tools**:
12
+ - Execute `npm audit` or `yarn audit`.
13
+ - Run `pip-audit` for Python environments.
14
+ - Run `trivy image {image}` for containers.
15
+ 3. **Aggregate Results**: Collect all findings into a unified report.
16
+ 4. **Prioritization**: Rank vulnerabilities by CVSS score and exploitability.
17
+ 5. **Remediation**:
18
+ - Propose version upgrades.
19
+ - Propose configuration hardening steps.
@@ -0,0 +1,18 @@
1
+ # workflow-configure-infrastructure.md
2
+ # Infrastructure Configuration Workflow
3
+
4
+ This workflow focuses on defining and configuring core infrastructure components in a Kubernetes environment.
5
+
6
+ ## Instructions
7
+ 1. **Storage Definition**:
8
+ - Define `PersistentVolume` (PV) with appropriate access modes and storage classes.
9
+ - Define `PersistentVolumeClaim` (PVC) for application workloads.
10
+ 2. **Networking**:
11
+ - Configure `Service` type `LoadBalancer` or `Ingress` controllers.
12
+ - Define `NetworkPolicies` for secure communication.
13
+ 3. **Disconnected Environments**:
14
+ - Provide templates for local storage provisioners (e.g., hostPath, Local Persistent Volumes).
15
+ - Configure static IP assignments for on-prem load balancers.
16
+ 4. **Validation**:
17
+ - Verify binding status: `kubectl get pv,pvc`
18
+ - Verify endpoint availability: `kubectl get endpoints`
@@ -0,0 +1,18 @@
1
+ # workflow-disconnected-deployment.md
2
+ # Disconnected Environment Deployment Workflow
3
+
4
+ Strategies and actions for deploying applications in air-gapped or restricted on-prem environments.
5
+
6
+ ## Instructions
7
+ 1. **Dependency Gathering**:
8
+ - Identify all required container images.
9
+ - Export images: `docker save {image_list} | gzip > images.tar.gz`
10
+ - Package Helm charts: `helm package {chart_path}`
11
+ 2. **Target Readiness**:
12
+ - Verify local registry availability.
13
+ - Import images: `docker load < images.tar.gz`
14
+ 3. **Deployment**:
15
+ - Use `--set image.repository={local_registry}/{repo}` for Helm.
16
+ - Verify offline connectivity between components.
17
+ 4. **Troubleshooting**:
18
+ - Check for 'ImagePullBackOff' due to incorrect registry paths.
@@ -0,0 +1,17 @@
1
+ # workflow-docker-compose-setup.md
2
+ # Docker Compose Management Workflow
3
+
4
+ This workflow handles multi-container orchestration using Docker Compose, optimized for development and on-prem deployments.
5
+
6
+ ## Instructions
7
+ 1. **Define Services**: Map application components to Docker services.
8
+ 2. **Environment Sync**: Setup `.env` file management for different environments (on-prem, dev).
9
+ 3. **Disconnected Operations**:
10
+ - Build images with `--pull=false` if registry is unavailable.
11
+ - Use local image tags.
12
+ 4. **Orchestration**:
13
+ - Setup dependencies with `depends_on` and health checks.
14
+ - Configure volumes for persistence.
15
+ 5. **Execution**:
16
+ - `docker-compose up -d`
17
+ - `docker-compose ps`
@@ -0,0 +1,19 @@
1
+ # workflow-manage-helm.md
2
+ # Helm Management Workflow
3
+
4
+ This workflow handles the creation and management of Helm charts and Helm umbrellas for complex systems.
5
+
6
+ ## Instructions
7
+ 1. **Analyze System**: Determine if a single chart or an umbrella chart (multiple sub-charts) is needed.
8
+ 2. **Chart Creation**:
9
+ - `helm create {chart_name}`
10
+ - Structure for disconnected environments: Ensure all chart dependencies are bundled (vendorized).
11
+ 3. **Helm Umbrella Setup**:
12
+ - Configure `Chart.yaml` with sub-chart dependencies.
13
+ - Setup `values.yaml` to override sub-chart values.
14
+ 4. **On-prem Optimization**:
15
+ - Prepare `chart-save` and `chart-load` routines for air-gapped systems.
16
+ - Configure local registry mirrors.
17
+ 5. **Validation**:
18
+ - `helm lint {chart_path}`
19
+ - `helm template {chart_path}`
@@ -0,0 +1,23 @@
1
+ # workflow-check-deployment-status.md
2
+ # Deployment Status Check Workflow
3
+
4
+ This workflow guides the agent through checking the status of a specific deployment in a Kubernetes cluster.
5
+
6
+ ## Parameters
7
+ - `{namespace}`: The namespace of the deployment (default: `default`)
8
+ - `{deployment_name}`: The name of the deployment to check
9
+
10
+ ## Instructions
11
+ 1. **Identify Resource**: Determine the `{deployment_name}` and `{namespace}` from user input or context.
12
+ 2. **Run Diagnostics**:
13
+ - `kubectl get deployment {deployment_name} -n {namespace}`
14
+ - `kubectl describe deployment {deployment_name} -n {namespace}`
15
+ 3. **Check Pods**:
16
+ - `kubectl get pods -l app={deployment_name} -n {namespace}`
17
+ - Identify any pods that are NOT in `Running` state.
18
+ 4. **Analyze Events**:
19
+ - Look at the `Events` section of the `describe` output for error messages (e.g., `ImagePullBackOff`, `CrashLoopBackOff`).
20
+ 5. **Report**:
21
+ - Summarize the current status.
22
+ - Highlight any issues found.
23
+ - Suggest next steps (e.g., "Check logs", "Check resource limits").
@@ -0,0 +1,14 @@
1
+ # workflow-check-secrets.md
2
+ # Secret Debugging Workflow
3
+
4
+ This workflow helps identify and resolve problems related to Kubernetes Secrets.
5
+
6
+ ## Instructions
7
+ 1. **Check Visibility**: `kubectl get secret -n {namespace}`
8
+ 2. **Verify Mounting**:
9
+ - Check if the deployment actually mounts the secret.
10
+ - `kubectl get deployment {deployment_name} -o yaml | grep secret`
11
+ 3. **Check Permissions**: Verify ServiceAccount has permissions to read the secret (RBAC).
12
+ 4. **Content Verification**: (Safety first!) Offer to check if keys exist WITHOUT displaying sensitive values unless explicitly requested.
13
+ - `kubectl get secret {name} -n {namespace} -o jsonpath='{.data}'`
14
+ 5. **Common Errors**: Look for "Secret not found" or "Authorization" errors in pod events.
@@ -0,0 +1,18 @@
1
+ # workflow-check-system-status.md
2
+ # Overall System Status Workflow
3
+
4
+ This workflow provides a high-level overview of the health of the container runtime and orchestration environment.
5
+
6
+ ## Instructions
7
+ 1. **Detect Runtime**: Check if reachable:
8
+ - `kubectl cluster-info` (Kubernetes)
9
+ - `docker info` (Docker)
10
+ - `podman info` (Podman)
11
+ 2. **Resource Overview**:
12
+ - **K8s**: `kubectl get nodes`, `kubectl get pods -A | grep -v Running`
13
+ - **Docker**: `docker ps`, `docker stats --no-stream`
14
+ - **Podman**: `podman ps`, `podman stats --no-stream`
15
+ 3. **Cross-Platform Diagnostics**:
16
+ - Check for resource exhaustion (High CPU/Memory).
17
+ - Verify network connectivity between key services.
18
+ 4. **Summary Table**: Present a status table of all detected environments.
@@ -0,0 +1,16 @@
1
+ # workflow-day-2-ops.md
2
+ # Day 2 Operations & Maintenance Workflow
3
+
4
+ Focuses on long-term stability, cluster-to-config verification, and periodic maintenance.
5
+
6
+ ## Instructions
7
+ 1. **Config Verification**:
8
+ - Check current cluster status against the master configuration templates.
9
+ - Verify consistency of secrets, configmaps, and resource limits.
10
+ 2. **Resource Optimization**:
11
+ - Review `top nodes` and `top pods`.
12
+ - Identify over-provisioned or under-utilized resources.
13
+ 3. **Maintenance Tasks**:
14
+ - Node drain/uncordon (safe handling).
15
+ - Certificate rotation check.
16
+ 4. **Automation**: Propose cronjobs for periodic backups or diagnostic reports.
@@ -0,0 +1,18 @@
1
+ # workflow-deployment-strategies.md
2
+ # Deployment Strategies Workflow
3
+
4
+ Guides on implementing and monitoring advanced deployment techniques like Blue-Green, Canary, and Rolling Updates.
5
+
6
+ ## Instructions
7
+ 1. **Select Strategy**:
8
+ - **Rolling Update**: Standard Kubernetes strategy.
9
+ - **Canary**: Gradual traffic shift (requires Service Mesh or specialized CRDs like Argo Rollouts).
10
+ - **Blue-Green**: Instant switch between versions.
11
+ 2. **Strategy Status**:
12
+ - `kubectl get rollouts` (Argo Rollouts)
13
+ - Monitor success metrics (HTTP 2xx vs 5xx) during transition.
14
+ 3. **Health Verification**:
15
+ - Verify healthy startup before increasing traffic.
16
+ - Automatically propose rollbacks if SLOs are breached.
17
+ 4. **Execution**:
18
+ - Trigger rollout update or promotion.
@@ -0,0 +1,16 @@
1
+ # workflow-fix-deployments.md
2
+ # Deployment Fix Workflow
3
+
4
+ This workflow provides automated troubleshooting steps to resolve common deployment issues.
5
+
6
+ ## Instructions
7
+ 1. **Detect Issue**: Based on `check-deployment-status` output, identify the root cause.
8
+ 2. **Image issues**: If `ImagePullBackOff`, verify image name and registry secrets.
9
+ 3. **CrashLoopBackOff**:
10
+ - `kubectl logs {deployment_name} -n {namespace} --previous`
11
+ - Check for missing env vars or config maps.
12
+ 4. **Pending State**:
13
+ - Check node resources: `kubectl describe node`
14
+ - Verify PersistentVolumeClaims (PVCs).
15
+ 5. **Scaling**: If resource-related, suggest scaling or adjusting `resources.requests/limits`.
16
+ 6. **Action**: Offer to apply a fix (e.g., `kubectl apply -f ...` or `kubectl set image ...`).
@@ -0,0 +1,16 @@
1
+ # workflow-gitops-status.md
2
+ # GitOps Status & Drift Detection Workflow
3
+
4
+ This workflow monitors and reports the synchronization state between your git repository and the cluster using ArgoCD or Flux.
5
+
6
+ ## Instructions
7
+ 1. **Identify Tool**: Detect if ArgoCD or Flux is in use.
8
+ 2. **Sync Status**:
9
+ - **ArgoCD**: `argocd app list`, `argocd app get {app_name}`
10
+ - **Flux**: `flux get kustomizations`, `flux get helmreleases`
11
+ 3. **Drift Detection**:
12
+ - Identify "OutOfSync" resources.
13
+ - Compare live state with desired state in git.
14
+ 4. **Action**:
15
+ - Offer to trigger a sync: `argocd app sync {app_name}` or `flux reconcile kustomization {name}`.
16
+ - Analyze reasons for permanent drift (e.g., manual cluster changes).
package/lib/bmad.js ADDED
@@ -0,0 +1,102 @@
1
+ const fs = require('fs-extra');
2
+ const path = require('path');
3
+ const { execSync } = require('child_process');
4
+ const chalk = require('chalk');
5
+
6
+ const BMAD_DIR = '_bmad';
7
+ const CONFIG_DIR = path.join(BMAD_DIR, '_config', 'agents');
8
+
9
+ function isBmadInstalled(projectRoot = process.cwd()) {
10
+ return fs.existsSync(path.join(projectRoot, BMAD_DIR));
11
+ }
12
+
13
+ async function installBmad(agentIds, projectRoot = process.cwd()) {
14
+ let command = 'npx bmad-method install --yes';
15
+
16
+ if (agentIds && agentIds.length > 0) {
17
+ command += ` --tools ${agentIds.join(',')}`;
18
+ } else {
19
+ command += ' --tools none';
20
+ }
21
+
22
+ console.log(chalk.gray(` Running: ${command}`));
23
+ try {
24
+ execSync(command, { stdio: 'inherit', cwd: projectRoot });
25
+ return true;
26
+ } catch (error) {
27
+ console.error(chalk.red(` BMAD installation failed: ${error.message}`));
28
+ return false;
29
+ }
30
+ }
31
+
32
+ async function updateBmad(agentIds, projectRoot = process.cwd()) {
33
+ let command = 'npx bmad-method install --action update --yes';
34
+
35
+ if (agentIds && agentIds.length > 0) {
36
+ command += ` --tools ${agentIds.join(',')}`;
37
+ }
38
+
39
+ console.log(chalk.gray(` Running: ${command}`));
40
+ try {
41
+ execSync(command, { stdio: 'inherit', cwd: projectRoot });
42
+ return true;
43
+ } catch (error) {
44
+ console.error(chalk.red(` BMAD update failed: ${error.message}`));
45
+ return false;
46
+ }
47
+ }
48
+
49
+ async function applyCustomizations(projectRoot = process.cwd()) {
50
+ const sourceDir = path.join(__dirname, 'bmad-customizations');
51
+ const workflowSourceDir = path.join(__dirname, 'bmad-workflows');
52
+ const configTargetDir = path.join(projectRoot, CONFIG_DIR);
53
+ const agentTargetDir = path.join(projectRoot, BMAD_DIR, 'bmm', 'agents');
54
+ const workflowTargetDir = path.join(projectRoot, BMAD_DIR, 'bmm', 'workflows');
55
+
56
+ // 1. Apply YAML customizations
57
+ if (fs.existsSync(sourceDir)) {
58
+ await fs.ensureDir(configTargetDir);
59
+ const files = await fs.readdir(sourceDir);
60
+ for (const file of files) {
61
+ if (file.endsWith('.customize.yaml')) {
62
+ await fs.copy(path.join(sourceDir, file), path.join(configTargetDir, file));
63
+ console.log(chalk.cyan(` + Applied customization: ${file}`));
64
+ }
65
+ }
66
+ }
67
+
68
+ // 2. Apply detailed agent templates (.md files)
69
+ if (fs.existsSync(sourceDir)) {
70
+ await fs.ensureDir(agentTargetDir);
71
+ const files = await fs.readdir(sourceDir);
72
+ for (const file of files) {
73
+ if (file.endsWith('.md')) {
74
+ await fs.copy(path.join(sourceDir, file), path.join(agentTargetDir, file));
75
+ console.log(chalk.cyan(` + Applied agent template: ${file}`));
76
+ }
77
+ }
78
+ }
79
+
80
+ // 3. Apply workflows
81
+ if (fs.existsSync(workflowSourceDir)) {
82
+ await fs.ensureDir(workflowTargetDir);
83
+ await fs.copy(workflowSourceDir, workflowTargetDir);
84
+ console.log(chalk.cyan(` + Applied BMAD workflows`));
85
+ }
86
+
87
+ // Recompile agents to apply changes
88
+ const command = 'npx bmad-method install --action compile-agents --yes';
89
+ console.log(chalk.gray(` Running: ${command}`));
90
+ try {
91
+ execSync(command, { stdio: 'inherit', cwd: projectRoot });
92
+ } catch (error) {
93
+ console.error(chalk.red(` BMAD recompile failed: ${error.message}`));
94
+ }
95
+ }
96
+
97
+ module.exports = {
98
+ isBmadInstalled,
99
+ installBmad,
100
+ updateBmad,
101
+ applyCustomizations
102
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ma-agents",
3
- "version": "2.4.0",
3
+ "version": "2.6.0",
4
4
  "description": "NPX tool to install skills for AI coding agents (Claude Code, Gemini, Copilot, Kilocode, Cline, Cursor)",
5
5
  "main": "index.js",
6
6
  "bin": {