do-plan-before-doing

A development rule that requires reading a feature specification and inspecting the existing code before writing a step-by-step implementation plan. The plan is reviewed and updated as work progresses.

In plain words
What is it for?
Use it when planning changes across models, APIs, services, views, tests, templates, or styles in an existing codebase.
Why use it?
It reduces mistakes caused by relying on incomplete documentation, missing existing behavior, or assumed dependencies and APIs.

Cursor rule for Cursor

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/featurefactory-io/mimir/do-plan-before-doing
Clone the repo
git clone --depth 1 https://github.com/FeatureFactory-io/mimir

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 205 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.00205
Opus 5 $0.00000 $0.00102
Sonnet 5 $0.00000 $0.00041
Haiku 4.5 $0.00000 $0.00020

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

Security

Grade A, and why

do-plan-before-doing 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 2d ago.

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.

.cursor/rules/do-plan-before-doing.mdc · 15 lines

What it actually says

Rule: Plan Before Doing

  1. Read the feature or spec in full.
  2. If you need new packages, pick one path with the user when multiple fit; update requirements.txt when adding dependencies.
  3. Assess the codebase: what exists, what must change, what must be added. Do not trust signature + docstring alone—open the body; you may find TODO or NotImplementedError.
  4. Scan docs/architecture/; note doc vs code drift and ask the user to resolve.
  5. Write a step-by-step plan (models, APIs, services, views, tests, templates, styles).
  6. Show the plan and get approval or refinements before coding.
  7. After each step: update the plan, show where you stand, state the next step, then implement.
  8. When reality diverges (e.g. missing API you assumed), revise the plan and repeat from step 6.
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. 2d ago First seen · 15 lines · 0 tokens per session scan A be80961c1b04

Subscribe to this mod's changes

do-plan-before-doing is a cursor rule published in the GitHub repository FeatureFactory-io/mimir (13 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 205 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.