matcha: Cursor rule for Windsurf

.windsurfrules

windsurfrules is a cursor rule for Windsurf from plumpslabs/matcha. It costs 580 tokens per session, scanned A, original, MIT.

A set of coding rules for making changes in proportion to their risk, reusing existing code, validating inputs, isolating side effects, and considering performance and security. It also describes when to plan, review, or record assumptions.

In plain words
What is it for?
Use it as project-wide instructions for coding agents working on new features, fixes, refactoring, and production-sensitive changes. It covers planning, implementation, and review behavior.
Why use it?
It gives an agent consistent working guidelines instead of leaving decisions about scope, reuse, safety, and review implicit. This can reduce duplicated code and avoid unnecessary process for small changes.

Cursor rule for Windsurf

Written for Windsurf: a Windsurf rule.

This is plumpslabs/matcha's own configuration. It tells Windsurf how to work on matcha 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 matcha configures →

Reuse

Borrowing it

Nothing to install: this file belongs to plumpslabs/matcha. 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/plumpslabs/matcha/main/.windsurfrules
Clone the repo
git clone --depth 1 https://github.com/plumpslabs/matcha

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/plumpslabs/matcha/windsurfrules/github.svg)](https://agentmods.dev/rules/plumpslabs/matcha/windsurfrules)
Your own site
<a href="https://agentmods.dev/rules/plumpslabs/matcha/windsurfrules"><img src="https://agentmods.dev/badge/rules/plumpslabs/matcha/windsurfrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for windsurfrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/plumpslabs/matcha/windsurfrules"><img src="https://agentmods.dev/badge/rules/plumpslabs/matcha/windsurfrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 580 This file is loaded in full into every session.
When invoked 580 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.00580 $0.00580
Opus 5.5 $0.00232 $0.00232
Sonnet 5.5 $0.00116 $0.00116
Haiku 4.5 $0.00058 $0.00058

Measured 1mo ago against content hash 7450a3a25779, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 1mo 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.

.windsurfrules · 33 lines

How it starts

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

🍵 matcha — Windsurf Rules

Core Philosophy

Simple. Efficient. Deliberate. Never twice.

Always Apply

  1. ⚖️ Proportionality (effort ↔ risk) — Match ceremony to task size. Trivial (≤5 LOC, 1 file, no logic): minimal plan, fast pass. Small (1-3 files): short plan + light review. Large (cross-cutting/prod risk): full gate. Planning > implementation = over-planning. Exit conditions beat STOP — proceed on a recorded assumption rather than blocking on trivia.
  2. Intent Discovery — Confirm What/Why/How before any code. STOP if Why/How unclear — unless trivial, then proceed on a recorded assumption.
  3. Reuse Before Write — Search existing code (file:line). NEVER write what exists.
  4. Type-Safe & Boundary Guard — Strict types (no any). Validate inputs/schemas at entry points.
  5. Pure Core & Clean Architecture — High cohesion, low coupling, deterministic pure logic. Isolate side effects.
  6. Performance & Resource Awareness — Zero N+1/unbatched IO, avoid O(n²+) time/space complexity, prevent memory leaks, limit payload sizes (pagination/stream).
  7. Security & Data Safety — Parameterize queries (no SQLi/XSS), env vars (APPNAME_VAR_NAME), restrict least-privilege state access.
  8. Resilience & Explicit Errors — Idempotent retry-safe mutations, explicit error paths, no silent catches or dummy fallbacks.
  9. Clean Finish & No Debt Leakage — Done = working AND clean. Mark shortcuts with // matcha: [reason] at write time — a comment documenting a deliberate choice (skip/workaround/intentional hardcode) gets the prefix while writing; plain "what this does" comments need none.
  10. Loop Guardrail (Self-Termination) — Halt & ask for guidance if 2 consecutive attempts fail or repeat.
  11. Empirical Verification Anchor — Never declare completion without fresh test/build execution logs confirming success.

Session Memory

  • Read .agents/plan/current.md at task start (resume after context loss); overwrite it at the planning gate. Append review/audit output to .agents/reports/<agent>-<YYYY-MM>.md (keep latest 5). Lazy-load only.

Read the full file on GitHub · 33 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. 1mo ago First seen · 33 lines · 580 tokens per session scan A 7450a3a25779

Subscribe to this mod's changes

windsurfrules is a cursor rule published in the GitHub repository plumpslabs/matcha (2 stars, last pushed 5d ago), licensed MIT. It adds 580 tokens to every session, about $0.0023 per session on Opus 5.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-11.