HomeArticle

Discard it if you cannot understand it: The AI programming principles of a chief architect

数智奔流2026-10-22 10:24
Don't just talk to AI.

On October 19, MiniMax M3.1 Flash was released; on October 17, DeepSeek-V4.1-Flash-1017 was updated. A few days earlier, Meta launched Muse Spark Open; OpenAI updated the parallel Agent capability of GPT-6 Pro; Google also launched Gemini 4 Argon for complex tasks...

The iteration of models is getting faster and faster, and AI programming tools are also constantly changing the way developers work. Generating code, building websites, and developing games can now be completed in just a few rounds of conversation. But writing code faster means that software is easier to develop?

In the podcast Beyond Coding, host Patrick Akil asked chief architect Carlos Kelkboom a question: Compared with a few years ago, what is the most obvious change in software engineering?

Carlos replied: "I have noticed a phenomenon that I don't really like: collaboration among developers is decreasing." "You will work with your own Agent instead of working with the team."

The programming changes brought by AI have long gone beyond code generation itself. How to control code quality, arrange different Agents to work collaboratively, and retain engineering judgment while improving efficiency have all become new problems that developers should face.

Focusing on these issues, Carlos shared his practical experience. The five principles he summarized provide a specific perspective for understanding AI programming:

1. Build the code skeleton in person, and determine directories, key files and function signatures in advance.

2. Prohibit the main Agent from directly modifying codes and files, and do not start the execution Agent until the requirements are fully understood.

3. Discard the generated code if you cannot understand it, isolate the execution results in the working tree, and once you find that it deviates from the expected structure, discard it directly and start over.

4. Let the Agent complete larger tasks at one time as much as possible, so as to avoid continuous code patching caused by repeated modifications.

5. Let multiple Agents explore different schemes in parallel. For example, three Agents develop respectively, and then the fourth Agent compares the results and only merges the good parts.

AI is Only the Starting Point of the Project Marathon

In the context of decreasing collaboration, there is another more direct problem: AI makes it easy to start a project, but it does not make completing a project equally easy. The host has a similar feeling. He found that he can easily start many projects, but often fails to finish them.

Carlos once started five compiler projects, and only one of them was finally completed. Starting a project without finishing it is not a phenomenon unique to the AI era. If developers want to produce a product, they cannot stay in the stage of continuous attempts.

Carlos used the analogy of marathon and sprint, "Making something quickly without finishing it is a completely different thing from making something that you hope can exist for a long time. When a person works on a project alone, he usually will not take that extra step to really finish it."

Carlos also took game development as an example: "For example, you will see many people 'quickly' make games. The reason why I put 'quickly' in quotation marks is that the biggest problem in game development is to listen to users' opinions and make good game designs. You can iterate repeatedly with agents, but you still have to communicate with the outside world."

As generating code becomes easier and easier, developers can easily get a preliminary result. But they may not be willing to continuously invest time to solve subsequent engineering problems. Carlos warned developers: "You must resist the dopamine pleasure of getting something immediately as soon as you start."

Set Rules for Agents Before You Start Working

If starting a project quickly is the convenience brought by AI programming, then how to make the project iterate continuously has become a problem that Carlos pays more attention to.

Carlos introduced his workflow: before starting development, he will manually create directories and files, and sometimes supplement language specifications, code examples and the relationship between modules. The whole process usually takes 20 minutes to 1 hour.

He calls this step Scaffolding, that is, building scaffolding: "For example, if I want to write a compiler, I will first build the directory, write the lexer, and then write a little language specification. I will arrange the directory structure of how the intermediate representation flows all the way from the abstract syntax tree, and also write many examples in the target language. After that, the Agent will directly generate a compiler that is perfectly suitable for this language like a master."

He explained the reason for doing this: "I found that Agents are very good at finding a solution with brute force, but they often forget how this solution should be integrated into the entire application."

Carlos once tried to directly let the Agent develop the application from scratch. One or two months after the project progressed, he found that the code was getting harder and harder to understand, the original deployment scripts were replaced by other scripts, and the purpose of some new scripts was unknown.

Carlos suggested that when facing unfamiliar fields, you can first find some mature open source projects, let the Agent help extract the excellent design patterns in them, and after you understand them, gradually build scaffolding starting from a small-scale proof of concept, and let the Agent help check whether the design is reasonable.

