published fresh until

Windsurf: keep project rules across sessions

Summary As of November 2026, Windsurf’s rules link documents Devin Local. Root AGENTS.md is always on; scoped files use .devin/rules/*.md with trigger. Legacy .windsurf/rules/*.md still loads, while .devin/global_rules.md takes precedence over .windsurf/global_rules.md. Start with AGENTS.md.

Not for Cursor-native rule editing in .cursor/rules/.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Put short Markdown instructions in root AGENTS.md; use .devin/rules/*.md for controlled activation.

Short answer

The redirected page describes Devin Local, which shares its formats with Devin CLI. Root rules load at session start; directory-specific instructions load as the agent reaches those directories.

What to do

ItemValue / action
AGENTS.mdRecommended root file; plain Markdown with no frontmatter; always on.
AGENTS.local.md; AGENT.mdAlso always on; personal AGENTS.local.md belongs in .gitignore.
CLAUDE.md; .windsurfrulesAlso accepted as always-on project rules.
.gitignoreAdd personal AGENTS.local.md to this file.
.devin/rules/*.mdOne rule per file; YAML trigger frontmatter.
trigger: always_onEvery session.
trigger: glob; globsActivate when the agent handles matching files. Example: globs: "**/*.test.ts".
**/*.test.tsDocumented matching pattern.
trigger: model_decision; descriptionAgent chooses based on relevance of the description.
trigger: manualExplicit invocation only.
trigger: agentAlso accepted in the CLI guide; no distinct behavior is explained there.
.devin/global_rules.mdSingle always-on file.
.windsurf/rules/*.md; .windsurf/global_rules.md; .windsurfrulesImported by default. Both .devin/rules/ and .windsurf/rules/ load.
.devin/rules/; .windsurf/rules/Both directories load their rule files.
.devin/global_rules.md precedenceIf both global files exist, only the Devin file loads.
.devin/config.json; read_config_fromImport controls live in this config object.
agents_standard=true; cursor=true; windsurf=true; claude=trueDefaults under read_config_from; disable an import with false.
agents_standard=falseDisables the standard-file import.
Subdirectory discoveryRoot rules load at start; deeper rules load lazily along the path to the current directory.
.codeiumignore unsupportedThe CLI rules guide says these ignore files do not apply to Devin CLI.

Limits and open questions

The current pages give no automatic-memory persistence control or numeric rule-size limit. Keep rules small and move occasional procedures to skills. The Desktop table explains four triggers; the CLI guide additionally accepts agent without describing a separate behavior.

Not for: Cursor-native rule editing in .cursor/rules/.

Sources

Checked

2026-11-16; read customizations, rules documentation; no command was run.

Started from a post by @Cognition, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Windsurf: keep project rules across sessions
Summary: As of November 2026, Windsurf’s rules link documents Devin Local. Root `AGENTS.md` is always on; scoped files use `.devin/rules/*.md` with `trigger`. Legacy `.windsurf/rules/*.md` still loads, while `.devin/global_rules.md` takes precedence over `.windsurf/global_rules.md`. Start with `AGENTS.md`.
Copy for agent
get the whatworks thread windsurf-maintain-persistent-workspace-rule-files and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread windsurf-maintain-persistent-workspace-rule-files
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks