你会建立什么
这篇教学会示范如何为 SEO/GEO 工作设定 Windsurf Rules 和 Memories,避免把它们变成一堆混乱的偏好。Rules 是稳定政策,Memories 是轻量 context,Workflows 是一步一步的 procedure。把这三者分开,初学者就更容易控制 Windsurf。
你会建立:
.windsurf/
rules/
seo-geo-policy.md
technical-seo-risk.md
seo-geo/
context/
brand-facts.md
public-proof.md
memory-cleanup.md
图说:稳定政策放 Rules,短 context 放 Memories,重复步骤放 Workflows。
如果你的 Windsurf setup 是透过 UI 储存 rules,而不是档案,也可以把同样文字贴进 project rules,并把 context files 保留在 repo 里。
步骤 1:写 project SEO/GEO policy
建立一份可以贴进 Windsurf Rules 的 policy file:
mkdir -p .windsurf/rules seo-geo/context
cat > .windsurf/rules/seo-geo-policy.md <<'EOF2'
# SEO/GEO Policy
Always:
- diagnose before editing
- work on one page, one workflow, or one PR comment at a time
- name the files you plan to edit before editing
- mark missing evidence as TODO instead of inventing it
- keep public copy factual, specific, and useful
- preserve internal links that help the reader
- run available validation after edits
Never invent:
- customers
- logos
- testimonials
- awards
- rankings
- revenue numbers
- legal claims
- medical or financial claims
- search volume or analytics metrics
Ask before changing:
- pricing
- robots.txt
- noindex logic
- canonical logic
- redirects
- sitemap generation
- analytics or tracking
- shared page templates
- navigation
- schema helpers used across many pages
EOF2
初学者规则:如果这条 instruction 每周都应该适用,它就属于 Rules。如果它只对单一任务成立,就留在 prompt 里。
步骤 2:建立 technical risk rule
cat > .windsurf/rules/technical-seo-risk.md <<'EOF2'
# Technical SEO Risk Rule
Treat these as high-risk files or concepts:
- robots.txt
- sitemap generation
- noindex, nofollow, indexability helpers
- canonical URL helpers
- redirect rules
- middleware and routing
- hreflang and locale routing
- schema / JSON-LD helpers
- analytics, GTM, GA4, conversion tracking
When any high-risk file is involved:
1. Stop before editing.
2. Explain the search impact.
3. List affected URL patterns.
4. Ask for explicit approval.
5. After approval, apply the smallest diff.
6. Return validation and rollback notes.
EOF2
这可以避免一次简单 page refresh 意外变成全站 technical change。
步骤 3:建立 Memories 可以参照的 brand facts
不要让 Windsurf 记住 private analytics 或 secrets。把稳定的公开事实放进 repo files:
cat > seo-geo/context/brand-facts.md <<'EOF2'
# Brand Facts
Brand name: [your brand]
Category: [your category]
Audience: [primary audience]
Main use cases:
- [use case 1]
- [use case 2]
- [use case 3]
Approved claims:
- [claim with source]
- [claim with source]
Forbidden claims:
- fastest
- best
- #1
- guaranteed rankings
- unsupported customer results
EOF2
cat > seo-geo/context/public-proof.md <<'EOF2'
# Public Proof Sources
Use only these proof types unless approved:
- product screenshots
- public documentation
- public case studies
- public reviews or testimonials already approved for marketing
- first-party benchmarks clearly labeled with methodology
Do not use:
- private customer names
- raw analytics exports
- confidential revenue data
- sales call notes
EOF2
这样 Memories 可以写「brand facts live in seo-geo/context/brand-facts.md」,而不是把事实本身存在 memory 里。
步骤 4:请 Windsurf 建立 safe memories
在 Windsurf 使用这段 prompt:
Review these files:
- `.windsurf/rules/seo-geo-policy.md`
- `.windsurf/rules/technical-seo-risk.md`
- `seo-geo/context/brand-facts.md`
- `seo-geo/context/public-proof.md`
Suggest 5-8 Windsurf memories that help SEO/GEO work.
Rules:
- Do not store secrets.
- Do not store raw analytics.
- Do not store private customer facts.
- Prefer memories that point to repo files and workflow locations.
- Mark anything better suited for Rules or Workflows.
Do not change files until I approve.
好的 memories 很短:
For SEO/GEO tasks, brand facts are stored in seo-geo/context/brand-facts.md.
危险 memories 会像这样:
The API key for Search Console is...
步骤 5:判断什么应该放哪里
| 项目 | 放在 Rules | 放在 Memories | 放在 Workflow |
|---|---|---|---|
| 「不要捏造客户证据」 | 是 | 否 | 可选提醒 |
| Brand facts 档案位置 | 否 | 是 | 可选 |
| 逐步 page refresh procedure | 否 | 否 | 是 |
| Weekly report 格式偏好 | 可能 | 是 | 若重复使用就是 |
| API credentials | 否 | 否 | 否 |
| 暂时 campaign angle | 否 | 可以,但要有 expiry | 可能 |
如果某个 memory 开始变成 procedure,就把它移到 .windsurf/workflows/。
步骤 6:每月 cleanup 一次
建立 cleanup note:
cat > seo-geo/context/memory-cleanup.md <<'EOF2'
# Monthly Windsurf Memory Cleanup
Check for:
- outdated positioning
- expired campaign claims
- old file paths
- private customer facts
- raw analytics
- memories that should be workflows
- memories that duplicate rules
Output:
- keep
- update
- delete
- move to workflow
EOF2
Prompt Windsurf:
Review current Windsurf Rules and Memories for this project.
Use `seo-geo/context/memory-cleanup.md` as the checklist.
Return a table:
- item
- keep/update/delete/move
- reason
- safer replacement text
Do not change rules or memories until I approve.
步骤 7:用 page task 测试
请 Windsurf:
Using the current Rules and Memories, inspect one page for SEO/GEO improvement opportunities.
Do not edit yet. Return:
1. Which rules applied.
2. Which memories helped.
3. Which files you would inspect.
4. What evidence is missing.
5. Whether a workflow should be used.
如果 Windsurf 没有提到你的 policy、technical risk rule 或 brand facts file,就代表你的 rules/memories 太隐藏或太模糊。
FAQ
Memories 可以取代 Workflows 吗?
不行。Memories 是 context,Workflows 是 procedures。10 步骤流程应该放在 .windsurf/workflows/,不是 memory。
可以把 analytics summaries 放进 Memories 吗?
只有 durable、non-sensitive,而且带日期与 caveats 的摘要可以。更好的方式是放在 seo-geo/reports/,方便之后 audit。
Rules 多久应该改一次?
只有当 site architecture、approval policy、positioning 或 validation commands 改变时才改。
AI coding agents for SEO/GEO 学习路径
Windsurf track:
- Cursor vs Windsurf vs Gemini CLI:SEO/GEO 自动化怎么选
- 如何建立 Windsurf Cascade Workflows 做 SEO/GEO
- 如何把 Windsurf Rules and Memories 用在 SEO/GEO Projects
- 如何用 Windsurf 把 Keyword Research 变成 Content Briefs
- 如何用 Windsurf 处理 SEO/GEO PR Comments
- Cursor、Windsurf、Gemini CLI、Codex、Claude Code 的 SEO/GEO 营运模型
Sources and notes
- Windsurf/Devin Desktop documentation: Cascade Workflows ,以及 Cascade、Memories & Rules、Skills、AGENTS.md、Worktrees、MCP、Cascade Hooks 等公开导览。
- Related Auspia guide: Cursor vs Windsurf vs Gemini CLI for SEO/GEO Automation 。
Author: Camille Rhodes, Auspia 300+ AI Content Workflows Architect。Camille 撰写 AI-assisted content workflows、automation 与 editorial quality control。