Skip to main content
Rules are persistent instructions that shape how Devin for Terminal behaves in your project. They’re injected into the agent’s context at the start of every session, ensuring consistent behavior across your team. Common uses for rules include coding standards, architectural guidelines, preferred libraries, testing conventions, and project-specific constraints.

AGENTS.md

The simplest way to add rules is with an AGENTS.md file at your project root:
# Project Rules

- Use TypeScript for all new files
- Follow the existing patterns in src/components/
- Always run `npm run lint` before committing
- Use pnpm, not npm or yarn
- Write tests for all new utility functions
Devin for Terminal reads this file automatically — no configuration needed.
AGENTS.md is the recommended approach for project rules. It’s easy to read, version-controlled, and works across multiple AI tools.

Supported File Names

Devin for Terminal reads rules from any of these files at your project root:
FileNotes
AGENTS.mdRecommended
AGENT.mdSingular alternative
CLAUDE.mdCompatible with Claude Code
All of these are treated identically — their contents are loaded as always-on rules.

Rules From Other Tools

If you’re coming from another AI coding tool, Devin for Terminal can read your existing rules:
Devin for Terminal reads from .cursorrules and .cursor/rules/*.md.Cursor rules support frontmatter to control activation:
---
description: "React component guidelines"
globs: "src/components/**/*.tsx"
alwaysApply: false
---

Use functional components with hooks. Never use class components.
Activation behavior:
  • alwaysApply: true — Always active
  • globs specified — Active when working with matching files
  • description only — Agent decides when to apply
  • None of the above — User must invoke manually
Devin for Terminal reads from .windsurf/rules/*.md.Windsurf rules support frontmatter:
---
description: "API design rules"
trigger: always_on
---

All API endpoints must return JSON with a consistent envelope format.
Trigger values: always_on, manual, model_decision, glob
Devin for Terminal reads from the .claude/ directory.
Devin for Terminal does not support .codeiumignore files. If you use Codeium’s autocomplete and have configured ignore patterns, those patterns will not apply to Devin for Terminal.

Controlling Imports

You can enable or disable reading from specific tool formats in your config file (~/.config/cognition/config.json or .cognition/config.json):
{
  "read_config_from": {
    "cursor": true,
    "windsurf": true,
    "claude": true
  }
}
AGENTS.md is always read and cannot be disabled.

Rule Activation Types

Rules loaded from external formats may have different activation behaviors:
TypeBehavior
Always-onActive in every session, no user action needed
Glob-activatedActive when the agent works with files matching specific patterns
Agent-decidedThe agent chooses when to apply based on the rule’s description
User-invocableOnly active when explicitly triggered by the user
Rules from AGENTS.md are always “always-on”.

Best Practices

Keep rules concise

Long, verbose rules dilute the agent’s attention. Focus on what matters most.

Be specific

“Use pnpm” is better than “use the right package manager”. Concrete instructions are easier to follow.

Include examples

Show the pattern you want, not just a description of it.

Version control them

Keep rules in your repo so the whole team benefits from the same guidelines.
For rules that are personal preferences (not team standards), consider using skills instead. Skills give you more control over when and how they’re applied.