Based on the clear foundation of the early framework, Carlos tends to plan the complete functions in advance, and then let the Agent complete large-scale tasks at one time.

"Agents are not good at modifying, but good at completing tasks at one time. Their training seems to be closer to one-time tasks, rather than iterative development training on the code base." Carlos said, "This is where scaffolding comes into play, most things have been specified."

Of course, Carlos does not advocate investing the same amount of preparation time in all projects. If you just want to verify an idea, developers can try it quickly and restart immediately once the direction is wrong.

He shared a parallel exploration method: "Create three branches, and let three agents complete their work in the three branches or working trees respectively. Then let the fourth Agent compare the three results and only merge the good parts of them."

Throw Away the Code That You Cannot Understand Directly

AI can generate code quickly, and it can also modify it continuously according to feedback. However, as the scale of the project expands, problems such as repeated implementation, module confusion and architecture deviation will gradually accumulate.

Carlos once asked an Agent to develop a compiler. A month later, he asked the Agent to check the list function, and found that the same function had been implemented five times repeatedly. Each modification may solve the immediate problem, but after repeated superposition, the code becomes more and more difficult to maintain.

Therefore, he will regularly check whether the code meets expectations. If the implementation direction deviates, he would rather roll back and redo it than continue to patch on the wrong basis.

Carlos put it very directly: "They are not good at building a complete application at present." He also has a judgment standard: "If I can't understand it, I will throw it away".

The "unintelligible" here means that the code has deviated from the originally set structure and expectations. Carlos will first check whether the implementation conforms to the design; if the key parts do not match, he will roll back the current results, sort out the requirements and scaffolding again, and then start a new round of tasks.

In China, the Meituan technical team disclosed an engineering practice in May this year. The business system it is responsible for has a scale of 310,000 lines of code, more than 90% of which are generated by AI. With the rapid expansion of the system, the team found that if there is a lack of unified architectural specifications, the code generated by different developers with the help of AI will aggravate the complexity of the system, and the historical technical debt will also slow down subsequent iterations.

To this end, the team converted engineering specifications into rules that AI can execute, and added an AI self-inspection link before submitting code, so that the model first checks specifications, defects and exception handling, and then engineers focus on reviewing business logic and technical solutions.

Individual developers control code quality through phased inspections, while enterprise teams need to implement specifications in automated inspection and review processes. This shows that after the speed of code generation increases, quality inspection must keep up.

Since Agents can generate a large amount of code at one time, the review is also facing new pressure. Carlos's suggestion is to continue to retain the normal iteration and review process. "People often use the reason that the code volume is too large. But if there is too much code, why not let the Agent write less?"

Rather than generating a large amount of code at one time and then conducting centralized inspection, it is better to control the scale of each change, add review nodes, and retain discussions among developers. This makes it easier to find problems and allows the team to understand why the code changes.

The Main Agent Does Not Write Code, and is Only Responsible for Understanding Your Requirements

Carlos also designed a special Agent workflow: The main Agent you talk to directly does not modify code or touch the file system, and it is only responsible for interaction. When it is time to work, it dispatches sub-Agents. At the same time, another main Agent loop with the same behavior will run.

The host was very confused: "Why are main Agents not allowed to modify any files by default? Modifying files is what they can do, and they are very proactive in doing it. You consciously prohibit them from doing this, why?"

Carlos said: "Because I want it to focus on the questions I really ask." When he was working on a game, he once asked AI what it thought of John Cleese's speech on the "open mode" and "closed mode" of creativity? The other party immediately asked Carlos: "Do you want me to implement this in your project?"

He suddenly realized, "If the only perspective from which Agents look at all problems is 'can I write code for you right now', how can I possibly get a good answer?" Therefore, he set the main Agent as a role that does not modify files by default. This Agent is responsible for discussing, explaining, clarifying requirements, and can also call sub-Agents to complete actual work.

In order to prevent Agents from starting execution before fully understanding the task, Carlos introduced a confidence assessment mechanism. Only when the system judges that its understanding of the requirements exceeds 90%, is it allowed to start the sub-Agents. "Once the sub-Agents are started, they can complete the task directly, it doesn't matter if they run for twelve hours, multiple Agents can be started at the same time, I don't care. But until it is extremely convinced that it understands what I mean, it is not allowed to start."

