Add piia-engram-cross-tool-memory rules#295
Conversation
📝 WalkthroughWalkthroughAdds a new cursor rules file ( Changespiia-engram Cross-Tool Memory Rules
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
rules/piia-engram-cross-tool-memory.mdc (1)
3-4: ⚡ Quick winScope this rule more narrowly unless it is truly universal.
Line 4 sets
alwaysApply: truewith a global glob. That forces piia-engram behavior on all contexts, including ones where this tool is irrelevant/unavailable. Prefer scoped attach (alwaysApply: false) unless this repository intends hard global enforcement.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rules/piia-engram-cross-tool-memory.mdc` around lines 3 - 4, The rule currently uses a global glob pattern ("globs: **/*") with alwaysApply: true which forces piia-engram behavior everywhere; change this to a narrower scope or disable automatic attachment by setting alwaysApply: false (or replace the glob with specific paths/dirs where the tool is relevant) so the piia-engram-cross-tool-memory rule only applies in intended repositories/environments; update the rule header referencing globs and alwaysApply accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rules/piia-engram-cross-tool-memory.mdc`:
- Line 3: The front-matter contains an unquoted glob pattern (globs: **/*) which
breaks YAML parsing; update the front-matter by quoting the pattern (e.g., set
globs: "**/*") so the YAML loader treats the asterisks as a string, and while
editing consider whether to tighten the globs or remove reliance on alwaysApply:
true (reference the globs key and alwaysApply: true in the rule).
---
Nitpick comments:
In `@rules/piia-engram-cross-tool-memory.mdc`:
- Around line 3-4: The rule currently uses a global glob pattern ("globs: **/*")
with alwaysApply: true which forces piia-engram behavior everywhere; change this
to a narrower scope or disable automatic attachment by setting alwaysApply:
false (or replace the glob with specific paths/dirs where the tool is relevant)
so the piia-engram-cross-tool-memory rule only applies in intended
repositories/environments; update the rule header referencing globs and
alwaysApply accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d9d7b919-2629-4974-853c-56514a61602a
📒 Files selected for processing (1)
rules/piia-engram-cross-tool-memory.mdc
| @@ -0,0 +1,70 @@ | |||
| --- | |||
| description: "Cursor rules for piia-engram — a local-first MCP memory layer that persists user identity, preferences, lessons, and decisions across every AI tool. AI proposes knowledge; the user approves what becomes permanent." | |||
| globs: **/* | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether the front matter parses as YAML before/after quoting globs.
python - <<'PY'
from pathlib import Path
import sys
try:
import yaml
except Exception:
print("PyYAML missing; install with: pip install pyyaml", file=sys.stderr)
sys.exit(1)
p = Path("rules/piia-engram-cross-tool-memory.mdc")
text = p.read_text(encoding="utf-8")
if not text.startswith("---"):
print("No front matter found")
sys.exit(1)
parts = text.split("---", 2)
fm = parts[1]
print("Front matter content:\\n", fm)
try:
obj = yaml.safe_load(fm)
print("Parsed OK:", obj)
except Exception as e:
print("YAML parse error:", e)
sys.exit(2)
PYRepository: PatrickJS/awesome-cursorrules
Length of output: 601
Quote globs in front-matter to keep the rule YAML valid.
Unquoted globs: **/* (line 3) fails YAML parsing with while scanning an alias (* is treated as YAML alias syntax). Quote the pattern so the rule can load correctly.
Proposed fix
-globs: **/*
+globs: "**/*"- If this rule is meant to be tool-specific, consider tightening
globsrather than relying onalwaysApply: true.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@rules/piia-engram-cross-tool-memory.mdc` at line 3, The front-matter contains
an unquoted glob pattern (globs: **/*) which breaks YAML parsing; update the
front-matter by quoting the pattern (e.g., set globs: "**/*") so the YAML loader
treats the asterisks as a string, and while editing consider whether to tighten
the globs or remove reliance on alwaysApply: true (reference the globs key and
alwaysApply: true in the rule).
Adds cursor rules for using piia-engram, an MCP-based local memory layer.
These rules help Cursor make full use of piia-engram's MCP tools (get_user_context / add_lesson / add_decision / wrap_up_session etc.) — without them, Cursor tends to forget to call the MCP server proactively and the cross-tool benefit is lost.
The rules also encode piia-engram's core governance: AI-proposed knowledge lands in
stagingand only becomesverifiedafter explicit user approval. This is the structural difference from auto-capture memory tools (Mem0, Letta) — and the rules make sure Cursor respects it.Tested with my own daily setup. piia-engram itself is Apache-2.0 (https://github.com/Patdolitse/piia-engram), v3.30.1 on PyPI, in MCP Registry, listed in punkpeye/awesome-mcp-servers + kyrolabs/awesome-agents.
Summary by CodeRabbit