Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/smart-ai-memory/memdocs/cursorrulesgit clone --depth 1 https://github.com/Smart-AI-Memory/memdocsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01999 | $0.01999 |
| Opus 5 | $0.01000 | $0.01000 |
| Sonnet 5 | $0.00400 | $0.00400 |
| Haiku 4.5 | $0.00200 | $0.00200 |
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 yesterday.
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.
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)
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.
- yesterday First seen · 271 lines · 1,999 tokens per session scan A 3c1bfeae76bb
cursorrules is a cursor rule published in the GitHub repository Smart-AI-Memory/memdocs (1 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 1,999 tokens to every session, about $0.0100 per session on Opus 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.
Other cursor rules, from other repositories
180-creative-process-structure
description: WHEN approaching design-intensive tasks APPLY structured creative processes globs: ["/.md", "/.mdc"] alwaysApply: true.
190-evaluation-metrics-system
description: WHEN evaluating design solutions APPLY standardized metrics for objective assessment globs: ["/.md", "/.mdc"] alwaysApply: true.
200-quality-verification-procedures
description: WHEN verifying design quality APPLY systematic procedures for validation globs: ["/.md", "/.mdc"] alwaysApply: true.
210-artifact-management-system
description: WHEN managing design artifacts APPLY structured processes for organization and preservation globs: ["/.md", "/.mdc"] alwaysApply: true.
160-workflow-orchestration
WHEN executing tasks MANAGE workflow processes for consistent memory operations.
170-protocol-enforcement-mechanisms
description: WHEN executing commands ENFORCE protocol compliance for memory bank operations globs: ["/.md", "/.mdc"] alwaysApply: true.