.cursorrules for Cursor and .windsurfrules for Windsurf — to direct each tool to read AGENTS.md before beginning any task. The setup process is identical for both; only the config file name differs.
Install
Run init
Initialize the system in your project:The init script will ask which agents you use. Select Cursor, Windsurf, or both. It creates the appropriate config file with a directive pointing to
AGENTS.md and ensures .agents.local.md is gitignored.Config files
The init script creates the rules file for your tool. If you need to create or recreate it manually, the content is the same for both:- Cursor
- Windsurf
Cursor reads Cursor loads
.cursorrules at session start. Create this file in your project root:.cursorrules
.cursorrules automatically — no further configuration required.Session logging
Neither Cursor nor Windsurf exposes session-end hooks, so the Agent Context System cannot log sessions automatically. To save what happened in a session to.agents.local.md, tell the agent at the end of your conversation:
.agents.local.md.
Session logging depends on the agent seeing Rule 7 in
AGENTS.md and acting on it, or you explicitly prompting it. If you close the editor without logging, that session’s learnings are lost. Building the habit of ending sessions with “log this session” is worth it — the scratchpad is where patterns start their journey into AGENTS.md.