ai-globals: Cursor rule for Windsurf

.windsurfrules

windsurfrules is a cursor rule for Windsurf from m3taz-ahmed/ai-globals. It costs 927 tokens per session, scanned A, a copy of aizee, MIT.

A set of instructions that changes how a coding agent starts work, switches personas, finds project files, and chooses where edits may be made.

In plain words
What is it for?
It is for controlling agent startup, persona switching, project-root discovery, and allowed file changes.
Why use it?
It gives the agent a fixed startup process and file boundaries, reducing accidental edits in the wrong directory or missed project instructions.

Cursor rule for Windsurf

Written for Windsurf: a Windsurf rule.

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

Reuse

Borrowing it

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

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/m3taz-ahmed/ai-globals/windsurfrules/github.svg)](https://agentmods.dev/rules/m3taz-ahmed/ai-globals/windsurfrules)
Your own site
<a href="https://agentmods.dev/rules/m3taz-ahmed/ai-globals/windsurfrules"><img src="https://agentmods.dev/badge/rules/m3taz-ahmed/ai-globals/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/m3taz-ahmed/ai-globals/windsurfrules"><img src="https://agentmods.dev/badge/rules/m3taz-ahmed/ai-globals/windsurfrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 927 This file is loaded in full into every session.
When invoked 927 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 88% copy Near-identical to another mod 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.00927 $0.00927
Opus 5 $0.00464 $0.00464
Sonnet 5 $0.00185 $0.00185
Haiku 4.5 $0.00093 $0.00093

Measured 2d ago against content hash 9aef01a0c008, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 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.

Origin

This is a copy

88% identical to aizee — 10 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.windsurfrules · 52 lines

How it starts

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

aiZee

aiZee — Global Bootloader

  • Root: discovered via AIZEE_ROOT env or config.discover_root() (no hardcoded path).
  • Set AIZEE_ROOT if not already set. Use PYTHONIOENCODING=utf-8 on Windows.
  • This file is the canonical root pointer. All other OS files discover the root via AIZEE_ROOT or config.discover_root() and are loaded relative to it.

Working Directory [DIR-01]

  • Working directory: D:\server.ai ONLY. All edits, new files, and modifications go here.
  • D:\server\aizee is READ-ONLY. Never edit files in aizee directly. It is the deployment/usage folder, updated only via the batch update script.

Cold Start

  1. Read global-roles.md, global-workflow.md, and Memory.md.
  2. Detect personas with aizee persona detect --multi and load the returned skills/ before acting. Persona switch directive (mandatory): If the user message STARTS with a persona command — #انتحل, /انتحل, #reset, /reset, #persona, /persona, #redetect, #switch (or Arabic #شخصيات, /شخصيات, #بدّل, /بدّل, #حالة, /حالة, #مين, /مين, #معلومات, /معلومات) — strip the command token, then run aizee persona detect --multi "<remaining text>" and ADOPT the returned primary + secondary personas and load their skills/ + lords/ before acting. For status commands (#حالة, /status, #مين, /معلومات) print the currently active persona set instead of acting. This makes persona adoption explicit and verifiable; never silently ignore these commands.
  3. If the current project has spec.md, read it before any action.

Runtime Gate

  • Route every action through runtime/kernel.py.
  • Use aizee check <action> --args '{"tokens":N}' or Kernel.act to validate policy + budget.
  • No destructive action without explicit user approval.

Context & Memory

  • Detect stack from package.json / composer.json and load matching tech-stack/<pkg>-<ver>.md only after reading the lockfile for the exact version ([VER-01]).
  • If graphify-out/graph.json exists, use graphify query or query_graph (MCP); never raw grep.
  • Query Context7 MCP for external libraries/frameworks before implementation; use aizee_mcp/aizee_server.py for global context.
  • Run aizee memory ingest when rules/, tech-stack/, or workflows/ change; update Memory.md via workflows/17-memory-sync.md after every milestone.

Read the full file on GitHub · 52 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 · 52 lines · 927 tokens per session scan A 9aef01a0c008

Subscribe to this mod's changes

windsurfrules is a cursor rule published in the GitHub repository m3taz-ahmed/ai-globals (5 stars, last pushed yesterday), licensed MIT. It adds 927 tokens to every session, about $0.0046 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to aizee, differing in 10 lines, and is treated as a copy.