bmad-plus 0.1.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 (53) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +482 -0
  3. package/osint-agent-package/README.md +88 -0
  4. package/osint-agent-package/SETUP_KEYS.md +108 -0
  5. package/osint-agent-package/agents/osint-investigator.md +80 -0
  6. package/osint-agent-package/install.ps1 +87 -0
  7. package/osint-agent-package/install.sh +76 -0
  8. package/osint-agent-package/skills/bmad-osint-investigate/SKILL.md +147 -0
  9. package/osint-agent-package/skills/bmad-osint-investigate/osint/SKILL.md +452 -0
  10. package/osint-agent-package/skills/bmad-osint-investigate/osint/assets/dossier-template.md +116 -0
  11. package/osint-agent-package/skills/bmad-osint-investigate/osint/references/content-extraction.md +100 -0
  12. package/osint-agent-package/skills/bmad-osint-investigate/osint/references/enrichment-databases-fr.md +148 -0
  13. package/osint-agent-package/skills/bmad-osint-investigate/osint/references/platforms.md +130 -0
  14. package/osint-agent-package/skills/bmad-osint-investigate/osint/references/psychoprofile.md +69 -0
  15. package/osint-agent-package/skills/bmad-osint-investigate/osint/references/tools.md +281 -0
  16. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/_http.py +101 -0
  17. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/apify.py +260 -0
  18. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/brightdata.py +101 -0
  19. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/diagnose.py +141 -0
  20. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/exa.py +79 -0
  21. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/jina.py +71 -0
  22. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/mcp-client.py +136 -0
  23. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/parallel.py +85 -0
  24. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/perplexity.py +102 -0
  25. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/tavily.py +72 -0
  26. package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/volley.py +208 -0
  27. package/osint-agent-package/skills/bmad-osint-investigator/SKILL.md +15 -0
  28. package/package.json +51 -0
  29. package/readme-international/README.de.md +392 -0
  30. package/readme-international/README.es.md +484 -0
  31. package/readme-international/README.fr.md +482 -0
  32. package/src/bmad-plus/agents/agent-architect-dev/SKILL.md +96 -0
  33. package/src/bmad-plus/agents/agent-architect-dev/bmad-skill-manifest.yaml +13 -0
  34. package/src/bmad-plus/agents/agent-maker/SKILL.md +201 -0
  35. package/src/bmad-plus/agents/agent-maker/bmad-skill-manifest.yaml +13 -0
  36. package/src/bmad-plus/agents/agent-orchestrator/SKILL.md +137 -0
  37. package/src/bmad-plus/agents/agent-orchestrator/bmad-skill-manifest.yaml +13 -0
  38. package/src/bmad-plus/agents/agent-quality/SKILL.md +83 -0
  39. package/src/bmad-plus/agents/agent-quality/bmad-skill-manifest.yaml +13 -0
  40. package/src/bmad-plus/agents/agent-shadow/SKILL.md +71 -0
  41. package/src/bmad-plus/agents/agent-shadow/bmad-skill-manifest.yaml +13 -0
  42. package/src/bmad-plus/agents/agent-strategist/SKILL.md +80 -0
  43. package/src/bmad-plus/agents/agent-strategist/bmad-skill-manifest.yaml +13 -0
  44. package/src/bmad-plus/data/role-triggers.yaml +209 -0
  45. package/src/bmad-plus/module-help.csv +10 -0
  46. package/src/bmad-plus/module.yaml +174 -0
  47. package/src/bmad-plus/skills/bmad-plus-autopilot/SKILL.md +99 -0
  48. package/src/bmad-plus/skills/bmad-plus-parallel/SKILL.md +93 -0
  49. package/src/bmad-plus/skills/bmad-plus-sync/SKILL.md +69 -0
  50. package/tools/bmad-plus-npx.js +33 -0
  51. package/tools/cli/bmad-plus-cli.js +50 -0
  52. package/tools/cli/commands/install.js +437 -0
  53. package/tools/cli/commands/uninstall.js +70 -0
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * BMAD+ CLI — Main entry point
5
+ */
6
+
7
+ const { program } = require('commander');
8
+ const path = require('node:path');
9
+ const packageJson = require('../../package.json');
10
+
11
+ // Fix stdin for Windows
12
+ if (process.stdin.isTTY) {
13
+ try {
14
+ process.stdin.resume();
15
+ process.stdin.setEncoding('utf8');
16
+ if (process.platform === 'win32') {
17
+ process.stdin.on('error', () => {});
18
+ }
19
+ } catch {}
20
+ }
21
+
22
+ // Register commands
23
+ const install = require('./commands/install');
24
+ const uninstall = require('./commands/uninstall');
25
+
26
+ program
27
+ .version(packageJson.version)
28
+ .description('BMAD+ — Augmented AI-Driven Development Framework');
29
+
30
+ // Install command
31
+ const installCmd = program
32
+ .command('install')
33
+ .description('Install BMAD+ agents and skills into your project');
34
+
35
+ for (const option of install.options || []) {
36
+ installCmd.option(...option);
37
+ }
38
+ installCmd.action(install.action);
39
+
40
+ // Uninstall command
41
+ const uninstallCmd = program
42
+ .command('uninstall')
43
+ .description('Remove BMAD+ from your project');
44
+ uninstallCmd.action(uninstall.action);
45
+
46
+ program.parse(process.argv);
47
+
48
+ if (process.argv.slice(2).length === 0) {
49
+ program.outputHelp();
50
+ }
@@ -0,0 +1,437 @@
1
+ /**
2
+ * BMAD+ Install Command
3
+ * Installs agents, skills, and IDE configs into the current project
4
+ */
5
+
6
+ const path = require('node:path');
7
+ const fs = require('node:fs');
8
+ const fsExtra = require('fs-extra');
9
+ const clack = require('@clack/prompts');
10
+ const pc = require('picocolors');
11
+
12
+ // Pack definitions
13
+ const PACKS = {
14
+ core: {
15
+ name: 'Core Development',
16
+ icon: '⚙️',
17
+ description: '4 multi-role agents (Atlas, Forge, Sentinel, Nexus)',
18
+ required: true,
19
+ agents: ['agent-strategist', 'agent-architect-dev', 'agent-quality', 'agent-orchestrator'],
20
+ skills: ['bmad-plus-autopilot', 'bmad-plus-parallel', 'bmad-plus-sync'],
21
+ data: ['role-triggers.yaml'],
22
+ },
23
+ osint: {
24
+ name: 'OSINT Intelligence',
25
+ icon: '🔍',
26
+ description: 'Agent Shadow — investigation, scraping, psychoprofil',
27
+ required: false,
28
+ agents: ['agent-shadow'],
29
+ skills: [],
30
+ externalPackage: 'osint-agent-package',
31
+ },
32
+ maker: {
33
+ name: 'Agent Creator',
34
+ icon: '🧬',
35
+ description: 'Maker — design, build, and package new BMAD+ agents',
36
+ required: false,
37
+ agents: ['agent-maker'],
38
+ skills: [],
39
+ data: [],
40
+ },
41
+ audit: {
42
+ name: 'Audit Sécurité',
43
+ icon: '🛡️',
44
+ description: 'Agent Shield — scan vulnérabilités (bientôt)',
45
+ required: false,
46
+ disabled: true,
47
+ agents: [],
48
+ skills: [],
49
+ },
50
+ };
51
+
52
+ // IDE configurations
53
+ const IDE_CONFIGS = {
54
+ 'claude-code': {
55
+ name: 'Claude Code',
56
+ detect: ['.claude'],
57
+ configFile: 'CLAUDE.md',
58
+ },
59
+ 'gemini-cli': {
60
+ name: 'Gemini CLI',
61
+ detect: ['.gemini'],
62
+ configFile: 'GEMINI.md',
63
+ },
64
+ 'codex-cli': {
65
+ name: 'Codex CLI / OpenCode',
66
+ detect: ['.codex', '.opencode'],
67
+ configFile: 'AGENTS.md',
68
+ },
69
+ 'antigravity': {
70
+ name: 'Antigravity',
71
+ detect: ['.gemini/antigravity'],
72
+ configFile: 'GEMINI.md',
73
+ },
74
+ };
75
+
76
+ module.exports = {
77
+ command: 'install',
78
+ description: 'Install BMAD+ agents and skills into your project',
79
+ options: [
80
+ ['-d, --directory <path>', 'Installation directory (default: current directory)'],
81
+ ['-p, --packs <packs>', 'Comma-separated pack IDs: core,osint,all (default: interactive)'],
82
+ ['-y, --yes', 'Accept all defaults, skip prompts'],
83
+ ['--tools <tools>', 'Comma-separated IDE IDs (default: auto-detect)'],
84
+ ],
85
+ action: async (options) => {
86
+ const projectDir = path.resolve(options.directory || process.cwd());
87
+ const bmadSrc = path.join(__dirname, '..', '..', '..', 'src', 'bmad-plus');
88
+
89
+ // ── Intro ──
90
+ clack.intro(pc.bgCyan(pc.black(' BMAD+ Installer v0.1.0 ')));
91
+
92
+ // Verify source exists
93
+ if (!fs.existsSync(bmadSrc)) {
94
+ clack.log.error(`Source directory not found: ${bmadSrc}`);
95
+ clack.outro(pc.red('Installation failed.'));
96
+ process.exit(1);
97
+ }
98
+
99
+ clack.log.info(`Installing to: ${pc.cyan(projectDir)}`);
100
+
101
+ // ── Step 1: Pack Selection ──
102
+ let selectedPacks = ['core']; // Core always included
103
+
104
+ if (options.packs) {
105
+ const requested = options.packs.split(',').map(p => p.trim());
106
+ if (requested.includes('all')) {
107
+ selectedPacks = Object.keys(PACKS).filter(k => !PACKS[k].disabled);
108
+ } else {
109
+ selectedPacks = ['core', ...requested.filter(p => PACKS[p] && !PACKS[p].disabled)];
110
+ }
111
+ } else if (!options.yes) {
112
+ const packChoice = await clack.multiselect({
113
+ message: 'Quels packs installer ? (Core est toujours inclus)',
114
+ options: Object.entries(PACKS)
115
+ .filter(([, p]) => !p.required)
116
+ .map(([key, pack]) => ({
117
+ value: key,
118
+ label: `${pack.icon} ${pack.name}`,
119
+ hint: pack.disabled ? 'bientôt' : pack.description,
120
+ disabled: pack.disabled,
121
+ })),
122
+ required: false,
123
+ });
124
+
125
+ if (clack.isCancel(packChoice)) {
126
+ clack.cancel('Installation annulée.');
127
+ process.exit(0);
128
+ }
129
+
130
+ selectedPacks = [...new Set(['core', ...packChoice])];
131
+ }
132
+
133
+ clack.log.success(`Packs sélectionnés: ${selectedPacks.map(p => `${PACKS[p].icon} ${PACKS[p].name}`).join(', ')}`);
134
+
135
+ // ── Step 2: IDE Detection ──
136
+ let detectedIDEs = [];
137
+
138
+ if (options.tools) {
139
+ detectedIDEs = options.tools.split(',').map(t => t.trim());
140
+ } else {
141
+ // Auto-detect
142
+ for (const [id, ide] of Object.entries(IDE_CONFIGS)) {
143
+ for (const marker of ide.detect) {
144
+ if (fs.existsSync(path.join(projectDir, marker))) {
145
+ detectedIDEs.push(id);
146
+ break;
147
+ }
148
+ }
149
+ }
150
+
151
+ // If nothing detected, ask
152
+ if (detectedIDEs.length === 0 && !options.yes) {
153
+ const ideChoice = await clack.multiselect({
154
+ message: 'Quels IDE utilises-tu ?',
155
+ options: Object.entries(IDE_CONFIGS).map(([key, ide]) => ({
156
+ value: key,
157
+ label: ide.name,
158
+ })),
159
+ required: false,
160
+ });
161
+
162
+ if (!clack.isCancel(ideChoice)) {
163
+ detectedIDEs = ideChoice;
164
+ }
165
+ }
166
+
167
+ // Default to all if --yes
168
+ if (detectedIDEs.length === 0 && options.yes) {
169
+ detectedIDEs = Object.keys(IDE_CONFIGS);
170
+ }
171
+ }
172
+
173
+ if (detectedIDEs.length > 0) {
174
+ clack.log.info(`IDE détectés: ${detectedIDEs.map(id => IDE_CONFIGS[id].name).join(', ')}`);
175
+ }
176
+
177
+ // ── Step 3: User Config ──
178
+ let userName = process.env.USER || process.env.USERNAME || 'Developer';
179
+ let commLang = 'French';
180
+
181
+ if (!options.yes) {
182
+ const userConfig = await clack.group({
183
+ userName: () => clack.text({
184
+ message: 'Ton prénom (les agents l\'utilisent pour te saluer)',
185
+ placeholder: userName,
186
+ defaultValue: userName,
187
+ }),
188
+ commLang: () => clack.select({
189
+ message: 'Langue de communication',
190
+ options: [
191
+ { value: 'French', label: '🇫🇷 Français' },
192
+ { value: 'English', label: '🇬🇧 English' },
193
+ { value: 'German', label: '🇩🇪 Deutsch' },
194
+ { value: 'Spanish', label: '🇪🇸 Español' },
195
+ ],
196
+ }),
197
+ execMode: () => clack.select({
198
+ message: 'Mode d\'exécution',
199
+ options: [
200
+ { value: 'manual', label: 'Manuel — Tu appelles les agents toi-même' },
201
+ { value: 'autopilot', label: 'Autopilot — Nexus gère tout le pipeline' },
202
+ { value: 'hybrid', label: 'Hybride — Autopilot avec checkpoints fréquents' },
203
+ ],
204
+ }),
205
+ });
206
+
207
+ if (clack.isCancel(userConfig)) {
208
+ clack.cancel('Installation annulée.');
209
+ process.exit(0);
210
+ }
211
+
212
+ userName = userConfig.userName;
213
+ commLang = userConfig.commLang;
214
+ }
215
+
216
+ // ── Step 4: Install Files ──
217
+ const spinner = clack.spinner();
218
+ spinner.start('Installation des fichiers...');
219
+
220
+ const targetAgentsDir = path.join(projectDir, '.agents', 'skills');
221
+ const targetDataDir = path.join(projectDir, '.agents', 'data');
222
+ const targetBmadDir = path.join(projectDir, '_bmad');
223
+
224
+ // Create directories
225
+ fsExtra.ensureDirSync(targetAgentsDir);
226
+ fsExtra.ensureDirSync(targetDataDir);
227
+ fsExtra.ensureDirSync(targetBmadDir);
228
+
229
+ let copiedAgents = 0;
230
+ let copiedSkills = 0;
231
+ let copiedFiles = 0;
232
+
233
+ for (const packId of selectedPacks) {
234
+ const pack = PACKS[packId];
235
+ if (!pack || pack.disabled) continue;
236
+
237
+ // Copy agents
238
+ for (const agent of pack.agents) {
239
+ const src = path.join(bmadSrc, 'agents', agent);
240
+ const dest = path.join(targetAgentsDir, agent);
241
+ if (fs.existsSync(src)) {
242
+ fsExtra.copySync(src, dest, { overwrite: true });
243
+ copiedAgents++;
244
+ }
245
+ }
246
+
247
+ // Copy skills
248
+ for (const skill of pack.skills) {
249
+ const src = path.join(bmadSrc, 'skills', skill);
250
+ const dest = path.join(targetAgentsDir, skill);
251
+ if (fs.existsSync(src)) {
252
+ fsExtra.copySync(src, dest, { overwrite: true });
253
+ copiedSkills++;
254
+ }
255
+ }
256
+
257
+ // Copy data files
258
+ for (const dataFile of (pack.data || [])) {
259
+ const src = path.join(bmadSrc, 'data', dataFile);
260
+ const dest = path.join(targetDataDir, dataFile);
261
+ if (fs.existsSync(src)) {
262
+ fsExtra.copySync(src, dest, { overwrite: true });
263
+ copiedFiles++;
264
+ }
265
+ }
266
+
267
+ // Copy external package (OSINT)
268
+ if (pack.externalPackage) {
269
+ const extSrc = path.join(__dirname, '..', '..', '..', pack.externalPackage, 'skills');
270
+ const extDest = path.join(targetAgentsDir);
271
+ if (fs.existsSync(extSrc)) {
272
+ fsExtra.copySync(extSrc, extDest, { overwrite: true });
273
+ copiedSkills++;
274
+ }
275
+ }
276
+ }
277
+
278
+ // Copy module config
279
+ const moduleYaml = path.join(bmadSrc, 'module.yaml');
280
+ if (fs.existsSync(moduleYaml)) {
281
+ fsExtra.copySync(moduleYaml, path.join(targetBmadDir, 'module.yaml'));
282
+ copiedFiles++;
283
+ }
284
+
285
+ const helpCsv = path.join(bmadSrc, 'module-help.csv');
286
+ if (fs.existsSync(helpCsv)) {
287
+ fsExtra.copySync(helpCsv, path.join(targetBmadDir, 'module-help.csv'));
288
+ copiedFiles++;
289
+ }
290
+
291
+ spinner.stop(`✅ ${copiedAgents} agents, ${copiedSkills} skills, ${copiedFiles} fichiers copiés`);
292
+
293
+ // ── Step 5: Generate IDE Configs ──
294
+ if (detectedIDEs.length > 0) {
295
+ const ideSpinner = clack.spinner();
296
+ ideSpinner.start('Configuration des IDE...');
297
+
298
+ const configContent = generateIDEConfig(userName, commLang, selectedPacks);
299
+
300
+ for (const ideId of detectedIDEs) {
301
+ const ide = IDE_CONFIGS[ideId];
302
+ if (!ide) continue;
303
+
304
+ const configPath = path.join(projectDir, ide.configFile);
305
+ fs.writeFileSync(configPath, configContent, 'utf8');
306
+ }
307
+
308
+ ideSpinner.stop(`✅ ${detectedIDEs.length} IDE configuré(s)`);
309
+ }
310
+
311
+ // ── Step 6: Create config.yaml ──
312
+ const configYaml = generateConfigYaml(userName, commLang, projectDir);
313
+ const configPath = path.join(targetBmadDir, 'config.yaml');
314
+ fs.writeFileSync(configPath, configYaml, 'utf8');
315
+
316
+ // ── Step 7: Create output directories ──
317
+ const outputDir = path.join(projectDir, '_bmad-output');
318
+ fsExtra.ensureDirSync(path.join(outputDir, 'discovery'));
319
+ fsExtra.ensureDirSync(path.join(outputDir, 'build'));
320
+ fsExtra.ensureDirSync(path.join(projectDir, 'docs'));
321
+
322
+ // ── Step 8: Write install manifest ──
323
+ const manifest = {
324
+ version: '0.1.0',
325
+ installed: new Date().toISOString(),
326
+ packs: selectedPacks,
327
+ ides: detectedIDEs,
328
+ user: userName,
329
+ language: commLang,
330
+ };
331
+ fs.writeFileSync(
332
+ path.join(targetBmadDir, '.bmad-plus-install.json'),
333
+ JSON.stringify(manifest, null, 2),
334
+ 'utf8'
335
+ );
336
+
337
+ // ── Summary — Contextual Getting Started ──
338
+ const agentGuide = [
339
+ '💬 À qui parler ?',
340
+ '',
341
+ ' Discuter d\'une idée → "Atlas, j\'ai une idée de projet : [...]"',
342
+ ' Créer un PRD → "Atlas, crée le PRD"',
343
+ ' Architecture technique → "Forge, propose une architecture"',
344
+ ' Implémenter du code → "Forge, implémente la story [X]"',
345
+ ' Tester / code review → "Sentinel, review le module [X]"',
346
+ ' Planifier un sprint → "Nexus, crée les epics et stories"',
347
+ ' Tout automatiser → "autopilot" puis décris ton projet',
348
+ ];
349
+
350
+ if (selectedPacks.includes('osint')) {
351
+ agentGuide.push(' Investigation OSINT → "Shadow, investigate [nom]"');
352
+ }
353
+
354
+ if (selectedPacks.includes('maker')) {
355
+ agentGuide.push(' Créer un nouvel agent → "Maker, crée un agent [description]"');
356
+ }
357
+
358
+ agentGuide.push(
359
+ '',
360
+ '🚀 Workflow recommandé:',
361
+ ' 1. Atlas (idée → brief → PRD)',
362
+ ' 2. Forge (architecture → code)',
363
+ ' 3. Sentinel (tests → review)',
364
+ '',
365
+ '⚡ Ou: "autopilot" pour tout gérer automatiquement',
366
+ '',
367
+ `📁 Output: _bmad-output/discovery/ et _bmad-output/build/`,
368
+ );
369
+
370
+ clack.note(agentGuide.join('\n'), '✅ Installation terminée — Comment commencer');
371
+
372
+ clack.outro(pc.green('BMAD+ est prêt! Parle à Atlas pour commencer 🚀'));
373
+ },
374
+ };
375
+
376
+
377
+ // ── Helpers ──
378
+
379
+ function generateIDEConfig(userName, language, packs) {
380
+ const agents = [
381
+ '- **Atlas** (Strategist) — Business analysis + Product management',
382
+ '- **Forge** (Architect-Dev) — Architecture + Development + Documentation',
383
+ '- **Sentinel** (Quality) — QA + UX review',
384
+ '- **Nexus** (Orchestrator) — Sprint management + Autopilot + Parallel execution',
385
+ ];
386
+
387
+ if (packs.includes('osint')) {
388
+ agents.push('- **Shadow** (OSINT) — Investigation + Scraping + Psychoprofiling');
389
+ }
390
+
391
+ if (packs.includes('audit')) {
392
+ agents.push('- **Shield** (Audit) — Security scanning + Compliance');
393
+ }
394
+
395
+ return `# BMAD+ — AI Agent Configuration
396
+
397
+ ## Project Context
398
+ This project uses BMAD+, an augmented AI-driven development framework.
399
+ Based on BMAD-METHOD v6.2.0 with multi-role agents, autopilot mode, and parallel execution.
400
+
401
+ ## Agents
402
+ To activate an agent, say its name or persona:
403
+ ${agents.join('\n')}
404
+
405
+ ## Skills
406
+ - Load skills from \`.agents/skills/\`
407
+ - Each agent has a SKILL.md with capabilities, activation protocol, and role-switching rules
408
+ - Auto-activation triggers: \`.agents/data/role-triggers.yaml\`
409
+
410
+ ## Key Commands
411
+ - \`bmad-help\` — Show all available agents and skills
412
+ - \`autopilot\` — Launch Nexus in full pipeline mode
413
+ - \`parallel\` — Enable parallel multi-agent execution
414
+
415
+ ## Communication
416
+ - User name: ${userName}
417
+ - Default language: ${language} for user-facing content, English for code and technical docs.
418
+ `;
419
+ }
420
+
421
+ function generateConfigYaml(userName, language, projectDir) {
422
+ const projectName = path.basename(projectDir);
423
+ return `# BMAD+ Project Configuration
424
+ # Generated by bmad-plus install
425
+
426
+ user_name: "${userName}"
427
+ communication_language: "${language}"
428
+ document_output_language: "${language}"
429
+ output_folder: "_bmad-output"
430
+ project_name: "${projectName}"
431
+
432
+ # Execution settings
433
+ execution_mode: "manual"
434
+ auto_role_activation: true
435
+ parallel_execution: true
436
+ `;
437
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * BMAD+ Uninstall Command
3
+ * Removes BMAD+ agents, skills, and configs from the current project
4
+ */
5
+
6
+ const path = require('node:path');
7
+ const fs = require('node:fs');
8
+ const fsExtra = require('fs-extra');
9
+ const clack = require('@clack/prompts');
10
+ const pc = require('picocolors');
11
+
12
+ module.exports = {
13
+ command: 'uninstall',
14
+ description: 'Remove BMAD+ from your project',
15
+ action: async () => {
16
+ const projectDir = process.cwd();
17
+
18
+ clack.intro(pc.bgRed(pc.white(' BMAD+ Uninstaller ')));
19
+
20
+ // Check if installed
21
+ const manifestPath = path.join(projectDir, '_bmad', '.bmad-plus-install.json');
22
+ if (!fs.existsSync(manifestPath)) {
23
+ clack.log.warn('BMAD+ is not installed in this directory.');
24
+ clack.outro('Nothing to remove.');
25
+ return;
26
+ }
27
+
28
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
29
+ clack.log.info(`Found BMAD+ v${manifest.version} (installed ${manifest.installed})`);
30
+
31
+ const confirm = await clack.confirm({
32
+ message: 'Supprimer BMAD+ de ce projet ?',
33
+ });
34
+
35
+ if (!confirm || clack.isCancel(confirm)) {
36
+ clack.cancel('Cancelled.');
37
+ return;
38
+ }
39
+
40
+ const spinner = clack.spinner();
41
+ spinner.start('Suppression...');
42
+
43
+ // Remove .agents/skills/ (BMAD+ agents & skills)
44
+ const agentsDir = path.join(projectDir, '.agents');
45
+ if (fs.existsSync(agentsDir)) {
46
+ fsExtra.removeSync(agentsDir);
47
+ }
48
+
49
+ // Remove _bmad/ config
50
+ const bmadDir = path.join(projectDir, '_bmad');
51
+ if (fs.existsSync(bmadDir)) {
52
+ fsExtra.removeSync(bmadDir);
53
+ }
54
+
55
+ // Remove IDE configs
56
+ for (const configFile of ['CLAUDE.md', 'GEMINI.md', 'AGENTS.md', 'OPENCODE.md']) {
57
+ const p = path.join(projectDir, configFile);
58
+ if (fs.existsSync(p)) {
59
+ // Only remove if it's a BMAD+ generated file
60
+ const content = fs.readFileSync(p, 'utf8');
61
+ if (content.includes('BMAD+')) {
62
+ fs.unlinkSync(p);
63
+ }
64
+ }
65
+ }
66
+
67
+ spinner.stop('✅ BMAD+ supprimé');
68
+ clack.outro(pc.green('Done!'));
69
+ },
70
+ };