Does Windsurf read AGENTS.md?
Yes. Windsurf reads AGENTS.md, AGENTS.local.md and AGENT.md as always-on rules, at the workspace root and in each directory between the root and the directory the agent is working in.
Windsurf's agent reads always-on AGENTS.md files plus rule files with trigger frontmatter. Its documentation is now published under the Devin name, and the newer rule folder is .devin/rules, with the older Windsurf locations still imported.
Rules are the persistent instructions Windsurf's agent (Cascade) follows in a workspace. Last verified 2026-11-13 against the vendor documentation. Windsurf's documentation now lives on the Devin documentation site, and it describes two layers: AGENTS.md files, which are always on, and individual rule files, which declare when they apply.
See which other agents read these files on the compatibility page.
AGENTS.md, AGENTS.local.md (personal, kept out of version control) and AGENT.md: always-on rules, read at the workspace root and in each directory between the root and the directory being worked on..devin/rules/*.md: one rule per file, with trigger frontmatter..devin/global_rules.md: a single always-on file; the same files in your home directory apply to every project..windsurf/rules/*.md, .windsurf/global_rules.md and .windsurfrules are still imported by default.Rule files in both .devin/rules and .windsurf/rules load. When both global_rules.md files exist, only the .devin one loads.
Each rule file can declare when it applies with a trigger field:
always_on: applied to every task.model_decision: the agent decides whether it is relevant.glob: applied when the agent works with files matching globs.manual: applied only when you invoke it.---
trigger: glob
globs: "**/*.test.ts"
---
- Tests use Vitest. Import from vitest, not jest.
- One behavior per test; name tests after the behavior, not the function.
Because Windsurf treats AGENTS.md as always-on and scopes nested AGENTS.md files to their directory, it fits the AGENTS.md-first pattern without any wrapper file. 2prompt does not generate a separate Windsurf file for this reason.
Windsurf has published per-file character limits for rules, but we did not verify the current numbers on 2026-11-13, so check the vendor documentation before relying on a specific figure. Independent of any limit, always-on rules are sent with every task, so keep them short and push detail into triggered rules.
Windsurf reads AGENTS.md at the workspace root and in each directory between the root and the directory the agent is working in. In a repository with a web app and an API, a root file can hold the shared commit and review rules, while apps/web/AGENTS.md and services/api/AGENTS.md hold the commands and conventions for each part.
Codex and Cursor treat nested AGENTS.md files in a similar way, so this layout also works for teammates using those agents.
If you also keep legacy .windsurf/rules files, read them alongside the AGENTS.md files during a migration. Both are loaded, so any rule left in the old folder still applies until you delete it.
Generate an AGENTS.md with the generator and check legacy files with the linter. Moving from Cursor? See .cursorrules to AGENTS.md.
Yes. Windsurf reads AGENTS.md, AGENTS.local.md and AGENT.md as always-on rules, at the workspace root and in each directory between the root and the directory the agent is working in.
Yes, as a legacy file. The current documentation says the legacy .windsurfrules, .windsurf/rules and .windsurf/global_rules.md files are imported by default. New rules belong in AGENTS.md or .devin/rules.
Windsurf's documentation is now published on the Devin documentation site, and the newer rule folder is named .devin/rules. The older .windsurf folder still works, so existing projects keep their rules.
No separate one. Windsurf reads AGENTS.md as an always-on rule, so the AGENTS.md the generator produces already covers it. Add a .devin/rules file only for rules that need a trigger.