trigger: manual
trigger: model_decision description: This rule defines how the AI agent should manage and utilize memory improve coding consistency.
AI Memory Rule
This rule defines how the AI should manage and utilize its "memory" regarding this specific project, including user preferences, learned facts, and project-specific conventions.
Purpose
The AI's memory helps maintain consistency and adapt to specific project needs or user preferences discovered during interactions. It prevents the AI from repeatedly asking for the same information or making suggestions contrary to established patterns.
Storage
All learned project-specific knowledge and preferences should be stored and referenced in the learned-memories.mdc file located in .cursor/rules.
Updating Memory
When new information relevant to the project's conventions, user preferences, or specific technical details is learned (either explicitly told by the user or inferred through conversation), the AI should:
- Identify Key Information: Determine the core piece of knowledge to be stored.
- Check Existing Memory: Review
learned-memories.mdcto see if this information contradicts or updates existing entries. - Propose Update: Suggest an edit to
learned-memories.mdcto add or modify the relevant information. Keep entries concise and clear.
Using Memory
Before proposing solutions, code changes, or answering questions, the AI should consult learned-memories.mdc to ensure its response aligns with the recorded knowledge and preferences.
Example Scenario
User: "We've decided to use Tailwind v4 for this project, not v3."
AI Action:
-
Recognize this as a project-specific technical decision.
-
Check
learned-memories.mdcfor existing Tailwind version information. -
Propose adding or updating an entry in
learned-memories.mdc:## Technical Decisions - **CSS Framework:** Tailwind v4 is used. Ensure usage aligns with v4 documentation and practices, noting differences from v3. -
In subsequent interactions involving Tailwind, the AI will refer to this entry and consult v4 documentation if necessary.
Memory File (.cursor/rules/learned-memories.mdc)
The basic structure:
# Project Memory
This file stores project-specific knowledge, conventions, and user preferences learned by the AI assistant.
## User Preferences
- [Preference 1]
- [Preference 2]
## Technical Decisions
- [Decision 1]
- [Decision 2]
## Project Conventions
- [Convention 1]
- [Convention 2]
Related Documents
Zig 0.16.0 Context Document for LLMs
**Purpose:** This document updates LLM knowledge from Zig 0.13/0.14 to modern Zig (0.15.x/0.16.0). Paste this into any LLM conversation when working with current Zig code.
TreeDex — Comprehensive Documentation
> Tree-based, vectorless document RAG framework.
Attaching virtual persistent memory in a {{site.data.keyword.powerSys_notm}} instance
lastupdated: "2026-03-25"