bmad-plus 0.8.0 → 0.9.1
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 +45 -1
- package/LICENSE +21 -21
- package/README.md +107 -85
- 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 +18 -5
- package/readme-international/README.es.md +40 -12
- package/readme-international/README.fr.md +36 -8
- 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 -0
- package/src/bmad-plus/packs/pack-shield/README.md +110 -110
- package/src/bmad-plus/packs/pack-shield/SKILL.md +82 -0
- 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/bmad-plus-npx.js +3 -5
- package/tools/cli/bmad-plus-cli.js +5 -3
- package/tools/cli/commands/autoconfig.js +18 -61
- package/tools/cli/commands/doctor.js +30 -31
- package/tools/cli/commands/install.js +33 -343
- package/tools/cli/commands/memory.js +1 -0
- package/tools/cli/commands/scan.js +61 -74
- package/tools/cli/commands/uninstall.js +7 -4
- package/tools/cli/commands/update.js +15 -72
- package/tools/cli/i18n.js +92 -10
- package/tools/cli/lib/ide-config.js +259 -0
- package/tools/cli/lib/memory-init.js +113 -0
- package/tools/cli/lib/pack-copy.js +84 -0
- package/tools/cli/lib/packs.js +114 -0
- package/tools/cli/lib/stack-detect.js +102 -0
- package/tools/cli/lib/validate.js +45 -0
- package/src/bmad-plus/agents/pack-animated/animated-website-agent.md +0 -325
- package/src/bmad-plus/agents/pack-animated/templates/animated-website-workflow.md +0 -55
- package/src/bmad-plus/agents/pack-backup/backup-agent.md +0 -71
- package/src/bmad-plus/agents/pack-backup/templates/backup-workflow.md +0 -51
- package/src/bmad-plus/agents/pack-seo/SKILL.md +0 -171
- package/src/bmad-plus/agents/pack-seo/checklist.md +0 -140
- package/src/bmad-plus/agents/pack-seo/pagespeed-playbook.md +0 -320
- package/src/bmad-plus/agents/pack-seo/ref/audit-schema.json +0 -187
- package/src/bmad-plus/agents/pack-seo/ref/cwv-thresholds.md +0 -87
- package/src/bmad-plus/agents/pack-seo/ref/eeat-criteria.md +0 -123
- package/src/bmad-plus/agents/pack-seo/ref/geo-signals.md +0 -167
- package/src/bmad-plus/agents/pack-seo/ref/hreflang-rules.md +0 -153
- package/src/bmad-plus/agents/pack-seo/ref/quality-gates.md +0 -133
- package/src/bmad-plus/agents/pack-seo/ref/schema-catalog.md +0 -91
- package/src/bmad-plus/agents/pack-seo/ref/schema-templates.json +0 -356
- package/src/bmad-plus/agents/pack-seo/seo-chief.md +0 -294
- package/src/bmad-plus/agents/pack-seo/seo-judge.md +0 -241
- package/src/bmad-plus/agents/pack-seo/seo-scout.md +0 -171
- package/src/bmad-plus/agents/pack-seo/templates/seo-audit-workflow.md +0 -241
|
@@ -8,123 +8,17 @@
|
|
|
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');
|
|
15
14
|
const { t, getLanguageOptions, getCommLanguageOptions } = require('../i18n');
|
|
15
|
+
const { PACKS } = require('../lib/packs');
|
|
16
|
+
const { copyPackFiles } = require('../lib/pack-copy');
|
|
17
|
+
const { initMemory } = require('../lib/memory-init');
|
|
18
|
+
const { generateIDEConfig, IDE_CONFIGS } = require('../lib/ide-config');
|
|
19
|
+
const { validateUserName } = require('../lib/validate');
|
|
16
20
|
|
|
17
|
-
// Pack definitions
|
|
18
|
-
const PACKS = {
|
|
19
|
-
core: {
|
|
20
|
-
name: 'Core Development',
|
|
21
|
-
icon: '⚙️',
|
|
22
|
-
description: '4 multi-role agents (Atlas, Forge, Sentinel, Nexus)',
|
|
23
|
-
required: true,
|
|
24
|
-
agents: ['agent-strategist', 'agent-architect-dev', 'agent-quality', 'agent-orchestrator'],
|
|
25
|
-
skills: ['bmad-plus-autopilot', 'bmad-plus-parallel', 'bmad-plus-sync'],
|
|
26
|
-
data: ['role-triggers.yaml'],
|
|
27
|
-
},
|
|
28
|
-
osint: {
|
|
29
|
-
name: 'OSINT Intelligence',
|
|
30
|
-
icon: '🔍',
|
|
31
|
-
description: 'Agent Shadow — investigation, scraping, psychoprofil',
|
|
32
|
-
required: false,
|
|
33
|
-
agents: ['agent-shadow'],
|
|
34
|
-
skills: [],
|
|
35
|
-
externalPackage: 'osint-agent-package',
|
|
36
|
-
},
|
|
37
|
-
maker: {
|
|
38
|
-
name: 'Agent Creator',
|
|
39
|
-
icon: '🧬',
|
|
40
|
-
description: 'Maker — design, build, and package new BMAD+ agents',
|
|
41
|
-
required: false,
|
|
42
|
-
agents: ['agent-maker'],
|
|
43
|
-
skills: [],
|
|
44
|
-
data: [],
|
|
45
|
-
},
|
|
46
|
-
shield: {
|
|
47
|
-
name: 'Pack Shield (GRC)',
|
|
48
|
-
icon: '🛡️',
|
|
49
|
-
description: '38 compliance agents — GDPR, ISO 27001, SOC 2, PCI DSS, EU AI Act...',
|
|
50
|
-
required: false,
|
|
51
|
-
agents: [],
|
|
52
|
-
skills: [],
|
|
53
|
-
packDir: 'pack-shield',
|
|
54
|
-
packSrcDir: 'packs',
|
|
55
|
-
},
|
|
56
|
-
'dev-studio': {
|
|
57
|
-
name: 'Dev Studio — Full SDLC',
|
|
58
|
-
icon: '🏗️',
|
|
59
|
-
description: 'Full SDLC pipeline: brainstorm → PRD → architecture → TDD → code review → deploy',
|
|
60
|
-
required: false,
|
|
61
|
-
agents: [],
|
|
62
|
-
skills: [],
|
|
63
|
-
packDir: 'pack-dev-studio',
|
|
64
|
-
packSrcDir: 'packs',
|
|
65
|
-
},
|
|
66
|
-
seo: {
|
|
67
|
-
name: 'SEO Audit 360',
|
|
68
|
-
icon: '🔍',
|
|
69
|
-
description: '3 agents (Scout, Chief, Judge) + 6-phase audit + PageSpeed loop',
|
|
70
|
-
required: false,
|
|
71
|
-
agents: [],
|
|
72
|
-
skills: [],
|
|
73
|
-
packDir: 'pack-seo',
|
|
74
|
-
},
|
|
75
|
-
backup: {
|
|
76
|
-
name: 'Universal Backup',
|
|
77
|
-
icon: '🗂️',
|
|
78
|
-
description: 'Timestamped ZIP backup with smart exclusions',
|
|
79
|
-
required: false,
|
|
80
|
-
agents: [],
|
|
81
|
-
skills: [],
|
|
82
|
-
packDir: 'pack-backup',
|
|
83
|
-
},
|
|
84
|
-
animated: {
|
|
85
|
-
name: 'Animated Website',
|
|
86
|
-
icon: '🎬',
|
|
87
|
-
description: 'Luxury scroll-driven website from video',
|
|
88
|
-
required: false,
|
|
89
|
-
agents: [],
|
|
90
|
-
skills: [],
|
|
91
|
-
packDir: 'pack-animated',
|
|
92
|
-
},
|
|
93
|
-
memory: {
|
|
94
|
-
name: 'Memory — Persistent Brain',
|
|
95
|
-
icon: '🧠',
|
|
96
|
-
description: 'Cross-session memory + project scanner + Karpathy guardrails. Agents learn.',
|
|
97
|
-
required: false,
|
|
98
|
-
agents: [],
|
|
99
|
-
skills: [],
|
|
100
|
-
packDir: 'pack-memory',
|
|
101
|
-
packSrcDir: 'packs',
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
// IDE configurations
|
|
106
|
-
const IDE_CONFIGS = {
|
|
107
|
-
'claude-code': {
|
|
108
|
-
name: 'Claude Code',
|
|
109
|
-
detect: ['.claude'],
|
|
110
|
-
configFile: 'CLAUDE.md',
|
|
111
|
-
},
|
|
112
|
-
'gemini-cli': {
|
|
113
|
-
name: 'Gemini CLI',
|
|
114
|
-
detect: ['.gemini'],
|
|
115
|
-
configFile: 'GEMINI.md',
|
|
116
|
-
},
|
|
117
|
-
'codex-cli': {
|
|
118
|
-
name: 'Codex CLI / OpenCode',
|
|
119
|
-
detect: ['.codex', '.opencode'],
|
|
120
|
-
configFile: 'AGENTS.md',
|
|
121
|
-
},
|
|
122
|
-
'antigravity': {
|
|
123
|
-
name: 'Antigravity',
|
|
124
|
-
detect: ['.gemini/antigravity'],
|
|
125
|
-
configFile: 'GEMINI.md',
|
|
126
|
-
},
|
|
127
|
-
};
|
|
21
|
+
// Pack definitions are imported from the shared module: require('../lib/packs').PACKS
|
|
128
22
|
|
|
129
23
|
module.exports = {
|
|
130
24
|
command: 'install',
|
|
@@ -133,6 +27,7 @@ module.exports = {
|
|
|
133
27
|
['-d, --directory <path>', 'Installation directory (default: current directory)'],
|
|
134
28
|
['-p, --packs <packs>', 'Comma-separated pack IDs: core,osint,all (default: interactive)'],
|
|
135
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)'],
|
|
136
31
|
['--tools <tools>', 'Comma-separated IDE IDs (default: auto-detect)'],
|
|
137
32
|
],
|
|
138
33
|
action: async (options) => {
|
|
@@ -144,8 +39,8 @@ module.exports = {
|
|
|
144
39
|
clack.intro(pc.bgCyan(pc.black(` BMAD+ Installer v${pkgJson.version} `)));
|
|
145
40
|
clack.log.info(pc.dim('✨ Created by Laurent Rochetta — github.com/lrochetta/BMAD-PLUS'));
|
|
146
41
|
|
|
147
|
-
let lang = 'en';
|
|
148
|
-
if (!options.yes) {
|
|
42
|
+
let lang = options.lang || 'en';
|
|
43
|
+
if (!options.yes && !options.lang) {
|
|
149
44
|
const langChoice = await clack.select({
|
|
150
45
|
message: '🌐 Select your language / Choisissez votre langue / 选择语言',
|
|
151
46
|
options: getLanguageOptions(),
|
|
@@ -153,7 +48,7 @@ module.exports = {
|
|
|
153
48
|
|
|
154
49
|
if (clack.isCancel(langChoice)) {
|
|
155
50
|
clack.cancel('Installation cancelled.');
|
|
156
|
-
|
|
51
|
+
throw new Error('Installation cancelled.');
|
|
157
52
|
}
|
|
158
53
|
lang = langChoice;
|
|
159
54
|
}
|
|
@@ -164,7 +59,7 @@ module.exports = {
|
|
|
164
59
|
if (!fs.existsSync(bmadSrc)) {
|
|
165
60
|
clack.log.error(`${i.source_not_found}: ${bmadSrc}`);
|
|
166
61
|
clack.outro(pc.red(i.failed));
|
|
167
|
-
|
|
62
|
+
throw new Error(`Source not found: ${bmadSrc}`);
|
|
168
63
|
}
|
|
169
64
|
|
|
170
65
|
clack.log.info(`${i.installing_to}: ${pc.cyan(projectDir)}`);
|
|
@@ -187,7 +82,7 @@ module.exports = {
|
|
|
187
82
|
.map(([key, pack]) => ({
|
|
188
83
|
value: key,
|
|
189
84
|
label: `${pack.icon} ${pack.name}`,
|
|
190
|
-
hint: pack.disabled ? i.soon : pack.description,
|
|
85
|
+
hint: pack.disabled ? i.soon : (pack.desc || pack.description || ''),
|
|
191
86
|
disabled: pack.disabled,
|
|
192
87
|
})),
|
|
193
88
|
required: false,
|
|
@@ -195,7 +90,7 @@ module.exports = {
|
|
|
195
90
|
|
|
196
91
|
if (clack.isCancel(packChoice)) {
|
|
197
92
|
clack.cancel(i.cancelled);
|
|
198
|
-
|
|
93
|
+
throw new Error(i.cancelled);
|
|
199
94
|
}
|
|
200
95
|
|
|
201
96
|
selectedPacks = [...new Set(['core', ...packChoice])];
|
|
@@ -278,10 +173,15 @@ module.exports = {
|
|
|
278
173
|
|
|
279
174
|
if (clack.isCancel(userConfig)) {
|
|
280
175
|
clack.cancel(i.cancelled);
|
|
281
|
-
|
|
176
|
+
throw new Error(i.cancelled);
|
|
282
177
|
}
|
|
283
178
|
|
|
284
|
-
|
|
179
|
+
// Validate user-provided name
|
|
180
|
+
const rawName = userConfig.userName;
|
|
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;
|
|
285
185
|
commLang = userConfig.commLang;
|
|
286
186
|
}
|
|
287
187
|
|
|
@@ -302,148 +202,26 @@ module.exports = {
|
|
|
302
202
|
let copiedSkills = 0;
|
|
303
203
|
let copiedFiles = 0;
|
|
304
204
|
|
|
205
|
+
const projectRoot = path.join(bmadSrc, '..', '..');
|
|
206
|
+
|
|
305
207
|
for (const packId of selectedPacks) {
|
|
306
208
|
const pack = PACKS[packId];
|
|
307
209
|
if (!pack || pack.disabled) continue;
|
|
308
210
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
// Copy skills
|
|
320
|
-
for (const skill of pack.skills) {
|
|
321
|
-
const src = path.join(bmadSrc, 'skills', skill);
|
|
322
|
-
const dest = path.join(targetAgentsDir, skill);
|
|
323
|
-
if (fs.existsSync(src)) {
|
|
324
|
-
fsExtra.copySync(src, dest, { overwrite: true });
|
|
325
|
-
copiedSkills++;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// Copy data files
|
|
330
|
-
for (const dataFile of (pack.data || [])) {
|
|
331
|
-
const src = path.join(bmadSrc, 'data', dataFile);
|
|
332
|
-
const dest = path.join(targetDataDir, dataFile);
|
|
333
|
-
if (fs.existsSync(src)) {
|
|
334
|
-
fsExtra.copySync(src, dest, { overwrite: true });
|
|
335
|
-
copiedFiles++;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Copy external package (OSINT)
|
|
340
|
-
if (pack.externalPackage) {
|
|
341
|
-
const extSrc = path.join(__dirname, '..', '..', '..', pack.externalPackage, 'skills');
|
|
342
|
-
const extDest = path.join(targetAgentsDir);
|
|
343
|
-
if (fs.existsSync(extSrc)) {
|
|
344
|
-
fsExtra.copySync(extSrc, extDest, { overwrite: true });
|
|
345
|
-
copiedSkills++;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
// Copy pack directory (SEO, Backup, Animated Website, Shield)
|
|
350
|
-
if (pack.packDir) {
|
|
351
|
-
const srcParent = pack.packSrcDir || 'agents';
|
|
352
|
-
const packSrc = path.join(bmadSrc, srcParent, pack.packDir);
|
|
353
|
-
const packDest = path.join(targetAgentsDir, pack.packDir);
|
|
354
|
-
if (fs.existsSync(packSrc)) {
|
|
355
|
-
fsExtra.copySync(packSrc, packDest, { overwrite: true });
|
|
356
|
-
copiedAgents++;
|
|
357
|
-
copiedFiles++;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
211
|
+
const result = copyPackFiles({
|
|
212
|
+
bmadSrc,
|
|
213
|
+
targetAgentsDir,
|
|
214
|
+
targetDataDir,
|
|
215
|
+
projectRoot,
|
|
216
|
+
pack,
|
|
217
|
+
});
|
|
218
|
+
copiedAgents += result.copiedAgents;
|
|
219
|
+
copiedSkills += result.copiedSkills;
|
|
220
|
+
copiedFiles += result.copiedFiles;
|
|
360
221
|
|
|
361
222
|
// Memory pack: initialize brain with existing brain detection
|
|
362
223
|
if (packId === 'memory' && pack.packDir) {
|
|
363
|
-
|
|
364
|
-
const sessionsDir = path.join(memoryDir, 'sessions');
|
|
365
|
-
const globalBrainDir = path.join(os.homedir(), '.bmad-plus', 'brain', 'projects');
|
|
366
|
-
const templateDir = path.join(bmadSrc, 'packs', 'pack-memory', 'templates');
|
|
367
|
-
|
|
368
|
-
// Create project memory (never overwrite existing)
|
|
369
|
-
fsExtra.ensureDirSync(sessionsDir);
|
|
370
|
-
const memoryFiles = ['decisions.md', 'lessons.md', 'patterns.md', 'context.md'];
|
|
371
|
-
for (const mf of memoryFiles) {
|
|
372
|
-
const dest = path.join(memoryDir, mf);
|
|
373
|
-
if (!fs.existsSync(dest)) {
|
|
374
|
-
const src = path.join(templateDir, mf);
|
|
375
|
-
if (fs.existsSync(src)) {
|
|
376
|
-
let content = fs.readFileSync(src, 'utf8');
|
|
377
|
-
content = content.replace(/\{\{date\}\}/g, new Date().toISOString().slice(0, 10));
|
|
378
|
-
content = content.replace(/\{\{project_name\}\}/g, path.basename(projectDir));
|
|
379
|
-
content = content.replace(/\{\{project_path\}\}/g, projectDir);
|
|
380
|
-
fs.writeFileSync(dest, content, 'utf8');
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
// Detect existing brain directories
|
|
386
|
-
const brainCandidates = [
|
|
387
|
-
path.join(os.homedir(), '.bmad-plus', 'brain'),
|
|
388
|
-
path.join(projectDir, '_brain'),
|
|
389
|
-
path.join(os.homedir(), '.claude', 'memory'),
|
|
390
|
-
];
|
|
391
|
-
const existingBrain = brainCandidates.find(p => fs.existsSync(p));
|
|
392
|
-
|
|
393
|
-
if (existingBrain) {
|
|
394
|
-
clack.log.info(`🧠 ${i.brain_detected || 'Existing brain detected'}: ${existingBrain}`);
|
|
395
|
-
// Write brain link pointer
|
|
396
|
-
fs.writeFileSync(
|
|
397
|
-
path.join(memoryDir, '.brain-link'),
|
|
398
|
-
JSON.stringify({ linked_brain: existingBrain, linked_at: new Date().toISOString() }, null, 2),
|
|
399
|
-
'utf8'
|
|
400
|
-
);
|
|
401
|
-
} else {
|
|
402
|
-
// Create fresh global brain
|
|
403
|
-
fsExtra.ensureDirSync(globalBrainDir);
|
|
404
|
-
const identitySrc = path.join(templateDir, 'identity.yaml');
|
|
405
|
-
const identityDest = path.join(os.homedir(), '.bmad-plus', 'brain', 'identity.yaml');
|
|
406
|
-
if (fs.existsSync(identitySrc) && !fs.existsSync(identityDest)) {
|
|
407
|
-
let content = fs.readFileSync(identitySrc, 'utf8');
|
|
408
|
-
content = content.replace(/\{\{user_name\}\}/g, userName);
|
|
409
|
-
content = content.replace(/\{\{language\}\}/g, commLang);
|
|
410
|
-
content = content.replace(/\{\{date\}\}/g, new Date().toISOString().slice(0, 10));
|
|
411
|
-
fs.writeFileSync(identityDest, content, 'utf8');
|
|
412
|
-
}
|
|
413
|
-
// Copy global memory templates
|
|
414
|
-
for (const gf of ['decisions.md', 'lessons.md', 'patterns.md']) {
|
|
415
|
-
const dest = path.join(os.homedir(), '.bmad-plus', 'brain', gf);
|
|
416
|
-
if (!fs.existsSync(dest)) {
|
|
417
|
-
const src = path.join(templateDir, gf);
|
|
418
|
-
if (fs.existsSync(src)) {
|
|
419
|
-
let content = fs.readFileSync(src, 'utf8');
|
|
420
|
-
content = content.replace(/\{\{date\}\}/g, new Date().toISOString().slice(0, 10));
|
|
421
|
-
content = content.replace(/\{\{project_name\}\}/g, 'Global Brain');
|
|
422
|
-
fs.writeFileSync(dest, content, 'utf8');
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
clack.log.info(`🧠 ${i.brain_created || 'Global brain created'}: ${path.join(os.homedir(), '.bmad-plus', 'brain')}`);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
// Index this project in global brain
|
|
430
|
-
const crypto = require('node:crypto');
|
|
431
|
-
const projHash = crypto.createHash('sha256').update(projectDir).digest('hex').slice(0, 8);
|
|
432
|
-
const projMeta = {
|
|
433
|
-
path: projectDir,
|
|
434
|
-
name: path.basename(projectDir),
|
|
435
|
-
hash: projHash,
|
|
436
|
-
status: 'active',
|
|
437
|
-
bmad_installed: true,
|
|
438
|
-
packs_installed: selectedPacks,
|
|
439
|
-
last_scanned: new Date().toISOString().slice(0, 10),
|
|
440
|
-
};
|
|
441
|
-
fsExtra.ensureDirSync(globalBrainDir);
|
|
442
|
-
fs.writeFileSync(
|
|
443
|
-
path.join(globalBrainDir, `${projHash}.yaml`),
|
|
444
|
-
Object.entries(projMeta).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join('\n'),
|
|
445
|
-
'utf8'
|
|
446
|
-
);
|
|
224
|
+
initMemory({ projectDir, bmadSrc, userName, commLang, selectedPacks });
|
|
447
225
|
}
|
|
448
226
|
}
|
|
449
227
|
|
|
@@ -632,94 +410,6 @@ module.exports = {
|
|
|
632
410
|
|
|
633
411
|
// ── Helpers ──
|
|
634
412
|
|
|
635
|
-
function generateIDEConfig(userName, language, packs) {
|
|
636
|
-
const agents = [
|
|
637
|
-
'- **Atlas** (Strategist) — Business analysis + Product management',
|
|
638
|
-
'- **Forge** (Architect-Dev) — Architecture + Development + Documentation',
|
|
639
|
-
'- **Sentinel** (Quality) — QA + UX review',
|
|
640
|
-
'- **Nexus** (Orchestrator) — Sprint management + Autopilot + Parallel execution',
|
|
641
|
-
];
|
|
642
|
-
|
|
643
|
-
if (packs.includes('osint')) {
|
|
644
|
-
agents.push('- **Shadow** (OSINT) — Investigation + Scraping + Psychoprofiling');
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
if (packs.includes('shield')) {
|
|
648
|
-
agents.push('- **Shield** (GRC) — 38 compliance agents (GDPR, ISO 27001, SOC 2, HIPAA, EU AI Act, DORA, NIS2...)');
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
if (packs.includes('dev-studio')) {
|
|
652
|
-
agents.push('- **Miriam** (מרים) — Business Analyst — Strategic analysis, research, product briefs');
|
|
653
|
-
agents.push('- **Huldah** (חולדה) — Technical Writer — Documentation, diagrams, editorial review');
|
|
654
|
-
agents.push('- **Yosef** (יוסף) — Product Manager — PRD, requirements, feature prioritization');
|
|
655
|
-
agents.push('- **Rachel** (רחל) — UX Designer — User experience, wireframes, empathy mapping');
|
|
656
|
-
agents.push('- **Bezalel** (בצלאל) — System Architect — Architecture, ADRs, epics & stories');
|
|
657
|
-
agents.push('- **Oholiab** (אהליאב) — Senior Engineer — TDD, sprint, code review, implementation');
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
if (packs.includes('memory')) {
|
|
661
|
-
agents.push('- **Zecher** (זכר) — Memory Archivist — Consolidation, project scanning, context recall');
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
// Build memory section if memory pack is installed
|
|
665
|
-
let memorySection = '';
|
|
666
|
-
if (packs.includes('memory')) {
|
|
667
|
-
memorySection = [
|
|
668
|
-
'',
|
|
669
|
-
'## Memory Protocol (Karpathy Guardrails)',
|
|
670
|
-
'',
|
|
671
|
-
'Agents MUST follow these behavioral principles:',
|
|
672
|
-
'',
|
|
673
|
-
'### G1 — Think Before Coding',
|
|
674
|
-
'- State assumptions explicitly. If uncertain, ask.',
|
|
675
|
-
'- Check `.agents/memory/decisions.md` for prior decisions before re-deciding.',
|
|
676
|
-
'',
|
|
677
|
-
'### G2 — Simplicity First',
|
|
678
|
-
'- Minimum code that solves the problem. Nothing speculative.',
|
|
679
|
-
'- Check `.agents/memory/patterns.md` for existing solutions.',
|
|
680
|
-
'',
|
|
681
|
-
'### G3 — Surgical Changes',
|
|
682
|
-
'- Touch only what you must. Match existing style.',
|
|
683
|
-
'- Log surprises in `.agents/memory/lessons.md`.',
|
|
684
|
-
'',
|
|
685
|
-
'### G4 — Goal-Driven Execution',
|
|
686
|
-
'- Define success criteria before implementing.',
|
|
687
|
-
'- Log non-obvious decisions in `.agents/memory/decisions.md`.',
|
|
688
|
-
'',
|
|
689
|
-
'### Memory Files',
|
|
690
|
-
'- `.agents/memory/decisions.md` — Read at session start, write when making decisions',
|
|
691
|
-
'- `.agents/memory/lessons.md` — Write when something unexpected happens',
|
|
692
|
-
'- `.agents/memory/patterns.md` — Write when a reusable pattern is validated',
|
|
693
|
-
'- `.agents/memory/context.md` — Update at session end with project state',
|
|
694
|
-
].join('\n');
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
return `# BMAD+ — AI Agent Configuration
|
|
698
|
-
|
|
699
|
-
## Project Context
|
|
700
|
-
This project uses BMAD+, an augmented AI-driven development framework.
|
|
701
|
-
Based on BMAD-METHOD v6.6.0 with multi-role agents, autopilot mode, and parallel execution.
|
|
702
|
-
|
|
703
|
-
## Agents
|
|
704
|
-
To activate an agent, say its name or persona:
|
|
705
|
-
${agents.join('\n')}
|
|
706
|
-
|
|
707
|
-
## Skills
|
|
708
|
-
- Load skills from \`.agents/skills/\`
|
|
709
|
-
- Each agent has a SKILL.md with capabilities, activation protocol, and role-switching rules
|
|
710
|
-
- Auto-activation triggers: \`.agents/data/role-triggers.yaml\`
|
|
711
|
-
|
|
712
|
-
## Key Commands
|
|
713
|
-
- \`bmad-help\` — Show all available agents and skills
|
|
714
|
-
- \`autopilot\` — Launch Nexus in full pipeline mode
|
|
715
|
-
- \`parallel\` — Enable parallel multi-agent execution
|
|
716
|
-
|
|
717
|
-
## Communication
|
|
718
|
-
- User name: ${userName}
|
|
719
|
-
- Default language: ${language} for user-facing content, English for code and technical docs.
|
|
720
|
-
${memorySection}`;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
413
|
function generateConfigYaml(userName, language, projectDir) {
|
|
724
414
|
const projectName = path.basename(projectDir);
|
|
725
415
|
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,46 @@ function scanDirectory(rootDir, maxDepth = 4, currentDepth = 0, activeDays = 30,
|
|
|
143
118
|
return projects;
|
|
144
119
|
}
|
|
145
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Index a single project in the global brain by writing its metadata YAML file.
|
|
123
|
+
* @param {object} project - Project metadata object
|
|
124
|
+
* @param {string} globalBrainDir - Path to the brain projects directory
|
|
125
|
+
* @returns {void}
|
|
126
|
+
*/
|
|
127
|
+
function indexProject(project, globalBrainDir) {
|
|
128
|
+
const hash = crypto.createHash('sha256').update(project.path).digest('hex').slice(0, 8);
|
|
129
|
+
const meta = {
|
|
130
|
+
path: project.path,
|
|
131
|
+
name: project.name,
|
|
132
|
+
hash,
|
|
133
|
+
stack: project.stack,
|
|
134
|
+
status: project.status,
|
|
135
|
+
bmad_installed: project.bmad,
|
|
136
|
+
has_git: project.hasGit,
|
|
137
|
+
last_scanned: new Date().toISOString().slice(0, 10),
|
|
138
|
+
};
|
|
139
|
+
fs.writeFileSync(
|
|
140
|
+
path.join(globalBrainDir, `${hash}.yaml`),
|
|
141
|
+
Object.entries(meta).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join('\n'),
|
|
142
|
+
'utf8'
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Index multiple projects in the global brain.
|
|
148
|
+
* @param {object[]} projectList - Array of project metadata objects
|
|
149
|
+
* @param {string} brainDir - Path to the brain projects directory
|
|
150
|
+
* @returns {number} Number of projects indexed
|
|
151
|
+
*/
|
|
152
|
+
function indexProjects(projectList, brainDir) {
|
|
153
|
+
let count = 0;
|
|
154
|
+
for (const proj of projectList) {
|
|
155
|
+
indexProject(proj, brainDir);
|
|
156
|
+
count++;
|
|
157
|
+
}
|
|
158
|
+
return count;
|
|
159
|
+
}
|
|
160
|
+
|
|
146
161
|
module.exports = {
|
|
147
162
|
command: 'scan',
|
|
148
163
|
description: 'Scan directories to discover and index projects in the global brain',
|
|
@@ -152,12 +167,19 @@ module.exports = {
|
|
|
152
167
|
['--active-days <n>', 'Days since last modified to consider a project "active" (default: 30)', '30'],
|
|
153
168
|
['--paused-days <n>', 'Days since last modified to consider a project "paused" (default: 180)', '180'],
|
|
154
169
|
['-y, --yes', 'Index all projects without prompting'],
|
|
170
|
+
['-l, --lang <code>', 'Language code: en, fr, es, de, pt-br, ru, zh, he, ja, it'],
|
|
155
171
|
],
|
|
156
172
|
action: async (options) => {
|
|
157
173
|
const scanDir = path.resolve(options.directory || process.cwd());
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
const
|
|
174
|
+
|
|
175
|
+
const rawDepth = parseInt(options.depth, 10);
|
|
176
|
+
const maxDepth = (!isNaN(rawDepth) && rawDepth > 0) ? rawDepth : (() => { clack.log.warn(`Invalid --depth "${options.depth}", defaulting to 4`); return 4; })();
|
|
177
|
+
|
|
178
|
+
const rawActive = parseInt(options.activeDays, 10);
|
|
179
|
+
const activeDays = (!isNaN(rawActive) && rawActive > 0) ? rawActive : (() => { clack.log.warn(`Invalid --active-days "${options.activeDays}", defaulting to 30`); return 30; })();
|
|
180
|
+
|
|
181
|
+
const rawPaused = parseInt(options.pausedDays, 10);
|
|
182
|
+
const pausedDays = (!isNaN(rawPaused) && rawPaused > 0) ? rawPaused : (() => { clack.log.warn(`Invalid --paused-days "${options.pausedDays}", defaulting to 180`); return 180; })();
|
|
161
183
|
|
|
162
184
|
clack.intro(pc.bgMagenta(pc.white(' 🧠 BMAD+ Project Scanner ')));
|
|
163
185
|
|
|
@@ -218,26 +240,7 @@ module.exports = {
|
|
|
218
240
|
const fsExtra = require('fs-extra');
|
|
219
241
|
fsExtra.ensureDirSync(globalBrainDir);
|
|
220
242
|
|
|
221
|
-
|
|
222
|
-
for (const proj of projects) {
|
|
223
|
-
const hash = crypto.createHash('sha256').update(proj.path).digest('hex').slice(0, 8);
|
|
224
|
-
const meta = {
|
|
225
|
-
path: proj.path,
|
|
226
|
-
name: proj.name,
|
|
227
|
-
hash,
|
|
228
|
-
stack: proj.stack,
|
|
229
|
-
status: proj.status,
|
|
230
|
-
bmad_installed: proj.bmad,
|
|
231
|
-
has_git: proj.hasGit,
|
|
232
|
-
last_scanned: new Date().toISOString().slice(0, 10),
|
|
233
|
-
};
|
|
234
|
-
fs.writeFileSync(
|
|
235
|
-
path.join(globalBrainDir, `${hash}.yaml`),
|
|
236
|
-
Object.entries(meta).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join('\n'),
|
|
237
|
-
'utf8'
|
|
238
|
-
);
|
|
239
|
-
indexed++;
|
|
240
|
-
}
|
|
243
|
+
const indexed = indexProjects(projects, globalBrainDir);
|
|
241
244
|
clack.log.success(`✅ ${indexed} project(s) indexed in ${globalBrainDir}`);
|
|
242
245
|
} else {
|
|
243
246
|
// Interactive mode
|
|
@@ -279,27 +282,7 @@ module.exports = {
|
|
|
279
282
|
toIndex = selected.map(i => projects[i]);
|
|
280
283
|
}
|
|
281
284
|
|
|
282
|
-
|
|
283
|
-
for (const proj of toIndex) {
|
|
284
|
-
const hash = crypto.createHash('sha256').update(proj.path).digest('hex').slice(0, 8);
|
|
285
|
-
const meta = {
|
|
286
|
-
path: proj.path,
|
|
287
|
-
name: proj.name,
|
|
288
|
-
hash,
|
|
289
|
-
stack: proj.stack,
|
|
290
|
-
status: proj.status,
|
|
291
|
-
bmad_installed: proj.bmad,
|
|
292
|
-
has_git: proj.hasGit,
|
|
293
|
-
last_scanned: new Date().toISOString().slice(0, 10),
|
|
294
|
-
};
|
|
295
|
-
fs.writeFileSync(
|
|
296
|
-
path.join(globalBrainDir, `${hash}.yaml`),
|
|
297
|
-
Object.entries(meta).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join('\n'),
|
|
298
|
-
'utf8'
|
|
299
|
-
);
|
|
300
|
-
indexed++;
|
|
301
|
-
}
|
|
302
|
-
|
|
285
|
+
const indexed = indexProjects(toIndex, globalBrainDir);
|
|
303
286
|
clack.log.success(`✅ ${indexed} project(s) indexed in global brain`);
|
|
304
287
|
}
|
|
305
288
|
|
|
@@ -319,7 +302,9 @@ module.exports = {
|
|
|
319
302
|
}
|
|
320
303
|
}
|
|
321
304
|
existingProjects.push(meta);
|
|
322
|
-
} catch {
|
|
305
|
+
} catch {
|
|
306
|
+
// Skip a project entry whose index file is unreadable/corrupt.
|
|
307
|
+
}
|
|
323
308
|
}
|
|
324
309
|
}
|
|
325
310
|
|
|
@@ -356,5 +341,7 @@ module.exports = {
|
|
|
356
341
|
getProjectName,
|
|
357
342
|
hasBmadInstalled,
|
|
358
343
|
scanDirectory,
|
|
344
|
+
indexProject,
|
|
345
|
+
indexProjects,
|
|
359
346
|
},
|
|
360
347
|
};
|
|
@@ -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]})`);
|