# Continue rules that load on the right files

> Write .continue/rules files with globs and alwaysApply so Continue applies each convention only to the files it is about.

Page: https://videotomd.com/b/text-continue-rules/
Tool: Any AI · Tags: continue, rules, globs, agents-md, conventions · 582 words, about 757 tokens
Pills: free · continue · ran in Claude Code · ran in Ollama · self-check · done check · checked 2026-10-12 · Continue · Claude Code · Ollama · file tools · on trigger · 14B+ · coding

## Recipe

- Kind: rules
- Stage: not set
- Loads: on trigger
- Works in: Continue, Claude Code, Ollama
- Needs: file tools
- Bring: continue
- Cost: free
- Model: 14B+
- Tested in: Claude Code, Ollama
- Checked: 2026-10-12
- For: coding

## When this is useful
- You keep re-explaining the same conventions to Continue in every chat.
- A Python rule keeps firing while you edit CSS, or never fires at all.
- Your team shares one repo and wants the rules committed, not kept in one person's settings.


## Change it to
- Cursor: the same frontmatter works as `.cursor/rules/<name>.mdc` with `globs` and `alwaysApply`; the Cursor harness row gives the path.
- Any other coding agent: fold the always-on file into `AGENTS.md` at the workspace root; Continue reads that file as an always-on rule too (merged PR #7717).
- Short version for a 7B model: keep `10-always.md` to three rules, each with its example, and drop the scoped files.


## If your AI needs to look something up
- Search: `continue rules frontmatter globs alwaysApply` and fetch https://docs.continue.dev/customize/rules for the current field list (`name`, `globs`, `regex`, `description`, `alwaysApply`).


## Put it here

Loads when its trigger matches: put it where your tool looks for it:

- Continue: Save as .continue/rules/<name>.md with `alwaysApply: true`, or as AGENTS.md at the workspace root. Commit it. Reload: new chat. Check it loaded: the pen icon above the toolbar lists active rules. Source: https://docs.continue.dev/customize/rules (checked 2026-10-12).
- Claude Code: Save as CLAUDE.md in the project root, or .claude/CLAUDE.md. Other agents share the repo: put the shared rules in AGENTS.md and make CLAUDE.md one line, @AGENTS.md. Commit it. Start a new session: the file is read at launch. Reload: new session (or /memory to open the files). Check it loaded: /context lists the Memory files it read; /skills, /agents, /hooks list the rest; the InstructionsLoaded hook event fires once per loaded instruction file. Source: https://code.claude.com/docs/en/memory (checked 2026-10-12).
- Ollama: Put the text in a Modelfile as SYSTEM """...""" with FROM <model> and PARAMETER num_ctx <n>, then `ollama create <name> -f Modelfile` and run <name>. Chat-only: paste it as the first message instead. Reload: ollama create again. Check it loaded: `ollama show --modelfile <name>` prints the SYSTEM; `ollama ps` shows the loaded context size. Source: https://docs.ollama.com/modelfile (checked 2026-10-12).

## Access

Membership: plans at https://videotomd.com/pricing/, or email then a plan at https://videotomd.com/b/text-continue-rules/. A member's browser downloads the file there; an AI without that session needs the member to attach it.
