spm-project-memory

spm-project-memory is a cursor rule for Cursor from getspm/spm-agent-connectors. It costs 1,255 tokens per session, scanned A, original, MIT.

A rule set for using SPM as durable, governed project memory. It tells a coding agent how to resolve project context, handle evidence and share information safely.

In plain words
What is it for?
Use it to guide project-memory setup, resumption, evidence submission and explicitly requested cross-project sharing.
Why use it?
It reduces lost project knowledge and limits accidental use of information from the wrong project.

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/getspm/spm-agent-connectors/spm-project-memory
Clone the repo
git clone --depth 1 https://github.com/getspm/spm-agent-connectors

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spm-project-memory

README.md
[![agentmods](https://agentmods.dev/badge/rules/getspm/spm-agent-connectors/spm-project-memory.svg)](https://agentmods.dev/rules/getspm/spm-agent-connectors/spm-project-memory)
Your own site
<a href="https://agentmods.dev/rules/getspm/spm-agent-connectors/spm-project-memory"><img src="https://agentmods.dev/badge/rules/getspm/spm-agent-connectors/spm-project-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,255 This file is loaded in full into every session.
When invoked 1,255 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original 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.01255 $0.01255
Opus 5 $0.00628 $0.00628
Sonnet 5 $0.00251 $0.00251
Haiku 4.5 $0.00126 $0.00126

Measured 2d ago against content hash 177d0f7ccc99, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spm-project-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 2d ago.

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.

plugins/spm-cursor/.cursor/rules/spm-project-memory.mdc · 99 lines

How it starts

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

Use SPM for durable requirements, decisions, completed work, temporal state, authority, source evidence, agent handoff, security, testing, deployment and governed sharing. Resolve the active project before consequential work. Do not read or compose another authorized project unless the user explicitly requests it.

Start or resume project memory with spm_agent_session_start when the runtime has not already done so. If SPM returns an association prompt, ask it naturally and persist the user's semantic confirm, replace or skip answer with spm_agent_session_association_decide. When the user explicitly asks to create new project memory, call spm_project_bootstrap_execute with that instruction, a safe inventory and source-grounded evidence from a bounded inspection. Repeat the same idempotent operation to resume it. If SPM requests a known evidence gap, submit only that authorized source with spm_project_bootstrap_evidence_submit and execute again. Continue without another question after created or already_completed. Use spm_project_bootstrap_preview and spm_project_bootstrap_confirm only for an explicit review-first request or when execution returns review_required.

Use SPM context packs rather than copying whole projects between conversations. Preserve source project, temporal assessment, context boundary and verification hash. Use spm_agent_session_context_inject and spm_agent_session_context_revoke only for explicit context composition. Use spm_cross_project_context_pack for one explicit source project and spm_multi_project_context_pack for several explicit sources, preserving source packs and hashes. Never claim a durable write succeeded unless the SPM tool confirms it. If SPM unavailable status is returned, say so plainly and continue without claiming persistence. Do not store secrets, raw credentials or unnecessary personal data.

Before a claim or action depends on prior project facts, call spm_memory_context_compose with the concrete semantic question. Treat the returned envelope as a bounded governed projection, not proof that undisplayed memory does not exist. SPM performs at most one automatic deep composition when its LLM declares the interactive projection insufficient and additional authorized evidence exists. If the final sufficiency contract still requests clarification, clarify instead of guessing from local conversational confidence.

When the user wants to continue the same authorized work in another agent or device, use spm_agent_session_continuation_create. The receiving agent accepts the one-time token with spm_agent_session_continuation_accept; revoke an unused handoff with spm_agent_session_continuation_revoke. Continuations carry only project and injected-context references. SPM rechecks current authorization and never transfers memory bodies or credentials.

Record a body-free workspace manifest with spm_agent_workspace_manifest_record before creating the continuation. For Git, report stable repository identity, revision and a hash/count summary of local changes; for non-Git work, report a filesystem, document or remote-resource version snapshot; use memory_only when no material resource is needed. The receiving agent includes its inspected manifest when accepting and follows SPM's alignment result. Never clone, pull, reset, overwrite or disclose raw diffs automatically. Use spm_agent_workspace_manifest_list for authorized session or project history.

Surface pending project attention at session start. Display is not acknowledgement or resolution; update attention state only after an explicit user instruction.

When an authorized file, specification, repository snapshot, tool result or endpoint response materially informs work but is not already represented in captured turns, call spm_agent_resource_handoff with its stable source reference, kind and a redacted body or accurate summary. Include mandatory source_identity with the governed repository/source scope and repository-relative logical path; keep the revision, machine and absolute local locator as observation provenance, never as logical identity. SPM does not inspect local files, hidden tool output or endpoints implicitly. Never hand off secrets or data outside the approved sharing boundary. Use spm_agent_resources_list when body-free source provenance is needed.

Read the full file on GitHub · 99 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. 2d ago First seen · 99 lines · 1,255 tokens per session scan A 177d0f7ccc99

Subscribe to this mod's changes

spm-project-memory is a cursor rule published in the GitHub repository getspm/spm-agent-connectors (0 stars, last pushed 19d ago), licensed MIT. It adds 1,255 tokens to every session, about $0.0063 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.