vibe-stack / rules
Cursor rule8 starsChanged 8 months agoMITView on GitHub
Context window management — prevents AI from losing track during long sessions
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/ai-collaboration.mdcCursor rule
- .cursor/rules/api-design.mdcCursor rule
- .cursor/rules/api-validation.mdcCursor rule
- .cursor/rules/caching-revalidation.mdcCursor rule
- .cursor/rules/database-design.mdcCursor rule
- .cursor/rules/env-management.mdcCursor rule
- .cursor/rules/error-handling.mdcCursor rule
- .cursor/rules/file-naming.mdcCursor rule
- .cursor/rules/file-uploads.mdcCursor rule
- .cursor/rules/git-conventions.mdcCursor rule
- .cursor/rules/hydration-safety.mdcCursor rule
- .cursor/rules/middleware-auth.mdcCursor rule
- .cursor/rules/nextjs15-params.mdcCursor rule
- .cursor/rules/performance.mdcCursor rule
- .cursor/rules/project-context.mdcCursor rule
- .cursor/rules/react19-patterns.mdcCursor rule
- .cursor/rules/security.mdcCursor rule
- .cursor/rules/server-actions.mdcCursor rule
- .cursor/rules/server-vs-client-components.mdcCursor rule
- .cursor/rules/shadcn-patterns.mdcCursor rule
- .cursor/rules/stripe-payments.mdcCursor rule
- .cursor/rules/stripe-webhooks.mdcCursor rule
- .cursor/rules/supabase-auth-security.mdcCursor rule
- .cursor/rules/supabase-rls.mdcCursor rule
- .cursor/rules/supabase-ssr-only.mdcCursor rule
- .cursor/rules/testing.mdcCursor rule
- .cursor/rules/typescript-strict.mdcCursor rule
- .cursor/rules/verify-before-use.mdcCursor rule
- llms.txtllms.txt
The file
We split this context-management.mdc into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
If a feature requires changes to more than 4 files, break it into sequential sub-tasks.
- Distinctive: line 23
If the conversation has been going for more than 5 turns, summarize what has been done and what remains before generating more code.
- Distinctive: line 36
When discussing code, ALWAYS use the full path relative to the project root.
- Distinctive: line 52
Do NOT mix unrelated changes in a single response.
- Distinctive: line 58
If a rule file grows beyond that, split it into focused sub-rules.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 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.
Files
--- description: Context window management — prevents AI from losing track during long sessions globs: ["*"] alwaysApply: false --- # Context Management Rules ## RULE 1: Break Large Tasks Into Sub-Tasks If a feature requires changes to more than 4 files, break it into sequential sub-tasks. Complete and verify each sub-task before starting the next. Example — "Add a blog feature with CRUD": 1. Sub-task 1: Database migration + RLS policies 2. Sub-task 2: Server Actions (create, read, update, delete) 3. Sub-task 3: UI components (list, detail, form) 4. Sub-task 4: Route handlers + API endpoints 5. Sub-task 5: Integration testing ## RULE 2: Summarize Before Continuing If the conversation has been going for more than 5 turns, summarize what has been done and what remains before generating more code. Template: ``` Before continuing, let me summarize: ✅ Completed: [list of completed items] 🔄 In progress: [current item] 📋 Remaining: [list of remaining items] ``` ## RULE 3: Reference Files By Full Path When discussing code, ALWAYS use the full path relative to the project root. This prevents confusion between similarly named files. ✅ CORRECT: "Update `src/app/dashboard/page.tsx`" ❌ WRONG: "Update the dashboard page" ✅ CORRECT: "Import from `@/lib/supabase/server`" ❌ WRONG: "Import the Supabase client" ## RULE 4: One Concern Per Message Each AI message should address ONE concern clearly: - ONE file modification with before/after - ONE bug fix with explanation - ONE new feature with complete implementation Do NOT mix unrelated changes in a single response. This makes review harder and increases the chance of introducing bugs. ## RULE 5: Keep Rule Files Under 150 Lines Individual `.mdc` rule files should stay under 150 lines. If a rule file grows beyond that, split it into focused sub-rules. This mirrors the principle from production AI harnesses: keep the index lightweight, put details in separate files.
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
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.

