Skip to content

Commit 32615af

Browse files
Brian MadisonBrian Madison
authored andcommitted
memory location is non configurable _bmad/_memory for sidecar content
1 parent 59e4cc7 commit 32615af

File tree

18 files changed

+204
-169
lines changed

18 files changed

+204
-169
lines changed

docs/custom-content-installation.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ The sidecar folder location is configured during BMAD core installation:
159159

160160
1. **Agent Declaration**: Agents declare `hasSidecar: true` in their metadata
161161
2. **Sidecar Detection**: The installer automatically detects folders with "sidecar" in the name
162-
3. **Installation**: Sidecar content is copied to the configured location
163-
4. **Path Replacement**: The `{bmad_memory}` placeholder in agent configurations is replaced with the actual path to the installed instance of the sidecar folder. Now when you use the agent, depending on its design, will use the content in sidecar to record interactions, remember things you tell it, or serve a host of many other issues.
162+
3. **Installation**: Sidecar content is always copied to the destination install \_bmad/\_memory folder.
164163

165164
### Example Structure
166165

@@ -231,8 +230,8 @@ Custom content can be distributed:
231230
### Sidecar Issues
232231
233232
- Ensure the agent has `hasSidecar: true` in metadata
234-
- Check that sidecar folders contain "sidecar" in the name
235-
- Verify the bmad_memory configuration
233+
- Check that sidecar folders contain "-sidecar" in the name
234+
- Verify the folder on install got cloned to \_bmad/\_memory
236235
- Ensure the custom agent has proper language in it to actually use the sidecar content, including loading memories on agent load.
237236
238237
## Support

src/core/module.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,3 @@ output_folder:
2323
prompt: "Where should default output files be saved unless specified in other modules?"
2424
default: "_bmad-output"
2525
result: "{project-root}/{value}"
26-
27-
bmad_memory:
28-
prompt: "Some agents will record their own memories and history. Where should these be stored?"
29-
default: "_bmad/_memory"
30-
result: "{project-root}/{value}"

src/modules/bmb/docs/agents/agent-menu-patterns.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ exec: "../../../core/tasks/validate.xml"
375375

376376
- `{project-root}` - Project root directory
377377
- `_bmad` - BMAD installation folder
378-
- `{bmad_memory}` - Agent installation directory (Expert agents)
379378
- `{output_folder}` - Document output location
380379
- `{user_name}` - User's name from config
381380
- `{communication_language}` - Language preference

src/modules/bmb/docs/agents/expert-agent-architecture.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,6 @@ critical_actions:
204204
- **Memory integration** - Past context becomes part of current session
205205
- **Protocol adherence** - Ensures consistent behavior
206206
207-
### {bmad_memory} Variable
208-
209-
Special variable resolved during installation:
210-
211-
- Points to the agent's installation directory
212-
- Used to reference sidecar files
213-
- Example: `_bmad/custom/agents/journal-keeper/`
214-
215207
## What Gets Injected at Compile Time
216208
217209
Same as simple agents, PLUS:
@@ -320,12 +312,11 @@ critical_actions:
320312
## Best Practices
321313
322314
1. **Load sidecar files in critical_actions** - Must be explicit and MANDATORY
323-
2. **Enforce domain restrictions** - Clear boundaries prevent scope creep
324-
3. **Use {bmad_memory} paths** - Portable across installations
325-
4. **Design for memory growth** - Structure sidecar files for accumulation
326-
5. **Reference past naturally** - Don't dump memory, weave it into conversation
327-
6. **Separate concerns** - Memories, instructions, knowledge in distinct files
328-
7. **Include privacy features** - Users trust expert agents with personal data
315+
2. **Enforce domain restrictions** - Clear boundaries prevent scope creep=
316+
3. **Design for memory growth** - Structure sidecar files for accumulation
317+
4. **Reference past naturally** - Don't dump memory, weave it into conversation
318+
5. **Separate concerns** - Memories, instructions, knowledge in distinct files
319+
6. **Include privacy features** - Users trust expert agents with personal data
329320
330321
## Common Patterns
331322
@@ -364,8 +355,8 @@ identity: |
364355
- [ ] Sidecar folder structure created and populated
365356
- [ ] memories.md has clear section structure
366357
- [ ] instructions.md contains core directives
367-
- [ ] Menu actions reference {bmad_memory} correctly
368-
- [ ] File paths use {bmad_memory} variable
358+
- [ ] Menu actions reference \_bmad/\_memory correctly
359+
- [ ] File paths use \_bmad/\_memory/[agentname]-sidecar/ to reference sidecar content
369360
- [ ] Install config personalizes sidecar references
370361
- [ ] Agent folder named consistently: `{agent-name}/`
371362
- [ ] YAML file named: `{agent-name}.agent.yaml`

