bmad-plus 0.12.0 → 0.12.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.
- package/CHANGELOG.md +612 -554
- package/README.md +557 -577
- package/osint-agent-package/agents/osint-investigator.md +12 -0
- package/osint-agent-package/skills/bmad-osint-investigate/osint/SKILL.md +491 -482
- package/osint-agent-package/skills/bmad-osint-investigate/osint/assets/dossier-template.md +126 -126
- package/osint-agent-package/skills/bmad-osint-investigate/osint/assets/lawful-basis-record.md +48 -48
- package/osint-agent-package/skills/bmad-osint-investigate/osint/references/content-extraction.md +100 -100
- package/osint-agent-package/skills/bmad-osint-investigate/osint/references/gdpr-osint.md +48 -48
- package/osint-agent-package/skills/bmad-osint-investigate/osint/references/platforms.md +130 -130
- package/osint-agent-package/skills/bmad-osint-investigate/osint/references/psychoprofile.md +69 -69
- package/osint-agent-package/skills/bmad-osint-investigate/osint/references/tools.md +281 -281
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/mcp-client.py +136 -136
- package/package.json +104 -91
- package/readme-international/README.de.md +596 -589
- package/readme-international/README.es.md +613 -606
- package/readme-international/README.fr.md +611 -604
- package/src/bmad-plus/agents/agent-shadow/SKILL.md +18 -0
- package/src/bmad-plus/data/role-triggers.yaml +52 -0
- package/src/bmad-plus/module.yaml +283 -283
- package/src/bmad-plus/packs/pack-animated/animated-website-agent.md +325 -325
- package/src/bmad-plus/packs/pack-animated/templates/animated-website-workflow.md +55 -55
- package/src/bmad-plus/packs/pack-backup/backup-agent.md +71 -71
- package/src/bmad-plus/packs/pack-backup/templates/backup-workflow.md +51 -51
- package/src/bmad-plus/packs/pack-dev-studio/README.md +162 -162
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/analyst-agent.md +73 -73
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/document-project.md +61 -61
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/domain-research.md +95 -95
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/market-research.md +95 -95
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/prfaq.md +134 -134
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/product-brief.md +80 -80
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/tech-writer-agent.md +73 -73
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/technical-research.md +95 -95
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/architect-agent.md +73 -73
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/create-architecture.md +73 -73
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/create-epics-stories.md +92 -92
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/generate-project-context.md +80 -80
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/implementation-readiness.md +90 -90
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-01-init.md +153 -153
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-01b-continue.md +173 -173
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-02-context.md +224 -224
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-03-starter.md +329 -329
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-04-decisions.md +318 -318
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-05-patterns.md +359 -359
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-06-structure.md +379 -379
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-07-validation.md +361 -361
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-08-complete.md +81 -81
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/checkpoint-preview.md +67 -67
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-01-gather-context.md +85 -85
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-02-review.md +35 -35
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-03-triage.md +49 -49
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-04-present.md +131 -131
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review.md +89 -89
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/correct-course.md +300 -300
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/create-story.md +428 -428
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-agent.md +73 -73
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-story-checklist.md +80 -80
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-story.md +484 -484
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/investigate.md +193 -193
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/qa-e2e-tests.md +175 -175
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/quick-dev.md +110 -110
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/retrospective.md +1511 -1511
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/sprint-planning.md +298 -298
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/sprint-status.md +296 -296
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/create-prd.md +29 -29
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/create-ux-design.md +74 -74
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/edit-prd.md +29 -29
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/pm-agent.md +73 -73
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/prd.md +89 -89
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/ux-designer-agent.md +73 -73
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/validate-prd.md +29 -29
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/advanced-elicitation.md +141 -141
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/adversarial-review.md +37 -37
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/bmad-help.md +75 -75
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/brainstorming.md +6 -6
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/customize.md +110 -110
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/distillator.md +176 -176
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/edge-case-hunter.md +67 -67
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/editorial-review-prose.md +86 -86
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/editorial-review-structure.md +179 -179
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/index-docs.md +66 -66
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/party-mode.md +127 -127
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/shard-doc.md +105 -105
- package/src/bmad-plus/packs/pack-dev-studio/dev-studio-orchestrator.md +120 -120
- package/src/bmad-plus/packs/pack-dev-studio/shared/architecture-decision-template.md +12 -12
- package/src/bmad-plus/packs/pack-dev-studio/shared/bwml-spec.md +328 -328
- package/src/bmad-plus/packs/pack-dev-studio/shared/module-help.csv +32 -32
- package/src/bmad-plus/packs/pack-dev-studio/upstream-sync.yaml +81 -81
- package/src/bmad-plus/packs/pack-memory/shared/memory-protocol.md +14 -0
- package/src/bmad-plus/packs/pack-seo/SKILL.md +171 -171
- package/src/bmad-plus/packs/pack-seo/checklist.md +140 -140
- package/src/bmad-plus/packs/pack-seo/pagespeed-playbook.md +320 -320
- package/src/bmad-plus/packs/pack-seo/ref/audit-schema.json +187 -187
- package/src/bmad-plus/packs/pack-seo/ref/cwv-thresholds.md +87 -87
- package/src/bmad-plus/packs/pack-seo/ref/eeat-criteria.md +123 -123
- package/src/bmad-plus/packs/pack-seo/ref/geo-signals.md +167 -167
- package/src/bmad-plus/packs/pack-seo/ref/hreflang-rules.md +153 -153
- package/src/bmad-plus/packs/pack-seo/ref/quality-gates.md +133 -133
- package/src/bmad-plus/packs/pack-seo/ref/schema-catalog.md +91 -91
- package/src/bmad-plus/packs/pack-seo/ref/schema-templates.json +356 -356
- package/src/bmad-plus/packs/pack-seo/requirements.txt +17 -0
- package/src/bmad-plus/packs/pack-seo/scripts/seo_apis.py +456 -0
- package/src/bmad-plus/packs/pack-seo/scripts/seo_crawl.py +359 -0
- package/src/bmad-plus/packs/pack-seo/scripts/seo_fetch.py +304 -0
- package/src/bmad-plus/packs/pack-seo/scripts/seo_parse.py +255 -0
- package/src/bmad-plus/packs/pack-seo/scripts/seo_report.py +410 -0
- package/src/bmad-plus/packs/pack-seo/scripts/seo_screenshot.py +202 -0
- package/src/bmad-plus/packs/pack-seo/seo-chief.md +294 -294
- package/src/bmad-plus/packs/pack-seo/seo-judge.md +241 -241
- package/src/bmad-plus/packs/pack-seo/seo-scout.md +171 -171
- package/src/bmad-plus/packs/pack-seo/templates/seo-audit-workflow.md +241 -241
- package/src/bmad-plus/packs/pack-shield/README.md +6 -6
- package/src/bmad-plus/packs/pack-shield/SKILL.md +2 -2
- package/src/bmad-plus/packs/pack-shield/categories/accessibility-esg/csrd-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/accessibility-esg/section508-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/accessibility-esg/wcag-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/ai-governance/eu-ai-act-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/ai-governance/iso42001-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/ai-governance/nist-ai-rmf-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/cis-controls-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/ism-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/iso27001-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/nis2-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/nist-800-53-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/nist-csf-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/defense-export/cmmc-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/defense-export/ear-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/defense-export/itar-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/defense-export/tsa-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/dora-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/fedramp-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/hipaa-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/pci-dss-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/soc2-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/swift-csp-agent.md +11 -11
- package/src/bmad-plus/packs/pack-shield/shield-orchestrator.md +1 -1
- package/tools/build/check-counts.js +628 -0
- package/tools/build/generated-adapters/.codex/AGENTS.md +1 -1
- package/tools/build/generated-adapters/.cursor/rules/bmad-plus.mdc +1 -1
- package/tools/build/generated-adapters/.opencode/AGENTS.md +1 -1
- package/tools/build/generated-adapters/AGENTS.md +1 -1
- package/tools/build/generated-adapters/CLAUDE.md +1 -1
- package/tools/build/generated-adapters/CONVENTIONS.md +1 -1
- package/tools/build/generated-adapters/GEMINI.md +1 -1
- package/tools/cli/commands/autoconfig.js +470 -472
- package/tools/cli/commands/doctor.js +233 -233
- package/tools/cli/commands/install.js +598 -495
- package/tools/cli/commands/memory-journal-cmd.js +311 -311
- package/tools/cli/commands/memory.js +195 -195
- package/tools/cli/commands/scan.js +348 -364
- package/tools/cli/commands/uninstall.js +101 -101
- package/tools/cli/commands/update.js +134 -134
- package/tools/cli/i18n.js +845 -845
- package/tools/cli/lib/README-memory-journal.md +125 -125
- package/tools/cli/lib/ide-config.js +267 -259
- package/tools/cli/lib/memory-init.js +204 -113
- package/tools/cli/lib/packs.js +209 -209
- package/tools/cli/lib/path-hash.js +39 -0
- package/tools/cli/lib/python-provision.js +508 -508
- package/tools/cli/lib/stack-detect.js +102 -102
- package/tools/cli/lib/validate.js +50 -50
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BMAD+ Uninstall Command
|
|
3
|
-
* Removes BMAD+ agents, skills, and configs from the current project
|
|
4
|
-
* Internationalized — uses i18n system
|
|
5
|
-
*
|
|
6
|
-
* Author: Laurent Rochetta
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const path = require('node:path');
|
|
10
|
-
const fs = require('node:fs');
|
|
11
|
-
const fsExtra = require('fs-extra');
|
|
12
|
-
const clack = require('@clack/prompts');
|
|
13
|
-
const pc = require('picocolors');
|
|
14
|
-
const { t } = require('../i18n');
|
|
15
|
-
|
|
16
|
-
module.exports = {
|
|
17
|
-
command: 'uninstall',
|
|
18
|
-
description: 'Remove BMAD+ from your project',
|
|
19
|
-
options: [
|
|
20
|
-
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it'],
|
|
21
|
-
],
|
|
22
|
-
action: async (options) => {
|
|
23
|
-
const projectDir = process.cwd();
|
|
24
|
-
|
|
25
|
-
clack.intro(pc.bgRed(pc.white(' BMAD+ Uninstaller ')));
|
|
26
|
-
|
|
27
|
-
// Check if installed
|
|
28
|
-
const manifestPath = path.join(projectDir, '_bmad', '.bmad-plus-install.json');
|
|
29
|
-
if (!fs.existsSync(manifestPath)) {
|
|
30
|
-
clack.log.warn('BMAD+ is not installed in this directory.');
|
|
31
|
-
clack.outro('Nothing to remove.');
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
36
|
-
|
|
37
|
-
// Use --lang flag, or fall back to manifest language
|
|
38
|
-
let lang = options.lang || manifest.uiLanguage || 'en';
|
|
39
|
-
const i = t(lang);
|
|
40
|
-
|
|
41
|
-
clack.log.info(`BMAD+ v${manifest.version} (${i.installed_on || 'installed'} ${manifest.installed.split('T')[0]})`);
|
|
42
|
-
clack.log.info(`${i.selected_packs}: ${(manifest.packs || ['core']).join(', ')}`);
|
|
43
|
-
|
|
44
|
-
const confirm = await clack.confirm({
|
|
45
|
-
message: i.uninstall_confirm || 'Remove BMAD+ from this project?',
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
if (!confirm || clack.isCancel(confirm)) {
|
|
49
|
-
clack.cancel(i.cancelled);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const spinner = clack.spinner();
|
|
54
|
-
spinner.start(i.uninstall_removing || 'Removing...');
|
|
55
|
-
|
|
56
|
-
let removed = 0;
|
|
57
|
-
|
|
58
|
-
// Remove .agents/skills/ (BMAD+ agents & skills)
|
|
59
|
-
const agentsDir = path.join(projectDir, '.agents');
|
|
60
|
-
if (fs.existsSync(agentsDir)) {
|
|
61
|
-
fsExtra.removeSync(agentsDir);
|
|
62
|
-
removed++;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Remove _bmad/ config
|
|
66
|
-
const bmadDir = path.join(projectDir, '_bmad');
|
|
67
|
-
if (fs.existsSync(bmadDir)) {
|
|
68
|
-
fsExtra.removeSync(bmadDir);
|
|
69
|
-
removed++;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Remove _bmad-output/ (only if empty)
|
|
73
|
-
const outputDir = path.join(projectDir, '_bmad-output');
|
|
74
|
-
if (fs.existsSync(outputDir)) {
|
|
75
|
-
const contents = fs.readdirSync(outputDir, { recursive: true }).filter(f => !f.startsWith('.'));
|
|
76
|
-
if (contents.length === 0) {
|
|
77
|
-
fsExtra.removeSync(outputDir);
|
|
78
|
-
removed++;
|
|
79
|
-
} else {
|
|
80
|
-
clack.log.info(i.uninstall_output_kept || '📁 _bmad-output/ kept (contains files)');
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Remove IDE configs (only BMAD+-generated ones)
|
|
85
|
-
for (const configFile of ['CLAUDE.md', 'GEMINI.md', 'AGENTS.md', 'OPENCODE.md']) {
|
|
86
|
-
const p = path.join(projectDir, configFile);
|
|
87
|
-
if (fs.existsSync(p)) {
|
|
88
|
-
const content = fs.readFileSync(p, 'utf8');
|
|
89
|
-
// NODE-05: only remove a config BMAD+ actually generated (it carries the
|
|
90
|
-
// marker below). A hand-authored file that merely mentions "BMAD+" is kept.
|
|
91
|
-
if (content.includes('BMAD+ — AI Agent Configuration')) {
|
|
92
|
-
fs.unlinkSync(p);
|
|
93
|
-
removed++;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
spinner.stop(i.uninstall_done ? i.uninstall_done(removed) : `✅ BMAD+ removed (${removed} items)`);
|
|
99
|
-
clack.outro(pc.green(i.guide_ready ? '👋 Done!' : 'Done!'));
|
|
100
|
-
},
|
|
101
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* BMAD+ Uninstall Command
|
|
3
|
+
* Removes BMAD+ agents, skills, and configs from the current project
|
|
4
|
+
* Internationalized — uses i18n system
|
|
5
|
+
*
|
|
6
|
+
* Author: Laurent Rochetta
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const path = require('node:path');
|
|
10
|
+
const fs = require('node:fs');
|
|
11
|
+
const fsExtra = require('fs-extra');
|
|
12
|
+
const clack = require('@clack/prompts');
|
|
13
|
+
const pc = require('picocolors');
|
|
14
|
+
const { t } = require('../i18n');
|
|
15
|
+
|
|
16
|
+
module.exports = {
|
|
17
|
+
command: 'uninstall',
|
|
18
|
+
description: 'Remove BMAD+ from your project',
|
|
19
|
+
options: [
|
|
20
|
+
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it'],
|
|
21
|
+
],
|
|
22
|
+
action: async (options) => {
|
|
23
|
+
const projectDir = process.cwd();
|
|
24
|
+
|
|
25
|
+
clack.intro(pc.bgRed(pc.white(' BMAD+ Uninstaller ')));
|
|
26
|
+
|
|
27
|
+
// Check if installed
|
|
28
|
+
const manifestPath = path.join(projectDir, '_bmad', '.bmad-plus-install.json');
|
|
29
|
+
if (!fs.existsSync(manifestPath)) {
|
|
30
|
+
clack.log.warn('BMAD+ is not installed in this directory.');
|
|
31
|
+
clack.outro('Nothing to remove.');
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
36
|
+
|
|
37
|
+
// Use --lang flag, or fall back to manifest language
|
|
38
|
+
let lang = options.lang || manifest.uiLanguage || 'en';
|
|
39
|
+
const i = t(lang);
|
|
40
|
+
|
|
41
|
+
clack.log.info(`BMAD+ v${manifest.version} (${i.installed_on || 'installed'} ${manifest.installed.split('T')[0]})`);
|
|
42
|
+
clack.log.info(`${i.selected_packs}: ${(manifest.packs || ['core']).join(', ')}`);
|
|
43
|
+
|
|
44
|
+
const confirm = await clack.confirm({
|
|
45
|
+
message: i.uninstall_confirm || 'Remove BMAD+ from this project?',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
if (!confirm || clack.isCancel(confirm)) {
|
|
49
|
+
clack.cancel(i.cancelled);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const spinner = clack.spinner();
|
|
54
|
+
spinner.start(i.uninstall_removing || 'Removing...');
|
|
55
|
+
|
|
56
|
+
let removed = 0;
|
|
57
|
+
|
|
58
|
+
// Remove .agents/skills/ (BMAD+ agents & skills)
|
|
59
|
+
const agentsDir = path.join(projectDir, '.agents');
|
|
60
|
+
if (fs.existsSync(agentsDir)) {
|
|
61
|
+
fsExtra.removeSync(agentsDir);
|
|
62
|
+
removed++;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Remove _bmad/ config
|
|
66
|
+
const bmadDir = path.join(projectDir, '_bmad');
|
|
67
|
+
if (fs.existsSync(bmadDir)) {
|
|
68
|
+
fsExtra.removeSync(bmadDir);
|
|
69
|
+
removed++;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Remove _bmad-output/ (only if empty)
|
|
73
|
+
const outputDir = path.join(projectDir, '_bmad-output');
|
|
74
|
+
if (fs.existsSync(outputDir)) {
|
|
75
|
+
const contents = fs.readdirSync(outputDir, { recursive: true }).filter(f => !f.startsWith('.'));
|
|
76
|
+
if (contents.length === 0) {
|
|
77
|
+
fsExtra.removeSync(outputDir);
|
|
78
|
+
removed++;
|
|
79
|
+
} else {
|
|
80
|
+
clack.log.info(i.uninstall_output_kept || '📁 _bmad-output/ kept (contains files)');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Remove IDE configs (only BMAD+-generated ones)
|
|
85
|
+
for (const configFile of ['CLAUDE.md', 'GEMINI.md', 'AGENTS.md', 'OPENCODE.md']) {
|
|
86
|
+
const p = path.join(projectDir, configFile);
|
|
87
|
+
if (fs.existsSync(p)) {
|
|
88
|
+
const content = fs.readFileSync(p, 'utf8');
|
|
89
|
+
// NODE-05: only remove a config BMAD+ actually generated (it carries the
|
|
90
|
+
// marker below). A hand-authored file that merely mentions "BMAD+" is kept.
|
|
91
|
+
if (content.includes('BMAD+ — AI Agent Configuration')) {
|
|
92
|
+
fs.unlinkSync(p);
|
|
93
|
+
removed++;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
spinner.stop(i.uninstall_done ? i.uninstall_done(removed) : `✅ BMAD+ removed (${removed} items)`);
|
|
99
|
+
clack.outro(pc.green(i.guide_ready ? '👋 Done!' : 'Done!'));
|
|
100
|
+
},
|
|
101
|
+
};
|
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BMAD+ Update Command
|
|
3
|
-
* Updates agents and skills while preserving user config
|
|
4
|
-
*
|
|
5
|
-
* Author: Laurent Rochetta
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const path = require('node:path');
|
|
9
|
-
const fs = require('node:fs');
|
|
10
|
-
const fsExtra = require('fs-extra');
|
|
11
|
-
const clack = require('@clack/prompts');
|
|
12
|
-
const pc = require('picocolors');
|
|
13
|
-
const { t } = require('../i18n');
|
|
14
|
-
const { PACKS } = require('../lib/packs');
|
|
15
|
-
const { copyPackFiles } = require('../lib/pack-copy');
|
|
16
|
-
|
|
17
|
-
// Pack definitions imported from shared module: require('../lib/packs').PACKS
|
|
18
|
-
|
|
19
|
-
module.exports = {
|
|
20
|
-
command: 'update',
|
|
21
|
-
description: 'Update BMAD+ agents and skills (preserves config)',
|
|
22
|
-
options: [
|
|
23
|
-
['-d, --directory <path>', 'Project directory (default: current directory)'],
|
|
24
|
-
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it'],
|
|
25
|
-
],
|
|
26
|
-
action: async (options) => {
|
|
27
|
-
const projectDir = path.resolve(options.directory || process.cwd());
|
|
28
|
-
const bmadSrc = path.join(__dirname, '..', '..', '..', 'src', 'bmad-plus');
|
|
29
|
-
const packageJson = require('../../../package.json');
|
|
30
|
-
|
|
31
|
-
clack.intro(pc.bgMagenta(pc.white(` BMAD+ Updater v${packageJson.version} `)));
|
|
32
|
-
|
|
33
|
-
// Check if installed
|
|
34
|
-
const manifestPath = path.join(projectDir, '_bmad', '.bmad-plus-install.json');
|
|
35
|
-
if (!fs.existsSync(manifestPath)) {
|
|
36
|
-
clack.log.error('BMAD+ is not installed in this directory.');
|
|
37
|
-
clack.log.info('Run `npx bmad-plus install` first.');
|
|
38
|
-
clack.outro(pc.red('Update aborted.'));
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
let manifest;
|
|
43
|
-
try {
|
|
44
|
-
manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
45
|
-
} catch (err) {
|
|
46
|
-
clack.log.error(`Install manifest is unreadable or corrupt: ${err.message}`);
|
|
47
|
-
clack.log.info('Re-run `npx bmad-plus install` to repair the installation.');
|
|
48
|
-
clack.outro(pc.red('Update aborted.'));
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (!manifest || typeof manifest !== 'object') {
|
|
52
|
-
clack.log.error('Install manifest is malformed (not an object).');
|
|
53
|
-
clack.log.info('Re-run `npx bmad-plus install` to repair the installation.');
|
|
54
|
-
clack.outro(pc.red('Update aborted.'));
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
const lang = options.lang || manifest.uiLanguage || 'en';
|
|
58
|
-
const i = t(lang);
|
|
59
|
-
|
|
60
|
-
clack.log.info(`📦 Installed: v${manifest.version} → Available: v${packageJson.version}`);
|
|
61
|
-
|
|
62
|
-
if (manifest.version === packageJson.version) {
|
|
63
|
-
clack.log.success(i.update_current || '✅ Already up to date!');
|
|
64
|
-
clack.outro(pc.green('Nothing to update.'));
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Guard against a missing/malformed `packs` field (NODE-04): coerce to an array.
|
|
69
|
-
const selectedPacks = Array.isArray(manifest.packs) && manifest.packs.length > 0
|
|
70
|
-
? manifest.packs
|
|
71
|
-
: ['core'];
|
|
72
|
-
clack.log.info(`${i.selected_packs}: ${selectedPacks.join(', ')}`);
|
|
73
|
-
|
|
74
|
-
const confirm = await clack.confirm({
|
|
75
|
-
message: i.update_confirm || `Update from v${manifest.version} to v${packageJson.version}?`,
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
if (!confirm || clack.isCancel(confirm)) {
|
|
79
|
-
clack.cancel(i.cancelled);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const spinner = clack.spinner();
|
|
84
|
-
spinner.start(i.update_updating || 'Updating agents and skills...');
|
|
85
|
-
|
|
86
|
-
const targetAgentsDir = path.join(projectDir, '.agents', 'skills');
|
|
87
|
-
const targetDataDir = path.join(projectDir, '.agents', 'data');
|
|
88
|
-
|
|
89
|
-
fsExtra.ensureDirSync(targetAgentsDir);
|
|
90
|
-
fsExtra.ensureDirSync(targetDataDir);
|
|
91
|
-
|
|
92
|
-
let updated = 0;
|
|
93
|
-
|
|
94
|
-
const projectRoot = path.join(bmadSrc, '..', '..');
|
|
95
|
-
|
|
96
|
-
for (const packId of selectedPacks) {
|
|
97
|
-
const pack = PACKS[packId];
|
|
98
|
-
if (!pack) continue;
|
|
99
|
-
|
|
100
|
-
const result = copyPackFiles({
|
|
101
|
-
bmadSrc,
|
|
102
|
-
targetAgentsDir,
|
|
103
|
-
targetDataDir,
|
|
104
|
-
projectRoot,
|
|
105
|
-
pack,
|
|
106
|
-
});
|
|
107
|
-
updated += result.copiedAgents + result.copiedSkills + result.copiedFiles;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// Update module config (always)
|
|
111
|
-
const moduleYaml = path.join(bmadSrc, 'module.yaml');
|
|
112
|
-
const targetBmadDir = path.join(projectDir, '_bmad');
|
|
113
|
-
if (fs.existsSync(moduleYaml)) {
|
|
114
|
-
fsExtra.copySync(moduleYaml, path.join(targetBmadDir, 'module.yaml'));
|
|
115
|
-
updated++;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const helpCsv = path.join(bmadSrc, 'module-help.csv');
|
|
119
|
-
if (fs.existsSync(helpCsv)) {
|
|
120
|
-
fsExtra.copySync(helpCsv, path.join(targetBmadDir, 'module-help.csv'));
|
|
121
|
-
updated++;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// Update manifest version (preserve everything else)
|
|
125
|
-
manifest.version = packageJson.version;
|
|
126
|
-
manifest.lastUpdated = new Date().toISOString();
|
|
127
|
-
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), 'utf8');
|
|
128
|
-
|
|
129
|
-
spinner.stop(i.update_done ? i.update_done(updated) : `✅ ${updated} files updated to v${packageJson.version}`);
|
|
130
|
-
|
|
131
|
-
clack.log.info('📋 Config preserved: config.yaml, IDE configs, output directories');
|
|
132
|
-
clack.outro(pc.green(i.update_ready || `BMAD+ v${packageJson.version} is ready! 🚀`));
|
|
133
|
-
},
|
|
134
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* BMAD+ Update Command
|
|
3
|
+
* Updates agents and skills while preserving user config
|
|
4
|
+
*
|
|
5
|
+
* Author: Laurent Rochetta
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const path = require('node:path');
|
|
9
|
+
const fs = require('node:fs');
|
|
10
|
+
const fsExtra = require('fs-extra');
|
|
11
|
+
const clack = require('@clack/prompts');
|
|
12
|
+
const pc = require('picocolors');
|
|
13
|
+
const { t } = require('../i18n');
|
|
14
|
+
const { PACKS } = require('../lib/packs');
|
|
15
|
+
const { copyPackFiles } = require('../lib/pack-copy');
|
|
16
|
+
|
|
17
|
+
// Pack definitions imported from shared module: require('../lib/packs').PACKS
|
|
18
|
+
|
|
19
|
+
module.exports = {
|
|
20
|
+
command: 'update',
|
|
21
|
+
description: 'Update BMAD+ agents and skills (preserves config)',
|
|
22
|
+
options: [
|
|
23
|
+
['-d, --directory <path>', 'Project directory (default: current directory)'],
|
|
24
|
+
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it'],
|
|
25
|
+
],
|
|
26
|
+
action: async (options) => {
|
|
27
|
+
const projectDir = path.resolve(options.directory || process.cwd());
|
|
28
|
+
const bmadSrc = path.join(__dirname, '..', '..', '..', 'src', 'bmad-plus');
|
|
29
|
+
const packageJson = require('../../../package.json');
|
|
30
|
+
|
|
31
|
+
clack.intro(pc.bgMagenta(pc.white(` BMAD+ Updater v${packageJson.version} `)));
|
|
32
|
+
|
|
33
|
+
// Check if installed
|
|
34
|
+
const manifestPath = path.join(projectDir, '_bmad', '.bmad-plus-install.json');
|
|
35
|
+
if (!fs.existsSync(manifestPath)) {
|
|
36
|
+
clack.log.error('BMAD+ is not installed in this directory.');
|
|
37
|
+
clack.log.info('Run `npx bmad-plus install` first.');
|
|
38
|
+
clack.outro(pc.red('Update aborted.'));
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let manifest;
|
|
43
|
+
try {
|
|
44
|
+
manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
45
|
+
} catch (err) {
|
|
46
|
+
clack.log.error(`Install manifest is unreadable or corrupt: ${err.message}`);
|
|
47
|
+
clack.log.info('Re-run `npx bmad-plus install` to repair the installation.');
|
|
48
|
+
clack.outro(pc.red('Update aborted.'));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (!manifest || typeof manifest !== 'object') {
|
|
52
|
+
clack.log.error('Install manifest is malformed (not an object).');
|
|
53
|
+
clack.log.info('Re-run `npx bmad-plus install` to repair the installation.');
|
|
54
|
+
clack.outro(pc.red('Update aborted.'));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const lang = options.lang || manifest.uiLanguage || 'en';
|
|
58
|
+
const i = t(lang);
|
|
59
|
+
|
|
60
|
+
clack.log.info(`📦 Installed: v${manifest.version} → Available: v${packageJson.version}`);
|
|
61
|
+
|
|
62
|
+
if (manifest.version === packageJson.version) {
|
|
63
|
+
clack.log.success(i.update_current || '✅ Already up to date!');
|
|
64
|
+
clack.outro(pc.green('Nothing to update.'));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Guard against a missing/malformed `packs` field (NODE-04): coerce to an array.
|
|
69
|
+
const selectedPacks = Array.isArray(manifest.packs) && manifest.packs.length > 0
|
|
70
|
+
? manifest.packs
|
|
71
|
+
: ['core'];
|
|
72
|
+
clack.log.info(`${i.selected_packs}: ${selectedPacks.join(', ')}`);
|
|
73
|
+
|
|
74
|
+
const confirm = await clack.confirm({
|
|
75
|
+
message: i.update_confirm || `Update from v${manifest.version} to v${packageJson.version}?`,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
if (!confirm || clack.isCancel(confirm)) {
|
|
79
|
+
clack.cancel(i.cancelled);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const spinner = clack.spinner();
|
|
84
|
+
spinner.start(i.update_updating || 'Updating agents and skills...');
|
|
85
|
+
|
|
86
|
+
const targetAgentsDir = path.join(projectDir, '.agents', 'skills');
|
|
87
|
+
const targetDataDir = path.join(projectDir, '.agents', 'data');
|
|
88
|
+
|
|
89
|
+
fsExtra.ensureDirSync(targetAgentsDir);
|
|
90
|
+
fsExtra.ensureDirSync(targetDataDir);
|
|
91
|
+
|
|
92
|
+
let updated = 0;
|
|
93
|
+
|
|
94
|
+
const projectRoot = path.join(bmadSrc, '..', '..');
|
|
95
|
+
|
|
96
|
+
for (const packId of selectedPacks) {
|
|
97
|
+
const pack = PACKS[packId];
|
|
98
|
+
if (!pack) continue;
|
|
99
|
+
|
|
100
|
+
const result = copyPackFiles({
|
|
101
|
+
bmadSrc,
|
|
102
|
+
targetAgentsDir,
|
|
103
|
+
targetDataDir,
|
|
104
|
+
projectRoot,
|
|
105
|
+
pack,
|
|
106
|
+
});
|
|
107
|
+
updated += result.copiedAgents + result.copiedSkills + result.copiedFiles;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Update module config (always)
|
|
111
|
+
const moduleYaml = path.join(bmadSrc, 'module.yaml');
|
|
112
|
+
const targetBmadDir = path.join(projectDir, '_bmad');
|
|
113
|
+
if (fs.existsSync(moduleYaml)) {
|
|
114
|
+
fsExtra.copySync(moduleYaml, path.join(targetBmadDir, 'module.yaml'));
|
|
115
|
+
updated++;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const helpCsv = path.join(bmadSrc, 'module-help.csv');
|
|
119
|
+
if (fs.existsSync(helpCsv)) {
|
|
120
|
+
fsExtra.copySync(helpCsv, path.join(targetBmadDir, 'module-help.csv'));
|
|
121
|
+
updated++;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Update manifest version (preserve everything else)
|
|
125
|
+
manifest.version = packageJson.version;
|
|
126
|
+
manifest.lastUpdated = new Date().toISOString();
|
|
127
|
+
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), 'utf8');
|
|
128
|
+
|
|
129
|
+
spinner.stop(i.update_done ? i.update_done(updated) : `✅ ${updated} files updated to v${packageJson.version}`);
|
|
130
|
+
|
|
131
|
+
clack.log.info('📋 Config preserved: config.yaml, IDE configs, output directories');
|
|
132
|
+
clack.outro(pc.green(i.update_ready || `BMAD+ v${packageJson.version} is ready! 🚀`));
|
|
133
|
+
},
|
|
134
|
+
};
|