a-memory: Cursor rule for Windsurf

.windsurfrules

windsurfrules is a cursor rule for Windsurf from Cipher208/a-memory. It costs 484 tokens per session, scanned A, original, MIT.

A set of project rules for ai-memory, a tool that keeps searchable information about a codebase for an AI assistant.

In plain words
What is it for?
It is for scanning a codebase, searching symbols and text, tracing callers and execution flows, finding dependencies or unused code, and mapping tests to implementation.
Why use it?
It helps an assistant find relevant code context without loading the whole repository into every conversation.

Cursor rule for Windsurf

Written for Windsurf: a Windsurf rule.

This is Cipher208/a-memory's own configuration. It tells Windsurf how to work on a-memory itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything a-memory configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Cipher208/a-memory. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Cipher208/a-memory/master/.windsurfrules
Clone the repo
git clone --depth 1 https://github.com/Cipher208/a-memory

Made for: Windsurf.

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 windsurfrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/cipher208/a-memory/windsurfrules.svg)](https://agentmods.dev/rules/cipher208/a-memory/windsurfrules)
Your own site
<a href="https://agentmods.dev/rules/cipher208/a-memory/windsurfrules"><img src="https://agentmods.dev/badge/rules/cipher208/a-memory/windsurfrules.svg" alt="Measured on agentmods" height="20"></a>
Per session 484 This file is loaded in full into every session.
When invoked 484 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00484 $0.00484
Opus 5 $0.00242 $0.00242
Sonnet 5 $0.00097 $0.00097
Haiku 4.5 $0.00048 $0.00048

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

Security

Grade A, and why

windsurfrules 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.

.windsurfrules · 89 lines

How it starts

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

AI-Memory Integration Rules

This project uses ai-memory for codebase context management.

Quick Commands

# Initialize (one-time per project)
ai-memory init

# Full scan (run after major changes)
ai-memory scan

# Watch mode (auto-update on file changes)
ai-memory watch

# Ask about the codebase (low-token context)
ai-memory ask "<your question>"

# Semantic search (run `ai-memory embed` first)
ai-memory semantic "<query>"

# Symbol context with call graph
ai-memory context <symbol_name>

# Reverse call graph � who calls this symbol
ai-memory callers <symbol>

# Full-text search over names/signatures/docstrings
ai-memory search "<query>"

# Detect circular dependencies
ai-memory cycles

# Full inheritance chain for a class
ai-memory inherits <class_name>

# Public API surface
ai-memory api

# See execution flows
ai-memory flows

# See code communities/modules
ai-memory communities

# Find dead/unused code
ai-memory dead-code

# Review changed files and impacted flows
ai-memory review

# Extract TODO/FIXME/HACK markers
ai-memory todos

# Map tests to implementation
ai-memory test-map

# Dependency manifests
ai-memory deps

# Load coverage data
ai-memory coverage

# Build semantic embeddings
ai-memory embed

# Incremental embeddings (only new/changed symbols)
ai-memory embed --incremental

Guidelines for AI Assistants

  1. Before answering questions, use ai-memory ask or ai-memory semantic to get pre-computed context.
  2. When modifying code, check ai-memory review to see which flows and communities are impacted.
  3. For new features, consult ai-memory communities to find the right module to extend.
  4. For debugging, use ai-memory context <symbol> to trace call chains from entry points.
  5. To find where code is tested, use ai-memory test-map.
  6. To find public APIs, use ai-memory api.
  7. To search by keyword, use ai-memory search "auth middleware".

Project Structure (from ai-memory communities)

Check ai-memory communities for the latest module boundaries.

Read the full file on GitHub · 89 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 · 89 lines · 484 tokens per session scan A e50a1a39fda4

Subscribe to this mod's changes

windsurfrules is a cursor rule published in the GitHub repository Cipher208/a-memory (0 stars, last pushed today), licensed MIT. It adds 484 tokens to every session, about $0.0024 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-07.