BMAD-METHOD/docs/memory-architecture/ide-memory-activation-guide.md

14 KiB

BMAD Method Memory Enhancement: IDE Activation Guide

The Core Integration Challenge

IDEs and AI environments (Claude Code, Cursor AI, V0, etc.) don't inherently know about the BMAD Method Memory Enhancement. We need to instruct them to use it through:

  1. BMAD System Prompts - Initial instructions that activate BMAD memory behavior
  2. BMAD Conversation Primers - Opening messages that establish BMAD methodology context
  3. BMAD Embedded Instructions - Memory commands built into the BMAD workflow
  4. BMAD File-Based Instructions - BMAD instructions stored in project files

BMAD Activation Methods by Environment

Method 1: BMAD Conversation-Based Activation (Universal)

Works in: Claude Code, ChatGPT, V0, any AI chat interface

Implementation: Start every conversation with a BMAD memory activation prompt

# Universal BMAD Memory Activation Prompt

BMAD METHOD MEMORY ENHANCEMENT ACTIVATION

You are now equipped with the BMAD methodology enhanced with intelligent memory. Follow these instructions:

CORE BMAD MEMORY BEHAVIOR:
1. Automatically create memories when you detect these BMAD methodology patterns:
   - "Remember this BMAD approach: [content]"  SEMANTIC memory
   - "I've decided on this BMAD methodology: [content]"  DECISION memory  
   - "The BMAD solution is: [content]"  SOLUTION memory
   - "I learned this BMAD pattern: [content]"  LEARNING memory

2. Respond to these BMAD commands:
   - /bmad-remember [content] [type] [importance]  Create BMAD memory
   - /bmad-recall [query]  Search BMAD memories
   - /bmad-memories [filter]  List BMAD memories
   - /bmad-status  Show BMAD memory statistics

3. BMAD memory storage format:

MEMORY_ID: bmad_mem_[timestamp]_[type] TYPE: [WORKING|DECISION|SOLUTION|LEARNING|PATTERN] CONTENT: [BMAD methodology memory content] IMPORTANCE: [0.1-1.0] TAGS: [relevant BMAD methodology tags] CREATED: [timestamp]


4. Maintain BMAD methodology context throughout conversation
5. Reference relevant BMAD memories in responses
6. Create new BMAD memories from methodology insights gained

CURRENT BMAD MEMORY STATE: Empty (new session)
BMAD PROJECT CONTEXT: [to be determined]

Confirm BMAD Method activation and ask for project context.

Usage Example:

User: [Pastes BMAD activation prompt]

AI: "BMAD Method Memory Enhancement activated successfully!

Current BMAD memory state:
- Total BMAD memories: 0
- Active BMAD session started: 2024-01-15 10:30 AM
- BMAD memory storage: Ready
- BMAD command interface: Active

What BMAD methodology project are we working on? I'll create a project context memory to get started."

User: "We're building a component library using BMAD methodology"

AI: "Remember this BMAD approach: Building component library with BMAD methodology

[AUTO-CREATED] bmad_mem_20240115_001: SEMANTIC
CONTENT: Project is component library using BMAD methodology
IMPORTANCE: 0.8
TAGS: bmad, methodology, component-library, architecture
CREATED: 2024-01-15T10:30:00Z

BMAD project context established. How can I help with your component library using BMAD methodology?"

Method 2: BMAD File-Based Instructions (IDE Integration)

Works in: Cursor AI, VS Code with AI extensions, JetBrains with AI

Implementation: Create BMAD instruction files in your project

# .bmad-memory/instructions.md

# BMAD Method Memory Enhancement Instructions for AI

When working in this project, you MUST follow these BMAD memory management protocols:

## Automatic BMAD Memory Creation
- Create DECISION memories for BMAD methodology choices
- Create SOLUTION memories for BMAD methodology problem resolutions  
- Create PATTERN memories for reusable BMAD methodology approaches
- Create WORKING memories for current BMAD session context

## BMAD Memory Commands
Always respond to these BMAD commands:
- /bmad-remember [content] [type] [importance]
- /bmad-recall [query] [type] [limit]
- /bmad-memories [filter]
- /bmad-status

## BMAD Memory Storage Location
Store BMAD memories in: .bmad-memory/storage/[type]/

## BMAD Project Context
- Project: Component Library
- BMAD Methodology: Component-based architecture
- BMAD Approach: Atomic design system

## Current BMAD Memory Index
[This section gets updated as BMAD memories are created]

IMPORTANT: Load existing BMAD memories from .bmad-memory/storage/ at session start

Cursor AI + BMAD Integration:

# .cursor/instructions.md

# Cursor AI + BMAD Method Memory Integration

You are working with the BMAD Method Memory Enhancement. 

