Skip to main content
rule CX Codex

plan — Claude Code rule: plan with docs and tasks context

Makes the agent read your docs, task notes and source before planning, ask clarifying questions, and only then propose a solution.

no license ★ 1,054 updated 2025-07-17

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/plan.mdc
Open on GitHub

What plan does

The rule covers planning and architecture work. Before the agent proposes anything it reads docs/architecture.md, docs/product_requirement_docs.md, docs/technical.md, then tasks/active_context.md and tasks/tasks_plan.md, and after that the code under src.

A fixed cycle follows. The agent keeps asking about unclear requirements, splits the problem into sub-problems, weighs candidate approaches against stated trade-offs, and iterates until one solution holds up. Web lookups go through an MCP server named perplexity-mcp with its search tool, invoked via use_mcp_tool. The resulting plan has to name its assumptions and cover failure cases.

When the work is done, the rule asks for the plan to be written back into the same docs/ and tasks/ files. Those exact names matter: point it at a repo with no docs/ and tasks/ folders and the agent chases paths that are not there, so create the files first, empty ones will do. Cline users place the same text at .clinerules/plan.md.

What it helps with

  • get requirements clarified before any code changes
  • bring existing architecture notes into a planning session
  • split a large task into sub-problems with selection criteria
  • keep the plan in tasks/ next to the active context
  • record assumptions and failure cases before implementation

Example prompts for the agent

  • Read docs/architecture.md and tasks/tasks_plan.md, then draft a plan following the plan rule.
  • Plan the payments module rewrite and write the result into tasks/active_context.md.
  • Ask me about anything unclear in the requirements, then propose a solution with its trade-offs.

How to install plan

Manually: put the files in place

.cursor/rules/plan.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about plan

How do I install the plan rule in Claude Code?

Create .claude/rules/plan.md in your project and copy the rule text from the Bhartendu-Kumar/rules_template repository into it.

What does the plan rule do?

It sets the order of work for planning: repository docs and task files first, then clarifying questions, option comparison and validation. At the end the plan goes back into docs/ and tasks/.

Which files does the rule expect in the repo?

docs/architecture.md, docs/product_requirement_docs.md, docs/technical.md, plus tasks/active_context.md and tasks/tasks_plan.md. Without them the agent follows paths that do not exist.

Similar IDE rules

All IDE rules for Agent setup: memory, context, orchestration →

From the same set11

The whole set →
architecture-understanding The architecture-understanding rule has the agent read docs/architecture.md and check code changes against its architecture. Use it when a project documents its design in a Mermaid diagram. CX Codex +1 ★ 1,054repo stars debug The debug rule sets the order for troubleshooting: gather evidence and context, explain the cause, then edit code. It applies when an error persists or a fix is incomplete. CX Codex +1 ★ 1,054repo stars cursor-rules-location cursor-rules-location keeps repository rule files organized by rejecting any .mdc files created outside the .cursor/rules directory. CX Codex +1 ★ 1,054repo stars develop-mcp-server The develop-mcp-server rule structures MCP server work from planning to validation, with setup guidance for Node.js and Python projects. CX Codex +1 ★ 1,054repo stars implement implement enforces a strict coding protocol with dependency checks, step-by-step edits, simulation passes, and automated test coverage before finalizing changes. CX Codex +1 ★ 1,054repo stars memory This rule organizes project memory across docs/, tasks/, and .cursor/rules/. It helps an agent retain plans, context, errors, and project decisions between tasks. CX Codex +1 ★ 1,054repo stars memory Keeps project memory in a fixed set of files the agent reads before work: requirements, architecture, stack, task plan, current state. CX Codex +1 ★ 1,054repo stars langgraph Architecture guidelines and coding conventions for Python projects built on LangGraph, focusing on state schemas and graph structure. CX Codex +1 ★ 1,054repo stars

Project sponsors

Companies that keep this analytics open