This process puts requirement discussion before execution. Developers can sort out the goals, design ideas and constraints clearly first, and then let the Agents focus on completing the work.

A Brand New Programming Language

Carlos believes that "we are at a critical point where a new programming language is needed." He proposed that several problems must be changed: remove heap memory, developers no longer need pointers, no dynamic memory, and no need for those things generated around them.

This new language should be divided into three levels: the first level is for humans to express requirements, which can combine natural language and structured syntax to describe components and their functions. The second level system can generate visual content such as charts and videos, allowing developers to check how the system plans to achieve the goals, and then further communicate and adjust the plan. The third level converts the confirmed design into a machine-executable representation to maximize the certainty during operation.

Carlos said: "We need to return to a state where we can reason about what is actually running on the machine, instead of facing the current uncontrollable AI-style things."

Why is deterministic language so important? Imagine a satellite, launch it into space, and its memory is limited. If the program uses heap allocation, there may be an out-of-memory exception or null pointer exception in the satellite. We are increasingly entering fields such as robotics, satellites, and machine learning, so we hope the system is as deterministic as possible.

Is Communication and Collaboration the Second Language in the AI Coding Era?

AI programming lowers the development threshold. If more and more codes are generated by Agents, do developers still need to spend time learning programming languages, frameworks and underlying principles?

In Carlos's view, developers with solid foundations can better give play to the advantages of AI programming tools. Knowledge takes time to be truly internalized. If you just let Agents generate code, you actually don't learn these things yourself. He also worried that developers rely on AI for help, and their communication with others will decrease accordingly.

Some people will even directly tell their colleagues "ask your Agent first, and then come to me." This involves another easily overlooked problem: independent thinking and creativity need space.

Carlos borrowed John Cleese's view on the "open mode" and "closed mode" of creativity. The open mode requires people to be in a relaxed state, put aside the immediate tasks for the time being, and let their thoughts flow freely, so that new ideas can be generated.

However, social media and AI are instilling information into people anytime and anywhere, "You no longer have a moment where you just sit there, close your eyes, and know yourself." AI can give answers quickly, and let multiple models question each other, but this does not mean that people can completely skip the thinking process.

What kind of talents does the software industry need in the future? Carlos hopes that software development can truly become democratized, so that more people have the ability to solve real-world problems through software.

For example, there will be some process problems in medical services, and some people can try to develop software to help relevant personnel solve practical difficulties.

The old saying "We are the experts, only we can do it" no longer works. The host also said that the lower limit of ability has been lowered, and the entry threshold has suddenly become accessible to everyone, "But I also think that people who have worked in this industry for many years know what is right and what is wrong; the new generation has not yet formed that taste or intuition."

Carlos responded: "If you look at the declining number of people choosing engineering, especially software engineering, in schools, you will find that the future is very scary. We are no longer training junior engineers, just handing agents over to them."

He put forward an extreme possibility: if Tokens become extremely expensive in the future; or AI disappears for some reason, everything will collapse.

Following Carlos's words, the host raised a question "Is this a bubble? Will the bubble burst and leave nothing in the end?"

Carlos said that three things are happening at present:

First, AI has indeed brought revolutionary breakthroughs in medical care, materials science, robotics and many other fields. These are all amazing and wonderful. Carlos described this world with the word "magic".

Second, large language models are incredibly cool, but they are very wasteful and have low energy efficiency. Carlos thinks this is a hype, although the benefits they bring in programming are indeed huge. Companies invest huge sums of money, but they are not sure whether they can fulfill the promises made to everyone.

Third, the balance of power has changed dramatically. Almost all the largest companies are technology companies. Carlos is worried about future privacy and security issues. AI has always been advertised as a "great equalizer tool", but so far we have not seen it really make everyone equal, and in the future it may only make the rich richer.

At the end of the interview, Carlos believes that we are all more and more isolated in our own world. The only way to fight against this is to get together again, work together, make mistakes together, laugh together, and learn together."

This article is from the WeChat official account "Digital Intelligence Surging", author: Tian Yu, editor: Shen Xiao, published with authorization from 36Kr.