Continue Agent Rules

An AI coding assistant with editor integrations and a command-line agent.

Overview

Continue's analyzed file applies only to extensions/cli. It maps authentication, terminal interfaces, tools, and hooks, then gives the TypeScript CLI's build and test rules.

Documents

└── extensions
    └── cli
        └── 

Techniques in this file

01 / Architecture as narrative

Make layered hook configuration explicit

The hooks section lists user-global, project, and project-local settings in increasing precedence. Agents can inspect the correct layer instead of assuming the first configuration file controls behavior.

Source excerpt starting at line 59.
   - **Config locations** (lowest to highest precedence):     - `~/.claude/settings.json`, `~/.continue/settings.json` (user-global)     - `.claude/settings.json`, `.continue/settings.json` (project)     - `.claude/settings.local.json`, `.continue/settings.local.json` (project-local)

02 / Architecture as narrative

Define the protocol meaning of exit codes

The guide distinguishes a blocked operation from an error that should not block it. It also states how stderr becomes feedback when a hook rejects an action.

Source excerpt starting at line 63.
   - **Exit code semantics**: 0 = proceed, 2 = block (stderr becomes feedback), other = non-blocking error

03 / Architecture as narrative

Name unsupported hook types

The hook inventory separates implemented command and HTTP handlers from prompt and agent handlers that are not implemented. This keeps a familiar configuration name from being mistaken for a supported feature.

Source excerpt starting at line 65.
   - **Hook types**: `command` (shell), `http` (POST request), `prompt`/`agent` (not yet implemented)

04 / Good and bad pairs

Show the import spelling required by the build

The build section connects the package's module setup with explicit file extensions. A short contrasting example gives an agent the syntax needed for relative imports.

Source excerpt starting at line 89.
- Relative import paths require explicit file extensions, e.g. 'from "./test.js"' instead of 'from "./test"'

Ideas for your repo

  1. List configuration layers in precedence order.
  2. Document the meaning of control-flow exit codes.
  3. Mark recognized but unimplemented capabilities explicitly.
  4. Pair module-system requirements with an exact import example.
Sponsored byModem

Give your agents the whole story.

These instructions explain how to work in Continue. Modem shows your agents what customers said, who is affected, and what changed.

See how Modem works