Skip to content
Open
Changes from all commits
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
Prompt the user for explicit approval before saving durable decisions to hosted memory. Redact all proprietary secrets, credentials, and confidential project data prior to transmission:
- **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 & Configuration:** Key non-sensitive configuration parameters (never store plaintext secrets, tokens, or private keys).

## 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