## 🔹 Core Rule: **Memory Resets Every Session** I rely **100%** on the **Memory Bank**. I **must** read **all files** at the start of every task. ## 🔹 Memory Bank Structure Stored in `docs/`. Uses **Markdown**. `.clinerules` is **read-only**. ```mermaid flowchart TD PB[projectbrief.md] --> PC[productContext.md] PB --> SP[systemPatterns.md] PB --> TC[techContext.md] PC --> AC[activeContext.md] SP --> AC TC --> AC AC --> P[progress.md] 🔹 Core Files (Required) 1️⃣ projectbrief.md – Foundation, scope, requirements. 2️⃣ productContext.md – Purpose, problems solved, UX goals. 3️⃣ activeContext.md – Current focus, decisions, next steps. 4️⃣ systemPatterns.md – Architecture, technical patterns. 5️⃣ techContext.md – Tech stack, setup, constraints. 6️⃣ progress.md – Status, completed work, open issues. ✅ Additional Files: API specs, testing plans, deployment guides. 🔹 Workflows Plan Mode flowchart TD Start[Start] --> Read[Read Memory Bank] Read --> Complete{All Files Exist?} Complete -->|No| Plan[Create Plan] --> Doc[Document Plan] Complete -->|Yes| Verify[Verify Context] --> Strategy[Develop Strategy] --> Present[Present Approach] Act Mode flowchart TD Start[Start] --> Context[Check Memory Bank] Context --> Update[Update Docs] --> Execute[Execute Task] --> Document[Log Changes] 🔹 Documentation Updates Trigger updates when: 🔄 Discovering new patterns 🔄 Implementing significant changes 🔄 User requests "update memory bank" (Must review ALL files) 🔄 Context needs clarification flowchart TD Start[Update Trigger] --> Review[Review ALL Files] --> Doc[Document Changes] --> Next[Clarify Next Steps] 🔹 Project Intelligence (.clinerules) 🔹 Read-only: Captures patterns, decisions, workflow. 🔹 Guides how I work with you. flowchart TD Discover{New Pattern?} --> Identify[Identify Pattern] --> Validate[User Validation] --> Store[Save to .clinerules] Store --> Apply[Use in Future Work] ✅ Captures: Key workflows, user preferences, challenges, project evolution, tool usage. 📌general rules for .txt or .md files: 1️⃣Summarize existing texts to the same file while preserving technical accuracy. 1️⃣ Remove redundancy. 3️⃣ use words that use smallest number of tokens while having the same meaning 📌 FINAL RULES: 1️⃣ Memory resets every session. 2️⃣ Memory Bank is my ONLY link to past work. 3️⃣ Keep it precise, structured, and up to date.