---
title: "Devin Desktop (Windsurf) rules: path และรูปแบบ · DotsAgent"
description: "ตำแหน่งของ .devin/rules/*.md รูปแบบและ frontmatter วิธีผสานไฟล์ระดับ global กับไฟล์ในโฟลเดอร์ย่อย และเครื่องมือที่อ่านไฟล์นี้ ตรวจสอบเมื่อ 2026-10-01"
url: https://dotsagent.io/th/instructions/files/windsurf-rules
---

.devin/rules/*.md

# Devin Desktop (Windsurf) rules: ตำแหน่งไฟล์และวิธีที่เครื่องมืออ่าน

Devin Desktop ซึ่งเป็นชื่อใหม่ของ Windsurf ตั้งแต่ 2026-06-02 อ่านไฟล์ rules จาก .devin/rules/ และยังรองรับ .windsurf/rules/ กับ .windsurfrules แบบเก่า แต่ละ rule จะทำงานตาม trigger ที่กำหนดว่าให้เปิดใช้งานตลอด จับคู่ด้วย glob ให้ model เลือก หรือเรียกใช้ด้วยตนเอง

## ตำแหน่งไฟล์

- Workspace: .devin/rules/*.md (แนะนำ) หรือ .windsurf/rules/*.md (ใช้เมื่อไม่มีตำแหน่งแรก)
- ไฟล์เดี่ยวแบบเก่า: .windsurfrules ที่ root ของ workspace ซึ่งระบบยังอ่านอยู่
- Global: ~/.codeium/windsurf/memories/global_rules.md เปิดใช้งานตลอด
- AGENTS.md ในไดเรกทอรีใดก็ได้
- System (Enterprise): /Library/Application Support/Devin/rules/*.md, /etc/devin/rules/*.md หรือ C:\ProgramData\Devin\rules\*.md

## รูปแบบ

Markdown; rules ระดับ workspace ต้องเริ่มด้วย YAML frontmatter ค่า trigger คือ always_on, model_decision, glob หรือ manual โดย rules แบบ glob ต้องมี globs และแบบ model_decision ต้องมี description จำกัด global_rules.md ไว้ที่ 6,000 อักขระ และไฟล์ rule ระดับ workspace แต่ละไฟล์ไว้ที่ 12,000 อักขระ

คีย์ Frontmatter: `trigger``globs``description`

`.devin/rules/*.md`

```
---
trigger: glob
globs: **/*.test.ts
---

# Test files

- Use Vitest and import describe, it and expect explicitly.
- Test one behaviour per case and name it in plain English.
- Mock network calls with the helpers in test/mocks/.
- Never call real payment APIs from a test.
```

## ลำดับความสำคัญและการผสาน

.devin/ มีลำดับความสำคัญสูงกว่า .windsurf/ กฎของระบบจะรวมกับกฎระดับ workspace และ global โดยไม่เขียนทับกัน ส่วน global_rules.md และ AGENTS.md ที่ root จะเปิดใช้งานตลอด ระบบค้นหา rules ใน workspace ไดเรกทอรีย่อย และไดเรกทอรีระดับบนขึ้นไปจนถึง git root

## เครื่องมือที่อ่านไฟล์นี้

| เครื่องมือ | การรองรับ |
| --- | --- |
| [Cline](https://docs.cline.bot/features/cline-rules) | ตรวจพบไฟล์ .windsurfrules แบบเก่า |

## เคล็ดลับ

- สร้าง rules ใหม่ใน .devin/rules/; เก็บ .windsurf/rules/ ไว้สำหรับการติดตั้งเวอร์ชันเก่าเท่านั้น
- ใช้ trigger: model_decision พร้อม description ที่ชัดเจน สำหรับแนวทางที่ agent ควรเรียกใช้เมื่อเกี่ยวข้องเท่านั้น
- Memories ที่สร้างโดยอัตโนมัติมีผลกับ agent Cascade รุ่นเก่าเท่านั้น ไม่รวม Devin Local ซึ่งเป็นค่าเริ่มต้นในปัจจุบัน

สร้าง AGENTS.md และไฟล์กฎที่ตรงกันสำหรับเครื่องมือ 5 รายการจากแบบฟอร์มเดียว [เปิดตัวสร้าง AGENTS.md →](https://dotsagent.io/th/instructions)

## ไฟล์คำสั่งอื่น ๆ

[AGENTS.md](https://dotsagent.io/th/instructions/files/agents-md)

[CLAUDE.md](https://dotsagent.io/th/instructions/files/claude-md)

[GEMINI.md](https://dotsagent.io/th/instructions/files/gemini-md)

[.cursor/rules/*.mdc](https://dotsagent.io/th/instructions/files/cursor-rules)

[.github/copilot-instructions.md](https://dotsagent.io/th/instructions/files/github-copilot-instructions)

[.clinerules/](https://dotsagent.io/th/instructions/files/cline-rules)

[~/.openclaw/workspace/AGENTS.md](https://dotsagent.io/th/instructions/files/openclaw-workspace)

## แหล่งข้อมูล

1. [docs.windsurf.com](https://docs.windsurf.com/windsurf/cascade/memories)/windsurf/cascade/memories
2. [devin.ai](https://devin.ai/blog/windsurf-is-now-devin-desktop)/blog/windsurf-is-now-devin-desktop
3. [docs.devin.ai](https://docs.devin.ai/desktop/devin-desktop-faq)/desktop/devin-desktop-faq

แหล่งอ้างอิงอิสระสำหรับผู้สร้าง AI agent ไม่มีส่วนเกี่ยวข้องกับผู้ให้บริการที่กล่าวถึง

© 2026 DotsAgent · ตรวจสอบข้อมูลเมื่อ 1 ตุลาคม 2569
