AIWorkflowProductivity

How I use AI tools in development without losing control

How I use AI tools in development without losing control

Build faster without losing control - My AI workflow

I started using Copilot in 2023, and last year, in 2025, I spent a lot of time using Cursor and Windsurf. Honestly, AI tools are evolving so fast that by March 2026, my current tool stacks have already switched to Antigravity and Codex desktop.

In this article, I will share how I use AI coding tools to accelerate building while still maintaining critical thinking, instead of blindly vibe coding.

The main workflow includes 5 parts:

1. Coding

1.1 Understand Requirements

Before writing any code, ask questions to clarify all necessary details and edge cases. This was crucial even before generative AI became a trend.

1.2 Detailed Plan and Constraints

An efficient way for me to implement a feature is to write as detailed a plan as possible using bullet points. Constraints are also necessary, such as using @ to specify exactly which files need to be edited.

When building large features, I recommend starting with the plan mode, which breaks detailed requirements into multiple steps. What we need to do is carefully review and modify the generated plan before it actually starts coding.

1.3 UI Development

AI models' visual understanding abilities have become very powerful. Whether you are using React for a web frontend or Swift/Kotlin for a mobile app, taking a screenshot and sending it to an AI coding tool is a super efficient approach.

Another tip for UI development is to separate large UI elements into multiple sub-components across different files, avoiding AI-generated monolithic code. This makes future maintenance much easier. Although this is a very basic design pattern, we sometimes forget it now that generating code is so easy.

1.4 Version Control

Version control is far more important than ever before. Frequently commit code blocks with clear, understandable commit messages. By doing so, it will be much easier to roll back when the AI inevitably messes up the codebase.

1.5 Manage the Context Window

Limiting the context window and reducing irrelevant content are extremely important for improving the quality of generated code.

I highly recommend reading this paper (https://arxiv.org/abs/2510.06606) if you are interested in more details.

If you use the latest version of Cursor, you can easily check the context used. It is best to start a new conversation when it goes over 30%.

For Antigravity (my current primary tool), since it doesn't support context usage checking yet, I suggest starting a new conversation completely after finishing a major feature module.

2. Review

The core work of software engineers has completely changed. Now that coding speed is no longer the bottleneck, critical code review has become more essential than ever. Here are the key elements I focus on during code reviews.

2.1 Security First

I have seen lots of vibe coding disasters happen over the past year on X. Here are some common security checks to perform when reviewing AI-generated code:

  • Ensure no API keys are exposed in git history or hard-coded in files.
  • Check for SQL injection risks when reviewing the data layer in backend projects.

2.2 Logic Correctness

Check the key parts of the generated code: do they actually meet the requirements? For critical implementations, if you have prior experience, it is usually easy to tell whether the logic is correct. As long as we don't let the AI generate massive amounts of code all at once, the review process won't be too difficult.

2.3 Unnecessary Code

AI coding tools tend to generate more verbose code than human engineers. During the code review, it is necessary to check for overcomplicated implementations. For example, some features can be easily implemented using existing npm packages instead of reinventing the wheel.

Simpler code usually means less technical debt and higher maintainability.

2.4 Code Style

Here are two key points for code style reviews:

  • Check if the variable naming is consistent with the existing codebase and team conventions.
  • For JavaScript & TypeScript, run ESLint to fix formatting after each AI generation.

2.5 Maintainability

Ask yourself: will I still understand this code in a week?

3. Debugging

3.1 Give Full Context

Sending the full error message to the AI tool is the fastest way I've found to debug. Besides the error itself, always describe the expected output, the actual behavior, and what you've already tried to fix it.

3.2 UI Bugs

Send an image of what the actual UI looks like, alongside what you expect it to look like (e.g., the Figma design). Additionally, explicitly describe your expectations, such as a button's color or exact position.

3.3 Review the Fix

It's hard to provide a strict rule for reviewing fixes, as it heavily relies on accumulated experience. My biggest suggestion is to never blindly accept fixes, as they often introduce new side effects.

4. Testing

4.1 Let AI write the unit tests

Writing unit tests used to be the most tedious part of development. Now, just let AI work for that. I usually select the core backend logic and let the AI generate the test suites.

4.2 End-to-End Manual Testing

For the project that include user interface, I still prefer manual testing. It still too comolicated for AI to test the whole business logic.

5. Documentation

5.1 README and Setup Docs

A messy project without documentation is a nightmare. I always ask the AI to generate the initial README.md and local setup guides based on the project structure. It does a decent job, but I always manually verify the steps to ensure someone else can actually run the project without getting blocked.

5.2 Inline Comments

While clean code should explain itself, complex logic still needs context. Instead of letting AI write useless comments like // fetch data from api, I prompt it to explain why a certain workaround or specific logic was chosen.

5.3 Keep Docs Synchronized

When you are building features at 5x speed with AI tools, your docs will become outdated very quickly. My workflow is to simply ask the AI to update the relevant documentation files immediately after completing or refactoring a big feature module.

6. Final Thoughts

6.1 Enhance Your Fundamentals

If you lack solid engineering experience, relying entirely on AI is a trap. Pure vibe coding reduces your chances of truly learning how systems work and how to debug complex issues. I highly recommend building some small practice projects completely manually. You need to understand the underlying mechanics before you can effectively guide an AI to build them for you.

6.2 Learn Design Patterns

As AI makes code generation effortless, your real value lies in how you architect the system. The codebase can quickly turn into a mess if you just let the AI write without critical thinking. Learning established design patterns helps you create maintainable code.

In addition, AI tends to generate verbose, overcomplicated code. To counter this, reading books such as "Clean Code" is more relevant than ever.

Last, just remember, AI generates the code, but you take full responsibility for it.