How vanzan01/cursor-memory-bank works
Project Type and Purpose
• This is a document-centric, AI-powered “Memory Bank” personal task management system tailored as a set of Cursor custom modes and hierarchical rule files.
• It is not a traditional code service or microservice setup but a structured repository of Markdown-based rules, mode instructions, and templates that work inside the Cursor editor to guide you through development phases.
Main Architectural Components
a. Memory Bank Core
• Orchestrator of the entire system. Loads rules, manages state, and drives mode transitions.
b. Custom Modes (Phases)
• 🔍 VAN (Initialization)
• 📋 PLAN (Task Planning)
• 🎨 CREATIVE (Design Decisions)
• ⚒️ IMPLEMENT (Code Implementation)
• 🔍 REFLECT (Review)
• 📚 ARCHIVE (Documentation)
c. Hierarchical Rule Loader
• .cursor/rules/isolation_rules/ directory:
• Core rules
• Level1–Level4 workflows for complexity tiers
• Phase-specific rules and visual map modules
d. Memory Bank State Store
• Markdown files in root (e.g., tasks.md, activeContext.md, progress.md, creative-*.md, reflect-*.md) that persist the current context, decisions, and progress.
e. Visual Process Maps
f. Token Optimization Module
• Lazy-loading logic embedded in rule files to minimize AI prompt tokens.
Component Interactions and Data Flows
• The user invokes a mode in Cursor → Memory Bank Core loads the minimal rule set for that mode from the Hierarchical Rule Loader → Mode logic reads/writes Memory Bank State Store files → If requested, Visual Process Maps are rendered to guide the user → QA functions can be called at any point to validate code/design → Transitions to next mode follow the defined VAN→PLAN→…→ARCHIVE sequence based on task complexity.
Architectural Patterns and Principles
• Hierarchical Rule Loading: Layered directories of rules loaded on demand (Core → Level → Phase → Visual Map).
• Modular Custom Modes: Each mode is a self-contained module with clear inputs (state files, rules) and outputs (updates to state, new docs).
• Lazy Loading & Token Efficiency: Only load what’s necessary for each mode or complexity level.
• State Persistence: All runtime context is persisted in Markdown files, enabling deterministic transitions and easy backtracking.
Technologies & Artifacts
• Cursor Editor Custom Modes (no external services)
• Markdown for rules and state storage
• Git for versioning (README, RELEASE_NOTES, optimization docs)