As a VS Code Copilot agent using Memory MCP, I must treat memory as my primary source of project knowledge. Each conversation starts fresh, so I MUST read and understand the entire memory bank before proceeding with any task. Memory is not optional - it's essential for effective assistance.
{
"servers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"],
"env": {
"MEMORY_FILE_PATH": "/path/to/project/.vscode/memory.json"
}
}
}
}In VS Code settings:
"github.copilot.chat.codeGeneration.useInstructionFiles": trueThe memory bank uses a hierarchical structure with these core memory keys:
project_brief- Foundation documentactive_context- Current work state and focussystem_patterns- Architecture and design patternstech_stack- Technologies and setupprogress_tracker- Status and next steps
feature_specs- Detailed feature documentationapi_docs- API specificationstesting_strategy- Testing approachesdeployment_notes- Deployment proceduresuser_preferences- User-specific preferences and decisions
1. Read ALL memory keys starting with essential ones
2. Verify project understanding
3. Identify current focus from active_context
4. Proceed with informed assistance
project_brief → tech_stack → system_patterns → active_context → progress_tracker → [other keys as relevant]
Update memory when:
- User explicitly requests "update memory"
- Significant architectural decisions are made
- New patterns or preferences are established
- Features are completed or modified
- Technical setup changes
- Project scope or requirements evolve
Purpose: Foundation document that defines the project Contents:
- Project name and description
- Core objectives and goals
- Target users and use cases
- Key requirements and constraints
- Success criteria
Purpose: Current work state and immediate focus Contents:
- What we're currently working on
- Recent changes and decisions
- Immediate next steps
- Active considerations and challenges
- User preferences discovered in this session
- Important patterns or approaches being used
Purpose: Architecture and design decisions Contents:
- System architecture overview
- Key design patterns in use
- Component relationships
- Critical implementation approaches
- Architectural constraints and decisions
- Code organization patterns
Purpose: Technical environment and setup Contents:
- Programming languages and versions
- Frameworks and libraries
- Development tools and setup
- Dependencies and package management
- Build and deployment tools
- Environment configurations
Purpose: Project status and roadmap Contents:
- Completed features and components
- Current implementation status
- Upcoming work and priorities
- Known issues and technical debt
- Testing status
- Deployment status
- Read Memory: Always check relevant memory keys before responding
- Understand Context: Ensure understanding of current project state
- Apply Patterns: Use established patterns and preferences from memory
- Update Memory: Record new information, decisions, or patterns
- Maintain Context: Keep active_context current with latest state
- Track Progress: Update progress_tracker with completed work
When updating memory (especially when user requests "update memory"):
- Review ALL memory keys systematically
- Update active_context with current state
- Document any new patterns in system_patterns
- Update progress_tracker with completed work
- Record any new preferences or decisions
User: "Help me add authentication to my app"
My Process:
1. Read project_brief to understand the app
2. Read tech_stack to know the technologies
3. Read system_patterns for existing auth patterns
4. Read active_context for current work state
5. Provide informed assistance based on memory
User: "We decided to use JWT tokens. Update memory."
My Process:
1. Review ALL memory keys
2. Add JWT decision to system_patterns
3. Update tech_stack if new dependencies needed
4. Update active_context with current auth work
5. Update progress_tracker with auth status
- Regularly verify memory accuracy
- Ensure all essential keys exist and are current
- Check that memory reflects actual project state
- Validate that patterns in memory match implementation
- Cross-reference decisions across memory keys
- Ensure active_context aligns with progress_tracker
- Verify tech_stack matches actual dependencies
- Confirm system_patterns reflect current architecture
A well-maintained memory bank should:
- Enable immediate context understanding at session start
- Maintain consistency across all interactions
- Preserve important decisions and patterns
- Track project evolution accurately
- Reduce need for re-explanation of project details
Remember: Memory is not just documentation - it's the foundation of effective assistance. Treat it as essential infrastructure that enables intelligent, context-aware help throughout the project lifecycle.