This project provides a streamlined way to work with AI assistants (like Claude or GPT-4) inside the Cursor IDE, making development more autonomous and consistent. It helps the AI remember project context and follow a structured process, even across different sessions. Think of it as giving your AI assistant a reliable memory and a clear playbook. This system now supports iterative processing of lists of items, enhancing its capabilities for complex tasks.
This setup is inspired by the ideas in the original kleosr/cursorkleosr repository but simplifies it drastically for better autonomy and lower overhead.
- @atalas Atalas Cursor IDE Profile
- @stevejb Stevejb Cursor IDE Profile
- Contributors to the original
kleosr/cursorkleosrconcepts.
Instead of many complex rule files, this system uses just two core Markdown files:
-
project_config.md(Long-Term Memory - LTM):- Purpose: Holds the stable, essential information about your project.
- Content: Project goals, main technologies, critical coding patterns/conventions, key constraints, and now, tokenization settings (e.g., characters per token for estimation).
- Usage: The AI reads this at the start of major tasks to understand the project's foundation. It's updated infrequently.
-
workflow_state.md(Short-Term Memory + Rules + Log - STM):- Purpose: The dynamic heart of the system. Tracks the current work session.
- Content:
## State: Current phase (Analyze, Blueprint, etc.), status (Ready, Blocked, etc.),CurrentItem(for iteration).## Plan: The step-by-step plan for the current task (created in Blueprint phase).## Rules: All the operational rules defining the workflow phases, memory updates, tool use, error handling, and now, iteration logic.## Log: A running log of actions, tool outputs, and decisions made during the session.## Items: A list of items to be processed iteratively (table format).## TokenizationResults: Stores results (summary, token count) for each processed item.
- Usage: The AI reads this file constantly before acting and updates it immediately after acting. This is how it maintains context and follows the process.
The AI operates in a continuous cycle, driven by the workflow_state.md file:
graph LR
A[Start] --> B{Read workflow_state.md};
B --> C{State.Status == READY and CurrentItem == null?};
C -- Yes --> D[Trigger RULE_ITERATE_01];
C -- No --> E{Proceed with current workflow};
E --> F[Execute current step];
F --> G[Update workflow_state.md];
G --> H{Phase == VALIDATE?};
H -- Yes --> I[Trigger RULE_ITERATE_01];
H -- No --> E;
D --> J{More items in list?};
J -- Yes --> K[Set CurrentItem to next item];
K --> L[Clear ## Log];
L --> M[Reset State.Phase and State.Status];
M --> B;
J -- No --> N[Set State.Status = COMPLETED_ITERATION];
N --> O[End];
In simple terms: The AI reads the state, interprets rules, decides what to do, acts via Cursor, observes the result, updates the state, and repeats. The new iteration feature adds a loop within this main loop, processing items one by one, clearing context between each.
The ## Rules section defines a simple, structured workflow:
- [PHASE: ANALYZE]: Understand the task and context. No coding or planning solutions yet.
- [PHASE: BLUEPRINT]: Create a detailed, step-by-step plan for implementation. No coding yet.
- [PHASE: CONSTRUCT]: Execute the plan precisely, using Cursor tools. Handle errors based on rules. This phase now includes iterative processing of items from the
## Itemssection. - [PHASE: VALIDATE]: Run tests and checks to ensure the implementation matches the plan and requirements.
The AI follows the constraints of the current phase, guided by the rules in workflow_state.md.
- Locate the Files: The core files
project_config.mdandworkflow_state.mdare located within thecursorkleosr/directory. - Fill
project_config.md: Add your project's specific goals, tech stack, key patterns, constraints, and tokenization settings. - Instruct the AI: Start your Cursor chat with a clear system prompt instructing the AI to operate exclusively based on these two files and the autonomous loop described above. (A good system prompt is crucial for enforcement!).
- Example Snippet for System Prompt: "You are an autonomous AI developer. Operate solely based on
project_config.mdandworkflow_state.md. Before every action, readworkflow_state.md, determine state, consult## Rules, act accordingly, then immediately updateworkflow_state.md."
- Example Snippet for System Prompt: "You are an autonomous AI developer. Operate solely based on
- Give the First Task: The AI will initialize based on
RULE_INIT_01and ask for the first task.
The main .cursorrules file is now less important for the workflow itself. You might still use it for global Cursor settings (like preferred AI models or global ignores), but the core logic resides in workflow_state.md.
This project concept is licensed under the MIT License - see the LICENSE file for details.
Feel free to adapt and improve this system. Share your experiences and refinements!
- @atalas Atalas Cursor IDE Profile
- @stevejb Stevejb Cursor IDE Profile
- Contributors to the original
kleosr/cursorkleosrconcepts.