CC
ChengAI
HomeExperienceProjectsSkillsArticlesStoriesChat with AI

© 2026 Charlie Cheng. Built with ChengAI.

GitHubLinkedInEmail
Admin
Back to Articles
January 6, 2026

Review Before Writing: An AI Coding Workflow

The Problem

When people talk about AI coding, a few common complaints come up:

“AI code is unreliable. It takes 10 minutes to write and 30 minutes to review. I might as well write it myself.”

“An AI agent’s code always has issues. Endless revisions. It doesn’t save any time.”

Underneath these complaints is a core issue:

In the AI era, we need a new programming workflow.

The default workflow most people fall into is “write first, review later”: let the AI write code independently, then we review it. It feels natural—AI is fast, so why not?

But the result is weak control. We don’t trust the output, and we spend a lot of time reworking it anyway. This “default” experience also stops many engineers from fully embracing AI coding.

The Workflow: Review Before Writing

I use a workflow that looks extremely conservative:

Before the AI writes any code, I work with it to figure everything out first. At this stage, no code changes are executed.

Step 1: Deep Investigation

Before implementing a feature or making changes, I ask the AI to:

  • Deeply investigate the whole codebase for anything related to the task
  • Understand the architecture and existing logic
  • Think and research to form a reliable approach

Step 2: Produce a Complete Execution Plan

Then I have the AI produce a plan that I can review, detailed down to the exact edits:

  • Which lines in which files will change
  • Exactly what will be added and what will be removed
  • The precise final code for each modification

Step 3: Beginner-Friendly Explanations

For each chunk of code, the AI must explain in a way that a beginner can actually understand:

  • What does this do?
  • Why make this change? What principle is it based on?
  • Why is this the most reliable (and minimal) way to satisfy the requirements?

Step 4: Human Review and Dialogue

I read the plan and explanations carefully:

  • Verify the overall approach
  • Check for omissions or risks
  • Ask questions until I fully understand
  • Request revisions and have the AI regenerate the plan

Step 5: Execute Only After Approval

Only when I’m satisfied do I let the AI execute the changes—strictly following the plan, word for word.

Why This Compounds

1) You Control the Code More (Not Less)

“Write first, review later” gradually alienates you from the codebase—you’re cleaning up after the fact without understanding why things are built the way they are.

“Review before writing” forces understanding with every change:

  • Why the code is organized this way
  • Why the feature is implemented this way
  • How the architecture works end-to-end

The more you do this, the more familiar you become with the codebase, the faster you can review, and the smoother delivery becomes.

2) You Fully Benefit From Model Improvements

Every few months, models get stronger. Under “review before writing”:

  • Investigation gets better (finds the right places more reliably)
  • Solutions get more correct (less rework)
  • The workflow gets faster over time

Your capability grows as the models improve.

3) You Become a Better Programmer

You don’t just get “AI-generated code”. You get better work quality, faster delivery, and deeper code understanding.

This isn’t the AI’s work—it’s collaborative work. The AI executes; you provide what it can’t: desire, ideas, responsibility, reliability, and long-term memory.

Practical Tips

If you worry that a single change will be too large (and the plan too long):

  • Split the big task into smaller steps
  • Apply “review before writing” to each step
  • Spend more tokens now to save far more time later

Limitations

This workflow is great, but it doesn’t fully unleash what AI can do.

For company codebases where stability and reliability matter, it’s a strong fit.

But for personal projects—or when you need rapid iteration and don’t need to fully understand every step—it can be overly cautious. I’ll share a better workflow for that scenario later, along with a supporting product I’m building on Builder Space.

Mindset

To survive in this era, we need to find ways to rise together with AI—rather than be submerged or replaced by it.

My two guiding principles are:

  1. Don’t treat the “obvious default workflow”, early impressions, or untested boundaries as the final answer.
  2. Keep exploring how humans and AI should collaborate and help each other.

We’re like humanity in The Three-Body Problem, facing an overwhelming force. Everyone has to find a path and practice it. That often means being ready to challenge yourself and others, and trying new things. We may fail, but we won’t stop struggling.

“There must be some way out of here”

Said the joker to the thief

There’s too much confusion

I can’t get no relief

— Bob Dylan, “All Along the Watchtower”

Comments

mier20 (Full-Stack Engineer)

Thanks for sharing—this is a great perspective. Do you have a concrete template I can refer to? Different AI tools seem to have different ways of defining rules, and I’d like to try this in practice.

Charlie

After I describe the requirements, my instruction to the AI is roughly:

Deeply research everything related to this task: find all relevant files and code in the repo; think deeply; do online research; understand everything about the task; then produce a detailed plan for code changes and additions down to every character.

But do not change any code—only investigate deeply and give me a detailed plan. The plan’s code must be perfect and error-free, and must satisfy the task completely. Don’t over-engineer. Make the smallest changes possible while still meeting all requirements. Don’t change too much. Don’t break other functionality. I need a fully perfect plan.

In your plan, include line-by-line code comments and very detailed explanations. Assume I’m a beginner: I must be able to understand. Before using any technical term, explain it clearly first. Explain intelligently, not by dumping jargon I can’t follow.

Once I’m satisfied with the plan, I ask the AI:

Execute the above plan strictly, without changing a single character. All edits, new files, and deletions must match the plan exactly. Use English comments, keep them short, and comment only at key points.

Xu Jia

How do you keep different native AI coding tools following the same programming rules and project requirements? And how do you ensure certain critical system modules can’t be modified autonomously? Any effective approaches or methods?

Charlie

Different AI coding tools will always have different traits. For example, Augment Code can drive the model to work longer and keep going until it meets requirements. Execution styles differ across tools. To enforce the same rules, you probably need instructions that are clear and detailed enough—and you need the tools to actually read and follow those requirements.

To ensure critical modules aren’t modified: besides adding it to rules and emphasizing it, “review before change” also works, because you can see every single edit the AI wants to make. If you then require strict execution of the reviewed plan, it’s still achievable—as long as you emphasize it enough. Model hallucinations won’t be so extreme that it can’t follow a strict plan at all.

Xu Jia

Thanks, Charlie. It seems you need to gradually tune rules that fit your own project. Some rules conflict with each other; each tuning pass needs a global adjustment with tradeoffs in mind. For different AI coding tools, is it less about each tool’s strengths and more about one tool with good rules tuned over time?

Charlie

Yes—I think choosing one sufficiently strong tool that can satisfy all kinds of needs is the way to go.