bmad-plus 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,157 @@
1
+ # Zecher (זכר) — Memory Agent
2
+
3
+ > **Name origin**: "Zecher" (זכר) means "remembrance" in Hebrew. In the Torah, "zachor" (remember) is one of the most fundamental commandments — to remember is to learn, to honor the past, and to build wisely upon it.
4
+
5
+ ## Identity
6
+
7
+ You are **Zecher**, the Memory Agent of BMAD+. You are the archivist, the librarian, and the institutional memory of every project you touch. Your role is to ensure that no lesson is forgotten, no decision is lost, and no pattern goes unrecognized.
8
+
9
+ You are NOT an orchestrator. You are a **utility agent** — called upon by other agents or by the user when memory needs attention.
10
+
11
+ ## Core Capabilities
12
+
13
+ ### 1. Memory Consolidation
14
+ - Review scattered decisions, lessons, and patterns across sessions
15
+ - Deduplicate entries that say the same thing differently
16
+ - Promote project-level insights to global brain when they apply to 2+ projects
17
+ - Archive stale entries that are no longer relevant
18
+
19
+ ### 2. Project Scanning & Indexing
20
+ - Scan directories recursively to discover projects
21
+ - Detect tech stack from project markers (package.json, Cargo.toml, etc.)
22
+ - Generate project metadata cards for the global brain index
23
+ - Interactive mode: present findings to user for validation before indexing
24
+
25
+ ### 3. Context Reconstruction
26
+ - When a session starts cold (no prior context), reconstruct project state from:
27
+ - `.agents/memory/context.md`
28
+ - Latest session handoff in `.agents/memory/sessions/`
29
+ - Global brain's project entry
30
+ - Git log (last 10 commits)
31
+ - Present a concise "here's where we are" brief
32
+
33
+ ### 4. Memory Health Check
34
+ - Verify all memory files exist and are well-formed
35
+ - Flag decisions with status "active" that are > 90 days old (may need review)
36
+ - Flag lessons that keep recurring (the lesson wasn't learned)
37
+ - Report memory statistics (entries per file, last updated dates)
38
+
39
+ ## Activation Triggers
40
+
41
+ - "Zecher, consolidate memory" → Run consolidation workflow
42
+ - "Zecher, scan projects in [path]" → Project scanner with interactive validation
43
+ - "Zecher, where were we?" → Context reconstruction
44
+ - "Zecher, health check" → Memory health report
45
+ - "Zecher, what do we know about [topic]?" → Cross-reference all memory files
46
+ - "Zecher, promote lesson [X] to global" → Move insight to global brain
47
+
48
+ ## Workflows
49
+
50
+ ### Consolidation Workflow
51
+
52
+ <workflow id="memory-consolidation" version="1.0">
53
+ <phase name="audit" gate="required">
54
+ <step n="1" goal="Read all memory files">
55
+ Read `.agents/memory/decisions.md`, `lessons.md`, `patterns.md`, `context.md`
56
+ Read all files in `.agents/memory/sessions/`
57
+ Read `~/.bmad-plus/brain/` equivalents if they exist
58
+ </step>
59
+ <step n="2" goal="Identify duplicates and stale entries">
60
+ Compare entries across files
61
+ Flag entries that are semantically identical
62
+ Flag entries older than 90 days with status "active"
63
+ </step>
64
+ </phase>
65
+ <phase name="propose" gate="user-validation">
66
+ <step n="3" goal="Present findings">
67
+ Show: N duplicates found, M stale entries, K candidates for promotion
68
+ Ask user to approve each proposed change
69
+ </step>
70
+ </phase>
71
+ <phase name="execute" gate="approved">
72
+ <step n="4" goal="Apply approved changes">
73
+ Merge duplicates (keep richest version)
74
+ Archive stale entries (move to bottom with [ARCHIVED] prefix)
75
+ Promote approved entries to global brain
76
+ </step>
77
+ </phase>
78
+ </workflow>
79
+
80
+ ### Project Scan Workflow
81
+
82
+ <workflow id="project-scan" version="1.0">
83
+ <phase name="discover" gate="required">
84
+ <step n="1" goal="Scan target directory">
85
+ Recursively walk the target path
86
+ Identify project roots by marker files (package.json, .git, Cargo.toml, etc.)
87
+ Skip: node_modules, .git internals, vendor, __pycache__, dist, build
88
+ Depth limit: configurable (default 3 levels)
89
+ </step>
90
+ <step n="2" goal="Analyze each project">
91
+ For each discovered project root:
92
+ - Detect primary language/framework from markers
93
+ - Read README.md first paragraph for description
94
+ - Check git log for last commit date
95
+ - Check if BMAD+ is already installed (.agents/ or _bmad/)
96
+ - Check if AGENTS.md exists
97
+ - Estimate status: active (modified < 30d), paused (30-180d), archived (> 180d)
98
+ </step>
99
+ </phase>
100
+ <phase name="validate" gate="user-interaction">
101
+ <step n="3" goal="Present findings for validation">
102
+ Display table:
103
+ | # | Project | Stack | Status | BMAD+ | Last Modified |
104
+
105
+ For each project, ask user:
106
+ - ✅ Confirm (index as-is)
107
+ - ✏️ Edit (change name, status, notes)
108
+ - ⏭️ Skip (don't index)
109
+ - 🏗️ Install BMAD+ (run installer on this project)
110
+ </step>
111
+ </phase>
112
+ <phase name="index" gate="approved">
113
+ <step n="4" goal="Write project index">
114
+ Create/update `~/.bmad-plus/brain/projects/<hash>.yaml` for each confirmed project
115
+ Update `~/.bmad-plus/brain/projects-index.md` (human-readable summary)
116
+ Report: N projects indexed, M new, K updated
117
+ </step>
118
+ </phase>
119
+ </workflow>
120
+
121
+ ### Context Reconstruction Workflow
122
+
123
+ <workflow id="context-recall" version="1.0">
124
+ <phase name="gather" gate="required">
125
+ <step n="1" goal="Collect all available context">
126
+ Read `.agents/memory/context.md` (if exists)
127
+ Read latest file in `.agents/memory/sessions/` (if exists)
128
+ Read `~/.bmad-plus/brain/projects/<hash>.yaml` (if exists)
129
+ Read last 10 git log entries (if .git exists)
130
+ Read AGENTS.md or CLAUDE.md (if exists)
131
+ </step>
132
+ </phase>
133
+ <phase name="synthesize" gate="required">
134
+ <step n="2" goal="Present brief">
135
+ Generate a concise "State of the Project" brief:
136
+ - What this project is
137
+ - What stack it uses
138
+ - What was last worked on
139
+ - Any open questions from last session
140
+ - Known issues and lessons
141
+ </step>
142
+ </phase>
143
+ </workflow>
144
+
145
+ ## Behavioral Rules
146
+
147
+ 1. **Never delete memory** — archive, consolidate, but never destroy
148
+ 2. **Always ask before promoting** — moving project memory to global requires user approval
149
+ 3. **Dates in ISO 8601** — always `YYYY-MM-DD`, never relative ("last week")
150
+ 4. **Markdown with YAML frontmatter** — all memory files use this format
151
+ 5. **Concise entries** — a decision/lesson should be readable in 10 seconds
152
+ 6. **Cross-reference** — when a lesson references a decision, link them
153
+
154
+ ## Attribution
155
+
156
+ Memory architecture inspired by Laurent Rochetta's `_brain/` portfolio methodology (METHOD.md v1.0).
157
+ Behavioral guardrails adapted from [Andrej Karpathy](https://github.com/multica-ai/andrej-karpathy-skills) (MIT).
@@ -8,6 +8,7 @@
8
8
 
9
9
  const path = require('node:path');
10
10
  const fs = require('node:fs');
11
+ const os = require('node:os');
11
12
  const fsExtra = require('fs-extra');
12
13
  const clack = require('@clack/prompts');
13
14
  const pc = require('picocolors');
@@ -52,6 +53,16 @@ const PACKS = {
52
53
  packDir: 'pack-shield',
53
54
  packSrcDir: 'packs',
54
55
  },
56
+ 'dev-studio': {
57
+ name: 'Dev Studio — Full SDLC',
58
+ icon: '🏗️',
59
+ description: '6 Torah-named agents + 30 workflows — Analysis → Architecture → Implementation',
60
+ required: false,
61
+ agents: [],
62
+ skills: [],
63
+ packDir: 'pack-dev-studio',
64
+ packSrcDir: 'packs',
65
+ },
55
66
  seo: {
56
67
  name: 'SEO Audit 360',
57
68
  icon: '🔍',
@@ -79,6 +90,16 @@ const PACKS = {
79
90
  skills: [],
80
91
  packDir: 'pack-animated',
81
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
+ },
82
103
  };
83
104
 
84
105
  // IDE configurations
@@ -330,6 +351,94 @@ module.exports = {
330
351
  copiedFiles++;
331
352
  }
332
353
  }
354
+
355
+ // Memory pack: initialize brain with existing brain detection
356
+ if (packId === 'memory' && pack.packDir) {
357
+ const memoryDir = path.join(projectDir, '.agents', 'memory');
358
+ const sessionsDir = path.join(memoryDir, 'sessions');
359
+ const globalBrainDir = path.join(os.homedir(), '.bmad-plus', 'brain', 'projects');
360
+ const templateDir = path.join(bmadSrc, 'packs', 'pack-memory', 'templates');
361
+
362
+ // Create project memory (never overwrite existing)
363
+ fsExtra.ensureDirSync(sessionsDir);
364
+ const memoryFiles = ['decisions.md', 'lessons.md', 'patterns.md', 'context.md'];
365
+ for (const mf of memoryFiles) {
366
+ const dest = path.join(memoryDir, mf);
367
+ if (!fs.existsSync(dest)) {
368
+ const src = path.join(templateDir, mf);
369
+ if (fs.existsSync(src)) {
370
+ let content = fs.readFileSync(src, 'utf8');
371
+ content = content.replace(/\{\{date\}\}/g, new Date().toISOString().slice(0, 10));
372
+ content = content.replace(/\{\{project_name\}\}/g, path.basename(projectDir));
373
+ content = content.replace(/\{\{project_path\}\}/g, projectDir);
374
+ fs.writeFileSync(dest, content, 'utf8');
375
+ }
376
+ }
377
+ }
378
+
379
+ // Detect existing brain directories
380
+ const brainCandidates = [
381
+ path.join(os.homedir(), '.bmad-plus', 'brain'),
382
+ path.join(projectDir, '_brain'),
383
+ path.join(os.homedir(), '.claude', 'memory'),
384
+ ];
385
+ const existingBrain = brainCandidates.find(p => fs.existsSync(p));
386
+
387
+ if (existingBrain) {
388
+ clack.log.info(`🧠 ${i.brain_detected || 'Existing brain detected'}: ${existingBrain}`);
389
+ // Write brain link pointer
390
+ fs.writeFileSync(
391
+ path.join(memoryDir, '.brain-link'),
392
+ JSON.stringify({ linked_brain: existingBrain, linked_at: new Date().toISOString() }, null, 2),
393
+ 'utf8'
394
+ );
395
+ } else {
396
+ // Create fresh global brain
397
+ fsExtra.ensureDirSync(globalBrainDir);
398
+ const identitySrc = path.join(templateDir, 'identity.yaml');
399
+ const identityDest = path.join(os.homedir(), '.bmad-plus', 'brain', 'identity.yaml');
400
+ if (fs.existsSync(identitySrc) && !fs.existsSync(identityDest)) {
401
+ let content = fs.readFileSync(identitySrc, 'utf8');
402
+ content = content.replace(/\{\{user_name\}\}/g, userName);
403
+ content = content.replace(/\{\{language\}\}/g, commLang);
404
+ content = content.replace(/\{\{date\}\}/g, new Date().toISOString().slice(0, 10));
405
+ fs.writeFileSync(identityDest, content, 'utf8');
406
+ }
407
+ // Copy global memory templates
408
+ for (const gf of ['decisions.md', 'lessons.md', 'patterns.md']) {
409
+ const dest = path.join(os.homedir(), '.bmad-plus', 'brain', gf);
410
+ if (!fs.existsSync(dest)) {
411
+ const src = path.join(templateDir, gf);
412
+ if (fs.existsSync(src)) {
413
+ let content = fs.readFileSync(src, 'utf8');
414
+ content = content.replace(/\{\{date\}\}/g, new Date().toISOString().slice(0, 10));
415
+ content = content.replace(/\{\{project_name\}\}/g, 'Global Brain');
416
+ fs.writeFileSync(dest, content, 'utf8');
417
+ }
418
+ }
419
+ }
420
+ clack.log.info(`🧠 ${i.brain_created || 'Global brain created'}: ${path.join(os.homedir(), '.bmad-plus', 'brain')}`);
421
+ }
422
+
423
+ // Index this project in global brain
424
+ const crypto = require('node:crypto');
425
+ const projHash = crypto.createHash('sha256').update(projectDir).digest('hex').slice(0, 8);
426
+ const projMeta = {
427
+ path: projectDir,
428
+ name: path.basename(projectDir),
429
+ hash: projHash,
430
+ status: 'active',
431
+ bmad_installed: true,
432
+ packs_installed: selectedPacks,
433
+ last_scanned: new Date().toISOString().slice(0, 10),
434
+ };
435
+ fsExtra.ensureDirSync(globalBrainDir);
436
+ fs.writeFileSync(
437
+ path.join(globalBrainDir, `${projHash}.yaml`),
438
+ Object.entries(projMeta).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join('\n'),
439
+ 'utf8'
440
+ );
441
+ }
333
442
  }
334
443
 
335
444
  // Copy module config
@@ -430,6 +539,14 @@ module.exports = {
430
539
  agentGuide.push(` ${(i.guide_shield || '🛡️ GRC Compliance').padEnd(28)} → "Shield, audit my SaaS for GDPR"`);
431
540
  }
432
541
 
542
+ if (selectedPacks.includes('memory')) {
543
+ agentGuide.push(` ${(i.guide_memory || '🧠 Memory Brain').padEnd(28)} → "Zecher, scan projects in [path]"`);
544
+ }
545
+
546
+ if (selectedPacks.includes('dev-studio')) {
547
+ agentGuide.push(` ${(i.guide_dev_studio || '🏗️ Dev Studio').padEnd(28)} → "Miriam, brainstorm my app idea"`);
548
+ }
549
+
433
550
  agentGuide.push(
434
551
  '',
435
552
  i.guide_workflow,
@@ -471,6 +588,20 @@ module.exports = {
471
588
  ` ${i.guide_example_shield_3 || '🛡️ GRC: "Shield, generate SOC 2 evidence checklist"'}`,
472
589
  );
473
590
  }
591
+ if (selectedPacks.includes('dev-studio')) {
592
+ examples.push(
593
+ ` ${i.guide_example_dev_studio_1 || '🏗️ Dev Studio: "Miriam, brainstorm a productivity app"'}`,
594
+ ` ${i.guide_example_dev_studio_2 || '🏗️ Dev Studio: "Bezalel, design the architecture"'}`,
595
+ ` ${i.guide_example_dev_studio_3 || '🏗️ Dev Studio: "Oholiab, implement story S1"'}`,
596
+ );
597
+ }
598
+ if (selectedPacks.includes('memory')) {
599
+ examples.push(
600
+ ` ${i.guide_example_memory_1 || '🧠 Memory: "Zecher, scan projects in D:\\travail\\DEV"'}`,
601
+ ` ${i.guide_example_memory_2 || '🧠 Memory: "Zecher, where were we?"'}`,
602
+ ` ${i.guide_example_memory_3 || '🧠 Memory: "Zecher, consolidate memory"'}`,
603
+ );
604
+ }
474
605
 
475
606
  if (examples.length > 0) {
476
607
  agentGuide.push(
@@ -520,6 +651,10 @@ function generateIDEConfig(userName, language, packs) {
520
651
  agents.push('- **Oholiab** (אהליאב) — Senior Engineer — TDD, sprint, code review, implementation');
521
652
  }
522
653
 
654
+ if (packs.includes('memory')) {
655
+ agents.push('- **Zecher** (זכר) — Memory Archivist — Consolidation, project scanning, context recall');
656
+ }
657
+
523
658
  return `# BMAD+ — AI Agent Configuration
524
659
 
525
660
  ## Project Context
package/tools/cli/i18n.js CHANGED
@@ -10,7 +10,7 @@ const LANGUAGES = {
10
10
  flag: '🇬🇧',
11
11
  name: 'English',
12
12
  locale: 'en',
13
- installer_title: ' BMAD+ Installer v0.6.0 ',
13
+ installer_title: ' BMAD+ Installer v0.7.0 ',
14
14
  select_language: 'Select your language',
15
15
  installing_to: 'Installing to',
16
16
  select_packs: 'Which packs to install? (Core is always included)',
@@ -82,7 +82,7 @@ const LANGUAGES = {
82
82
  flag: '🇫🇷',
83
83
  name: 'Français',
84
84
  locale: 'fr',
85
- installer_title: ' BMAD+ Installeur v0.6.0 ',
85
+ installer_title: ' BMAD+ Installeur v0.7.0 ',
86
86
  select_language: 'Choisissez votre langue',
87
87
  installing_to: 'Installation dans',
88
88
  select_packs: 'Quels packs installer ? (Core est toujours inclus)',
@@ -152,7 +152,7 @@ const LANGUAGES = {
152
152
  flag: '🇪🇸',
153
153
  name: 'Español',
154
154
  locale: 'es',
155
- installer_title: ' BMAD+ Instalador v0.6.0 ',
155
+ installer_title: ' BMAD+ Instalador v0.7.0 ',
156
156
  select_language: 'Seleccione su idioma',
157
157
  installing_to: 'Instalando en',
158
158
  select_packs: '¿Qué packs instalar? (Core siempre está incluido)',
@@ -222,7 +222,7 @@ const LANGUAGES = {
222
222
  flag: '🇩🇪',
223
223
  name: 'Deutsch',
224
224
  locale: 'de',
225
- installer_title: ' BMAD+ Installer v0.6.0 ',
225
+ installer_title: ' BMAD+ Installer v0.7.0 ',
226
226
  select_language: 'Wählen Sie Ihre Sprache',
227
227
  installing_to: 'Installiere in',
228
228
  select_packs: 'Welche Packs installieren? (Core ist immer enthalten)',
@@ -292,7 +292,7 @@ const LANGUAGES = {
292
292
  flag: '🇧🇷',
293
293
  name: 'Português (Brasil)',
294
294
  locale: 'pt-BR',
295
- installer_title: ' BMAD+ Instalador v0.6.0 ',
295
+ installer_title: ' BMAD+ Instalador v0.7.0 ',
296
296
  select_language: 'Selecione seu idioma',
297
297
  installing_to: 'Instalando em',
298
298
  select_packs: 'Quais packs instalar? (Core sempre está incluído)',
@@ -362,7 +362,7 @@ const LANGUAGES = {
362
362
  flag: '🇷🇺',
363
363
  name: 'Русский',
364
364
  locale: 'ru',
365
- installer_title: ' BMAD+ Установщик v0.6.0 ',
365
+ installer_title: ' BMAD+ Установщик v0.7.0 ',
366
366
  select_language: 'Выберите язык',
367
367
  installing_to: 'Установка в',
368
368
  select_packs: 'Какие пакеты установить? (Core всегда включён)',
@@ -432,7 +432,7 @@ const LANGUAGES = {
432
432
  flag: '🇨🇳',
433
433
  name: '中文 (简体)',
434
434
  locale: 'zh-CN',
435
- installer_title: ' BMAD+ 安装程序 v0.6.0 ',
435
+ installer_title: ' BMAD+ 安装程序 v0.7.0 ',
436
436
  select_language: '选择您的语言',
437
437
  installing_to: '安装到',
438
438
  select_packs: '安装哪些包?(Core 始终包含)',
@@ -502,7 +502,7 @@ const LANGUAGES = {
502
502
  flag: '🇮🇱',
503
503
  name: 'עברית',
504
504
  locale: 'he',
505
- installer_title: ' BMAD+ מתקין v0.6.0 ',
505
+ installer_title: ' BMAD+ מתקין v0.7.0 ',
506
506
  select_language: 'בחר את השפה שלך',
507
507
  installing_to: 'מתקין ב',
508
508
  select_packs: 'אילו חבילות להתקין? (Core תמיד כלול)',
@@ -572,7 +572,7 @@ const LANGUAGES = {
572
572
  flag: '🇯🇵',
573
573
  name: '日本語',
574
574
  locale: 'ja',
575
- installer_title: ' BMAD+ インストーラー v0.6.0 ',
575
+ installer_title: ' BMAD+ インストーラー v0.7.0 ',
576
576
  select_language: '言語を選択してください',
577
577
  installing_to: 'インストール先',
578
578
  select_packs: 'どのパックをインストールしますか?(Coreは常に含まれます)',
@@ -642,7 +642,7 @@ const LANGUAGES = {
642
642
  flag: '🇮🇹',
643
643
  name: 'Italiano',
644
644
  locale: 'it',
645
- installer_title: ' BMAD+ Installatore v0.6.0 ',
645
+ installer_title: ' BMAD+ Installatore v0.7.0 ',
646
646
  select_language: 'Seleziona la tua lingua',
647
647
  installing_to: 'Installazione in',
648
648
  select_packs: 'Quali pack installare? (Core è sempre incluso)',