src/modules/bmb/module.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ default_selected: false # This module will not be selected by default for new in
99
## communication_language
1010
## document_output_language
1111
## output_folder
12-
## bmad_memory
1312

1413
bmb_creations_output_folder:
1514
prompt: "Where should BoMB generated agents, workflows and modules SOURCE be saved?"

src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ agent:
2020
- Reflection transforms experience into wisdom
2121

2222
critical_actions:
23-
- "Load COMPLETE file {bmad_memory}/journal-keeper-sidecar/memories.md and remember all past insights"
24-
- "Load COMPLETE file {bmad_memory}/journal-keeper-sidecar/instructions.md and follow ALL journaling protocols"
25-
- "ONLY read/write files in {bmad_memory}/journal-keeper-sidecar/ - this is our private space"
23+
- "Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md and remember all past insights"
24+
- "Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/instructions.md and follow ALL journaling protocols"
25+
- "ONLY read/write files in {project-root}/_bmad/_memory/journal-keeper-sidecar/ - this is our private space"
2626
- "Track mood patterns, recurring themes, and breakthrough moments"
2727
- "Reference past entries naturally to show continuity"
2828

@@ -120,7 +120,7 @@ agent:
120120
description: "Write today's journal entry"
121121

122122
- trigger: quick
123-
action: "Save a quick, unstructured entry to {bmad_memory}/journal-keeper-sidecar/entries/entry-{date}.md with timestamp and any patterns noticed"
123+
action: "Save a quick, unstructured entry to {project-root}/_bmad/_memory/journal-keeper-sidecar/entries/entry-{date}.md with timestamp and any patterns noticed"
124124
description: "Quick capture without prompts"
125125

126126
- trigger: mood
@@ -140,13 +140,13 @@ agent:
140140
description: "Reflect on the past week"
141141

142142
- trigger: insight
143-
action: "Document this breakthrough in {bmad_memory}/journal-keeper-sidecar/breakthroughs.md with date and significance"
143+
action: "Document this breakthrough in {project-root}/_bmad/_memory/journal-keeper-sidecar/breakthroughs.md with date and significance"
144144
description: "Record a meaningful insight"
145145

146146
- trigger: read-back
147-
action: "Load and share entries from {bmad_memory}/journal-keeper-sidecar/entries/ for requested timeframe, highlighting themes and growth"
147+
action: "Load and share entries from {project-root}/_bmad/_memory/journal-keeper-sidecar/entries/ for requested timeframe, highlighting themes and growth"
148148
description: "Review past entries"
149149

150150
- trigger: save
151-
action: "Update {bmad_memory}/journal-keeper-sidecar/memories.md with today's session insights and emotional markers"
151+
action: "Update {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md with today's session insights and emotional markers"
152152
description: "Save what we discussed today"

