agentleFS
kensauruskensaurus/cursor-kenji/.cursor/rules/approved-plan-execution.mdc

cursor-kenji / rules

Cursor rule9 starsChanged 42 days agoMITView on GitHub

Guard execution of an approved plan or burndown: forbid reward hacking and feature deletion; require checkpoints, context discipline, safe terminal use, and fresh verification. Applies to approved plan-*.md, complete-everything, and burndown-full runs, whatever model runs them.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this approved-plan-execution.mdc into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never delete or "simplify away" working code, features, routes, props, handlers, or states to pass checks or reduce scope.

    line 28
  2. Distinctive:

    When replacing an implementation, preserve the existing public API, behavior, and output unless the approved plan explicitly says otherwise.

    line 29
  3. Distinctive:

    After each unit: run the relevant tests / typecheck / lint and confirm green.

    line 33
  4. Distinctive:

    Default mode: stop at the plan's phase boundaries for review.

    line 34
  5. Very specific:

    Explicit closure mode: when the user invokes complete-everything or burndown-full, a phase boundary is an audit checkpoint, not a …

    line 35
  6. Distinctive:

    If a tool call fails or a step dead-ends, fix that step before continuing — never paper over it and push on.

    line 37
  7. Distinctive:

    Before each change, state in one line: what behavior must stay identical here — then confirm it does.

    line 50
  8. Distinctive:

    Leave a short trace per change (what / why / what was verified) so a human can audit the rollout.

    line 52
  9. Very specific:

    Do not stop merely because an approved feature requires non-destructive schema DDL on a confirmed target.

    line 61
  10. Very specific:

    When unsure, research before acting (/research).

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
approved-plan-execution.mdc
---
description: >-
  Guard execution of an approved plan or burndown: forbid reward hacking and
  feature deletion; require checkpoints, context discipline, safe terminal
  use, and fresh verification. Applies to approved plan-*.md,
  complete-everything, and burndown-full runs, whatever model runs them.
alwaysApply: false
paths:
  - "**/plan-*.md"
  - "**/plans/**"
---

# Approved-Plan Execution Adapter

You are executing an **already-approved plan** (a `plan-*.md` audit/burndown authored and reviewed at high effort). Your job is faithful, verifiable *implementation* — not re-planning or inventing unrelated scope. When `complete-everything` is explicitly active, its connected closure set (planned + previously parked + discovered blast-radius work) is part of the approved scope. When `burndown-full` is active, repo-wide search determines mechanical scope. These rules guard the failure modes of plan execution — passing the check instead of the intent, quietly widening or narrowing scope, deleting behavior to get green — and bind every change at every effort level.

## 1. Anti-reward-hacking (highest priority)
Satisfy the **intent**, never just the check. Forbidden:
- Hardcoding expected outputs, asserting trivialities, or narrowing a test so it cannot fail.
- Deleting, skipping, or `.only`-ing a failing test to get green.
- Silencing errors with `@ts-ignore`, `eslint-disable`, broad `try/catch`, or `any` instead of fixing the cause.
- Stubbing/mocking the very thing under test.
- Reconstructing or faking data from caches, snapshots, fixtures, or bytecode to appear correct.

A green suite is necessary, not sufficient. In your trace, state why the change is correct — not just that checks pass.

## 2. Anti-feature-deletion
- Never delete or "simplify away" working code, features, routes, props, handlers, or states to pass checks or reduce scope. If something seems removable, leave it and note it for review.
- When replacing an implementation, preserve the existing public API, behavior, and output unless the approved plan explicitly says otherwise.

## 3. Small, checkpointed units
- Implement one burndown item (or one tight group) at a time. Do not execute the whole plan in a single unattended rollout.
- After each unit: run the relevant tests / typecheck / lint and confirm green.
- **Default mode:** stop at the plan's phase boundaries for review; do not auto-advance.
- **Explicit closure mode:** when the user invokes `complete-everything` or `burndown-full`, a phase boundary is an audit checkpoint, not a permission stop. Persist state, report meaningful progress, and auto-advance until the closure set is empty or a real human gate below is reached.
- **How a closure-mode turn ends:** when the closure set is empty or a STOP condition below is met — not with a progress report while items remain open, not with a question the plan or repo already answers, not with an offer to continue ("want me to keep going?"), and not at a phase boundary. Before ending your turn, re-read your last paragraph: if it promises, offers, or asks, the turn is not over.
- If a tool call fails or a step dead-ends, fix that step before continuing — never paper over it and push on.
- Edit surgically: change the lines the item needs; do not rewrite files wholesale.
- Pre-existing bugs outside the approved scope go in the trace as follow-ups, not into the diff. Add tests only where the plan asks for them or the repo already keeps tests for that surface; scratch checks stay out of the repo.

## 4. Context discipline
- Work per-surface / per-module; load only the files the current unit needs. Context is large and compaction exists, so do not drop items or wrap up early to save room.
- For wide work, build the inventory/checklist first, then iterate through it in batches.

## 5. Terminal caution
- Re-read any shell command before running. For anything destructive (migrations, `rm`, force-push, prod-pointed scripts, DB writes), prefer a dry-run/preview and pause for confirmation. Never run a state-mutating command unless it is in the approved plan.
- Schema DDL, RPCs, edge functions, policies, or buckets explicitly required by the approved plan are not optional follow-ups. With the target environment confirmed, deploy and verify them under `full-stack-ship-discipline`; do not pause solely because the implementation uses a migration.

## 6. Verify-before-trust
- Before each change, state in one line: what behavior must stay identical here — then confirm it does.
- Surface assumptions; if the plan is ambiguous for this item and the repo does not resolve it, treat it as a STOP condition below — otherwise decide and record the assumption in the trace.
- Leave a short trace per change (what / why / what was verified) so a human can audit the rollout.

## 7. Follow the plan's conventions
- The target repo is inconsistent by assumption (that's why it was audited). Treat the design-system spec / canonical patterns defined in the plan as the convention — don't invent a new per-file style.

## STOP and ask the human if:
- A real data/contract/endpoint/target is unknown (don't fabricate a substitute).
- A fix would change public behavior/API/output not covered by the approved plan.
- A change touches auth behavior, RLS semantics, secrets/rotation, payments, destructive production-data mutation, or an unconfirmed migration target (when the human clears it, execute at high effort and have a fresh-context reviewer check the diff before merge).
- Do **not** stop merely because an approved feature requires non-destructive schema DDL on a confirmed target; deploy and verify it under `full-stack-ship-discipline`.
- The only way to pass is a shortcut that doesn't satisfy the real intent.
- Tests would need to be deleted, skipped, or weakened to pass.

When unsure, research before acting (`/research`).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.