I need you to thoroughly analyze my codebase and create a comprehensive Memory Bank following Cline's structure. This Memory Bank is CRITICAL - it's the ONLY way Cline can understand the project after memory resets.
Before writing any documentation, spend time understanding:
- Project architecture and organization
- Core technologies and frameworks
- Key design patterns and programming paradigms
- Business domain and purpose
- API structures and data flows
- State management approaches
- UI/UX patterns and user flows
Think step-by-step through the codebase:
- Identify entry points
- Trace execution paths
- Examine file organization
- Note naming conventions
- Understand data structures
- Identify component relationships
Generate these core files in Markdown format:
# Project Brief: [Project Name]
## Overview
[Concise 2-3 sentence description]
## Core Requirements
- [Requirement 1]
- [Requirement 2]
...
## Project Scope
- [Include/Exclude 1]
- [Include/Exclude 2]
...
## Success Criteria
- [Criterion 1]
- [Criterion 2]
...
## Timeline
[If apparent from codebase]
# Product Context
## Problem Statement
[Define the core problems this project solves]
## User Personas
[Derive from codebase - who uses this?]
## Key User Flows
[Describe 3-5 primary user journeys]
## Business Rules
[Document critical business logic]
## User Experience Goals
[What experience should users have?]
# System Patterns
## Architecture Overview
[Text-based architecture diagram]
```mermaid
[Include architectural diagram]
[Describe major components and their relationships]
[List and explain key patterns used]
[Describe how data moves through the system]
[Explain state management approach]
[Document error handling strategies]
### 4. techContext.md
```markdown
# Technical Context
## Technology Stack
- Languages: [List with versions]
- Frameworks: [List with versions]
- Libraries: [List key libraries]
## Environment Setup
[Document development environment requirements]
## External Dependencies
[List APIs, services, and integrations]
## Database Structure
[Document data models and relationships]
## Build & Deployment
[Describe the build pipeline and deployment process]
# Active Context
## Current Focus
[Identify active development areas]
## Recent Changes
[Document recent updates and their purpose]
## In-Progress Work
[List features currently being implemented]
## Next Steps
[Identify logical next development tasks]
## Active Decisions
[Document ongoing technical decisions]
# Project Progress
## Completed Features
- [Feature 1]: [Brief description]
- [Feature 2]: [Brief description]
...
## Pending Implementation
- [Task 1]: [Priority & description]
- [Task 2]: [Priority & description]
...
## Known Issues
- [Issue 1]: [Severity & description]
- [Issue 2]: [Severity & description]
...
## Test Coverage
[Assess current test coverage]
## Performance Status
[Note any performance considerations]
# Project Intelligence
## Coding Standards
[Document project-specific standards]
## Naming Conventions
[Document pattern for variables, functions, classes, etc.]
## File Organization
[Document project structure patterns]
## Implementation Patterns
[Document common approaches to recurring problems]
## Critical Paths
[Identify key execution paths]
## Project Preferences
[Note evident preferences in implementation style]
After creating each file, ask yourself:
- Is this comprehensive enough for someone with NO prior context?
- Have I captured both explicit and implicit patterns?
- Is the documentation clear, concise, and accurate?
- Have I used examples where appropriate?
- Have I noted areas where more information is needed?
For each file:
- Use the exact filename as header (e.g., "# projectbrief.md")
- Provide complete markdown content following templates above
- Include a brief explanation of your analysis process
- Indicate any assumptions made or areas needing clarification
- Be thorough but concise - these files will be read at the start of EVERY session
- Include specific examples from the codebase to illustrate patterns
- Create visual diagrams using mermaid syntax where appropriate
- Label any uncertain information as "Needs clarification: [specific question]"
- Focus on capturing unwritten assumptions that would be crucial for a developer
- For activeContext.md, prioritize recent changes based on file timestamps or git history
The Memory Bank's quality directly impacts Cline's effectiveness - it must contain all context needed to continue development with no additional information.