bmad-plus 0.9.0 → 0.9.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 +36 -0
- package/LICENSE +21 -21
- package/README.md +106 -86
- package/osint-agent-package/README.md +88 -88
- package/osint-agent-package/SETUP_KEYS.md +108 -108
- package/osint-agent-package/agents/osint-investigator.md +80 -80
- package/osint-agent-package/install.ps1 +87 -87
- package/osint-agent-package/install.sh +76 -76
- package/osint-agent-package/skills/bmad-osint-investigate/SKILL.md +147 -147
- package/osint-agent-package/skills/bmad-osint-investigate/osint/references/enrichment-databases-fr.md +148 -148
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/_http.py +101 -101
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/apify.py +266 -266
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/brightdata.py +101 -101
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/diagnose.py +141 -141
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/exa.py +79 -79
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/jina.py +71 -71
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/parallel.py +85 -85
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/perplexity.py +102 -102
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/tavily.py +72 -72
- package/osint-agent-package/skills/bmad-osint-investigate/osint/scripts/volley.py +208 -208
- package/osint-agent-package/skills/bmad-osint-investigator/SKILL.md +15 -15
- package/package.json +30 -3
- package/readme-international/README.de.md +8 -3
- package/readme-international/README.es.md +8 -3
- package/readme-international/README.fr.md +8 -3
- package/src/bmad-plus/agents/agent-architect-dev/SKILL.md +96 -96
- package/src/bmad-plus/agents/agent-architect-dev/bmad-skill-manifest.yaml +13 -13
- package/src/bmad-plus/agents/agent-maker/SKILL.md +201 -201
- package/src/bmad-plus/agents/agent-maker/bmad-skill-manifest.yaml +13 -13
- package/src/bmad-plus/agents/agent-orchestrator/SKILL.md +137 -137
- package/src/bmad-plus/agents/agent-orchestrator/bmad-skill-manifest.yaml +13 -13
- package/src/bmad-plus/agents/agent-quality/SKILL.md +83 -83
- package/src/bmad-plus/agents/agent-quality/bmad-skill-manifest.yaml +13 -13
- package/src/bmad-plus/agents/agent-shadow/SKILL.md +71 -71
- package/src/bmad-plus/agents/agent-shadow/bmad-skill-manifest.yaml +13 -13
- package/src/bmad-plus/agents/agent-strategist/SKILL.md +80 -80
- package/src/bmad-plus/agents/agent-strategist/bmad-skill-manifest.yaml +13 -13
- package/src/bmad-plus/data/role-triggers.yaml +209 -209
- package/src/bmad-plus/module-help.csv +10 -10
- package/src/bmad-plus/packs/pack-memory/README.md +106 -106
- package/src/bmad-plus/packs/pack-memory/memory-orchestrator.md +79 -79
- package/src/bmad-plus/packs/pack-memory/shared/karpathy-guardrails.md +86 -86
- package/src/bmad-plus/packs/pack-memory/shared/memory-protocol.md +143 -143
- package/src/bmad-plus/packs/pack-memory/templates/context.md +39 -39
- package/src/bmad-plus/packs/pack-memory/templates/decisions.md +25 -25
- package/src/bmad-plus/packs/pack-memory/templates/identity.yaml +39 -39
- package/src/bmad-plus/packs/pack-memory/templates/lessons.md +31 -31
- package/src/bmad-plus/packs/pack-memory/templates/patterns.md +24 -24
- package/src/bmad-plus/packs/pack-memory/templates/session-handoff.md +25 -25
- package/src/bmad-plus/packs/pack-memory/zecher-agent.md +157 -157
- package/src/bmad-plus/packs/pack-seo/bmad-skill-manifest.yaml +13 -13
- package/src/bmad-plus/packs/pack-shield/README.md +110 -110
- package/src/bmad-plus/packs/pack-shield/SKILL.md +82 -82
- package/src/bmad-plus/packs/pack-shield/categories/accessibility-esg/csrd-agent.md +251 -251
- package/src/bmad-plus/packs/pack-shield/categories/accessibility-esg/section508-agent.md +168 -168
- package/src/bmad-plus/packs/pack-shield/categories/accessibility-esg/wcag-agent.md +190 -190
- package/src/bmad-plus/packs/pack-shield/categories/ai-governance/eu-ai-act-agent.md +86 -86
- package/src/bmad-plus/packs/pack-shield/categories/ai-governance/iso42001-agent.md +240 -240
- package/src/bmad-plus/packs/pack-shield/categories/ai-governance/nist-ai-rmf-agent.md +122 -122
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/cis-controls-agent.md +210 -210
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/ism-agent.md +139 -139
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/iso27001-agent.md +156 -156
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/nis2-agent.md +72 -72
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/nist-800-53-agent.md +239 -239
- package/src/bmad-plus/packs/pack-shield/categories/cybersecurity/nist-csf-agent.md +207 -207
- package/src/bmad-plus/packs/pack-shield/categories/data-privacy/ccpa-agent.md +94 -94
- package/src/bmad-plus/packs/pack-shield/categories/data-privacy/dpdpa-agent.md +136 -136
- package/src/bmad-plus/packs/pack-shield/categories/data-privacy/gdpr-agent.md +296 -296
- package/src/bmad-plus/packs/pack-shield/categories/data-privacy/iso27701-agent.md +134 -134
- package/src/bmad-plus/packs/pack-shield/categories/data-privacy/lgpd-agent.md +129 -129
- package/src/bmad-plus/packs/pack-shield/categories/defense-export/cmmc-agent.md +116 -116
- package/src/bmad-plus/packs/pack-shield/categories/defense-export/ear-agent.md +261 -261
- package/src/bmad-plus/packs/pack-shield/categories/defense-export/itar-agent.md +191 -191
- package/src/bmad-plus/packs/pack-shield/categories/defense-export/tsa-agent.md +356 -356
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/dora-agent.md +499 -499
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/fedramp-agent.md +236 -236
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/hipaa-agent.md +162 -162
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/pci-dss-agent.md +228 -228
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/soc2-agent.md +255 -255
- package/src/bmad-plus/packs/pack-shield/categories/industry-compliance/swift-csp-agent.md +153 -153
- package/src/bmad-plus/packs/pack-shield/categories/workflows/ai-act-classifier.md +131 -131
- package/src/bmad-plus/packs/pack-shield/categories/workflows/ai-act-fria.md +155 -155
- package/src/bmad-plus/packs/pack-shield/categories/workflows/ai-act-incidents.md +187 -187
- package/src/bmad-plus/packs/pack-shield/categories/workflows/ai-act-roles.md +113 -113
- package/src/bmad-plus/packs/pack-shield/categories/workflows/breach-sentinel.md +197 -197
- package/src/bmad-plus/packs/pack-shield/categories/workflows/cookie-policy-gen.md +180 -180
- package/src/bmad-plus/packs/pack-shield/categories/workflows/dpia-sentinel.md +235 -235
- package/src/bmad-plus/packs/pack-shield/categories/workflows/legitimate-interest.md +159 -159
- package/src/bmad-plus/packs/pack-shield/categories/workflows/privacy-advisor.md +133 -133
- package/src/bmad-plus/packs/pack-shield/categories/workflows/privacy-notice-gen.md +160 -160
- package/src/bmad-plus/packs/pack-shield/categories/workflows/privacy-policy-gen.md +135 -135
- package/src/bmad-plus/packs/pack-shield/references/ccpa/ccpa-gdpr-comparison.md +117 -117
- package/src/bmad-plus/packs/pack-shield/references/ccpa/consumer-rights-workflows.md +177 -177
- package/src/bmad-plus/packs/pack-shield/references/cis-controls/framework-mappings.md +162 -162
- package/src/bmad-plus/packs/pack-shield/references/cis-controls/implementation-guidance.md +235 -235
- package/src/bmad-plus/packs/pack-shield/references/cis-controls/safeguards-detail.md +252 -252
- package/src/bmad-plus/packs/pack-shield/references/cmmc/cmmc-assessment.md +170 -170
- package/src/bmad-plus/packs/pack-shield/references/cmmc/cmmc-levels.md +113 -113
- package/src/bmad-plus/packs/pack-shield/references/cmmc/cmmc-practices.md +211 -211
- package/src/bmad-plus/packs/pack-shield/references/csrd/compliance-program.md +281 -281
- package/src/bmad-plus/packs/pack-shield/references/csrd/double-materiality.md +253 -253
- package/src/bmad-plus/packs/pack-shield/references/csrd/esrs-standards.md +401 -401
- package/src/bmad-plus/packs/pack-shield/references/dora/article-reference.md +441 -441
- package/src/bmad-plus/packs/pack-shield/references/dora/incident-classification.md +297 -297
- package/src/bmad-plus/packs/pack-shield/references/dora/rts-its-guide.md +306 -306
- package/src/bmad-plus/packs/pack-shield/references/dora/third-party-risk.md +349 -349
- package/src/bmad-plus/packs/pack-shield/references/dpdpa/gdpr-comparison.md +173 -173
- package/src/bmad-plus/packs/pack-shield/references/dpdpa/rights-and-obligations.md +426 -426
- package/src/bmad-plus/packs/pack-shield/references/dpdpa/rules-2025.md +599 -599
- package/src/bmad-plus/packs/pack-shield/references/dpdpa/sections-reference.md +319 -319
- package/src/bmad-plus/packs/pack-shield/references/ear/ccl-eccn-guide.md +250 -250
- package/src/bmad-plus/packs/pack-shield/references/ear/compliance-program.md +280 -280
- package/src/bmad-plus/packs/pack-shield/references/ear/license-exceptions.md +207 -207
- package/src/bmad-plus/packs/pack-shield/references/eu-ai-act/gpai-governance.md +267 -267
- package/src/bmad-plus/packs/pack-shield/references/eu-ai-act/obligations-high-risk.md +287 -287
- package/src/bmad-plus/packs/pack-shield/references/eu-ai-act/risk-classification.md +182 -182
- package/src/bmad-plus/packs/pack-shield/references/fedramp/appendices-guide.md +209 -209
- package/src/bmad-plus/packs/pack-shield/references/fedramp/control-families.md +281 -281
- package/src/bmad-plus/packs/pack-shield/references/fedramp/poam-guide.md +93 -93
- package/src/bmad-plus/packs/pack-shield/references/fedramp/readiness-checklist.md +134 -134
- package/src/bmad-plus/packs/pack-shield/references/fedramp/sap-sar-guide.md +86 -86
- package/src/bmad-plus/packs/pack-shield/references/fedramp/ssp-guide.md +129 -129
- package/src/bmad-plus/packs/pack-shield/references/gdpr-compliance/documents.md +192 -192
- package/src/bmad-plus/packs/pack-shield/references/gdpr-compliance/dpa-template.md +121 -121
- package/src/bmad-plus/packs/pack-shield/references/gdpr-compliance/privacy-notice.md +87 -87
- package/src/bmad-plus/packs/pack-shield/references/hipaa-compliance/breach-notification.md +293 -293
- package/src/bmad-plus/packs/pack-shield/references/hipaa-compliance/privacy-rule.md +276 -276
- package/src/bmad-plus/packs/pack-shield/references/hipaa-compliance/security-rule.md +299 -299
- package/src/bmad-plus/packs/pack-shield/references/hipaa-compliance/templates.md +568 -568
- package/src/bmad-plus/packs/pack-shield/references/ism/control-applicability.md +181 -181
- package/src/bmad-plus/packs/pack-shield/references/ism/guidelines-overview.md +183 -183
- package/src/bmad-plus/packs/pack-shield/references/iso27001/annex-a-2013.md +203 -203
- package/src/bmad-plus/packs/pack-shield/references/iso27001/annex-a-2022.md +132 -132
- package/src/bmad-plus/packs/pack-shield/references/iso27001/control-mapping.md +153 -153
- package/src/bmad-plus/packs/pack-shield/references/iso27701/annex-a-controls.md +195 -195
- package/src/bmad-plus/packs/pack-shield/references/iso27701/regulatory-mapping.md +229 -229
- package/src/bmad-plus/packs/pack-shield/references/iso27701/transition-guide.md +219 -219
- package/src/bmad-plus/packs/pack-shield/references/iso42001/iso42001-ai-risk-assessment.md +258 -258
- package/src/bmad-plus/packs/pack-shield/references/iso42001/iso42001-clauses-requirements.md +279 -279
- package/src/bmad-plus/packs/pack-shield/references/iso42001/iso42001-controls-annex-a.md +155 -155
- package/src/bmad-plus/packs/pack-shield/references/itar/compliance-program.md +174 -174
- package/src/bmad-plus/packs/pack-shield/references/itar/licensing-guide.md +146 -146
- package/src/bmad-plus/packs/pack-shield/references/itar/usml-categories.md +93 -93
- package/src/bmad-plus/packs/pack-shield/references/lgpd/anpd-enforcement.md +147 -147
- package/src/bmad-plus/packs/pack-shield/references/lgpd/compliance-program.md +272 -272
- package/src/bmad-plus/packs/pack-shield/references/lgpd/lgpd-articles.md +271 -271
- package/src/bmad-plus/packs/pack-shield/references/nis2/article-21-measures.md +153 -153
- package/src/bmad-plus/packs/pack-shield/references/nis2/iso27001-nis2-mapping.md +68 -68
- package/src/bmad-plus/packs/pack-shield/references/nist-800-53/assessment-rmf.md +349 -349
- package/src/bmad-plus/packs/pack-shield/references/nist-800-53/baselines-tailoring.md +277 -277
- package/src/bmad-plus/packs/pack-shield/references/nist-800-53/control-families.md +450 -450
- package/src/bmad-plus/packs/pack-shield/references/nist-ai-rmf/rmf-core.md +361 -361
- package/src/bmad-plus/packs/pack-shield/references/nist-ai-rmf/rmf-profiles.md +192 -192
- package/src/bmad-plus/packs/pack-shield/references/nist-csf/csf-10-to-20-mapping.md +143 -143
- package/src/bmad-plus/packs/pack-shield/references/nist-csf/csf-20-functions-categories.md +278 -278
- package/src/bmad-plus/packs/pack-shield/references/nist-csf/csf-implementation-tiers.md +135 -135
- package/src/bmad-plus/packs/pack-shield/references/pci-compliance/pci-dss-requirements.md +366 -366
- package/src/bmad-plus/packs/pack-shield/references/pci-compliance/pci-dss-saq-guide.md +217 -217
- package/src/bmad-plus/packs/pack-shield/references/pci-compliance/pci-dss-v4-changes.md +190 -190
- package/src/bmad-plus/packs/pack-shield/references/section-508/wcag-mapping.md +160 -160
- package/src/bmad-plus/packs/pack-shield/references/soc2/controls.md +241 -241
- package/src/bmad-plus/packs/pack-shield/references/soc2/evidence.md +236 -236
- package/src/bmad-plus/packs/pack-shield/references/soc2/policies.md +254 -254
- package/src/bmad-plus/packs/pack-shield/references/soc2/vendor.md +276 -276
- package/src/bmad-plus/packs/pack-shield/references/swift-csp/swift-assessment.md +202 -202
- package/src/bmad-plus/packs/pack-shield/references/swift-csp/swift-controls.md +545 -545
- package/src/bmad-plus/packs/pack-shield/references/tsa-compliance/tsa-crmp-requirements.md +359 -359
- package/src/bmad-plus/packs/pack-shield/references/tsa-compliance/tsa-directives-overview.md +187 -187
- package/src/bmad-plus/packs/pack-shield/references/tsa-compliance/tsa-incident-reporting.md +187 -187
- package/src/bmad-plus/packs/pack-shield/references/wcag/criteria-detail.md +510 -510
- package/src/bmad-plus/packs/pack-shield/shared/audit-report-template.md +103 -103
- package/src/bmad-plus/packs/pack-shield/shared/cross-framework-mapper.md +103 -103
- package/src/bmad-plus/packs/pack-shield/shared/gap-analysis-template.md +83 -83
- package/src/bmad-plus/packs/pack-shield/shield-orchestrator.md +229 -229
- package/src/bmad-plus/packs/pack-shield/upstream-sync.yaml +68 -68
- package/src/bmad-plus/skills/bmad-plus-autopilot/SKILL.md +99 -99
- package/src/bmad-plus/skills/bmad-plus-parallel/SKILL.md +93 -93
- package/src/bmad-plus/skills/bmad-plus-sync/SKILL.md +69 -69
- package/tools/cli/bmad-plus-cli.js +5 -3
- package/tools/cli/commands/autoconfig.js +23 -59
- package/tools/cli/commands/doctor.js +14 -0
- package/tools/cli/commands/install.js +29 -128
- package/tools/cli/commands/memory.js +1 -0
- package/tools/cli/commands/scan.js +44 -42
- package/tools/cli/commands/uninstall.js +10 -5
- package/tools/cli/commands/update.js +21 -3
- package/tools/cli/lib/ide-config.js +259 -0
- package/tools/cli/lib/memory-init.js +0 -1
- package/tools/cli/lib/pack-copy.js +84 -84
- package/tools/cli/lib/packs.js +16 -8
- package/tools/cli/lib/stack-detect.js +102 -0
- package/tools/cli/lib/validate.js +50 -0
|
@@ -17,6 +17,7 @@ module.exports = {
|
|
|
17
17
|
description: 'Check BMAD+ installation integrity',
|
|
18
18
|
options: [
|
|
19
19
|
['-d, --directory <path>', 'Project directory (default: current directory)'],
|
|
20
|
+
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it'],
|
|
20
21
|
],
|
|
21
22
|
action: async (options) => {
|
|
22
23
|
const projectDir = path.resolve(options.directory || process.cwd());
|
|
@@ -39,6 +40,7 @@ module.exports = {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
43
|
+
const lang = options.lang || manifest.uiLanguage || 'en';
|
|
42
44
|
clack.log.success(`✅ Manifest found — v${manifest.version}`);
|
|
43
45
|
passed++;
|
|
44
46
|
|
|
@@ -86,6 +88,18 @@ module.exports = {
|
|
|
86
88
|
const packPath = path.join(agentsDir, entry.packDir);
|
|
87
89
|
if (fs.existsSync(packPath)) {
|
|
88
90
|
passed++;
|
|
91
|
+
|
|
92
|
+
// These packs bundle their agents as files inside packDir — verify
|
|
93
|
+
// them there (not as loose directories, which would falsely warn).
|
|
94
|
+
for (const agentFile of (entry.packAgents || [])) {
|
|
95
|
+
checks++;
|
|
96
|
+
if (fs.existsSync(path.join(packPath, agentFile))) {
|
|
97
|
+
passed++;
|
|
98
|
+
} else {
|
|
99
|
+
clack.log.warn(`⚠️ Missing agent: ${agentFile} (pack: ${pack})`);
|
|
100
|
+
warnings++;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
89
103
|
} else {
|
|
90
104
|
clack.log.warn(`⚠️ Missing pack directory: ${entry.packDir} (pack: ${pack})`);
|
|
91
105
|
warnings++;
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
const path = require('node:path');
|
|
10
10
|
const fs = require('node:fs');
|
|
11
|
-
const os = require('node:os');
|
|
12
11
|
const fsExtra = require('fs-extra');
|
|
13
12
|
const clack = require('@clack/prompts');
|
|
14
13
|
const pc = require('picocolors');
|
|
@@ -16,33 +15,11 @@ const { t, getLanguageOptions, getCommLanguageOptions } = require('../i18n');
|
|
|
16
15
|
const { PACKS } = require('../lib/packs');
|
|
17
16
|
const { copyPackFiles } = require('../lib/pack-copy');
|
|
18
17
|
const { initMemory } = require('../lib/memory-init');
|
|
18
|
+
const { generateIDEConfig, IDE_CONFIGS } = require('../lib/ide-config');
|
|
19
|
+
const { validateUserName } = require('../lib/validate');
|
|
19
20
|
|
|
20
21
|
// Pack definitions are imported from the shared module: require('../lib/packs').PACKS
|
|
21
22
|
|
|
22
|
-
// IDE configurations
|
|
23
|
-
const IDE_CONFIGS = {
|
|
24
|
-
'claude-code': {
|
|
25
|
-
name: 'Claude Code',
|
|
26
|
-
detect: ['.claude'],
|
|
27
|
-
configFile: 'CLAUDE.md',
|
|
28
|
-
},
|
|
29
|
-
'gemini-cli': {
|
|
30
|
-
name: 'Gemini CLI',
|
|
31
|
-
detect: ['.gemini'],
|
|
32
|
-
configFile: 'GEMINI.md',
|
|
33
|
-
},
|
|
34
|
-
'codex-cli': {
|
|
35
|
-
name: 'Codex CLI / OpenCode',
|
|
36
|
-
detect: ['.codex', '.opencode'],
|
|
37
|
-
configFile: 'AGENTS.md',
|
|
38
|
-
},
|
|
39
|
-
'antigravity': {
|
|
40
|
-
name: 'Antigravity',
|
|
41
|
-
detect: ['.gemini/antigravity'],
|
|
42
|
-
configFile: 'GEMINI.md',
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
|
|
46
23
|
module.exports = {
|
|
47
24
|
command: 'install',
|
|
48
25
|
description: 'Install BMAD+ agents and skills into your project',
|
|
@@ -50,6 +27,7 @@ module.exports = {
|
|
|
50
27
|
['-d, --directory <path>', 'Installation directory (default: current directory)'],
|
|
51
28
|
['-p, --packs <packs>', 'Comma-separated pack IDs: core,osint,all (default: interactive)'],
|
|
52
29
|
['-y, --yes', 'Accept all defaults, skip prompts'],
|
|
30
|
+
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it (overrides auto-detection)'],
|
|
53
31
|
['--tools <tools>', 'Comma-separated IDE IDs (default: auto-detect)'],
|
|
54
32
|
],
|
|
55
33
|
action: async (options) => {
|
|
@@ -61,8 +39,8 @@ module.exports = {
|
|
|
61
39
|
clack.intro(pc.bgCyan(pc.black(` BMAD+ Installer v${pkgJson.version} `)));
|
|
62
40
|
clack.log.info(pc.dim('✨ Created by Laurent Rochetta — github.com/lrochetta/BMAD-PLUS'));
|
|
63
41
|
|
|
64
|
-
let lang = 'en';
|
|
65
|
-
if (!options.yes) {
|
|
42
|
+
let lang = options.lang || 'en';
|
|
43
|
+
if (!options.yes && !options.lang) {
|
|
66
44
|
const langChoice = await clack.select({
|
|
67
45
|
message: '🌐 Select your language / Choisissez votre langue / 选择语言',
|
|
68
46
|
options: getLanguageOptions(),
|
|
@@ -200,19 +178,10 @@ module.exports = {
|
|
|
200
178
|
|
|
201
179
|
// Validate user-provided name
|
|
202
180
|
const rawName = userConfig.userName;
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
} else if (rawName.length > 100) {
|
|
208
|
-
clack.log.warn('Name too long (>100 chars). Truncating.');
|
|
209
|
-
userName = rawName.slice(0, 100);
|
|
210
|
-
} else if (SHELL_META.test(rawName)) {
|
|
211
|
-
clack.log.warn('Name contains shell metacharacters. Using sanitized version.');
|
|
212
|
-
userName = rawName.replace(SHELL_META, '').trim() || 'Developer';
|
|
213
|
-
} else {
|
|
214
|
-
userName = rawName;
|
|
215
|
-
}
|
|
181
|
+
const fb = process.env.USER || process.env.USERNAME || 'Developer';
|
|
182
|
+
const { name: validatedName, warnings } = validateUserName(rawName, fb);
|
|
183
|
+
for (const w of warnings) clack.log.warn(w);
|
|
184
|
+
userName = validatedName;
|
|
216
185
|
commLang = userConfig.commLang;
|
|
217
186
|
}
|
|
218
187
|
|
|
@@ -277,12 +246,32 @@ module.exports = {
|
|
|
277
246
|
ideSpinner.start(i.configuring_ides);
|
|
278
247
|
|
|
279
248
|
const configContent = generateIDEConfig(userName, commLang, selectedPacks);
|
|
249
|
+
// Marker present in every BMAD+-generated IDE config (see lib/ide-config.js).
|
|
250
|
+
const BMAD_MARKER = 'BMAD+ — AI Agent Configuration';
|
|
280
251
|
|
|
281
252
|
for (const ideId of detectedIDEs) {
|
|
282
253
|
const ide = IDE_CONFIGS[ideId];
|
|
283
254
|
if (!ide) continue;
|
|
284
255
|
|
|
285
256
|
const configPath = path.join(projectDir, ide.configFile);
|
|
257
|
+
|
|
258
|
+
// NODE-02: never clobber a hand-authored config without protecting it.
|
|
259
|
+
if (fs.existsSync(configPath)) {
|
|
260
|
+
const existing = fs.readFileSync(configPath, 'utf8');
|
|
261
|
+
if (!existing.includes(BMAD_MARKER)) {
|
|
262
|
+
if (!options.yes) {
|
|
263
|
+
// Interactive: keep the user's file untouched.
|
|
264
|
+
clack.log.warn(`⚠️ ${ide.configFile} already exists and was not created by BMAD+ — kept your file (skipped). Re-run with --yes to back it up and overwrite.`);
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
// Non-interactive: back up before overwriting, never destroy data.
|
|
268
|
+
let backupPath = `${configPath}.bak`;
|
|
269
|
+
if (fs.existsSync(backupPath)) backupPath = `${configPath}.${Date.now()}.bak`;
|
|
270
|
+
fs.copyFileSync(configPath, backupPath);
|
|
271
|
+
clack.log.warn(`⚠️ Backed up existing ${ide.configFile} → ${path.basename(backupPath)}`);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
286
275
|
fs.writeFileSync(configPath, configContent, 'utf8');
|
|
287
276
|
}
|
|
288
277
|
|
|
@@ -441,94 +430,6 @@ module.exports = {
|
|
|
441
430
|
|
|
442
431
|
// ── Helpers ──
|
|
443
432
|
|
|
444
|
-
function generateIDEConfig(userName, language, packs) {
|
|
445
|
-
const agents = [
|
|
446
|
-
'- **Atlas** (Strategist) — Business analysis + Product management',
|
|
447
|
-
'- **Forge** (Architect-Dev) — Architecture + Development + Documentation',
|
|
448
|
-
'- **Sentinel** (Quality) — QA + UX review',
|
|
449
|
-
'- **Nexus** (Orchestrator) — Sprint management + Autopilot + Parallel execution',
|
|
450
|
-
];
|
|
451
|
-
|
|
452
|
-
if (packs.includes('osint')) {
|
|
453
|
-
agents.push('- **Shadow** (OSINT) — Investigation + Scraping + Psychoprofiling');
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
if (packs.includes('shield')) {
|
|
457
|
-
agents.push('- **Shield** (GRC) — 38 compliance agents (GDPR, ISO 27001, SOC 2, HIPAA, EU AI Act, DORA, NIS2...)');
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
if (packs.includes('dev-studio')) {
|
|
461
|
-
agents.push('- **Miriam** (מרים) — Business Analyst — Strategic analysis, research, product briefs');
|
|
462
|
-
agents.push('- **Huldah** (חולדה) — Technical Writer — Documentation, diagrams, editorial review');
|
|
463
|
-
agents.push('- **Yosef** (יוסף) — Product Manager — PRD, requirements, feature prioritization');
|
|
464
|
-
agents.push('- **Rachel** (רחל) — UX Designer — User experience, wireframes, empathy mapping');
|
|
465
|
-
agents.push('- **Bezalel** (בצלאל) — System Architect — Architecture, ADRs, epics & stories');
|
|
466
|
-
agents.push('- **Oholiab** (אהליאב) — Senior Engineer — TDD, sprint, code review, implementation');
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
if (packs.includes('memory')) {
|
|
470
|
-
agents.push('- **Zecher** (זכר) — Memory Archivist — Consolidation, project scanning, context recall');
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
// Build memory section if memory pack is installed
|
|
474
|
-
let memorySection = '';
|
|
475
|
-
if (packs.includes('memory')) {
|
|
476
|
-
memorySection = [
|
|
477
|
-
'',
|
|
478
|
-
'## Memory Protocol (Karpathy Guardrails)',
|
|
479
|
-
'',
|
|
480
|
-
'Agents MUST follow these behavioral principles:',
|
|
481
|
-
'',
|
|
482
|
-
'### G1 — Think Before Coding',
|
|
483
|
-
'- State assumptions explicitly. If uncertain, ask.',
|
|
484
|
-
'- Check `.agents/memory/decisions.md` for prior decisions before re-deciding.',
|
|
485
|
-
'',
|
|
486
|
-
'### G2 — Simplicity First',
|
|
487
|
-
'- Minimum code that solves the problem. Nothing speculative.',
|
|
488
|
-
'- Check `.agents/memory/patterns.md` for existing solutions.',
|
|
489
|
-
'',
|
|
490
|
-
'### G3 — Surgical Changes',
|
|
491
|
-
'- Touch only what you must. Match existing style.',
|
|
492
|
-
'- Log surprises in `.agents/memory/lessons.md`.',
|
|
493
|
-
'',
|
|
494
|
-
'### G4 — Goal-Driven Execution',
|
|
495
|
-
'- Define success criteria before implementing.',
|
|
496
|
-
'- Log non-obvious decisions in `.agents/memory/decisions.md`.',
|
|
497
|
-
'',
|
|
498
|
-
'### Memory Files',
|
|
499
|
-
'- `.agents/memory/decisions.md` — Read at session start, write when making decisions',
|
|
500
|
-
'- `.agents/memory/lessons.md` — Write when something unexpected happens',
|
|
501
|
-
'- `.agents/memory/patterns.md` — Write when a reusable pattern is validated',
|
|
502
|
-
'- `.agents/memory/context.md` — Update at session end with project state',
|
|
503
|
-
].join('\n');
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
return `# BMAD+ — AI Agent Configuration
|
|
507
|
-
|
|
508
|
-
## Project Context
|
|
509
|
-
This project uses BMAD+, an augmented AI-driven development framework.
|
|
510
|
-
Based on BMAD-METHOD v6.6.0 with multi-role agents, autopilot mode, and parallel execution.
|
|
511
|
-
|
|
512
|
-
## Agents
|
|
513
|
-
To activate an agent, say its name or persona:
|
|
514
|
-
${agents.join('\n')}
|
|
515
|
-
|
|
516
|
-
## Skills
|
|
517
|
-
- Load skills from \`.agents/skills/\`
|
|
518
|
-
- Each agent has a SKILL.md with capabilities, activation protocol, and role-switching rules
|
|
519
|
-
- Auto-activation triggers: \`.agents/data/role-triggers.yaml\`
|
|
520
|
-
|
|
521
|
-
## Key Commands
|
|
522
|
-
- \`bmad-help\` — Show all available agents and skills
|
|
523
|
-
- \`autopilot\` — Launch Nexus in full pipeline mode
|
|
524
|
-
- \`parallel\` — Enable parallel multi-agent execution
|
|
525
|
-
|
|
526
|
-
## Communication
|
|
527
|
-
- User name: ${userName}
|
|
528
|
-
- Default language: ${language} for user-facing content, English for code and technical docs.
|
|
529
|
-
${memorySection}`;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
433
|
function generateConfigYaml(userName, language, projectDir) {
|
|
533
434
|
const projectName = path.basename(projectDir);
|
|
534
435
|
return `# BMAD+ Project Configuration
|
|
@@ -40,6 +40,7 @@ module.exports = {
|
|
|
40
40
|
description: 'Manage BMAD+ persistent brain (status, export)',
|
|
41
41
|
options: [
|
|
42
42
|
['-d, --directory <path>', 'Project directory (default: current directory)'],
|
|
43
|
+
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it'],
|
|
43
44
|
],
|
|
44
45
|
subcommands: {
|
|
45
46
|
status: 'Show memory health report',
|
|
@@ -12,34 +12,7 @@ const os = require('node:os');
|
|
|
12
12
|
const crypto = require('node:crypto');
|
|
13
13
|
const clack = require('@clack/prompts');
|
|
14
14
|
const pc = require('picocolors');
|
|
15
|
-
|
|
16
|
-
// Project detection markers (priority order)
|
|
17
|
-
const PROJECT_MARKERS = [
|
|
18
|
-
{ file: 'package.json', stack: 'Node.js', detect: (dir) => {
|
|
19
|
-
try {
|
|
20
|
-
const pkg = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'));
|
|
21
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
22
|
-
if (deps['next']) return 'Next.js';
|
|
23
|
-
if (deps['nuxt']) return 'Nuxt';
|
|
24
|
-
if (deps['react']) return 'React';
|
|
25
|
-
if (deps['vue']) return 'Vue.js';
|
|
26
|
-
if (deps['svelte']) return 'Svelte';
|
|
27
|
-
if (deps['express']) return 'Express';
|
|
28
|
-
if (deps['fastify']) return 'Fastify';
|
|
29
|
-
if (deps['electron']) return 'Electron';
|
|
30
|
-
if (deps['tauri']) return 'Tauri';
|
|
31
|
-
return 'Node.js';
|
|
32
|
-
} catch { return 'Node.js'; }
|
|
33
|
-
}},
|
|
34
|
-
{ file: 'Cargo.toml', stack: 'Rust' },
|
|
35
|
-
{ file: 'pyproject.toml', stack: 'Python' },
|
|
36
|
-
{ file: 'requirements.txt', stack: 'Python' },
|
|
37
|
-
{ file: 'go.mod', stack: 'Go' },
|
|
38
|
-
{ file: 'composer.json', stack: 'PHP' },
|
|
39
|
-
{ file: 'Gemfile', stack: 'Ruby' },
|
|
40
|
-
{ file: 'pom.xml', stack: 'Java' },
|
|
41
|
-
{ file: 'build.gradle', stack: 'Java/Kotlin' },
|
|
42
|
-
];
|
|
15
|
+
const { PROJECT_MARKERS } = require('../lib/stack-detect');
|
|
43
16
|
|
|
44
17
|
// Directories to skip during scanning
|
|
45
18
|
const SKIP_DIRS = new Set([
|
|
@@ -77,7 +50,9 @@ function getProjectName(dir) {
|
|
|
77
50
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
78
51
|
if (pkg.name) return pkg.name;
|
|
79
52
|
}
|
|
80
|
-
} catch {
|
|
53
|
+
} catch {
|
|
54
|
+
// Malformed/unreadable package.json; fall back to directory name.
|
|
55
|
+
}
|
|
81
56
|
return path.basename(dir);
|
|
82
57
|
}
|
|
83
58
|
|
|
@@ -143,6 +118,22 @@ function scanDirectory(rootDir, maxDepth = 4, currentDepth = 0, activeDays = 30,
|
|
|
143
118
|
return projects;
|
|
144
119
|
}
|
|
145
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Normalize a filesystem path for stable hashing.
|
|
123
|
+
* On Windows the same project can be referenced as `D:\proj` or `d:\proj`
|
|
124
|
+
* (case-insensitive drive) with mixed separators. Resolving + lowercasing the
|
|
125
|
+
* drive letter ensures the same project produces the same index key and is not
|
|
126
|
+
* double-indexed.
|
|
127
|
+
* @param {string} p - Raw filesystem path
|
|
128
|
+
* @returns {string} Normalized path suitable for hashing
|
|
129
|
+
*/
|
|
130
|
+
function normalizePathForHash(p) {
|
|
131
|
+
let resolved = path.resolve(p);
|
|
132
|
+
// Lowercase a leading Windows drive letter (e.g. "D:" → "d:").
|
|
133
|
+
resolved = resolved.replace(/^([A-Za-z]):/, (_m, drive) => drive.toLowerCase() + ':');
|
|
134
|
+
return resolved;
|
|
135
|
+
}
|
|
136
|
+
|
|
146
137
|
/**
|
|
147
138
|
* Index a single project in the global brain by writing its metadata YAML file.
|
|
148
139
|
* @param {object} project - Project metadata object
|
|
@@ -150,7 +141,7 @@ function scanDirectory(rootDir, maxDepth = 4, currentDepth = 0, activeDays = 30,
|
|
|
150
141
|
* @returns {void}
|
|
151
142
|
*/
|
|
152
143
|
function indexProject(project, globalBrainDir) {
|
|
153
|
-
const hash = crypto.createHash('sha256').update(project.path).digest('hex').slice(0, 8);
|
|
144
|
+
const hash = crypto.createHash('sha256').update(normalizePathForHash(project.path)).digest('hex').slice(0, 8);
|
|
154
145
|
const meta = {
|
|
155
146
|
path: project.path,
|
|
156
147
|
name: project.name,
|
|
@@ -168,6 +159,21 @@ function indexProject(project, globalBrainDir) {
|
|
|
168
159
|
);
|
|
169
160
|
}
|
|
170
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Index multiple projects in the global brain.
|
|
164
|
+
* @param {object[]} projectList - Array of project metadata objects
|
|
165
|
+
* @param {string} brainDir - Path to the brain projects directory
|
|
166
|
+
* @returns {number} Number of projects indexed
|
|
167
|
+
*/
|
|
168
|
+
function indexProjects(projectList, brainDir) {
|
|
169
|
+
let count = 0;
|
|
170
|
+
for (const proj of projectList) {
|
|
171
|
+
indexProject(proj, brainDir);
|
|
172
|
+
count++;
|
|
173
|
+
}
|
|
174
|
+
return count;
|
|
175
|
+
}
|
|
176
|
+
|
|
171
177
|
module.exports = {
|
|
172
178
|
command: 'scan',
|
|
173
179
|
description: 'Scan directories to discover and index projects in the global brain',
|
|
@@ -177,6 +183,7 @@ module.exports = {
|
|
|
177
183
|
['--active-days <n>', 'Days since last modified to consider a project "active" (default: 30)', '30'],
|
|
178
184
|
['--paused-days <n>', 'Days since last modified to consider a project "paused" (default: 180)', '180'],
|
|
179
185
|
['-y, --yes', 'Index all projects without prompting'],
|
|
186
|
+
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it'],
|
|
180
187
|
],
|
|
181
188
|
action: async (options) => {
|
|
182
189
|
const scanDir = path.resolve(options.directory || process.cwd());
|
|
@@ -249,11 +256,7 @@ module.exports = {
|
|
|
249
256
|
const fsExtra = require('fs-extra');
|
|
250
257
|
fsExtra.ensureDirSync(globalBrainDir);
|
|
251
258
|
|
|
252
|
-
|
|
253
|
-
for (const proj of projects) {
|
|
254
|
-
indexProject(proj, globalBrainDir);
|
|
255
|
-
indexed++;
|
|
256
|
-
}
|
|
259
|
+
const indexed = indexProjects(projects, globalBrainDir);
|
|
257
260
|
clack.log.success(`✅ ${indexed} project(s) indexed in ${globalBrainDir}`);
|
|
258
261
|
} else {
|
|
259
262
|
// Interactive mode
|
|
@@ -295,12 +298,7 @@ module.exports = {
|
|
|
295
298
|
toIndex = selected.map(i => projects[i]);
|
|
296
299
|
}
|
|
297
300
|
|
|
298
|
-
|
|
299
|
-
for (const proj of toIndex) {
|
|
300
|
-
indexProject(proj, globalBrainDir);
|
|
301
|
-
indexed++;
|
|
302
|
-
}
|
|
303
|
-
|
|
301
|
+
const indexed = indexProjects(toIndex, globalBrainDir);
|
|
304
302
|
clack.log.success(`✅ ${indexed} project(s) indexed in global brain`);
|
|
305
303
|
}
|
|
306
304
|
|
|
@@ -320,7 +318,9 @@ module.exports = {
|
|
|
320
318
|
}
|
|
321
319
|
}
|
|
322
320
|
existingProjects.push(meta);
|
|
323
|
-
} catch {
|
|
321
|
+
} catch {
|
|
322
|
+
// Skip a project entry whose index file is unreadable/corrupt.
|
|
323
|
+
}
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
|
|
@@ -357,6 +357,8 @@ module.exports = {
|
|
|
357
357
|
getProjectName,
|
|
358
358
|
hasBmadInstalled,
|
|
359
359
|
scanDirectory,
|
|
360
|
+
normalizePathForHash,
|
|
360
361
|
indexProject,
|
|
362
|
+
indexProjects,
|
|
361
363
|
},
|
|
362
364
|
};
|
|
@@ -11,12 +11,15 @@ const fs = require('node:fs');
|
|
|
11
11
|
const fsExtra = require('fs-extra');
|
|
12
12
|
const clack = require('@clack/prompts');
|
|
13
13
|
const pc = require('picocolors');
|
|
14
|
-
const { t
|
|
14
|
+
const { t } = require('../i18n');
|
|
15
15
|
|
|
16
16
|
module.exports = {
|
|
17
17
|
command: 'uninstall',
|
|
18
18
|
description: 'Remove BMAD+ from your project',
|
|
19
|
-
|
|
19
|
+
options: [
|
|
20
|
+
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it'],
|
|
21
|
+
],
|
|
22
|
+
action: async (options) => {
|
|
20
23
|
const projectDir = process.cwd();
|
|
21
24
|
|
|
22
25
|
clack.intro(pc.bgRed(pc.white(' BMAD+ Uninstaller ')));
|
|
@@ -31,8 +34,8 @@ module.exports = {
|
|
|
31
34
|
|
|
32
35
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
33
36
|
|
|
34
|
-
// Use
|
|
35
|
-
let lang = manifest.uiLanguage || 'en';
|
|
37
|
+
// Use --lang flag, or fall back to manifest language
|
|
38
|
+
let lang = options.lang || manifest.uiLanguage || 'en';
|
|
36
39
|
const i = t(lang);
|
|
37
40
|
|
|
38
41
|
clack.log.info(`BMAD+ v${manifest.version} (${i.installed_on || 'installed'} ${manifest.installed.split('T')[0]})`);
|
|
@@ -83,7 +86,9 @@ module.exports = {
|
|
|
83
86
|
const p = path.join(projectDir, configFile);
|
|
84
87
|
if (fs.existsSync(p)) {
|
|
85
88
|
const content = fs.readFileSync(p, 'utf8');
|
|
86
|
-
|
|
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')) {
|
|
87
92
|
fs.unlinkSync(p);
|
|
88
93
|
removed++;
|
|
89
94
|
}
|
|
@@ -21,6 +21,7 @@ module.exports = {
|
|
|
21
21
|
description: 'Update BMAD+ agents and skills (preserves config)',
|
|
22
22
|
options: [
|
|
23
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'],
|
|
24
25
|
],
|
|
25
26
|
action: async (options) => {
|
|
26
27
|
const projectDir = path.resolve(options.directory || process.cwd());
|
|
@@ -38,8 +39,22 @@ module.exports = {
|
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
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';
|
|
43
58
|
const i = t(lang);
|
|
44
59
|
|
|
45
60
|
clack.log.info(`📦 Installed: v${manifest.version} → Available: v${packageJson.version}`);
|
|
@@ -50,7 +65,10 @@ module.exports = {
|
|
|
50
65
|
return;
|
|
51
66
|
}
|
|
52
67
|
|
|
53
|
-
|
|
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'];
|
|
54
72
|
clack.log.info(`${i.selected_packs}: ${selectedPacks.join(', ')}`);
|
|
55
73
|
|
|
56
74
|
const confirm = await clack.confirm({
|