NAME
.augment/guidelines.md — instruction file for Augment Code
SYNOPSIS
.augment/guidelines.md
METADATA
DESCRIPTION
`.augment/guidelines.md` is the instruction file for Augment Code, an AI-powered coding assistant. It supports YAML frontmatter with a `type` field that controls activation: `Always` (loaded on every request), `Auto` (Augment decides based on context relevance), or `Manual` (only when the user explicitly references it).
The file lives in the `.augment/` directory at the project root and uses standard Markdown. It is designed to be committed to version control and shared across the team. The content follows the familiar pattern of project overview, coding standards, architecture description, and workflow commands.
Augment Code's activation modes (Always/Auto/Manual) parallel similar systems in Kiro (always/auto/manual) and Cursor (alwaysApply + globs), though Augment uses a single guidelines file rather than a directory of rule files.
STRUCTURE
ANNOTATED EXAMPLE
1---
2type: Always
3---
4
5# Augment Code Guidelines
6
7## Project Overview
8Full-stack TypeScript application using Next.js 14 (App Router)
9with tRPC, Prisma, and PostgreSQL. Deployed on Vercel.
10
11## Code Standards
12- TypeScript strict mode — no `any`, no `ts-ignore`
13- Use server components by default
14- Client components only for interactivity (onClick, useState, etc.)
15- tRPC routers in `src/server/routers/`
16- Prisma models map 1:1 to database tables
17
18## File Organization
19- `src/app/` — Next.js pages and layouts
20- `src/components/` — Shared React components
21- `src/server/` — tRPC routers and server-side logic
22- `src/lib/` — Utilities, constants, type helpers
23- `prisma/` — Schema and migrations
24
25## Testing
26- Vitest for unit tests
27- Playwright for E2E tests
28- Test files colocated: `Component.test.tsx` next to `Component.tsx`
29
30## Commands
31```bash
32pnpm dev # Start development server
33pnpm build # Production build
34pnpm test # Run Vitest
35pnpm test:e2e # Run Playwright
36pnpm db:migrate # Apply Prisma migrations
37```
COMMON MISTAKES
The `type` field in frontmatter determines when the guidelines are active. Without it, the default behavior may not match your intent. Use `Always` for core standards, `Auto` for context-dependent guidelines, and `Manual` for reference-only content.
Augment Code looks specifically in the `.augment/` directory. Files at the project root with similar names are not read.
Unlike Cline which auto-detects other tools' rule files, Augment Code only reads from its own configuration directory. If you use multiple AI tools, you need separate config files for each.