From ba5c35c20cc696ecc80884956e2eda2691455cbd Mon Sep 17 00:00:00 2001 From: mdhaseeb343q-pixel Date: Mon, 14 Sep 2026 16:23:50 +0530 Subject: [PATCH 1/2] Add MemorySync persistent memory cursor rule Adds a canonical .mdc project rule for Cursor AI to persist architectural decisions, API conventions, and project constraints across sessions via MemorySync MCP. --- rules/memorysync-persistent-memory.mdc | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 rules/memorysync-persistent-memory.mdc diff --git a/rules/memorysync-persistent-memory.mdc b/rules/memorysync-persistent-memory.mdc new file mode 100644 index 00000000..3d1216eb --- /dev/null +++ b/rules/memorysync-persistent-memory.mdc @@ -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). + +## 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) From b1942b3b3e132a34b84d4273eb09dfc002cd831c Mon Sep 17 00:00:00 2001 From: mdhaseeb343q-pixel Date: Wed, 16 Sep 2026 17:17:43 +0530 Subject: [PATCH 2/2] Update memorysync-persistent-memory.mdc --- rules/memorysync-persistent-memory.mdc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/memorysync-persistent-memory.mdc b/rules/memorysync-persistent-memory.mdc index 3d1216eb..7f2005cb 100644 --- a/rules/memorysync-persistent-memory.mdc +++ b/rules/memorysync-persistent-memory.mdc @@ -24,11 +24,11 @@ Ensure the MemorySync MCP server is configured in `.cursor/mcp.json` or Cursor S ``` ## When to Save Memories -Automatically invoke memory storage when the user or project establishes durable decisions: +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 & Secrets:** Key configuration variables needed (never store plaintext secrets or private tokens). +- **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: