2 minute read

Kilo in VS Code can assist you in writing your programming projects through AI. So far, the experience has been quite good. Although it occasionally runs into errors or exhausts the token limit in a single conversation, it can generally complete most requirements if you break them down into smaller tasks.

kilo

Key Takeaways

If I throw my requirements or problems directly at the AI and expect it to fix everything all at once, most of the outputs it generates are incorrect. From this, I’ve learned that it’s actually very similar to working with humans—when writing code, if we can plan it out before we start typing, we can significantly reduce errors.

If I want to add a new feature to a project, I will first use the Ask option to ask questions, such as about the current memory allocation or how to find the right timing/hooks to invoke. Then, based on my understanding, I will describe the desired features and requirements to the Architect option, letting it plan and generate a Markdown (md) requirement document for me. After reviewing the entire document, if everything looks good and it understands what I mean, I will ask it to refine the requirement md to be more specific, such as specifying which paths to modify and what changes to make.

Once a nanny-level, highly detailed requirement md is complete, don’t rush to have the Code option execute it. If we run it directly, the token limit for a single conversation will be depleted very quickly. Therefore, we need to ask the Architect option to write another md file—one that breaks the project down into different milestone tasks, where each phase is independently testable. Take firmware as an example: we might need to partition memory space, so we need to verify that the memory is actually allocated as expected after the build completes before moving on to the next step.

Through repeated confirmation and debugging, two md files are completed: a general feature requirement md, and a breakdown of different small tasks md. Both md descriptions must be specific. At this point, you can start running the Code option. Each time a task is executed, it must be checked and tested, progressing all the way to completion.

AI often misses things, such as duplicate declarations or forgetting to delete code that should be removed. If you encounter a bug, use the Debug option to help troubleshoot. Although I don’t fully understand the exact difference between it and the Code option, using it for debugging is indeed faster.

Finally, even if everything builds or compiles successfully, errors can still occur—such as failing to follow the md requirements or hallucinating and creating unnecessary components. Therefore, it is still necessary to constantly double-check using the Ask option before finally deploying it with peace of mind.



This article was originally written in Chinese and translated into English by AI.
© All rights reserved. Please credit the original source when copying or sharing.

Leave a comment