memory

Establishes a persistent memory protocol for capturing and retrieving knowledge, including storage strategies, context retrieval, and proactive memory management for continuous learning.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/felipebarcelospro/igniter-js/memory
Clone the repo
git clone --depth 1 https://github.com/felipebarcelospro/igniter-js

Made for: Cursor.

Per session 1,007 This file is loaded in full into every session.
When invoked 1,007 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.01007 $0.01007
Opus 5 $0.00504 $0.00504
Sonnet 5 $0.00201 $0.00201
Haiku 4.5 $0.00101 $0.00101

Measured today against content hash d62f45cac5dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory 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 today.

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.

apps/starter-nextjs/.cursor/rules/memory.mdc · 127 lines

How it starts

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

Memory & Context Management

1. Persistent Memory Protocol

1.1 Memory Storage Strategy

ALWAYS store memories for:

  • User preferences and communication styles
  • Successful workflows and patterns discovered
  • Architectural decisions and their rationales
  • Bug patterns and their solutions
  • Performance insights and optimizations
  • Project-specific conventions and standards
  • User corrections and feedback

Memory Types & Usage:

  • user_preference: Communication style, technical preferences, workflow likes/dislikes
  • architectural_decision: System design choices, technology selections, integration patterns
  • code_pattern: Reusable code structures, development workflows, best practices
  • bug_pattern: Common errors, debugging approaches, solution patterns
  • performance_insight: Optimization techniques, bottlenecks identified, measurement results
  • insight: General learnings, observations, connections between concepts
  • relationship_map: How different components/concepts relate to each other

1.2 Context Retrieval Strategy

Before ANY significant task:

  1. Search memories with relevant tags/keywords
  2. Check for similar patterns or past solutions
  3. Review user preferences for this type of work
  4. Look for architectural decisions that might impact the approach

Search Patterns:

  • Use broad keywords first, then narrow down
  • Search by type when looking for specific kinds of information
  • Use tag combinations for precise filtering
  • Check confidence levels to prioritize reliable information

1.3 Memory Relationships & Evolution

  • ALWAYS create relationships between related memories using mcp_igniter-mcp_relate_memories
  • Use relationship types: implements, uses, extends, contradicts, similar_to, depends_on
  • Update existing memories when new information contradicts or extends them
  • Build knowledge graphs that show how concepts connect

2. Proactive Memory Management

2.1 Memory Triggers (When to Store)

Explicit Signals:

  • User says: "remember this", "next time", "always do", "don't do this again"
  • User provides corrections or alternative approaches
  • User explains their preferences or workflow

Read the full file on GitHub · 127 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. today First seen · 127 lines · 1,007 tokens per session scan A d62f45cac5dc

Subscribe to this mod's changes

memory is a cursor rule published in the GitHub repository felipebarcelospro/igniter-js (242 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 1,007 tokens to every session, about $0.0050 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-09-01.