DEV Community

Olivia Craft
Olivia Craft

Posted on

The Cursor AI Workflow That Saves My Team 6 Hours a Week

The Cursor AI Workflow That Saves My Team 6 Hours a Week

Three months ago, my team of four was burning time. Not on features — on corrections. Every PR review surfaced the same problems: wrong patterns, inconsistent conventions, code that worked but didn't match how we build things.

We were using Cursor, but we were using it like a fancy autocomplete. Type a comment, accept the suggestion, fix the output manually. Rinse, repeat.

Then we started treating .cursorrules as engineering infrastructure, not a suggestion box. The result: 6 hours saved per week across the team, measured in reduced PR revision cycles and fewer "can you change this to match our pattern" comments.

Here's the exact workflow.


The Problem: One Rules File Can't Serve Every Project

Our team runs three types of projects simultaneously:

  • A Next.js SaaS frontend
  • A Python data pipeline
  • A vanilla JS browser extension

A single .cursorrules file that says "use TypeScript strict mode" is actively harmful when you're writing Python. Rules that say "use pytest fixtures" make no sense in a Next.js project.

The fix was scoped rules — one .cursorrules per project, tailored to that project's stack and conventions.


Scoped Rules: The Next.js .cursorrules

Here's a trimmed version of what lives in our Next.js project root:

You are an expert Next.js 14 developer using the App Router.

## Stack
- Next.js 14 with App Router (no Pages Router)
- TypeScript strict mode
- Tailwind CSS (no CSS modules, no styled-components)
- Prisma ORM with PostgreSQL
- NextAuth.js for authentication

## File Conventions
- Server Components by default. Only add "use client" when needed.
- API routes go in `app/api/[resource]/route.ts`
- Shared components go in `components/ui/`
- Server actions go in `lib/actions/`

## Patterns
- Use server actions for mutations, not API routes
- Always validate with Zod before database writes
- Use `notFound()` from next/navigation, not custom 404 components
- Prefer `loading.tsx` files over manual loading states

## Never
- Never use Pages Router patterns (getServerSideProps, etc.)
- Never use inline styles — always Tailwind
- Never put business logic in components — extract to lib/
- Never use default exports except for page/layout files
Enter fullscreen mode Exit fullscreen mode

Before scoped rules, a developer would ask Cursor to build a form and get something with getServerSideProps, inline styles, and no validation. Three rounds of PR feedback later, it matched our conventions.

After scoped rules, Cursor generates a Server Action with Zod validation, Tailwind styling, and proper file placement on the first pass.


Scoped Rules: The Python Pipeline .cursorrules

Same team, completely different rules:

You are an expert Python data engineer.

## Stack
- Python 3.12
- pandas + polars for data transforms
- SQLAlchemy 2.0 with async sessions
- pytest with fixtures for testing
- Pydantic v2 for data validation

## Conventions
- Type hints on all function signatures
- Docstrings on public functions (Google style)
- Use pathlib, never os.path
- Use f-strings, never .format() or % formatting
- Prefer polars over pandas for new code

## Error Handling
- Custom exceptions inherit from pipeline.errors.PipelineError
- Always log before raising: logger.error("context", exc_info=True)
- Never catch bare `except:` — always specify the exception type

## Testing
- Fixtures in conftest.py, not inline
- Use tmp_path for file operations
- Mock external APIs, never mock the database
Enter fullscreen mode Exit fullscreen mode

The Python rules enforce completely different patterns than the Next.js rules. That's the point. Each project gets exactly the rules it needs, and nothing it doesn't.


How Rules Cascade in Practice

Cursor reads the .cursorrules file from the project root when you open that project. There's no inheritance between projects — each project is its own world.

Within a project, you can reinforce rules by being specific about directory structure. When your .cursorrules says "API routes go in app/api/[resource]/route.ts," Cursor follows that pattern because it has clear, unambiguous guidance.

The cascade that matters is specificity:

  1. General rules (stack, language, framework) set the baseline
  2. Convention rules (file placement, naming) reduce decision-making
  3. Pattern rules (how to handle auth, errors, data fetching) eliminate whole categories of review feedback
  4. Never rules (anti-patterns, deprecated approaches) prevent known mistakes

Each layer narrows what Cursor generates. By the time you hit layer 4, there's very little room for Cursor to drift.


The Weekly Rule Review Habit

Here's the part most teams skip: rules need maintenance.

Every Friday, we spend 15 minutes reviewing the week's PRs for patterns. We ask three questions:

  1. What did we correct more than once? That's a missing rule.
  2. What rule did Cursor ignore? That rule needs to be rewritten — it's probably too vague.
  3. What rule is no longer relevant? Delete it. Dead rules add noise.

This is our actual review log from two weeks ago:

Pattern Action Rule Added
Cursor kept using fetch instead of our apiClient wrapper Added rule "Always use lib/apiClient for HTTP requests, never raw fetch"
"Use Tailwind" rule was being followed 100% No change
Rule about CSS Modules was from old stack Deleted
Cursor generating console.log in production code Added rule "Use logger from lib/logger, never console.log"

In three months of weekly reviews, our rules file went from 12 lines to 47 lines. Every line earned its place by preventing a real mistake.


Catching Drift with Rule Audits

Even with good rules, Cursor can drift during long sessions. The model loses track of constraints when conversations go deep. We catch this with a simple audit habit:

After every PR, the author checks three things:

  1. Does the generated code match the .cursorrules conventions?
  2. Are there any patterns that should be a rule but aren't?
  3. Did Cursor introduce any dependencies we didn't approve?

This takes 2 minutes per PR. It's not a formal process — it's a habit. And it's the reason our rules stay effective instead of becoming stale documentation that nobody reads.


The Results

After 12 weeks of this workflow:

  • PR revision cycles dropped 60% — code matched conventions on first submission
  • Onboarding time for new team members cut in half — the .cursorrules file IS the conventions doc
  • 6 hours/week saved across 4 developers — less correction, less back-and-forth, less "that's not how we do it"

The biggest surprise: the .cursorrules file became our most-read team document. New developers read it before the README. It's the fastest way to understand how a project actually works, not how it theoretically should work.


Start Building Your Workflow

The key is to start small. Add 5 rules this week. Review them on Friday. Add 3 more next week. In a month, you'll have a rules file that genuinely changes how your team ships code.

If you want to skip the trial-and-error phase, I built a Cursor Rules Pack v2 with production-tested rule sets for Next.js, Python, React, Node.js, and more. Each rule set is based on real team workflows — not generic advice, but specific patterns that prevent specific mistakes.

Get the Cursor Rules Pack v2 ($27) ->


What's in your .cursorrules? Share your best rule in the comments — the more specific, the better.

Top comments (0)