BMAD STARTUP SEQUENCE:
1. Check for .bmad-memory/instructions.md and follow those instructions
2. Load existing BMAD memories from .bmad-memory/storage/
3. Create BMAD working memory for current session
4. Reference relevant BMAD memories in code suggestions

BMAD MEMORY-ENHANCED CODING:
- Before suggesting code, check for relevant BMAD patterns in memory
- After solving problems, create BMAD solution memories
- When making architecture decisions, create BMAD decision memories
- Reference previous BMAD solutions when encountering similar problems

BMAD MEMORY COMMANDS:
Respond to /bmad-remember, /bmad-recall, /bmad-memories commands in chat

EXAMPLE BMAD WORKFLOW:
User: "Help me implement component composition using BMAD methodology"
You: "/bmad-recall 'component composition' 
Found: bmad_mem_005 - BMAD component composition pattern
Based on previous BMAD memory, I'll implement component composition using the established BMAD pattern..."

Method 3: BMAD Custom System Prompts (Advanced IDEs)

Works in: Cursor AI, Claude Code (with custom instructions), Advanced AI IDEs

Implementation: Set up persistent BMAD system instructions

# Cursor AI System Prompt Configuration for BMAD Method

Add to Cursor AI settings:

{
  "systemPrompt": "You are equipped with the BMAD Method Memory Enhancement. Always:\n1. Check for .bmad-memory/ folder and load existing BMAD memories\n2. Create memories for BMAD decisions, solutions, and patterns\n3. Respond to /bmad-remember, /bmad-recall, /bmad-memories commands\n4. Reference relevant BMAD memories in responses\n5. Maintain BMAD methodology context across conversations\n\nBMAD Memory format: ID|TYPE|CONTENT|IMPORTANCE|TAGS|CREATED"
}

Claude Code Custom Instructions for BMAD:

# Add to Claude Code custom instructions:

I work with the BMAD Method that includes a memory enhancement system to remember our conversations and decisions. I automatically:
- Create memories when you say "Remember this BMAD approach:", "I've decided on this BMAD methodology:", "The BMAD solution is:"
- Respond to commands like /bmad-remember, /bmad-recall, /bmad-memories
- Reference previous BMAD memories in my responses
- Build up knowledge about your BMAD methodology over time

I store BMAD memories in a simple format and can export them for you.

Method 4: BMAD Project Template Integration

Works in: Any IDE with project templates

Implementation: Create project templates with BMAD memory enhancement pre-configured

# Create BMAD-enabled project template

mkdir bmad-project-template
cd bmad-project-template

# Create BMAD memory system structure
mkdir -p .bmad-memory/{storage/{working,decision,solution,learning,pattern},config,logs}

# Create BMAD activation script
cat > .bmad-memory/activate.md << 'EOF'
# BMAD Method Memory Enhancement Activation

Copy and paste this into your AI conversation to activate BMAD memory:

---
BMAD METHOD MEMORY ENHANCEMENT ACTIVATED

Project: [PROJECT_NAME]
BMAD Methodology: [METHODOLOGY_APPROACH]
BMAD Memory Storage: .bmad-memory/storage/

I will now:
1. Create memories for BMAD decisions, solutions, and patterns
2. Respond to /bmad-remember, /bmad-recall, /bmad-memories commands  
3. Reference relevant BMAD memories in responses
4. Load existing BMAD memories from storage folder

/bmad-status
Ready for memory-enhanced BMAD methodology development!
---
EOF

# Create README with BMAD instructions
cat > README.md << 'EOF'
# BMAD Method-Enabled Project

This project includes the BMAD Method Memory Enhancement for AI-enhanced development.

## Quick Start
1. Open .bmad-memory/activate.md
2. Copy the BMAD activation prompt
3. Paste into your AI conversation
4. Start developing with memory-enhanced BMAD methodology

## BMAD Memory Commands
- /bmad-remember [content] [type] [importance] - Create BMAD memory
- /bmad-recall [query] - Search BMAD memories
- /bmad-memories - List all BMAD memories
- /bmad-status - Show BMAD memory statistics
EOF

Method 5: BMAD Browser Extension (Advanced)

Works in: Web-based AI interfaces (Claude.ai, ChatGPT, V0)

Implementation: Browser extension that automatically injects BMAD memory instructions

// bmad-memory-extension.js
// Browser extension that auto-activates BMAD memory enhancement

function injectBMADMemorySystem() {
    const activationPrompt = `
    BMAD METHOD MEMORY ENHANCEMENT AUTO-ACTIVATED
    
    I now have BMAD memory capabilities enabled. I will:
    - Create memories automatically from BMAD methodology patterns
    - Respond to /bmad-remember, /bmad-recall, /bmad-memories commands
    - Reference relevant BMAD memories in responses
    - Maintain BMAD methodology context across conversations
    
    BMAD Method memory enhancement ready. How can I help you today?
    `;
    
    // Auto-inject into conversation
    const chatInput = document.querySelector('[data-testid="chat-input"]');
    if (chatInput && !sessionStorage.getItem('bmad-activated')) {
        chatInput.value = activationPrompt;
        sessionStorage.setItem('bmad-activated', 'true');
    }
}

