Вчора показав .cursorrules.
Але якщо ти використовуєш Claude Code чи Copilot — цей файл не спрацює.
Кожен AI-тул читає свій формат. Сьогодні — повна карта.
—
Cursor
Старий формат:
- .cursorrules в корені проєкту
- Один файл, plain text
- Все ще працює, але deprecated
Новий формат:
- .cursor/rules/*.mdc
- Можна багато файлів
- YAML frontmatter з метаданими
Приклад .cursor/rules/react.mdc:
---
description: React component standards
globs: **/*.tsx
---
# React Standards
- Functional components only
- Props interface with JSDoc
- Error boundaries for pagesФішка: globs — правило активується тільки для .tsx файлів. Не засмічує контекст.
—
Claude Code
Два механізми:
CLAUDE.md — пам'ять проєкту
↳ В корені репозиторію
↳ Читається на старті сесії
↳ Команда /init згенерує автоматично
.claude/commands/*.md — кастомні команди
↳ Кожен файл = slash-команда
↳ test-suite.md стає /test-suite
↳ AI може сам викликати твої команди
Приклад CLAUDE.md:
# Project: MealMatics
Stack: Flutter, Supabase, Dart
## Commands
- flutter run -d chrome (web dev)
- flutter test (run tests)
## Code Style
- Riverpod for state
- Freezed for models
- Go Router for navigation
## Structure
- lib/features/ — feature modules
- lib/core/ — shared code
- lib/data/ — repositoriesПриклад .claude/commands/test.md:
# Run Tests
1. Run flutter test
2. If fails — show which tests
3. Suggest fixes for failuresТепер /test запускає цей workflow.
—
GitHub Copilot
Файл:
- .github/copilot-instructions.md
Фішка — path-specific правила:
- .github/instructions/api.instructions.md
- Застосується тільки в папці api/
Приклад:
# Backend Rules
- Express with TypeScript
- Zod for validation
- Prisma for database
- Always handle errors with try-catch
- Log errors to SentryТакож є global правила в налаштуваннях GitHub — для всіх репо.
—
Windsurf
Файл:
↳ .windsurfrules в корені
Чотири режими активації:
Global — завжди активне
Manual — тільки коли @згадаєш правило
Glob — для певних файлів
Model Decision — AI сам вирішує чи потрібне
Приклад:
# Windsurf Rules
## Always
- TypeScript strict mode
- No console.log
## When working with API
- Use axios instance from lib/api
- Handle loading/error statesЩе є Memories — факти, які Windsurf "вивчив" про проєкт. Окремо від Rules.
—
Cline
Файл:
- .clinerules (один файл)
- або .clinerules/ (папка з .md файлами)
Приклад .clinerules:
# Operational Rules
- Always run tests after editing
- Never delete files without asking
- Create backup before refactoring
# Code Style
- ESLint must pass
- No TypeScript errorsCline — агент для file operations. Тому правила часто про безпеку: "не видаляй", "спитай перед тим як".
—
Aider
Файл:
- CONVENTIONS.md
- Підключається через --read CONVENTIONS.md
Фішка — Repo Map:
- AST-карта всього проєкту
- Aider "бачить" структуру без читання кожного файлу
Приклад CONVENTIONS.md:
# Conventions
- Python 3.11+
- Black for formatting
- Pytest for tests
- Type hints required
- Docstrings for public functions—
Зведена таблиця
Cursor → .cursor/rules/*.mdc
Claude Code → CLAUDE.md + .claude/commands/
Copilot → .github/copilot-instructions.md
Windsurf → .windsurfrules
Cline → .clinerules
Aider → CONVENTIONS.md—
Що вибрати
Працюєш з одним тулом? Використовуй його формат.
Команда з різними тулами? Є рішення — AGENTS.md і Rulesync. Про це в наступних постах.
Завтра — три підходи до rules під капотом: чому Cursor "розумніший" за Copilot і коли це має значення.
Stay tuned 🧠