memdocs: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from Smart-AI-Memory/memdocs. It costs 1,999 tokens per session, scanned A, original, Apache-2.0.

A project-memory record containing documentation about a codebase and a specific documentation commit. It describes changes to modules related to symbol extraction, embeddings, search, summarization, policy, and MCP integration.

In plain words
What is it for?
Use it as repository context when reviewing the documented commit or understanding the roles of the listed modules.
Why use it?
It gives an agent background about earlier changes, their scope, risks, and relevant files.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is Smart-AI-Memory/memdocs's own configuration. It tells Cursor how to work on memdocs itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything memdocs configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Smart-AI-Memory/memdocs. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Smart-AI-Memory/memdocs/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/Smart-AI-Memory/memdocs

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/smart-ai-memory/memdocs/cursorrules/github.svg)](https://agentmods.dev/rules/smart-ai-memory/memdocs/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/smart-ai-memory/memdocs/cursorrules"><img src="https://agentmods.dev/badge/rules/smart-ai-memory/memdocs/cursorrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cursorrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/smart-ai-memory/memdocs/cursorrules"><img src="https://agentmods.dev/badge/rules/smart-ai-memory/memdocs/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,999 This file is loaded in full into every session.
When invoked 1,999 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01999 $0.01999
Opus 5.5 $0.00800 $0.00800
Sonnet 5.5 $0.00400 $0.00400
Haiku 4.5 $0.00200 $0.00200

Measured 2mo ago against content hash 3c1bfeae76bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cursorrules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursorrules · 271 lines

How it starts

The opening of the file, as written. The whole thing — 271 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Project Memory (Auto-generated by doc-intelligence)

Last updated: 2025-11-13 23:33:14

📚 Documentation

Enhanced module docstrings for core engine components

Commit: 1b02247 Scope: Module-level Date: 2025-11-14

Summary

  • Enhanced module docstrings for core engine components Added comprehensive module-level documentation to 6 core MemDocs modules (mcp_server, extract, embeddings, search, summarize, policy) describing their purpose, capabilities, and architectural role. Clarifies flagship MCP integration, multi-language symbol extraction, zero-cost local embeddings, FAISS-based vector search, Claude-powered summarization, and intelligent scope escalation.
  • Dogfooding: Committed .memdocs/ directory for self-documentation Modified .gitignore to allow committing .memdocs/ directory, demonstrating MemDocs usage on its own codebase with git-committed memories.

Changes

Modified: 7 files

  • .gitignore
  • memdocs/embeddings.py
  • memdocs/extract.py
  • memdocs/mcp_server.py
  • memdocs/policy.py

Risks

  • repository_size
  • documentation_only

References

  • Commit: 1b02247

🗺️ Code Map

memdocs/embeddings.py

  • class LocalEmbedder (line 20)
  • function embed_documents (line 76)
    def embed_documents(self, texts: list[str])
    
  • function embed_query (line 98)
    def embed_query(self, query: str)
    
  • function chunk_document (line 111)
    def chunk_document(text: str, max_tokens: int = 512, overlap: int = 50)
    
  • function load_embeddings (line 197)
    def load_embeddings(embeddings_file: Path)
    

memdocs/extract.py

  • class GitDiff (line 40)
  • class FileContext (line 54)
  • class ExtractedContext (line 66)
  • class Extractor (line 74)
  • function __init__ (line 77)
    def __init__(self, repo_path: Path = Path(".")
    
  • function extract_diff (line 90)
    def extract_diff(self, commit: str | None = None)
    
  • function extract_file_context (line 145)
    def extract_file_context(self, file_path: Path)
    
  • function extract_context (line 201)
    def extract_context(self, paths: list[Path], commit: str | None = None)
    
  • function _expand_paths (line 226)
    def _expand_paths(self, paths: list[Path])
    
  • function _find_code_files (line 248)
    def _find_code_files(self, directory: Path)
    
  • function _glob_files (line 279)
    def _glob_files(self, pattern: Path)
    
  • function _extract_symbols (line 295)
    def _extract_symbols(self, file_path: Path, content: str, language: str)
    
  • function _extract_python_symbols (line 317)
    def _extract_python_symbols(self, file_path: Path, content: str)
    
  • function _extract_typescript_symbols (line 375)
    def _extract_typescript_symbols(self, file_path: Path, content: str)
    
  • function _extract_class_methods (line 420)
    def _extract_class_methods(self, class_lines: list[str])
    
  • function _extract_imports (line 436)
    def _extract_imports(self, content: str, language: str)
    
  • function _parse_dependencies (line 457)
    def _parse_dependencies(self, repo_root: Path, language: str)
    
  • function _parse_requirements_txt (line 488)
    def _parse_requirements_txt(self, repo_root: Path)
    
  • function _parse_pyproject_toml (line 519)
    def _parse_pyproject_toml(self, repo_root: Path)
    
  • function _parse_package_json (line 562)
    def _parse_package_json(self, repo_root: Path)
    

Read the full file on GitHub · 271 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 271 lines · 1,999 tokens per session scan A 3c1bfeae76bb

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Smart-AI-Memory/memdocs (1 stars, last pushed 11mo ago), licensed Apache-2.0. It adds 1,999 tokens to every session, about $0.0080 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

cursorrules compared with cursor rules from other repositories

cursorrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cursorrulesSmart-AI-Memory/memdocsCursor rule111mo agoApache-2.0A1,999Cursor
search-routingdavekilleen/DexCursor rule5128d agoMITA559Cursor
140-unified-command-interfacesavagelysubtle/BIG-BRAIN-Memory-BankCursor rule51y agoMITA3,595Cursor
150-standard-initialization-proceduresavagelysubtle/BIG-BRAIN-Memory-BankCursor rule51y agoMITA3,229Cursor
160-workflow-orchestrationsavagelysubtle/BIG-BRAIN-Memory-BankCursor rule51y agoMITA4,188Cursor
170-protocol-enforcement-mechanismssavagelysubtle/BIG-BRAIN-Memory-BankCursor rule51y agoMITA0Cursor
130-validation-reporting-systemsavagelysubtle/BIG-BRAIN-Memory-BankCursor rule51y agoMITA0Cursor