ma-agents 2.16.0 → 2.16.2

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 (60) hide show
  1. package/.agent/workflows/bmad-agent-bmad-master.md +15 -0
  2. package/.agent/workflows/bmad-agent-bmm-analyst.md +15 -0
  3. package/.agent/workflows/bmad-agent-bmm-architect.md +15 -0
  4. package/.agent/workflows/bmad-agent-bmm-dev.md +15 -0
  5. package/.agent/workflows/bmad-agent-bmm-pm.md +15 -0
  6. package/.agent/workflows/bmad-agent-bmm-qa.md +15 -0
  7. package/.agent/workflows/bmad-agent-bmm-quick-flow-solo-dev.md +15 -0
  8. package/.agent/workflows/bmad-agent-bmm-sm.md +15 -0
  9. package/.agent/workflows/bmad-agent-bmm-tech-writer.md +15 -0
  10. package/.agent/workflows/bmad-agent-bmm-ux-designer.md +15 -0
  11. package/.agent/workflows/bmad-agent-cis-brainstorming-coach.md +15 -0
  12. package/.agent/workflows/bmad-agent-cis-creative-problem-solver.md +15 -0
  13. package/.agent/workflows/bmad-agent-cis-design-thinking-coach.md +15 -0
  14. package/.agent/workflows/bmad-agent-cis-innovation-strategist.md +15 -0
  15. package/.agent/workflows/bmad-agent-cis-presentation-master.md +15 -0
  16. package/.agent/workflows/bmad-agent-cis-storyteller.md +15 -0
  17. package/.agent/workflows/bmad-bmm-check-implementation-readiness.md +6 -0
  18. package/.agent/workflows/bmad-bmm-code-review.md +14 -0
  19. package/.agent/workflows/bmad-bmm-correct-course.md +14 -0
  20. package/.agent/workflows/bmad-bmm-create-architecture.md +6 -0
  21. package/.agent/workflows/bmad-bmm-create-epics-and-stories.md +6 -0
  22. package/.agent/workflows/bmad-bmm-create-prd.md +6 -0
  23. package/.agent/workflows/bmad-bmm-create-product-brief.md +6 -0
  24. package/.agent/workflows/bmad-bmm-create-story.md +14 -0
  25. package/.agent/workflows/bmad-bmm-create-ux-design.md +6 -0
  26. package/.agent/workflows/bmad-bmm-dev-story.md +14 -0
  27. package/.agent/workflows/bmad-bmm-document-project.md +14 -0
  28. package/.agent/workflows/bmad-bmm-domain-research.md +6 -0
  29. package/.agent/workflows/bmad-bmm-edit-prd.md +6 -0
  30. package/.agent/workflows/bmad-bmm-generate-project-context.md +6 -0
  31. package/.agent/workflows/bmad-bmm-market-research.md +6 -0
  32. package/.agent/workflows/bmad-bmm-qa-generate-e2e-tests.md +14 -0
  33. package/.agent/workflows/bmad-bmm-quick-dev.md +6 -0
  34. package/.agent/workflows/bmad-bmm-quick-spec.md +6 -0
  35. package/.agent/workflows/bmad-bmm-retrospective.md +14 -0
  36. package/.agent/workflows/bmad-bmm-sprint-planning.md +14 -0
  37. package/.agent/workflows/bmad-bmm-sprint-status.md +14 -0
  38. package/.agent/workflows/bmad-bmm-technical-research.md +6 -0
  39. package/.agent/workflows/bmad-bmm-validate-prd.md +6 -0
  40. package/.agent/workflows/bmad-brainstorming.md +6 -0
  41. package/.agent/workflows/bmad-cis-design-thinking.md +14 -0
  42. package/.agent/workflows/bmad-cis-innovation-strategy.md +14 -0
  43. package/.agent/workflows/bmad-cis-problem-solving.md +14 -0
  44. package/.agent/workflows/bmad-cis-storytelling.md +14 -0
  45. package/.agent/workflows/bmad-editorial-review-prose.md +10 -0
  46. package/.agent/workflows/bmad-editorial-review-structure.md +10 -0
  47. package/.agent/workflows/bmad-help.md +10 -0
  48. package/.agent/workflows/bmad-index-docs.md +10 -0
  49. package/.agent/workflows/bmad-party-mode.md +6 -0
  50. package/.agent/workflows/bmad-review-adversarial-general.md +10 -0
  51. package/.agent/workflows/bmad-review-edge-case-hunter.md +10 -0
  52. package/.agent/workflows/bmad-shard-doc.md +10 -0
  53. package/README.md +43 -27
  54. package/bin/cli.js +37 -11
  55. package/lib/agents.js +21 -4
  56. package/lib/bmad-customizations/bmm-mil498.customize.yaml +12 -9
  57. package/lib/bmad-customizations/mil498.md +6 -3
  58. package/lib/bmad.js +111 -8
  59. package/lib/installer.js +112 -38
  60. package/package.json +3 -3
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: 'help'
3
+ description: 'Analyzes what is done and the users query and offers advice on what to do next. Use if user says what should I do next or what do I do now'
4
+ ---
5
+
6
+ # help
7
+
8
+ Read the entire task file at: {project-root}/_bmad/core/tasks/help.md
9
+
10
+ Follow all instructions in the task file exactly as written.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: 'index-docs'
3
+ description: 'Generates or updates an index.md to reference all docs in the folder. Use if user requests to create or update an index of all files in a specific folder'
4
+ ---
5
+
6
+ # index-docs
7
+
8
+ Read the entire task file at: {project-root}/_bmad/core/tasks/index-docs.xml
9
+
10
+ Follow all instructions in the task file exactly as written.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: 'party-mode'
3
+ description: 'Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations. Use when user requests party mode.'
4
+ ---
5
+
6
+ IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL {project-root}/_bmad/core/workflows/party-mode/workflow.md, READ its entire contents and follow its directions exactly!
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: 'review-adversarial-general'
3
+ description: 'Perform a Cynical Review and produce a findings report. Use when the user requests a critical review of something'
4
+ ---
5
+
6
+ # review-adversarial-general
7
+
8
+ Read the entire task file at: {project-root}/_bmad/core/tasks/review-adversarial-general.xml
9
+
10
+ Follow all instructions in the task file exactly as written.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: 'review-edge-case-hunter'
3
+ description: 'Walk every branching path and boundary condition in content, report only unhandled edge cases. Orthogonal to adversarial review - method-driven not attitude-driven.'
4
+ ---
5
+
6
+ # review-edge-case-hunter
7
+
8
+ Read the entire task file at: {project-root}/_bmad/core/tasks/review-edge-case-hunter.xml
9
+
10
+ Follow all instructions in the task file exactly as written.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: 'shard-doc'
3
+ description: 'Splits large markdown documents into smaller, organized files based on level 2 (default) sections. Use if the user says perform shard document'
4
+ ---
5
+
6
+ # shard-doc
7
+
8
+ Read the entire task file at: {project-root}/_bmad/core/tasks/shard-doc.xml
9
+
10
+ Follow all instructions in the task file exactly as written.
package/README.md CHANGED
@@ -2,17 +2,23 @@
2
2
 
