windsurf

An integration that gives Windsurf, an AI coding editor, a persistent project memory loop. It writes rules that load prior context, record file changes and follow-up tasks, and save session recaps.

In plain words
What is it for?
Use it to configure Windsurf, import context from Git history, log edits and TODOs, and carry session summaries into future work.
Why use it?
It helps the agent remember earlier work instead of starting each session without project context.

Agent

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 agents/rustkit-ai/aimemo/windsurf
Clone the repo
git clone --depth 1 https://github.com/rustkit-ai/aimemo
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 741 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00741
Opus 5 $0.00000 $0.00370
Sonnet 5 $0.00000 $0.00148
Haiku 4.5 $0.00000 $0.00074

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

Security

Grade A, and why

windsurf 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 yesterday.

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.

docs/agents/windsurf.md · 119 lines

How it starts

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

aimemo × Windsurf

Windsurf reads .windsurfrules automatically in every session. aimemo setup writes instructions into that file telling Windsurf to maintain the memory loop: inject context at session start, log after file edits, recap at session end.


Setup

Run once in your project root:

aimemo setup --windsurf

Then bootstrap from your git history so the agent has context from day one:

aimemo bootstrap

What gets written

.windsurfrules:

# aimemo — persistent memory
- At session start: run `aimemo inject --windsurf` to load context from previous sessions
- After modifying any file: run `aimemo log "modified {filename}: {one-line reason}"`
- When you identify something to fix later: run `aimemo log "todo: {description}"`
- At session end: run `aimemo recap "{what was done} — next: {what comes next}"` then `aimemo inject --windsurf`

<!-- aimemo:start -->
## aimemo context
last: (no entries yet)
<!-- aimemo:end -->

Windsurf loads .windsurfrules automatically — no additional configuration needed.


The session loop

Open Windsurf
      │
      ▼
Windsurf reads .windsurfrules
      │
      ▼
Agent runs: aimemo inject --windsurf
      │  (updates the context block in .windsurfrules)
      ▼
Agent reads the context — knows where it left off
      │
      ▼
You work — agent logs after each file edit:
  aimemo log "modified src/db/migrate.rs: added pg16 migration"
  aimemo log "todo: update connection pool config for pg16 defaults"
      │
      ▼
At session end:
  aimemo recap "migrated DB to PostgreSQL 16 — next: update connection pool config"
  aimemo inject --windsurf
      │
      ▼
Next session starts with full context

What the context block looks like

## aimemo context
recap (2026-03-15): "migrated DB to PostgreSQL 16 — next: update connection pool config"
recent (2026-03-15): "modified src/db/migrate.rs: added pg16 migration"
recent (2026-03-15): "modified src/db/pool.rs: extracted pool config"
todo: update connection pool config for pg16 defaults
recent tags: db · migration

Read the full file on GitHub · 119 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. yesterday First seen · 119 lines · 0 tokens per session scan A 9ad3fd36e088

Subscribe to this mod's changes

windsurf is an agent published in the GitHub repository rustkit-ai/aimemo (4 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 741 tokens. 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.