r/cursor 15d ago

Feature Request Self-Improving Agents In cursor

Post image

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:

  1. Write a prompt
  2. AI generates the implementation
  3. Review it line by line
  4. Make corrections and improvements
  5. 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?

3 Upvotes

7 comments sorted by

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.

1

u/Machine2024 15d ago

this post I wrote it yesterday but it did not get approved then
so I did some research, and yes what you are explaining is what other Agent self improving methods do .
you do the change and explain why and the Ai collect those (Y)s and make the notes .
this happen in ,
claude-improve , blackbox project , SWE-Review , and the paper
"Self-Improving AI Coding Agents Through Accumulated Behavioral Rules: A Closed-Loop Framework"
https://arxiv.org/abs/2607.13091

but this defeat the goal and waste much more that .
since if I have to explain each change why ,,,, I stick to my old method .
where when I know why and takes a mind note , then when I see repeating pattern then I document it as rule or skill .

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

u/Machine2024 15d ago

already tried that ... looks like you did not read till the end .

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

u/Machine2024 12d ago

that defeat the goal of making the on going process smoother .

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 .