如何把 Windsurf Rules and Memories 用在 SEO/GEO Projects

安全使用 Windsurf rules 與 memories 做 SEO/GEO 工作:把穩定政策、輕量 context 與 step-by-step workflows 分開管理。

你會建立什麼

這篇教學會示範如何為 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

Windsurf Rules、Memories、Workflows 在 SEO/GEO 專案中的分工

圖說:穩定政策放 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:

  1. Cursor vs Windsurf vs Gemini CLI:SEO/GEO 自動化怎麼選
  2. 如何建立 Windsurf Cascade Workflows 做 SEO/GEO
  3. 如何把 Windsurf Rules and Memories 用在 SEO/GEO Projects
  4. 如何用 Windsurf 把 Keyword Research 變成 Content Briefs
  5. 如何用 Windsurf 處理 SEO/GEO PR Comments
  6. Cursor、Windsurf、Gemini CLI、Codex、Claude Code 的 SEO/GEO 營運模型

Sources and notes

Author: Camille Rhodes, Auspia 300+ AI Content Workflows Architect。Camille 撰寫 AI-assisted content workflows、automation 與 editorial quality control。

探索此主題

繼續閱讀相同的成長脈絡