Cursor, an AI-powered code editor, can significantly streamline your software development process. However, to make the most of this tool, it's essential to develop certain practices. One of the most effective methods is to prepare todo files in parts, which makes it easier for the AI to read and act quickly. In this article, you'll learn how to use Cursor more effectively in your projects and avoid common pitfalls.
Splitting todo files into smaller parts is a fundamental way to enhance Cursor's performance. Large and complex files can cause the AI to lose context. By breaking your project into small, manageable pieces, you can make the AI's job easier and improve your project's organization.
How to Do It?
Create a .todo folder in your project.
Add a main todo.md file under this folder. This file should contain the project's general todo list in checkbox format.
For each todo item, create sub-todo files (e.g., user-dashboard.md).
If a todo item is too complex, store sub-steps in separate files: user-dashboard-001.md, user-dashboard-002.md, etc.
Ask the AI to add detailed instructions to each file. Even if there are repetitions, ensure all necessary details are included in every file.
This method allows you to track each stage of your project clearly.
The AI might sometimes generate fictional columns when working with database tables. To prevent this:
Predefine your project's database schema and provide it to the AI.
In each todo file, explicitly state which tables and columns will be used.
Ask the AI to check the table structure and write the necessary columns into the files.
This approach minimizes database-related errors and increases consistency.
When updating an existing project, the AI might struggle because it lacks prior memory. To overcome this:
Ask the AI to thoroughly examine the project and create a project.md file. This file should include the project's general structure, technologies used, and key components.
If you're using frameworks like Laravel, ask the AI to check the Model and Migration files and add the necessary fields to the todo lists.
Although this process may take some time initially, it enhances your project's consistency and the AI's efficiency in the long run.
Below is an example of how to prepare todo files with Cursor:
Instruction:
I will ask you to prepare a todo list for the @user-dashboard.md file.
Using your knowledge, add the necessary information to each step, check the system, and clearly include details about which columns will be used and what is in which table for each step.
Ensure there is no missing information. Make sure no section is forgotten while working.
I will provide you with the information step by step, but we won't start making changes. Just update the @user-dashboard.md file.
If necessary (if the file becomes too large and difficult to read), you can create files like user-dashboard-001.md, user-dashboard-002.md, etc. In fact, it would be great if you did.
In the @user-dashboard.md file, write the file to be used for each step.
Providing Information:
Now, I will start giving you the information; please prepare the todo file(s) as I described.
It will consist of 4 parts; you can create 4 files for these (user-dashboard-001.md, user-dashboard-002.md, user-dashboard-003.md, user-dashboard-004.md).
By following this example, you can use Cursor more effectively in your projects. Preparing todo files in a detailed and modular way may require some effort initially, but it ultimately leads to a smooth and error-free workflow.
When coding a project, even humans can forget things over time. Similarly, due to token limits, the AI can also forget details and start confusing them with the code it was trained on. Although we provide instructions, the code it was trained on is more significant and fixed for the AI. Therefore, it’s crucial to frequently remind the AI of the specifics.
Don’t forget to check the generated files. If, after 1-2 months, you (not the AI) return to the project and can proceed with updates without checking the old code line by line, it means your todo files are perfectly prepared. You can start coding step by step.
Utilizing memory and enforcing the use of tools like context7 through Cursor Rule files will provide additional assistance.
To maximize Cursor's potential, it’s critical to prepare todo files in parts, detail database tables, and strengthen the AI’s memory in existing projects. These practices ensure your projects progress in a more organized manner and reduce errors. By applying the methods and example above, you can optimize your software development processes.