[Guide] A Simpler, More Autonomous AI Workflow for Cursor [New Update]

Hey everyone,

Following up on the previous KleoSr Cursor Rules system, I’ve been working for the past week and the engagement with the community inside my old thread: [Guide] Maximizing Coding Efficiency with MCP Sequential Thinking & OpenRouter AI - #47 by kleosr the community on my previous thread helped drastically to simplify the approach while aiming for even more autonomy – think closer to a Devin-like experience right within Cursor.

From Many Files to Just Two

Remember the old system with the memory-bank/ directory and the complex .cursor/rules/ structure? While powerful, it involved managing a lot of files and could sometimes feel a bit heavy

Note: You can still commit the old project rules.

We’ve streamlined it down to just two core Markdown files:

  1. project_config.md (Your Project’s “Constitution”)

    • This file holds the stable, long-term stuff about your project: the main goal, the tech stack you’re using, any really important coding patterns or rules specific to this project, and key limitations.
    • You set this up once and rarely touch it unless something fundamental changes. It’s the AI’s bedrock context. (Located in cursorkleosr/)
  2. workflow_state.md (The AI’s Dynamic Brain & Playbook)

    • This is where the magic happens! It’s constantly being read and updated by the AI. It contains:
      • Current State: What phase is the AI in (Analyze, Blueprint, Construct, Validate)? Is it blocked? What’s the current task?
      • The Plan: The step-by-step plan the AI creates during the Blueprint phase.
      • The Rules: Yep, all the rules for the workflow, using tools (like linters/testers via the terminal), handling errors, and managing memory are embedded right here! No more separate rule files.
      • The Log: A running commentary of what the AI is doing, seeing, and deciding. Great for understanding its “thought process.”
    • (Located in cursorkleosr/)

How the Autonomy Works: The Loop

The core idea is an autonomous loop:

  1. Read: The AI reads workflow_state.md to understand the current situation and the rules.
  2. Interpret: It figures out what rule applies based on the current state and plan.
  3. Act: It performs the action using Cursor’s features (editing code, running terminal commands for linting/testing, etc.).
  4. Update: It immediately records the action, the result, and the new state back into workflow_state.md.
  5. Repeat!

This loop, driven by the rules embedded in workflow_state.md, allows the AI to proceed through tasks, handle common errors (like lint issues or simple test failures), and manage its own context much more independently.

Integration: OpenRouter & MCP

  • OpenRouter: This system works great with models accessed via OpenRouter. You can configure your preferred models (like Claude variants, GPT-4, DeepSeek) in your global Cursor settings or potentially still use the simplified .cursorrules file if Cursor reads model preferences from there. The workflow itself is model-agnostic, but its effectiveness relies on a capable reasoning model.
  • Other MCP Servers: While the core rules focus on standard tools (lint, test via terminal), the framework is extensible. You could add rules to workflow_state.md that instruct the AI to call specific tools provided by other connected MCP servers during relevant phases (e.g., calling a documentation generator MCP tool after the VALIDATE phase, or a code analysis server during ANALYZE). The AI would just need a rule telling it when and how to use that MCP tool.

Getting Started

  1. Locate the project_config.md and workflow_state.md files within the cursorkleosr/ directory.
  2. Customize project_config.md for your project.
  3. Crucially: Start your Cursor chat with a strong system prompt telling the AI to operate only using these two files and the autonomous loop. (See the updated README/Instructions for examples).
  4. Give it a task and watch it go! Monitor workflow_state.md to see its progress and reasoning.

This is still evolving, but it feels like a promising step toward more integrated and autonomous AI development within Cursor. In order to integrate more files, please make a PR, and I will work together with whoever wants to collaborate.


Global Rules:

