Learning Library

← Back to Library

Incremental Rules to Improve AI Coding

Key Points

  • When the AI repeatedly repeats a mistake, fix it once and then embed that correction as a concrete rule in the AI’s long‑term memory for the project.
  • Use project‑specific rules (e.g., doc‑cursor or cloud.md rules) rather than global ones so the AI applies the fix only where it’s needed.
  • Instead of importing large pre‑made rule sets at the start, create rules incrementally as errors surface during development.
  • Incremental rule building compounds learned lessons, reducing future errors and speeding up the creation of more complex features with AI.
  • This approach keeps the AI’s guidance focused, adaptive, and continuously improving throughout the life of the project.

Full Transcript

# Incremental Rules to Improve AI Coding **Source:** [https://www.youtube.com/watch?v=r6_iykaEfts](https://www.youtube.com/watch?v=r6_iykaEfts) **Duration:** 00:01:06 ## Summary - When the AI repeatedly repeats a mistake, fix it once and then embed that correction as a concrete rule in the AI’s long‑term memory for the project. - Use project‑specific rules (e.g., doc‑cursor or cloud.md rules) rather than global ones so the AI applies the fix only where it’s needed. - Instead of importing large pre‑made rule sets at the start, create rules incrementally as errors surface during development. - Incremental rule building compounds learned lessons, reducing future errors and speeding up the creation of more complex features with AI. - This approach keeps the AI’s guidance focused, adaptive, and continuously improving throughout the life of the project. ## Sections - [00:00:00](https://www.youtube.com/watch?v=r6_iykaEfts&t=0s) **Incremental Rule‑Based AI Debugging** - When an AI repeatedly repeats a mistake, capture that error as a project‑specific rule so the model’s long‑term memory avoids it, building rules incrementally rather than bulk‑loading them to accelerate complex feature development. ## Full Transcript
0:00So I figured out an interesting tactic 0:02to actually improve the AI's ability to 0:04code more complex features for an 0:06application that I'm building over an 0:07extended period of time. So if you're 0:09building AI or building with AI, so if 0:10you're Vive coding, then one tactic I'd 0:13recommend is when you run into an issue 0:15and the AI keeps on doing the same 0:17mistake over and over, once you fix that 0:19mistake, then you make that mistake 0:21concrete in the AI's long-term memory by 0:23setting up a rule specifically for that 0:25mistake. So this could be doc cursor 0:27rules. This could be cloud.md file 0:29rules. Those are the rules that you can 0:30set up in a specific project, not 0:32globally, but in the project. By doing 0:34this, thei is going to likely not make 0:36that same mistake going forward because 0:38you've made it concrete inside of the 0:40rule. Often times I see people creating 0:42massive rules to begin to start the 0:44project by doing a slash init cloud code 0:46or taking a GitHub repository that 0:48somebody else shared for cursor rules. 0:50Don't do that. Instead, build rules 0:52incrementally when errors arise and as 0:54it's needed. By doing this, you're going 0:56to compound the lessons learned 0:57throughout the process of building this 0:59project and accelerate your ability to 1:01build more complex features with AI in 1:03that specific application.