// Run when page loads
window.addEventListener('load', injectBMADMemorySystem);

Environment-Specific BMAD Implementation

Claude Code + BMAD Implementation

# Claude Code + BMAD Method Memory Setup

STEP 1: Create BMAD project memory folder
mkdir .bmad-memory

STEP 2: Start conversation with BMAD activation prompt
"BMAD Method Memory Enhancement activation for Claude Code:

I will maintain BMAD memories in .bmad-memory/ folder and respond to BMAD memory commands.
BMAD Project context: [describe your project]
Ready to begin memory-enhanced BMAD methodology development."

STEP 3: Test BMAD memory system
/bmad-remember "Using BMAD Method with Claude Code for React development" WORKING 0.6
/bmad-status

STEP 4: Use throughout BMAD development
- Automatic BMAD memory creation from conversation
- Manual BMAD memory commands as needed
- Reference BMAD memories in responses

V0 + BMAD Implementation

# V0 + BMAD Method Memory Setup

STEP 1: Activate BMAD memory in V0 conversation
"Enable BMAD Method Memory Enhancement for component generation:

I will remember:
- BMAD design preferences and patterns
- BMAD component structures that work well
- BMAD user feedback and iterations
- Successful BMAD design approaches

Ready to create memory-enhanced BMAD components."

STEP 2: Build BMAD memory through usage
/bmad-remember "BMAD recommends Tailwind CSS with custom color palette" PATTERN 0.8
/bmad-remember "BMAD components should be responsive and accessible" DECISION 0.9

STEP 3: Reference in BMAD component generation
"Based on your previous BMAD preferences (bmad_mem_001: Tailwind with custom colors), 
I'll create a responsive component with your established BMAD design patterns."

Cursor AI + BMAD Implementation

# Cursor AI + BMAD Method Memory Setup

STEP 1: Add to .cursor/instructions.md
"Use BMAD Method Memory Enhancement:
- Load BMAD memories from .bmad-memory/storage/
- Create memories for BMAD decisions and solutions
- Respond to /bmad-remember, /bmad-recall commands
- Reference BMAD memories in code suggestions"

STEP 2: Create BMAD memory structure
mkdir -p .bmad-memory/storage/{working,decision,solution,pattern}

STEP 3: Test BMAD integration
Open Cursor AI chat and type:
/bmad-status
/bmad-remember "BMAD Method recommends TypeScript with strict mode" DECISION 0.8

STEP 4: Use in BMAD development
- AI references BMAD memories when suggesting code
- Automatic BMAD memory creation from conversations
- Memory-enhanced BMAD code completion

Troubleshooting BMAD Memory Activation

Issue: BMAD memory commands not working

Solution:

Re-activate with explicit BMAD instructions:

"You MUST respond to these exact BMAD commands:
- When I type /bmad-remember [content], create a BMAD memory
- When I type /bmad-recall [query], search BMAD memories  
- When I type /bmad-memories, list all BMAD memories
- When I type /bmad-status, show BMAD memory statistics

Confirm you understand these BMAD commands."

Issue: BMAD memories not persisting across sessions

Solution:

Add BMAD persistence instructions:

"At the end of each conversation, export BMAD memories to .bmad-memory/session-[date].txt
At the start of each conversation, load BMAD memories from .bmad-memory/
Maintain BMAD memory continuity across sessions."

Issue: BMAD automatic memory creation not working

Solution:

Reinforce BMAD automatic triggers:

"You MUST automatically create BMAD memories when I say:
- 'Remember this BMAD approach: [content]'  Create SEMANTIC memory
- 'I've decided on this BMAD methodology: [content]'  Create DECISION memory
- 'The BMAD solution is: [content]'  Create SOLUTION memory

Confirm you will watch for these exact BMAD phrases."

BMAD Memory Enhancement Best Practices

1. Start Every BMAD Session with Activation

Always begin AI conversations with BMAD memory activation prompt

2. Test BMAD Memory System Immediately

Run /bmad-status and /bmad-remember test after activation

3. Use Consistent BMAD Terminology

Stick to established BMAD memory types and command formats

4. Create BMAD Project Context Early

Establish project context with initial BMAD memory

5. Export BMAD Memories Regularly

Use /bmad-export to save BMAD memories for future sessions

6. Validate BMAD Memory Behavior

Periodically check that BMAD memories are being created and referenced

This guide ensures you can activate BMAD Method Memory Enhancement in any AI environment and start benefiting from persistent, intelligent memory immediately!