src/modules/bmb/workflows/create-agent/templates/expert-agent.template.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,6 @@ critical_actions:
204204
- **Memory integration** - Past context becomes part of current session
205205
- **Protocol adherence** - Ensures consistent behavior
206206
207-
### {bmad_memory} Variable
208-
209-
Special variable resolved during installation:
210-
211-
- Points to the agent's installation directory
212-
- Used to reference sidecar files
213-
- Example: `_bmad/custom/agents/journal-keeper/`
214-
215207
## What Gets Injected at Compile Time
216208
217209
Same as simple agents, PLUS:
@@ -321,7 +313,7 @@ critical_actions:
321313
322314
1. **Load sidecar files in critical_actions** - Must be explicit and MANDATORY
323315
2. **Enforce domain restrictions** - Clear boundaries prevent scope creep
324-
3. **Use {bmad_memory} paths** - Portable across installations
316+
3. **Use \_bmad/\_memory/[agentname]-sidcar/ paths** - For reference to any sidecar content
325317
4. **Design for memory growth** - Structure sidecar files for accumulation
326318
5. **Reference past naturally** - Don't dump memory, weave it into conversation
327319
6. **Separate concerns** - Memories, instructions, knowledge in distinct files
@@ -364,8 +356,8 @@ identity: |
364356
- [ ] Sidecar folder structure created and populated
365357
- [ ] memories.md has clear section structure
366358
- [ ] instructions.md contains core directives
367-
- [ ] Menu actions reference {bmad_memory} correctly
368-
- [ ] File paths use {bmad_memory} variable
359+
- [ ] Menu actions reference \_bmad/\_memory/[agentname]-sidcar/ correctly if needing sidecar content reference
360+
- [ ] File paths use \_bmad/\_memory/[agentname]-sidcar/ to reference where the file will be after sidecar content is installed
369361
- [ ] Install config personalizes sidecar references
370362
- [ ] Agent folder named consistently: `{agent-name}/`
371363
- [ ] YAML file named: `{agent-name}.agent.yaml`

src/modules/bmb/workflows/create-agent/workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This uses **step-file architecture** for disciplined execution:
5151

5252
Load and read full config from `{project-root}/_bmad/bmb/config.yaml`:
5353

54-
- `project_name`, `user_name`, `bmad_memory`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
54+
- `project_name`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
5555

5656
### 2. First Step EXECUTION
5757

src/modules/bmb/workflows/create-module/templates/agent.template.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ agent:
2727

2828
# Optional: Only include if agent needs memory/persistence
2929
critical_actions:
30-
- 'Load COMPLETE file [bmad_memory]/[agent-name]-sidecar/memories.md and integrate all past interactions'
31-
- 'Load COMPLETE file [bmad_memory]/[agent-name]-sidecar/instructions.md and follow ALL protocols'
32-
- 'ONLY read/write files in [bmad_memory]/[agent-name]-sidecar/* - this is our private workspace'
30+
- 'Load COMPLETE file [project-root]/_bmad/_memory/[agent-name]-sidecar/memories.md and integrate all past interactions'
31+
- 'Load COMPLETE file [project-root]/_bmad/_memory/[agent-name]-sidecar/instructions.md and follow ALL protocols'
3332

3433
# Optional: Embedded prompts for common interactions
3534
prompts:
@@ -167,16 +166,15 @@ Expert agents support three types of menu actions:
167166

168167
1. **File Paths**:
169168
- Agent files go in: `[bmb_creations_output_folder]/[module_name]/agents/[agent-name]/[agent-name].yaml`
170-
- Sidecar folders go in: `[bmb_creations_output_folder]/[module_name]/agents/[agent-name]/[agent-name]-sidecar/`
169+
- Sidecar files go in folder: `[bmb_creations_output_folder]/[module_name]/agents/[agent-name]/[agent-name]-sidecar/`
171170

172171
2. **Variable Usage**:
173-
- `bmad_memory` resolves to the agents sidecar folder destination after installation
174172
- `module` is your module code/name
175173

176174
3. **Creating Sidecar Structure**:
177175
- When agent is created, also create the sidecar folder
178-
- Initialize with empty files: memories.md, instructions.md
179-
- Create sessions/ subfolder
176+
- Initialize with empty files: memories.md, instructions.md and any other files the agent will need to have special knowledge or files to record information to
177+
- Create sessions/ subfolder if interactions will result in new sessions
180178
- These files are automatically loaded due to critical_actions
181179

182180
4. **Choosing Menu Actions**:

src/modules/bmgd/module.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ default_selected: false
99
## communication_language
1010
## document_output_language
1111
## output_folder
12-
## bmad_memory
1312

1413
game_project_name:
1514
prompt: "What is the name of your game project?"

0 commit comments

Comments
 (0)