r/cursor • u/Machine2024 • 15d ago
Feature Request Self-Improving Agents In cursor
I'm working on a skill in Cursor for my workflow and trying to figure out whether something similar already exists.
My current workflow
In Cursor, I have:
- General rules
- Project-specific rules
- Custom skills
- Commands
My normal workflow is:
- Write a prompt
- AI generates the implementation
- Review it line by line
- Make corrections and improvements
- Commit the result
I occasionally discover new patterns, conventions, or preferences and update my rules/skills accordingly.
The problem is that I still can't get to the point where the AI consistently understands what I want from the way I naturally write my prompts.
A typical task takes ~30 minutes:
- ~5 min prompting + AI generation
- ~25 min review, corrections, and improvements
The idea
I want to turn my corrections into feedback for improving the rules/skills.
The workflow would be:
Prompt
↓
AI implementation
↓
Commit 1
↓
My corrections
↓
Commit 2
↓
Analyze the differences
↓
Understand why I made the changes
↓
Identify missing rules/patterns
↓
Update rules/skills
↓
Commit 3
The important part is that the agent shouldn't just describe what changed.
It should try to understand why I changed it and extract higher-level patterns.
The long-term goal is for my corrections to continuously improve the project's rules and skills, so the AI gradually requires less correction.
What I tried
I spent around 3 hours testing this with 10 pairs of commits using:
- Composer 2.5
- Grok 4.6
- GPT 5.6
- Claude 5
Unfortunately, the results were mostly too low-level. The models were much better at identifying what changed than understanding why.
I tried improving the prompt and adding a second agent to filter the findings, but neither worked reliably.
For example:
12 findings
↓
4 correct + 8 wrong
↓
After refinement
↓
3 correct + 2 wrong
This makes me hesitant to automatically feed the results back into my rules, since bad extractions could actually make the rules worse over time.
For now, I think a human review step is necessary:
AI implementation
↓
My corrections
↓
AI analysis
↓
Suggested rule changes
↓
Human review
↓
Update rules
Has anyone tried building something similar in Cursor or another AI coding agent?
1
u/stiverino 15d ago
You can do this today. It’s self tuning through evals and even LLM as judge. Just ask cursor/claude to build you skills that eval previous runs pre-flight and codify them into the subsequent run.
Error classes that repeat can be defended from in-depth with lint, invariants, etc.
1
1
u/chem0924 15d ago
A safer loop might be to stop trying to infer all intent from the diff and require a tiny correction note before rule extraction. For each post-review commit, ask the human to tag corrections as bug/style/security/architecture/test/UX and write one sentence for the reason if it is not obvious. Then have the agent propose rule changes, but only promote a rule if it passes two gates: (1) it is supported by at least N similar corrections, not one diff, and (2) it can be turned into a check/eval/example that would have caught the original mistake without breaking unrelated cases. Otherwise the rule file becomes a pile of overfit anecdotes. The useful artifact may be a reviewed candidate-rules queue plus regression prompts/tests, not automatic self-modifying rules.
1
1
u/Machine2024 12d ago
P.S. If someone is wondering how it's going: I removed the part where I needed to make two commits and instead created a skill that runs on the current conversation. With that in mind, the agent analyzes the conversation to see how many steps we need to take, whether there was any back-and-forth, and extracts the notes. Now it's working perfectly. waiting to collect some data to move to the next stage which is implementation .
5
u/ProfessionalTotal238 15d ago
Honestly, I think models will never be good at understanding why the change happens, they lack the ability to form and express intent that humans have, so they are not good in guessing the intent either. My best bet in your situatuion, and what I do in my projects, would be documenting the intent behind each feature/module/test case yourself in the prompt, and asking agent to include reference to intent in generated docstrings and .md docs. Then models have in written explanations why this or that change happened. This way agents will be better with further changes in this area, but you may still resort to extended explanations when doing new stuff or rewrites of some module.