3
3
  A universal NPX tool to install AI coding agent skills. Write skills once, install them across Claude Code, Gemini, Copilot, Cline, Cursor, and Kilocode.
4
4
 
5
- ## Quick Start
5
+ ## Installation & Usage
6
6
 
7
+ `ma-agents` is designed to be run via `npx` in the root of your project.
8
+
9
+ ### 1. Interactive Wizard (Recommended)
10
+ The wizard is the easiest way to set up or update your environment.
7
11
  ```bash
8
- # Interactive wizard (Install All / Custom Select / Update / Uninstall)
9
12
  npx ma-agents
13
+ ```
10
14
 
11
- # Direct install
12
- npx ma-agents install code-review claude-code
15
+ ### 2. Direct Command Line
16
+ ```bash
17
+ # Install specific skills to specific agents
18
+ npx ma-agents install code-review claude-code copilot
13
19
 
14
- # Install a skill to multiple agents at once
15
- npx ma-agents install code-review claude-code copilot cline
20
+ # Global installation (user-level)
21
+ npx ma-agents install code-review claude-code --global
16
22
  ```
17
23
 
18
24
  ## How It Works
@@ -43,18 +49,19 @@ skills/code-review/
43
49
 
44
50
  | Agent | Project Path | Template | Instruction File |
45
51
  |-------|-------------|----------|------------------|
46
- | Claude Code | `.claude/skills/` | `claude-code` | `CLAUDE.md` |
47
- | Google Gemini | `.gemini/skills/` | `generic` | - |
48
- | GitHub Copilot | `.github/copilot/skills/` | `generic` | - |
49
- | Cursor | `.cursor/skills/` | `generic` | - |
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` | - |
55
- | Kilocode | `.kilocode/skills/` | `generic` | - |
56
-
57
- ## Available Skills (22)
52
+ | Claude Code | `.claude/skills/` | `claude-code` | `.claude/CLAUDE.md` |
53
+ | Google Gemini | `.gemini/skills/` | `generic` | `.gemini/gemini.md` |
54
+ | GitHub Copilot | `.github/copilot/skills/` | `generic` | `.github/copilot/copilot.md` |
55
+ | Cursor | `.cursor/skills/` | `generic` | `.cursor/cursor.md` |
56
+ | Kilocode | `.kilocode/skills/` | `generic` | `.kilocode/kilocode.md` |
57
+ | Cline | `.cline/skills/` | `cline` | `.cline/clinerules.md` |
58
+ | SRE Agent (Alex) | `_bmad/skills/` | `generic` | `_bmad/bmm/agents/sre.md` |
59
+ | DevOps Agent (Amit) | `_bmad/skills/` | `generic` | `_bmad/bmm/agents/devops.md` |
60
+ | Cyber Analyst (Yael) | `_bmad/skills/` | `generic` | `_bmad/bmm/agents/cyber.md` |
61
+ | Joseph (MIL-STD-498) | `_bmad/skills/` | `generic` | `_bmad/bmm/agents/mil498.md` |
62
+ | Antigravity | `_bmad/skills/` | `generic` | `_bmad/bmm/agents/antigravity.md` |
63
+
64
+ ## Available Skills (25)
58
65
 
59
66
  | Skill ID | Domain | Description |
60
67
  | :--- | :--- | :--- |
@@ -117,13 +124,14 @@ npx ma-agents agents # List supported agents
117
124
  npx ma-agents uninstall <skill> <agents> # Direct uninstall
118
125
  ```
