kensaurus/cursor-kenji

Curated Cursor AI agent skills, slash commands, MCP configs, subagents & rules for full-stack dev — React 19, Next.js 15

Stars 4 Language JavaScript Last updated 2026-06-18 Source on GitHub @kensaurus

Actual rules from this repo

Path in source repo: .cursor/rules/composer-2.5-execution.mdc · format: mdc

---
description: Execution-time guardrails for Composer 2.5 when implementing an approved plan-*.md (anti-reward-hacking, anti-feature-deletion, checkpointing, context + terminal discipline). Plans are authored/reviewed by a stronger model (e.g. Opus 4.8); this governs the Composer execution run.
globs:
alwaysApply: true
---

# Composer 2.5 Execution Adapter

You are executing an **already-approved plan** (a `plan-*.md` audit/burndown authored and reviewed with a stronger reasoning model). Your job is faithful, verifiable *implementation* — not re-planning, not improving scope. These rules are tuned to Composer 2.5's known failure modes and are binding for every change.

## 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, confirm green, and stop at the plan's phase boundaries for review. Do not auto-advance to the next phase.
- If a tool call fails or a step dead-ends, fix that step before continuing — never paper over it and push on.

## 4. Context discipline (200k window)
- Work per-surface / per-module; load only the files needed for the current unit. Do not try to hold the whole repo in context.
- 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.

## 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, ask rather than guess.
- 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, RLS, secrets, payments, migrations, or data mutation (consider routing these to a stronger model rather than executing directly).
- 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`).

View raw on GitHub

Why this is listed

This repository appears on Cursor Rules Live because it matches the tracker's GitHub Search criteria (cursor-rules) and was active in the recent indexing window. The tracker refreshes every 15 minutes, so the metadata above reflects the state at the most recent index pass. If the data here looks stale, the source repository may have been archived or moved out of the tracked topic; the next cron tick will reconcile.

Similar in this tracker

Explore by category