Launch offer: use code LAUNCH20 for 20% off any single pack. See all kits

Continue Rules Examples: .continue/rules, Globs and AGENTS.md

Published 2026-11-27 · 10 min read · by AgentKit Co

Continue (continue.dev) reads Markdown files from a .continue/rules/ folder and adds them to the system message for Agent, Chat and Edit requests. Autocomplete doesn't use them. A short frontmatter block decides when each rule applies: always, when a matching file is in the chat, or when the agent asks for it.

First, the news: Continue made its final release in June 2026: version 2.1.0 of the VS Code extension and 1.5.47 of the cn CLI. The continuedev/continue README now says the repo "is no longer actively maintained and is read-only." The extension still works, and so do your rules, but nothing below will get fixed.

We didn't copy this from other guides. We read the rule loader in Continue's final source (loadMarkdownRules.ts, getSystemMessageWithRules.ts, markdownToRule.ts and the CLI's systemMessage.ts). Then we ran that code on 35 test folders on 2026-11-27 and compared it with the official rules docs. Four things behave differently from what the docs suggest, and we flag each one below.

Download free-continue-rules.zip (MIT: four .continue/rules templates, a /review prompt, a check-continue-rules.py checker that matched Continue's own loader in all 35 test folders, an AGENTS.md export for moving off Continue and a 50-test test.sh)

Where Continue looks

The VS Code and JetBrains extension collects rules from five places:

# What Where
1 Colocated rules Any rules.md file in your project, scoped to its folder
2 Agent file AGENTS.md at the workspace root (only that name; see check 1)
3 Rules folder .continue/rules/**/*.md in the workspace, then ~/.continue/rules/
4 Prompts folder .continue/prompts/**/*.md files that don't have invokable: true
5 Legacy file .continuerules at the workspace root

Rules from config.yaml (rules:) come after these. Every rule that applies is pasted into the system message, in that order. Nothing merges or overrides, so two rules that contradict each other both reach the model.

The cn CLI is simpler. It reads the first of AGENTS.md, AGENT.md, CLAUDE.md or CODEX.md in the current folder, plus the always-on rules from .continue/rules/ and ~/.continue/rules/. It skips rules with globs, rules that apply on request, rules.md, .continuerules and the prompts folder.

The frontmatter, and what each setting really does

Frontmatter When the rule applies
none, or only name Always
alwaysApply: true Always, even if it has globs
globs: ["**/*.ts"] When a matching file is in the chat
alwaysApply: false + description, no globs Only when the agent asks for it, using its request_rule tool (Agent mode)
alwaysApply: false + globs When a matching file is in the chat; the agent can't ask for it
alwaysApply: false and nothing else Never

regex works like globs, but it matches the file's content instead of its path. YAML yes/no are not booleans here: alwaysApply: yes counts as unset.

1. Always-on project rules

Save as .continue/rules/01-project.md:

---
name: Project
alwaysApply: true
---

# Project

- What this repo is: [one sentence: what it does and who uses it]
- Stack: [TypeScript 5 strict, Node 22, pnpm]
- Layout: [src/ app code, tests/ mirrors src/, scripts/ one-off tools]

## Commands
- Install: `[pnpm install]`
- Test: `[pnpm test]` (run it before you say a task is done)
- Lint and types: `[pnpm lint && pnpm typecheck]`

## Boundaries
- Never read, print or edit `.env*` files or anything under `[secrets/]`
- Ask before adding a dependency, changing a public API or touching `[migrations/]`
- Don't edit generated files: `[dist/, *.gen.ts]`

This one goes into every request, so keep it short.

2. A rule for one file type

Save as .continue/rules/02-typescript.md:

---
name: TypeScript
globs: ["**/*.ts", "**/*.tsx"]
---

# TypeScript

- `strict` is on. Don't use `any`; use `unknown` and narrow it.
- Prefer `type` imports for types (`import type { User } from ...`).
- Match the error handling already used in the file you're editing.
- New exported functions get a test next to the existing ones in `[tests/]`.

Start every glob with **/. A glob like src/**/*.ts (the docs use this style) stops matching partway through an agent task. Check 3 explains why.

3. A rule the agent fetches only when it needs it

Save as .continue/rules/04-database.md:

---
name: Database changes
alwaysApply: false
description: Read before changing the database schema, writing a migration or editing SQL queries
---

# Database changes

- Never edit a migration that has already shipped. Add a new one with `[pnpm db:migration:new name]`.
- Every migration must be reversible; write the down step too.
- Queries live in `[src/db/queries/]`. Don't build SQL from string concatenation.

In Agent mode, Continue lists Database changes: Read before changing... in its request_rule tool, and the model calls the tool when the task matches. Write the description as a "when", not a title. Don't add globs: then the rule disappears from that list. The download also has a 03-tests.md scoped to test files.

4. A slash command, not a rule

Save as .continue/prompts/review.md:

---
name: review
description: Review the current changes before I commit
invokable: true
---

Review the uncommitted changes in this repo. List problems first, most serious first:
bugs, missing tests, security issues, then style. For each, give the file, the line and a fix.
Don't rewrite code that is fine. End with "Ready to commit" or "Not ready" and one sentence why.

Without invokable: true, Continue loads a file in .continue/prompts/ as an always-on rule, so your review prompt ends up in every request.

AGENTS.md: yes, but not CLAUDE.md

The extension reads AGENTS.md from the workspace root and always applies it. The code means to fall back to AGENT.md and then CLAUDE.md, but the loop stops after checking the first name, even when that file doesn't exist. So in VS Code and JetBrains, a CLAUDE.md on its own is never read. We confirmed this by running the loader. The cn CLI does read CLAUDE.md (and CODEX.md) when there's no AGENTS.md.

If you also use Claude Code, keep the shared rules in AGENTS.md and make CLAUDE.md a one-line @AGENTS.md import. See AGENTS.md vs CLAUDE.md vs Cursor rules.

Why your Continue rules aren't loading: 9 checks

  1. You only have a CLAUDE.md. The extension reads AGENTS.md only (see above). Rename or copy the file.
  2. A horizontal rule ate your text. Continue splits a rule file on any line that is just ---, not only at the top. A file with no frontmatter but two --- dividers loses everything before the second one: the text in between is read as frontmatter. Use *** for dividers, or start the file with a real frontmatter block.
  3. Your glob doesn't start with **/. Continue matches globs against two things: file paths in code-block headers of the last message, and the full file:///home/you/app/src/x.ts path of every file in the chat. An @-attached file gives both on the first reply. Once the agent calls a tool, the last message is the tool result, so only full paths are left, and files the agent opens itself are only ever full paths. src/**/*.ts can't match a full path. **/src/**/*.ts matches both.
  4. Broken YAML makes a rule always-on. If the frontmatter doesn't parse (for example name: API: v2 without quotes), Continue doesn't report an error in the chat. It uses the whole file, frontmatter lines included, as a rule with no globs, so it applies everywhere.
  5. A prompt file became a rule. Anything in .continue/prompts/ without invokable: true loads as an always-on rule.
  6. alwaysApply: false with nothing else. That rule never applies. Add a description (so the agent can request it) or globs.
  7. It's not a .md file, or it's in the wrong .continue. Only .md files are read. Only the .continue/ folder at the workspace root counts, so packages/api/.continue/rules/ in a monorepo is ignored. Subfolders inside .continue/rules/ are fine.
  8. You're using rules.md or .continuerules. A colocated src/api/rules.md gets the glob src/api/**/*, so it has the same problem as check 3. A rules.md at the root turns into /**/* and never applies. The legacy .continuerules only applies when a file is in the chat. Move both into .continue/rules/.
  9. You're in the cn CLI. It only loads always-on rules, so glob and request-only rules don't exist there.

The free check-continue-rules.py runs these checks for you. Point it at a folder, optionally with a few file paths, and it lists every rule Continue loads, when it applies and what's wrong:

$ python3 check-continue-rules.py . --files src/api/user.ts
Continue rules for /home/you/my-app (VS Code / JetBrains extension)

 1. .continue/rules/01-project.md  [always]
 2. .continue/rules/02-typescript.md  [src/api/user.ts: yes]
 3. .continue/rules/03-tests.md  [src/api/user.ts: no]
 4. .continue/rules/04-database.md  [on request (agent's request_rule tool, by description)]
 5. .continue/rules/05-api.md  [src/api/user.ts: only before the agent's first tool call (typed or @-attached), never for files it opens]
 6. .continue/prompts/changelog.md  [always]

Warnings:
 - CLAUDE.md is NOT loaded by the VS Code/JetBrains extension: a loop bug means only AGENTS.md is checked. Rename or copy it to AGENTS.md. (The `cn` CLI does read CLAUDE.md.)
 - .continue/prompts/changelog.md: a prompt file without `invokable: true` is loaded as a RULE (always on), not as a slash command. Add `invokable: true` to its frontmatter.
 - .continue/rules/05-api.md: glob 'src/api/**/*.ts' doesn't start with '**/'. ...

Add --cli to see what cn loads instead. We tested the checker against Continue's own code: in 35 extension folders (each tried with 6 file paths) and 38 CLI folders, both gave the same answer every time.

Moving off Continue

Since Continue won't get updates, you may want to move your rules to a tool that's still maintained. AGENTS.md is the easiest landing spot. Cline, Kilo Code, Cursor, GitHub Copilot, Codex and Zed all read it. The checker can do the first pass:

python3 check-continue-rules.py . --to-agents-md > AGENTS.draft.md

That prints your always-on rules merged into one Markdown file, with each heading pushed down two levels so the structure survives. It lists glob and request-only rules at the end instead of merging them. It doesn't write or overwrite anything. Review the draft, save it as AGENTS.md, then move the scoped rules to your new tool's format: Cursor rules (globs carry over almost as-is), Cline rules (paths:) or Copilot instructions (applyTo:).

FAQ

Is Continue still maintained? No. The final release came out in June 2026 (extension 2.1.0, CLI 1.5.47), and the GitHub repo is read-only. The README says that last release removed anonymous telemetry and pulled out authentication. Open VSX still lists 2.1.0 as the current version.

Does Continue read AGENTS.md? Yes. The extension and the CLI both read AGENTS.md from the workspace root (the CLI uses the folder you run it in), and it always applies.

Markdown or YAML rules? Markdown files in .continue/rules/. The docs still accept YAML rule blocks, but Markdown is what they recommend and what the CLI reads.

What order do rules go in? Colocated rules.md files, then AGENTS.md, then .continue/rules/ (project, then global), then prompt files, then .continuerules, then config.yaml rules. The docs say files load in alphabetical order, but the loader doesn't sort them. It uses the order your editor lists the folder in, which is usually alphabetical. Numbered prefixes (01-, 02-) still help people reading the folder.

Do global rules apply to every project? Yes. Files in ~/.continue/rules/ load for every workspace, after the project's own rules. Set CONTINUE_GLOBAL_DIR to move that folder.

Get matching files for every tool

The free AGENTS.md generator builds AGENTS.md, CLAUDE.md, Cursor, Copilot, GEMINI.md and Kiro files from your package.json or pyproject.toml, and Continue reads the AGENTS.md as-is. The AI Coding Agent Config Kit adds 12 stack templates and prompts that audit and test them. Using other tools too? See Roo Code rules, Windsurf rules, aider CONVENTIONS.md and why AGENTS.md isn't working.

AgentKit Co is not affiliated with Continue Dev, Inc.

AI Coding Agent Config Kit · $14 · 30-day refund

One AGENTS.md for Continue and whatever comes next

AGENTS.md templates for 12 stacks, a CLAUDE.md with .claude/rules, 8 Cursor .mdc rules, Copilot instructions and 12 prompts that draft, audit and trim them. No Continue-specific files; the free rules kit above covers those.

Not ready to buy? Get our free Agent Skills pack on Gumroad (pay what you want, $0 is fine; Gumroad asks for your email to deliver it). Get the free skills

Keep reading

Agent Skills (SKILL.md) Explained: Formats, Folders and SafetyWhat an Agent Skill is, how SKILL.md works, which folders Claude Code, Codex, Cursor and Copilot read, and how to write and vet one. Checked on 2026-10-17.5 min readAGENTS.md Examples: 7 Copy-Paste Files for Real Projects (2026)Seven AGENTS.md examples to copy: Next.js, Python API, Go, a monorepo with nested files, a global ~/.codex file, an override and review rules.8 min readWhat Is an AI Agent? Plain-English Guide for BeginnersWhat an AI agent is, how it differs from a chatbot or automation, and the four building blocks every agent has. No jargon.4 min read