memoria
CLAUDE.md2 starsChanged 12 months agoMITView on GitHub
Memoria gives AI assistants memory of what broke before. Use these MCP tools to avoid breaking coupled files. BEFORE modifying any file, call the analyze_file MCP tool with the absolute path: What you get: - Risk Score (0-100): LOW (0-24), MEDIUM (25-49), HIGH (50-74), CRITICAL (75+) - Coupled Files: Files that historically change together - Static Dependents: Files that import this file - Pre-flight Checklist: Files to verify before committing Actions based on risk: - LOW (0-24): Safe to proceed…
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/memoria.mdcCursor rule
The file
We split this CLAUDE.md into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
MEDIUM (25-49): Verify coupled files are still compatible
- Distinctive: line 23
HIGH (50-74): Read all coupled files before making changes
- Distinctive: line 24
CRITICAL (75+): Stop and ask the user before proceeding
- Distinctive: line 34
IMPORTANT: Use SHORT keywords (1-3 words).
- Distinctive: line 47
If risk is CRITICAL: Stop and ask user before proceeding
- Distinctive: line 48
If risk is HIGH: Read all coupled files first
- Very specific: line 49
Before removing code: Call ask_history to check if it's a bug fix
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- MEMORIA:START -->Memoria Integration
Memoria gives AI assistants memory of what broke before. Use these MCP tools to avoid breaking coupled files.
File Analysis Rule
BEFORE modifying any file, call the analyze_file MCP tool with the absolute path:
{"path": "/absolute/path/to/file.ts"}What you get:
- Risk Score (0-100): LOW (0-24), MEDIUM (25-49), HIGH (50-74), CRITICAL (75+)
- Coupled Files: Files that historically change together
- Static Dependents: Files that import this file
- Pre-flight Checklist: Files to verify before committing
Actions based on risk:
- LOW (0-24): Safe to proceed normally
- MEDIUM (25-49): Verify coupled files are still compatible
- HIGH (50-74): Read all coupled files before making changes
- CRITICAL (75+): Stop and ask the user before proceeding
History Search Rule
Before removing "weird" code, call ask_history to understand WHY it exists:
{"query": "setTimeout", "path": "/absolute/path/to/file.ts"}IMPORTANT: Use SHORT keywords (1-3 words). Do NOT use full sentences - git grep requires exact matches.
Parameters:
query- Short keyword (e.g., "setTimeout", "Safari", "race condition")path- Optional: scope to specific filesearchType- "message", "diff", or "both" (default)startLine/endLine- For line-range search (Sherlock Mode)
Example: You see setTimeout(() => resolve(), 0) and think it's useless. Search for "setTimeout" and find a commit from 2 years ago: "Fix race condition in Safari." Keep the code!
Mandatory Rules
- ALWAYS call
analyze_filebefore modifying any code file - If risk is CRITICAL: Stop and ask user before proceeding
- If risk is HIGH: Read all coupled files first
- Before removing code: Call
ask_historyto check if it's a bug fix - Use ABSOLUTE paths (e.g.,
/Users/name/project/src/file.ts) - Use SHORT keywords in
ask_historyqueries (not sentences)
<!-- MEMORIA:END -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

