Colby PalmerColby Palmer
BlogAbout

© 2025 Colby Palmer. All rights reserved.

Pair Programming with Cursor - Part 2

Pair Programming with Cursor - Part 2

Adapting AI workflows into legacy codebases

In Part 1, I wrote about the thrill of spinning up a greenfield project using Cursor’s Agent Mode (then called AI Composer). With Claude 3.5 Sonnet acting like a sharp junior developer, I was able to scaffold a project from scratch and refine the UI with speed and accuracy.

Since then, I’ve been deep in a much larger, older codebase at Quiltster - a project that’s been around for years - and trying to integrate Cursor into that workflow has been a different kind of challenge.

The good news? Cursor is still an enormous time booster, even in legacy code. It especially shines in areas where there’s a lot of repetitive structure or complexity to track - for example, building Bootstrap-based UIs. It handles class names, nested elements, and verbose markup like a pro. It doesn’t get tired, it doesn’t forget, and it never complains about indentation. 😉

What’s changed, though, is that using Cursor in legacy code takes a little more discipline. In Agent Mode, it can be overzealous - touching files it shouldn’t, or making assumptions that don’t apply to your project. That’s where rules come in.

Using Cursor Effectively in Legacy Projects

Here are some of the techniques I’ve found helpful when adapting Cursor to an older, complex codebase:

Project & User Rules

Cursor’s Rules system has evolved. What used to be a simple .cursorrules file is now a powerful set of .mdc files inside .cursor/rules/. These can be scoped globally, per-project, or per-file.

Use the “New Cursor Rule” command in the IDE or manage them in Settings > Rules. For legacy code, I recommend breaking your rules into focused, reusable chunks:

.cursor/
  rules/
    code-style-and-conventions.mdc
    error-handling.mdc
    auth-logic.mdc

Global “User Rules” can also be helpful for coaching the agent to stay out of the wrong files or directories entirely.

Project Documentation

Since Cursor doesn’t yet sync rules across teammates, I’ve started keeping documentation files in a documents/ folder at the root of the project - which Cursor can read and reference in-context:

documents/
  changelog.mdc
  core-features.mdc
  system-architecture.mdc
  features-to-build.mdc

Pro tip: that features-to-build.mdc file can double as a to-do list - and you can have Cursor update it as it finishes features.

Ask Mode vs Agent Mode

If you’re seeing Cursor overstep, switch from Agent Mode to Ask Mode. Ask Mode is slower but more deliberate - it explains its thinking and usually avoids making surprise edits. You can toggle this in the bottom-right panel, and also choose which LLM to use.


Cursor continues to improve at a rapid pace. Even in the short time since Part 1, the IDE has shipped new features, cleaner UX, and better performance. The team seems to be on a tear - and hiring great talent - so I’m excited to see what’s next.

In the meantime, it’s totally possible to make Cursor a reliable pair-programmer even in older codebases… you just have to teach it the rules.


Published on 3/4/2025Artificial Intelligence

Tags

ideaicursor
← Back to blog
RSS Feed