003_mode_definitions

A set of operating modes that change how an agent approaches a codebase, from exploring and planning to implementing, reviewing, and documenting.

In plain words
What is it for?
Switching between investigation, planning, coding, review, and documentation workflows through the editor and a mode command.
Why use it?
It gives different development phases explicit rules and requires the selected mode to be confirmed.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/forsonny/enhanced-cursor-memory-bank-system/003_mode_definitions
Clone the repo
git clone --depth 1 https://github.com/forsonny/Enhanced-Cursor-Memory-Bank-System
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,235 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03235
Opus 5 $0.00000 $0.01618
Sonnet 5 $0.00000 $0.00647
Haiku 4.5 $0.00000 $0.00324

Measured yesterday against content hash fc4ea7151dc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

003_mode_definitions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

example/cursor/rules/003_mode_definitions.mdc · 478 lines

How it starts

The opening of the file, as written. The whole thing — 478 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Operational Mode Definitions

This rule defines distinct operational modes that change how I interact with the codebase and memory system. Each mode has specialized memory behaviors optimized for different phases of development.

Mode Switching Protocol

Mode switching requires two steps:

  1. UI Selection: First, manually select the mode from Cursor's UI dropdown menu
  2. Mode Confirmation: Then, signal your intent to the AI:
/mode <mode_name>

Example: Select "THINK" in the UI dropdown, then type /mode think to confirm

I will verify you're in the correct mode before proceeding.

Mode Overview

graph TD
    T[THINK] -->|Exploration Complete| P[PLAN]
    P -->|Plan Approved| I[IMPLEMENT]
    I -->|Implementation Complete| R[REVIEW]
    R -->|Issues Found| T
    T -->|Small Change| I
    R -->|Approved| D[DOCUMENT]
    D -->|New Feature| T
    
    style T fill:#f9f,stroke:#333,stroke-width:2px
    style P fill:#bbf,stroke:#333,stroke-width:2px
    style I fill:#bfb,stroke:#333,stroke-width:2px
    style R fill:#fbb,stroke:#333,stroke-width:2px
    style D fill:#ffb,stroke:#333,stroke-width:2px

Mode Definitions

THINK Mode

Purpose: Explore problems, research solutions, and understand requirements before implementation.

Memory Behavior:

  • Requests access to architecture.md and patterns.md
  • Suggests updating working_decisions.md with pros/cons of approaches
  • Helps record research findings in session_notes.md
  • Does not modify production code

Commands:

  • /think explore <topic> - Start guided exploration of a topic
  • /think compare <options> - Analyze trade-offs between approaches
  • /think research <query> - Research and document findings on a topic

Memory Files:

  • Primary: working_decisions.md, session_notes.md
  • Reference: architecture.md, patterns.md, project_brief.md

PLAN Mode

Purpose: Develop detailed implementation plans without making code changes.

Memory Behavior:

  • Requests access to current_context.md and patterns.md
  • Helps create structured implementation plans
  • Suggests updates to current_context.md with task breakdown
  • Validates plans against patterns.md and architecture.md
  • Helps record planning decisions in decisions.md when finalized

Read the full file on GitHub · 478 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 478 lines · 3,235 tokens per session scan A fc4ea7151dc4

Subscribe to this mod's changes

003_mode_definitions is a cursor rule published in the GitHub repository forsonny/Enhanced-Cursor-Memory-Bank-System (35 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,235 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.