119
126
 
120
- ### The Interactive Wizard
121
- The easiest way to manage your skills is to simply run `npx ma-agents`. The wizard will guide you through:
122
- - **Install All**: One-click setup for the entire 22-skill suite.
123
- - **Custom Select**: Granularly choose specific skills and agents.
124
- - **Update**: Add or remove skills from an existing installation.
125
- - **Clean Reinstall**: Wipe the slate and start fresh.
126
- - **Uninstall All**: Remove all ma-agents artifacts from the project.
127
+ ### The Update Process
128
+ Running `ma-agents` on a project where skills are already installed triggers the **Update Flow**:
129
+ 1. **Detection**: Recognizes existing `.ma-agents.json` manifest.
130
+ 2. **Selection**: Allows you to add new skills or remove existing ones.
131
+ 3. **Synchronization**:
132
+ - Re-injects the latest instructions into `CLAUDE.md`, `.clinerules`, etc.
133
+ - Regenerates the `MANIFEST.yaml` to reflect the current skill set.
134
+ - Updates BMAD-METHOD personas and workflows to the latest versions if detected.
127
135
 
128
136
  ### BMAD-METHOD Integration
129
137
  `ma-agents` features first-class integration with [BMAD-METHOD](https://docs.bmad-method.org/) to provide advanced orchestration and specialized personas.
@@ -147,6 +155,10 @@ The easiest way to manage your skills is to simply run `npx ma-agents`. The wiza
147
155
  - **Focus**: Cyber immunity, security auditing, and vulnerability management.
148
156
  - **Capabilities**: Immunity estimation (scoring), Vault secret management, and PKI automation.
149
157
  - **Integration**: Orchestrates ma-agents security skills for deep scans.
158
+ 4. **Joseph (MIL-STD-498)**:
159
+ - **Focus**: Technical standards compliance and military document generation.
160
+ - **Capabilities**: Document Data Descriptions (DIDs), requirements traceability, and complex specification writing.
161
+ - **Workflows**: SRS, SSS, and SSDD generation with strict structural validation.
150
162
 
151
163
  #### Operational Workflows
152
164
  The integration includes a suite of specialized playbooks:
@@ -326,9 +338,13 @@ ma-agents/
326
338
  │ └── cli.js # CLI entry point (wizard + commands)
327
339
  ├── lib/
328
340
  │ ├── agents.js # Agent configurations and paths
329
- └── installer.js # Skill discovery, frontmatter injection, installation
341
+ ├── installer.js # Skill discovery and installation logic
342
+ │ ├── bmad.js # BMAD-METHOD integration and injection logic
343
+ │ ├── bmad-customizations/ # BMAD persona templates (.md) and YAML configs
344
+ │ ├── bmad-workflows/ # Specialized BMAD playbooks (SRE, Cyber, etc.)
345
+ │ └── mil498-templates/ # MIL-STD-498 DID library (SRS, SSS, SSDD, etc.)
330
346
  ├── skills/
331
- │ ├── code-review/ # 22 bundled skills across 5 domains
347
+ │ ├── code-review/ # 25 bundled skills across 5 domains
332
348
  │ ├── commit-message/
333
349
  │ ├── create-hardened-docker-skill/
334
350
  │ ├── git-workflow-skill/
package/bin/cli.js CHANGED
@@ -52,8 +52,8 @@ function showAgents() {
52
52
  const agents = listAgents();
53
53
  console.log(chalk.bold('\n Supported Agents:\n'));
54
54
 
55
- const ideAgents = agents.filter(a => !['bmm-sre', 'bmm-devops', 'bmm-cyber', 'bmm-mil498'].includes(a.id));
56
- const bmadAgents = agents.filter(a => ['bmm-sre', 'bmm-devops', 'bmm-cyber', 'bmm-mil498'].includes(a.id));
55
+ const ideAgents = agents.filter(a => a.category !== 'bmad');
56
+ const bmadAgents = agents.filter(a => a.category === 'bmad');
57
57
 
58
58
  console.log(chalk.bold.yellow(' AI Coding Assistants:'));
59
59
  ideAgents.forEach(agent => {
@@ -235,8 +235,8 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
235
235
 
236
236
  // Step 2: Select agents
237
237
  if (selectedAgentIds.length === 0 || isUpdate) {
238
- const ideAgents = agents.filter(a => !['bmm-sre', 'bmm-devops', 'bmm-cyber', 'bmm-mil498'].includes(a.id));
239
- const bmadAgents = agents.filter(a => ['bmm-sre', 'bmm-devops', 'bmm-cyber', 'bmm-mil498'].includes(a.id));
238
+ const ideAgents = agents.filter(a => a.category !== 'bmad');
239
+ const bmadAgents = agents.filter(a => a.category === 'bmad');
240
240
 
241
241
  // 2.1 Coding Assistants
242
242
  const { ideChosen } = await prompts({
@@ -320,7 +320,7 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
320
320
  if (success) {
321
321
  console.log(chalk.green(' BMAD-METHOD installed successfully!'));
322
322
  console.log(chalk.cyan(' Applying ma-agents customizations...'));
323
- await bmad.applyCustomizations();
323
+ await bmad.applyCustomizations(process.cwd(), ['bmm', 'bmb'], bmadTools, selectedAgentIds);
324
324
  }
325
325
  }
326
326
  } else {
@@ -338,7 +338,7 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
338
338
  if (success) {
339
339
  console.log(chalk.green(' BMAD-METHOD updated successfully!'));
340
340
  console.log(chalk.cyan(' Re-applying ma-agents customizations...'));
341
- await bmad.applyCustomizations();
341
+ await bmad.applyCustomizations(process.cwd(), ['bmm', 'bmb'], bmadTools, selectedAgentIds);
342
342
  }
343
343
  }
344
344
  }
@@ -366,17 +366,43 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
366
366
 
367
367
  // Step 5: Execution
368
368
  if (isUpdate) {
369
- // Identify removals
370
- const currentlyInstalled = new Set();
371
- existingStatus.forEach(entry => Object.keys(entry.skills).forEach(id => currentlyInstalled.add(id)));
369
+ // Build a map: skillId -> set of agent IDs that originally had it installed
370
+ const originalAgentsBySkill = new Map();
371
+ const originalAllAgentIds = new Set();
372
+ existingStatus.forEach(entry => {
373
+ originalAllAgentIds.add(entry.agent.id);
374
+ Object.keys(entry.skills).forEach(skillId => {
375
+ if (!originalAgentsBySkill.has(skillId)) {
376
+ originalAgentsBySkill.set(skillId, new Set());
377
+ }
378
+ originalAgentsBySkill.get(skillId).add(entry.agent.id);
379
+ });
380
+ });
372
381
 
373
382
  const finalSkills = new Set(selectedSkillIds);
374
- const toRemove = [...currentlyInstalled].filter(id => !finalSkills.has(id));
383
+
384
+ // Skills to fully remove (deselected from skill list)
385
+ const toRemove = [...originalAgentsBySkill.keys()].filter(id => !finalSkills.has(id));
375
386
 
376
387
  if (toRemove.length > 0) {
377
388
  console.log(chalk.gray(`\n Cleaning up ${toRemove.length} removed skills...`));
378
389
  for (const skillId of toRemove) {
379
- await uninstallSkill(skillId, selectedAgentIds, installPath, 'project');
390
+ // Use the ORIGINAL agent IDs, not the new selection
391
+ const originalAgents = [...originalAgentsBySkill.get(skillId)];
392
+ await uninstallSkill(skillId, originalAgents, installPath, 'project');
393
+ }
394
+ }
395
+
396
+ // Also handle agents that were deselected: uninstall their skills
397
+ const deselectedAgents = [...originalAllAgentIds].filter(id => !selectedAgentIds.includes(id));
398
+
399
+ if (deselectedAgents.length > 0) {
400
+ console.log(chalk.gray(`\n Removing skills from ${deselectedAgents.length} deselected agents...`));
401
+ for (const [skillId, agentSet] of originalAgentsBySkill) {
402
+ const agentsToRemoveFrom = deselectedAgents.filter(id => agentSet.has(id));
403
+ if (agentsToRemoveFrom.length > 0) {
404
+ await uninstallSkill(skillId, agentsToRemoveFrom, installPath, 'project');
405
+ }
380
406
  }
381
407
  }
382
408
  }
package/lib/agents.js CHANGED
@@ -6,6 +6,7 @@ const path = require('path');
6
6
  * Each agent has:
7
7
  * - id: unique identifier
8
8
  * - name: display name
9
+ * - category: 'ide' for AI coding assistants, 'bmad' for BMAD-METHOD agents
9
10
  * - description: brief description
10
11
  * - getProjectPath: function that returns the project-level skills directory (relative to cwd)
11
12
  * - getGlobalPath: function that returns the global/user-level skills directory
@@ -18,6 +19,7 @@ const agents = [
18
19
  id: 'claude-code',
19
20
  name: 'Claude Code',
20
21
  version: '1.0.0',
22
+ category: 'ide',
21
23
  description: 'Anthropic Claude Code CLI',
22
24
  getProjectPath: () => path.join(process.cwd(), '.claude', 'skills'),
23
25
  getGlobalPath: () => {
@@ -38,6 +40,7 @@ const agents = [
38
40
  id: 'gemini',
39
41
  name: 'Google Gemini',
40
42
  version: '1.0.0',
43
+ category: 'ide',
41
44
  description: 'Google Gemini Code Assist',
42
45
  getProjectPath: () => path.join(process.cwd(), '.gemini', 'skills'),
43
46
  getGlobalPath: () => {
@@ -58,6 +61,7 @@ const agents = [
58
61
  id: 'copilot',
59
62
  name: 'GitHub Copilot',
60
63
  version: '1.0.0',
64
+ category: 'ide',
61
65
  description: 'GitHub Copilot Agent Mode',
62
66
  getProjectPath: () => path.join(process.cwd(), '.github', 'copilot', 'skills'),
63
67
  getGlobalPath: () => {
@@ -78,6 +82,7 @@ const agents = [
78
82
  id: 'kilocode',
79
83
  name: 'Kilocode',
80
84
  version: '1.0.0',
85
+ category: 'ide',
81
86
  description: 'Kilocode AI Assistant',
82
87
  getProjectPath: () => path.join(process.cwd(), '.kilocode', 'skills'),
83
88
  getGlobalPath: () => {
@@ -98,6 +103,7 @@ const agents = [
98
103
  id: 'cline',
99
104
  name: 'Cline',
100
105
  version: '1.0.0',
106
+ category: 'ide',
101
107
  description: 'Cline AI Assistant',
102
108
  getProjectPath: () => path.join(process.cwd(), '.cline', 'skills'),
103
109
  getGlobalPath: () => {
@@ -123,6 +129,7 @@ const agents = [
123
129
  id: 'cursor',
124
130
  name: 'Cursor',
125
131
  version: '1.0.0',
132
+ category: 'ide',
126
133
  description: 'Cursor AI Editor',
127
134
  getProjectPath: () => path.join(process.cwd(), '.cursor', 'skills'),
128
135
  getGlobalPath: () => {
@@ -143,6 +150,7 @@ const agents = [
143
150
  id: 'bmm-sre',
144
151
  name: 'SRE Agent',
145
152
  version: '1.0.0',
153
+ category: 'bmad',
146
154
  description: 'Specialized SRE Agent for BMAD-METHOD',
147
155
  getProjectPath: () => path.join(process.cwd(), '_bmad', 'skills'),
148
156
  getGlobalPath: () => {
@@ -163,8 +171,9 @@ const agents = [
163
171
  id: 'antigravity',
164
172
  name: 'Antigravity',
165
173
  version: '1.0.0',
174
+ category: 'ide',
166
175
  description: 'Google Deepmind Antigravity Agent',
167
- getProjectPath: () => path.join(process.cwd(), '_bmad', 'skills'),
176
+ getProjectPath: () => path.join(process.cwd(), '.antigravity', 'skills'),
168
177
  getGlobalPath: () => {
169
178
  const platform = os.platform();
170
179
  if (platform === 'win32') {
@@ -177,12 +186,13 @@ const agents = [
177
186
  },
178
187
  fileExtension: '.md',
179
188
  template: 'generic',
180
- instructionFiles: ['_bmad/bmm/agents/antigravity.md']
189
+ instructionFiles: ['.antigravity/antigravity.md']
181
190
  },
182
191
  {
183
192
  id: 'bmm-devops',
184
193
  name: 'DevOps Agent',
185
194
  version: '1.0.0',
195
+ category: 'bmad',
186
196
  description: 'Specialized DevOps Agent for BMAD-METHOD',
187
197
  getProjectPath: () => path.join(process.cwd(), '_bmad', 'skills'),
188
198
  getGlobalPath: () => {
@@ -203,6 +213,7 @@ const agents = [
203
213
  id: 'bmm-cyber',
204
214
  name: 'Cyber Analyst',
205
215
  version: '1.0.0',
216
+ category: 'bmad',
206
217
  description: 'Specialized Cyber Security Analyst (Yael) for BMAD-METHOD',
207
218
  getProjectPath: () => path.join(process.cwd(), '_bmad', 'skills'),
208
219
  getGlobalPath: () => {
@@ -221,8 +232,9 @@ const agents = [
221
232
  },
222
233
  {
223
234
  id: 'bmm-mil498',
224
- name: 'Joseph',
235
+ name: 'MIL-STD-498 Expert',
225
236
  version: '1.0.0',
237
+ category: 'bmad',
226
238
  description: 'MIL-STD-498 Documentation Expert',
227
239
  getProjectPath: () => path.join(process.cwd(), '_bmad', 'skills'),
228
240
  getGlobalPath: () => {
@@ -249,7 +261,12 @@ function getAllAgents() {
249
261
  return agents;
250
262
  }
251
263
 
264
+ function getAgentsByCategory(category) {
265
+ return agents.filter(a => a.category === category);
266
+ }
267
+
252
268
  module.exports = {
253
269
  getAgent,
254
- getAllAgents
270
+ getAllAgents,
271
+ getAgentsByCategory
255
272
  };
@@ -15,16 +15,19 @@ persona:
15
15
  menu:
16
16
  - trigger: bmad-mil-generate-srs
17
17
  workflow: "bmm/workflows/mil498/bmad-mil-generate-srs.md"
18
- description: "Generate SRS Document"
18
+ description: "Generate SRS (Software Requirements Specification)"
19
19
  - trigger: bmad-mil-generate-sdd
20
20
  workflow: "bmm/workflows/mil498/bmad-mil-generate-sdd.md"
21
- description: "Generate SDD Document"
22
- - trigger: bmad-mil-generate-stp
23
- workflow: "bmm/workflows/mil498/bmad-mil-generate-stp.md"
24
- description: "Generate STP Document"
25
- - trigger: bmad-mil-generate-ocd
26
- workflow: "bmm/workflows/mil498/bmad-mil-generate-ocd.md"
27
- description: "Generate OCD Document"
21
+ description: "Generate SDD (Software Design Description)"
28
22
  - trigger: bmad-mil-generate-sdp
29
23
  workflow: "bmm/workflows/mil498/bmad-mil-generate-sdp.md"
30
- description: "Generate SDP Document"
24
+ description: "Generate SDP (Software Development Plan)"
25
+ - trigger: bmad-mil-generate-ocd
26
+ workflow: "bmm/workflows/mil498/bmad-mil-generate-ocd.md"
27
+ description: "Generate OCD (Operational Concept Description)"
28
+ - trigger: bmad-mil-generate-sss
29
+ workflow: "bmm/workflows/mil498/bmad-mil-generate-sss.md"
30
+ description: "Generate SSS (System/Subsystem Specification)"
31
+ - trigger: bmad-mil-generate-std
32
+ workflow: "bmm/workflows/mil498/bmad-mil-generate-std.md"
33
+ description: "Generate STD (Software Test Description)"
@@ -62,9 +62,12 @@ You must fully embody this agent's persona and follow all activation instruction
62
62
  <menu>
63
63
  <item cmd="MH">[MH] Redisplay Menu Help</item>
64
64
  <item cmd="CH">[CH] Chat with Joseph about MIL-STD-498</item>
65
- <item cmd="GS" workflow="{project-root}/_bmad/bmm/workflows/mil498/bmad-mil-generate-srs.md">[GS] Generate SRS: Generate a Software Requirements Specification</item>
66
- <item cmd="GD" workflow="{project-root}/_bmad/bmm/workflows/mil498/bmad-mil-generate-sdd.md">[GD] Generate SDD: Generate a Software Design Description</item>
67
- <item cmd="GT" workflow="{project-root}/_bmad/bmm/workflows/mil498/bmad-mil-generate-stp.md">[GT] Generate STP: Generate a Software Test Plan</item>
65
+ <item cmd="GS" workflow="{project-root}/_bmad/bmm/workflows/mil498/bmad-mil-generate-srs.md">[GS] Generate SRS: Software Requirements Specification</item>
66
+ <item cmd="GD" workflow="{project-root}/_bmad/bmm/workflows/mil498/bmad-mil-generate-sdd.md">[GD] Generate SDD: Software Design Description</item>
67
+ <item cmd="GP" workflow="{project-root}/_bmad/bmm/workflows/mil498/bmad-mil-generate-sdp.md">[GP] Generate SDP: Software Development Plan</item>
68
+ <item cmd="GO" workflow="{project-root}/_bmad/bmm/workflows/mil498/bmad-mil-generate-ocd.md">[GO] Generate OCD: Operational Concept Description</item>
69
+ <item cmd="SS" workflow="{project-root}/_bmad/bmm/workflows/mil498/bmad-mil-generate-sss.md">[SS] Generate SSS: System/Subsystem Specification</item>
70
+ <item cmd="GT" workflow="{project-root}/_bmad/bmm/workflows/mil498/bmad-mil-generate-std.md">[GT] Generate STD: Software Test Description</item>
68
71
  <item cmd="DA">[DA] Dismiss Agent</item>
69
72
  </menu>
70
73
  </agent>
package/lib/bmad.js CHANGED
@@ -42,6 +42,8 @@ async function updateBmad(modules = ['bmm', 'bmb'], tools = [], projectRoot = pr
42
42
 
43
43
  if (tools && tools.length > 0) {
44
44
  command += ` --tools ${tools.join(',')}`;
45
+ } else {
46
+ command += ' --tools none';
45
47
  }
46
48
 
47
49
  console.log(chalk.gray(` Running: ${command}`));
@@ -54,7 +56,7 @@ async function updateBmad(modules = ['bmm', 'bmb'], tools = [], projectRoot = pr
54
56
  }
55
57
  }
56
58
 
57
- async function applyCustomizations(projectRoot = process.cwd()) {
59
+ async function applyCustomizations(projectRoot = process.cwd(), modules = ['bmm', 'bmb'], tools = [], selectedAgentIds = []) {
58
60
  const sourceDir = path.join(__dirname, 'bmad-customizations');
59
61
  const workflowSourceDir = path.join(__dirname, 'bmad-workflows');
60
62
  const configTargetDir = path.join(projectRoot, CONFIG_DIR);
@@ -63,26 +65,41 @@ async function applyCustomizations(projectRoot = process.cwd()) {
63
65
  const templateSourceDir = path.join(__dirname, 'mil498-templates');
64
66
  const templateTargetDir = path.join(projectRoot, BMAD_DIR, 'bmm', 'templates', 'mil498');
65
67
 
66
- // 1. Apply YAML customizations
68
+ // Mapping from BMAD agent IDs to their .md template filenames
69
+ const agentMdMap = {
70
+ 'bmm-sre': 'sre.md',
71
+ 'bmm-devops': 'devops.md',
72
+ 'bmm-cyber': 'cyber.md',
73
+ 'bmm-mil498': 'mil498.md'
74
+ };
75
+
76
+ // 1. Apply YAML customizations (filtered by selected agents)
67
77
  if (fs.existsSync(sourceDir)) {
68
78
  await fs.ensureDir(configTargetDir);
69
79
  const files = await fs.readdir(sourceDir);
70
80
  for (const file of files) {
71
81
  if (file.endsWith('.customize.yaml')) {
72
- await fs.copy(path.join(sourceDir, file), path.join(configTargetDir, file));
73
- console.log(chalk.cyan(` + Applied customization: ${file}`));
82
+ const agentId = file.replace('.customize.yaml', '');
83
+ // Always copy generic; filter others by selected agents
84
+ if (agentId === 'generic' || selectedAgentIds.length === 0 || selectedAgentIds.includes(agentId)) {
85
+ await fs.copy(path.join(sourceDir, file), path.join(configTargetDir, file));
86
+ console.log(chalk.cyan(` + Applied customization: ${file}`));
87
+ }
74
88
  }
75
89
  }
76
90
  }
77
91
 
78
- // 2. Apply detailed agent templates (.md files)
92
+ // 2. Apply detailed agent templates (.md files, filtered by selected agents)
79
93
  if (fs.existsSync(sourceDir)) {
80
94
  await fs.ensureDir(agentTargetDir);
81
95
  const files = await fs.readdir(sourceDir);
82
96
  for (const file of files) {
83
97
  if (file.endsWith('.md')) {
84
- await fs.copy(path.join(sourceDir, file), path.join(agentTargetDir, file));
85
- console.log(chalk.cyan(` + Applied agent template: ${file}`));
98
+ const matchingAgentId = Object.entries(agentMdMap).find(([, mdFile]) => mdFile === file)?.[0];
99
+ if (!matchingAgentId || selectedAgentIds.length === 0 || selectedAgentIds.includes(matchingAgentId)) {
100
+ await fs.copy(path.join(sourceDir, file), path.join(agentTargetDir, file));
101
+ console.log(chalk.cyan(` + Applied agent template: ${file}`));
102
+ }
86
103
  }
87
104
  }
88
105
  }
@@ -102,13 +119,99 @@ async function applyCustomizations(projectRoot = process.cwd()) {
102
119
  }
103
120
 
104
121
  // Recompile agents to apply changes
105
- const command = 'npx bmad-method install --yes';
122
+ let command = 'npx bmad-method install --yes';
123
+ if (modules && modules.length > 0) {
124
+ command += ` --modules ${modules.join(',')}`;
125
+ }
126
+ if (tools && tools.length > 0) {
127
+ command += ` --tools ${tools.join(',')}`;
128
+ } else {
129
+ command += ' --tools none';
130
+ }
106
131
  console.log(chalk.gray(` Running: ${command}`));
107
132
  try {
108
133
  execSync(command, { stdio: 'inherit', cwd: projectRoot });
109
134
  } catch (error) {
110
135
  console.error(chalk.red(` BMAD recompile failed: ${error.message}`));
111
136
  }
137
+
138
+ // 5. Register custom workflows in BMAD CSV registries (after recompile)
139
+ if (selectedAgentIds.length === 0 || selectedAgentIds.includes('bmm-mil498')) {
140
+ await registerMilWorkflows(projectRoot);
141
+ }
142
+ }
143
+
144
+ /**
145
+ * Append MIL-STD-498 workflow entries to the BMAD CSV registries
146
+ * so they appear as available slash commands.
147
+ */
148
+ async function registerMilWorkflows(projectRoot) {
149
+ const milEntries = [
150
+ {
151
+ name: 'Generate SRS', code: 'GS',
152
+ file: '_bmad/bmm/workflows/mil498/bmad-mil-generate-srs.md',
153
+ command: 'bmad-mil-generate-srs',
154
+ description: 'Generate a MIL-STD-498 Software Requirements Specification from BMAD project artifacts'
155
+ },
156
+ {
157
+ name: 'Generate SDD', code: 'GD',
158
+ file: '_bmad/bmm/workflows/mil498/bmad-mil-generate-sdd.md',
159
+ command: 'bmad-mil-generate-sdd',
160
+ description: 'Generate a MIL-STD-498 Software Design Description from architecture and design docs'
161
+ },
162
+ {
163
+ name: 'Generate SDP', code: 'GP',
164
+ file: '_bmad/bmm/workflows/mil498/bmad-mil-generate-sdp.md',
165
+ command: 'bmad-mil-generate-sdp',
166
+ description: 'Generate a MIL-STD-498 Software Development Plan from project planning artifacts'
167
+ },
168
+ {
169
+ name: 'Generate OCD', code: 'GO',
170
+ file: '_bmad/bmm/workflows/mil498/bmad-mil-generate-ocd.md',
171
+ command: 'bmad-mil-generate-ocd',
172
+ description: 'Generate a MIL-STD-498 Operational Concept Description from PRD and architecture'
173
+ },
174
+ {
175
+ name: 'Generate SSS', code: 'SS',
176
+ file: '_bmad/bmm/workflows/mil498/bmad-mil-generate-sss.md',
177
+ command: 'bmad-mil-generate-sss',
178
+ description: 'Generate a MIL-STD-498 System/Subsystem Specification from project requirements'
179
+ },
180
+ {
181
+ name: 'Generate STD', code: 'GT',
182
+ file: '_bmad/bmm/workflows/mil498/bmad-mil-generate-std.md',
183
+ command: 'bmad-mil-generate-std',
184
+ description: 'Generate a MIL-STD-498 Software Test Description from epics stories and architecture'
185
+ }
186
+ ];
187
+
188
+ // Append to module-help.csv
189
+ const moduleHelpPath = path.join(projectRoot, BMAD_DIR, 'bmm', 'module-help.csv');
190
+ if (fs.existsSync(moduleHelpPath)) {
191
+ let content = await fs.readFile(moduleHelpPath, 'utf-8');
192
+ for (const entry of milEntries) {
193
+ if (!content.includes(entry.command)) {
194
+ const row = `bmm,anytime,${entry.name},${entry.code},,${entry.file},${entry.command},false,mil498,Create Mode,${entry.description},planning_artifacts,document,`;
195
+ content = content.trimEnd() + '\n' + row + '\n';
196
+ }
197
+ }
198
+ await fs.writeFile(moduleHelpPath, content, 'utf-8');
199
+ console.log(chalk.cyan(` + Registered MIL-STD-498 workflows in module-help.csv`));
200
+ }
201
+
202
+ // Append to bmad-help.csv
203
+ const bmadHelpPath = path.join(projectRoot, BMAD_DIR, '_config', 'bmad-help.csv');
204
+ if (fs.existsSync(bmadHelpPath)) {
205
+ let content = await fs.readFile(bmadHelpPath, 'utf-8');
206
+ for (const entry of milEntries) {
207
+ if (!content.includes(entry.command)) {
208
+ const row = `bmm,anytime,${entry.name},${entry.code},,${entry.file},${entry.command},false,mil498,bmad:MIL-STD-498 compliance:agent:mil498,Joseph,📜 MIL-STD-498 Expert,Create Mode,${entry.description},planning_artifacts,document`;
209
+ content = content.trimEnd() + '\n' + row + '\n';
210
+ }
211
+ }
212
+ await fs.writeFile(bmadHelpPath, content, 'utf-8');
213
+ console.log(chalk.cyan(` + Registered MIL-STD-498 workflows in bmad-help.csv`));
214
+ }
112
215
  }
113
216
 
114
217
  module.exports = {