Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions rules/memorysync-persistent-memory.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
description: Scoped persistent memory guidelines for Cursor AI to capture and recall architecture decisions, API conventions, and project constraints across sessions via MemorySync MCP.
globs: ["**/*"]
alwaysApply: false
---
# MemorySync Persistent Memory for Cursor

This rule guides Cursor AI in maintaining persistent, scoped project memory across conversation restarts using the MemorySync Model Context Protocol (MCP) server.

## Connection Setup
Ensure the MemorySync MCP server is configured in `.cursor/mcp.json` or Cursor Settings > Features > MCP:

```json
{
"mcpServers": {
"memorysync": {
"url": "https://mcp.memorysync.io/mcp"
},
"memorysync-docs": {
"url": "https://docs.memorysync.io/mcp"
}
}
}
```

## When to Save Memories
Automatically invoke memory storage when the user or project establishes durable decisions:
- **Architecture Decisions:** Choice of libraries, state management patterns, routing conventions.
- **Project Conventions:** Date formatting (e.g., strict UTC ISO-8601), naming styles, error handling structures.
- **Bug Fixes & Gotchas:** Non-obvious edge cases resolved, pinned package workarounds, deprecated API replacements.
- **Environment & Secrets:** Key configuration variables needed (never store plaintext secrets or private tokens).
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

## When to Recall Memories
At the start of new tasks, feature implementations, or refactoring:
- Query MemorySync for existing decisions scoped to the current project or workspace (`project_id`).
- Respect recalled decisions rather than guessing or re-implementing contrasting patterns.
- Cite the memory record ID when applying a recalled rule (e.g., `Applied architecture constraint from memory #mem_...`).

## Documentation Search
When encountering unfamiliar SDK APIs or framework features:
- Use `memorysync-docs` to search live, verified documentation before generating speculative implementations.

## Reference
- Official Cursor Guide: [docs.memorysync.io/guides/cursor](https://docs.memorysync.io/guides/cursor)
Loading