CRUX-Compress / rules
Cursor rule8 starsChanged 2 months agoMITView on GitHub
CRUX Memories integration rule
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,181 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/crux-memories-integration.crux.mdcCursor rule
- .cursor/rules/_CRUX-RULE.mdcCursor rule
- .cursor/rules/docs-sync.crux.mdCursor rule
- .cursor/rules/docs-sync.crux.mdcCursor rule
- .cursor/rules/docs-sync.mdCursor rule
- .cursor/rules/example/coding-standards-demo.crux.mdcCursor rule
- .cursor/rules/example/coding-standards-demo.mdCursor rule
- .cursor/rules/ignore-example-rules.crux.mdCursor rule
- .cursor/rules/ignore-example-rules.crux.mdcCursor rule
- .cursor/rules/ignore-example-rules.mdCursor rule
- .cursor/rules/skill-and-agent-references.mdcCursor rule
- .cursor/rules/spec-agent-allocation.crux.mdCursor rule
- .cursor/rules/spec-agent-allocation.crux.mdcCursor rule
- .cursor/rules/spec-agent-allocation.mdCursor rule
- .cursor/rules/spec-implementation-hygiene.mdcCursor rule
- .cursor/rules/version-bump.crux.mdCursor rule
- .cursor/rules/version-bump.crux.mdcCursor rule
- .cursor/rules/version-bump.mdCursor rule
- .cursor/rules/zip-contents-protection.crux.mdCursor rule
- .cursor/rules/zip-contents-protection.crux.mdcCursor rule
- .cursor/rules/zip-contents-protection.mdCursor rule
- crux-skill-memory-compressSkill
- crux-skill-memory-crudSkill
- crux-skill-memory-extractSkill
- crux-skill-memory-indexSkill
- crux-skill-memory-meditation-coordinationSkill
- crux-skill-memory-meditation-ensembleSkill
- crux-skill-memory-meditation-quickSkill
- crux-skill-memory-meditation-reportSkill
- crux-skill-memory-meditation-researchSkill
- crux-skill-memory-meditation-reviewSkill
- crux-skill-memory-rebalanceSkill
- crux-skill-memory-reference-trackerSkill
- crux-utilsSkill
The file
Show its rules and text
We split this crux-memories-integration.md into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
When amnesia mode is on, it takes precedence over enableMemories: "true"
- Very specific: line 18
If the user explicitly invokes a memory-management command (/crux-dream, /crux-recall, /crux-remember, /crux-meditate, /crux-forget), treat …
- Distinctive: line 26
If MCP is configured, agents may use semantic search instead of index scanning
- Distinctive: line 28
Search early in your workflow, not after you've already committed to an approach
- Distinctive: line 29
Use descriptive queries — the search is semantic, so natural language works well
- Very specific: line 32
Do NOT search if /crux-amnesia is active (unless the user explicitly invoked a memory command)
- Very specific: line 36
When a memory influences your response, you MUST include [memory:{title}] in your output, where {title} is the memory's exact title from …
- Distinctive: line 37
Place the annotation inline near the relevant statement, or at the end of the paragraph it influenced
- Very specific: line 49
When you spawn a subagent and it returns text containing [memory:{title}] annotations, you MUST preserve those annotations verbatim in your …
- Very specific: line 50
If you paraphrase a subagent's findings, copy any [memory:…] markers into your paraphrase alongside the statement they influenced — do not …
- Very specific: line 52
If a subagent surfaces a memory via natural language but forgets the literal [memory:Title] syntax, and you can identify the matching …
- Very specific: line 60
After spec execution completes, suggest running /crux-dream to extract learnings
- Distinctive: line 65
No index loading, no annotation, no reference tracking
- Very specific: line 95
When MCP is available, agents prefer semantic search over linear index scanning for large memory sets.
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule 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
CRUX Memories Integration Rule
This rule governs how agents interact with the CRUX Memories system. Behavior is controlled by the enableMemories flag in .crux/crux-memories.json, unless the current chat session explicitly enables /crux-amnesia.
Session Override: /crux-amnesia
/crux-amnesiais a chat-session-only override- When amnesia mode is on, it takes precedence over
enableMemories: "true" - Amnesia mode suppresses ambient memory discovery, loading, annotation, reference tracking, and automatic
/crux-dreamnudges during ordinary work - This override must never modify
.crux/crux-memories.json, memory files, trackers, or the memory index - Subagents spawned for ordinary work inherit the same amnesia state and must suppress ambient memory usage too
- If the user explicitly invokes a memory-management command (
/crux-dream,/crux-recall,/crux-remember,/crux-meditate,/crux-forget), treat that as direct user intent to interact with memories even while amnesia mode is on
When Memories Are Enabled (enableMemories: "true")
Discovery
- Agents MUST discover memories by reading
.crux/memory-index.yml - Load full memory files only for likely matches (by title, description, or tags)
- If MCP is configured, agents may use semantic search instead of index scanning
- Proactively query the
crux-memoriesMCP server on non-trivial tasks — before making architectural or design decisions, when encountering unfamiliar code, when planning implementations or debugging, and when the task touches patterns or past decisions that may be documented - Search early in your workflow, not after you've already committed to an approach
- Use descriptive queries — the search is semantic, so natural language works well
- Filter by
types(core, learning, redflag, idea, goal) when you know the category - Filter by
minStrengthto prioritise well-established memories (strength >= 3) - Do NOT search if
/crux-amnesiais active (unless the user explicitly invoked a memory command)
Output Annotation (CRITICAL)
- When a memory influences your response, you MUST include
[memory:{title}]in your output, where{title}is the memory's exact title from its frontmatter - Place the annotation inline near the relevant statement, or at the end of the paragraph it influenced
- This is how the system tracks which memories are valuable — an
afterAgentResponsehook automatically scans for these annotations and updates reference trackers - Example: "Components should use memoization with custom comparators. [memory:React.memo on list item components prevents full re-render on data changes]"
- You do NOT need to manually invoke the reference-tracker skill — the hook handles all
.refs.ymlbookkeeping automatically - The annotation contract is load-bearing: if you do not annotate, the system silently records zero references, memory strength never grows, REM-sleep rebalancing has nothing to work with, and stale-tracker nudges will fire. Annotation is not optional decoration — it is the only signal the system has that memories are actually being used
Subagent Annotation Passthrough (CRITICAL)
The afterAgentResponse hook scans the response text it is given. When a subagent emits [memory:{title}] annotations in its return-to-parent summary, those annotations live in the subagent transcript, but the user-facing reply is composed by the parent agent. Subagent annotations are silently lost unless the parent surfaces them.
Therefore:
- When you spawn a subagent and it returns text containing
[memory:{title}]annotations, you MUST preserve those annotations verbatim in your reply to the user (or in your next downstream tool call to another agent that will eventually reach the user) - If you paraphrase a subagent's findings, copy any
[memory:…]markers into your paraphrase alongside the statement they influenced — do not strip them - This applies recursively: a parent forwarding to a grand-parent must preserve annotations from any depth in the subtree
- If a subagent surfaces a memory via natural language but forgets the literal
[memory:Title]syntax, and you can identify the matching memory from.crux/memory-index.yml, add the annotation yourself in the user-facing reply
Self-check Before Responding
Before returning a substantive response, ask yourself: did any memory in .crux/memory-index.yml (or anything I discovered via the user-crux-memories MCP) shape what I am about to say? If yes and the corresponding [memory:Title] is not in my draft reply, add it. A response that consulted memories without annotating them is a contract violation.
Dream Nudge
- After spec execution completes, suggest running
/crux-dreamto extract learnings
When Memories Are Disabled (enableMemories: "false")
- Agents skip all memory operations silently
- No index loading, no annotation, no reference tracking
General Rules
- Agents never directly read or write memory files — they use CRUX memory skills
- Agents only see base memories and their own agent-scoped memories
- Each repository owns its own memories; agents never touch memories from other repos
- Memory files live in the
memories/directory (configurable viacruxMemories.storage.memoriesDir)
MCP Server Configuration
The MCP server is installed at the user level and shared across all projects. Install it via:
pipx install ./crux_mcp_serverThis configures ~/.cursor/mcp.json with:
{
"mcpServers": {
"crux-memories": {
"command": "crux-mcp-server",
"args": ["-t", "stdio", "--config", ".crux/crux-memories.json"]
}
}
}When MCP is available, agents prefer semantic search over linear index scanning for large memory sets. Example tool call: CallMcpTool(server="user-crux-memories", toolName="memory-search", arguments={"query": "relevant search terms"}).
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.