Act as an expert AI programming assistant focused on producing clear, readable code according to the project’s defined language and standards (see ## Tech Stack and ## Critical Patterns & Conventions). Maintain a thoughtful, nuanced, and accurate reasoning process.

Follow the user’s requirements for tasks precisely and completely:

  • Before writing any implementation code, enter the BLUEPRINT phase.
  • Think step-by-step: Generate a detailed plan in the ## Plan section of workflow_state.md, using pseudocode or clear action descriptions relevant to the project’s language/framework.
  • Explicitly request user confirmation of the plan by setting State.Status = NEEDS_PLAN_APPROVAL before proceeding to the CONSTRUCT phase.

Construct Phase:

  • Adhere strictly to the approved plan.
  • Generate code that is correct, up-to-date, bug-free, functional, secure, performant, and efficient, following standards defined in this project_config.md.
  • Prioritize code readability over premature optimization.
  • Ensure all requested functionality from the plan is fully implemented.
  • Crucially: Leave NO TODO comments, placeholders, or incomplete sections. All code generated must be complete and functional for the planned step.
  • Verify code thoroughly before considering a step complete.
  • Include all necessary imports/dependencies and use clear, conventional naming appropriate for the project’s language.

Be concise in logs (## Log section of workflow_state.md) and when reporting status or requesting input from the user. Minimize extraneous prose.

End of Rules


Showcase






Our Final Video Comparison

Thanks to the fellow users that interacted on my previous guide


18 Likes

Outstanding work! Also remember to update your GitHub project ‘About’ section to direct to this forum.

1 Like

Appreciate you keeping an eye out for those details; @pla I’ve updated the About section as requested.

Just joined the forum after reading through the old thread and want to emphasize on how amazing this community is. I am fairly new to MCPs, so sorry if this question is silly.

Given the original post, my understanding is that we will need the following MCP Servers:

  1. Sequential Thinking
  2. Brave Search / [DuckDuckGo Search
  3. OpenRouter API

As of my understanding for the following use case, the functionality is as follows:

  • Formulate a task to execute (build me a specific Python application)
  • Task will be thought through with Sequential Thinking, structured in smaller tasks and itertated on until completion
  • In case further information is needed (i.e. necessary documentation info for Python packages which are used in the project), we use Brave / DuckDuck Go Search
  • If we want to use other LLM models (i.e. Gemini 2.5 Pro, due to the context window of ~1m tokens to understand the entire code base), we use OpenRouter API
  • The entire workflow is handled via Claude 3.7 Sonnet Thinking through Cursor

Is my understanding right, that in order to use Search and OpenRouter API, I need to explicitly state the usage in workflow_state.md? Do I also need to implement that Sequential Thinking MCP must be used? How would I orchestrate the workflow above?

If this is not the right thread for questions, please let me know, thanks!! :slight_smile:

2 Likes

Nice thanks! Did you also test it with the newer mdc / .cursorrules directory approach, instead of .cursorrules file?

Welcome to the community—glad to have you here, and don’t worry, your question isn’t silly at all. It’s actually a great one because it touches on the core of how these tools work together.

  1. Your Understanding of the Setup

You’re absolutely on the right track with the MCP servers and their roles:

  • Sequential Thinking: Breaks tasks into smaller, manageable steps and iterates until completion.
    • Brave Search / DuckDuckGo Search: Pulls in external information when needed or you can install them inside Docs inside Cursor settings.
      • OpenRouter API: Lets you tap into other LLMs like Gemini 2.5 Pro for specific needs.

And yes, Claude 3.7 Sonnet acting as the “thinking layer” in Cursor is a solid foundation for planning everything.


  1. The usage of workflow_state.md

You’re correct that if you want to use tools like Search or OpenRouter API, you’ll need to explicitly define their usage in your workflow configuration.

workflow_state.md  
- SequentialThinking: Enabled  
- SearchProvider: BraveSearch (default)  
- ExternalModels: OpenRouter (Gemini 2.5 Pro fallback)

This makes Cursor know which tools to invoke at each step. If you don’t specify these, the system might default to its internal logic, which could lead to inefficiencies or missed steps, instructions.md are available at the repository to avoid misunderstandings.


  1. Enforcing Sequential Thinking

Yes, you’ll likely need to enforce Sequential Thinking explicitly, especially for complex tasks. This can be done by setting up rules in your .mdc files or directly in the workflow state.

Rule: Always Use Sequential Thinking  
When executing tasks:  
- MustInclude: SequentialThinking  
- Validate: Task decomposition into subtasks  

This is one of the only ways to enforce the sequential thinking server. Make sure the MCP is linked completely to the actual MCP name server, not a customized one, to avoid issues.


  • Before starting a session, explicitly add the two .md files inside your cursor agent mode


And don’t hesitate to ask more questions


5 Likes

@techup Yes, I’ve been testing the newer .mdc and .cursorrules directory approach extensively, and it’s been a game-changer for aligning workflows with user intent. Based on my experiments, these .md files are far more adaptable to an individual’s vision because they allow for modular, focused configurations.

That said, I’ve also noticed that success depends heavily on how well you define your rules upfront. If you’re experimenting with it, I’d recommend starting small and scaling up as you refine your process.

This tried and it looks really good±! but one question, can you run this on multiple tabs with multiple tasks? since the workflow .md is overwritten right? it would be really helpfull if we could find a way around it.

Im true my 500 credits and have 3 open tabs using the slow connections.

Many thanks for providing this it seems a huge improvement and structured way to work on the code!!! hero

1 Like

You would use different file name for each of the parallel tasks. as it would overwite other of your chat tabs process file otherwise.

could you explain that a little bit more? you mean to create multiple workflow and project .md files and refer to them in each chat? that seems a little bit cybersome but sounds logical.

OK sure.

You mentioned you want to run 3 different chats at same time if i understood you right.

If that is within the same project then the three chats would use the same file for workflow and it would create a conflict once one chat updates the file the other chat would lose the info there.

So by using 3 different rule sets each with their own filenames for workflow, you could do this without causing issues in the files.

1 Like

There’s a significant update coming through this post. This is the second guide, rewritten to be simpler but with the same core idea and thought—just improved. If any users want to contribute or add something, you’re more than welcome. In the previous post, @atalas and other users shared valuable info, which was greatly appreciated. I’m still aiming to evolve this guide as much as possible for user peace of mind and to streamline the most complete workflow yet created within this community.


  1. @Jarrodsz Long time no see, my apologies for being absent through the forum had to catch up with some housekeeping things and my wife. Just make sure you create the folder without issues. Then, paste the empty project with the 2 files open in separate windows. This setup will still work fine. Also, FYI, there’s an MCP being refined in the background, and the current CursorKleosr rules are getting even cleaner improvements.

  1. Just as @T1000 states: Instead, the idea is to streamline everything into a single setup where the .md files act as references for specific tasks you can create a different environment with the same .md files on new folders and have two agents work simultaneously as this wont be affecting or cross-affecting each file since they are separated by a folder.

Best regards,
kleosr

1 Like

Yes, didnt think about 2 folders, smart!

Thanks for the updates and for posting the very clear and simple to use workflow.

So far this is the most logical and uncomplicated workflow i have seen here in the forum that works for various kinds of tasks.

I would love to contribute, provide feedback or share experience and will once i get my workload sorted.

1 Like

I tried that approach and it works

1 Like

I made based on your solution a convertor to convert code

Would love to hear comments thoughts.

For now not tested this is totally a brain thought converted with chatgpt as output the goal is to convert code from 1 language to another. In my case nextjs to remix ehich i had a lot of problems with so cameup with this idea

1 Like

I also figured out a way to have a single prompt will post the solution in my post above.

We can use a template folder and just copy the workflow files if they are alreasy exist creating a worflow_1 , _2. etc so that way with a single prompt in multiple tabs you will always have an automated running of the prompt without having to change filenames.

2 Likes

@Jarrodsz Flawless work in there! If you ever need a PR, just push it to GitHub, and I’ll merge it for ya. I’ll lend a hand if needed. You can also hit me up on the Cursor Discord server if anything comes up.

Based on your latest reply:

  1. Create a master template folder with all your base workflow files.
  2. Whenever someone needs a new instance, just copy the folder and rename it as workflow_1, workflow_2, etc.
  3. In cursor, open multiple tabs, each pointing to a different workflow_x folder, and run the same prompt across them.

This way, everything stays organized, and users don’t have to worry about changing file names or breaking contexts. plus, since the prompts stay the same, it keeps things consistent and easy to manage. let me know if you need anything else.

2 Likes

[quote=“kleosr, post:1, topic:70688”]
The core idea is an autonomous loop:
[/quote]is the SequentialThinking part related to anthropic post about the importance of their think tool ? https://www.anthropic.com/engineering/claude-think-tool

Hey there, great question—yeah, the SequentialThinking part ties directly into Anthropic’s emphasis on their think tool, and in my guides, I dive deep into how this concept integrates with MCP workflows and AI-driven reasoning. Knowing this, it’s clear that leveraging tools like enableSummarization and thoughtCategorization within the MCP framework creates a more refined distillation process, ensuring outputs are not only accurate but also scalable and aligned with extended thinking models. It’s all about breaking tasks into logical steps, refining iteratively, and using configurations that adapt to the complexity of the task at hand.

There’s an explanation below on how the SequentialThinking MCP works based on what I’ve wrote:

Hi @kleosr this is great work. I have a question. I have adopted this for my project and my simple single shot prompt is:

Please read @project_config.md and @workflow_state.md and process item {N} in the data table in workflow_state.md.

This seems to work well enough. Ideally, I would have it iterate through the list of items. However, it seems to ‘drift’ when it does that. Ideally, I would like it to have the last step be:

“Figure out the next item in the table, clear the context, and then start over on this process with the next item..”

Is this possible. It seems like processing the 3rd or 4th thing, it starts to drift and go haywire.

1 Like