Andrew Ng Redefines “Loop Engineering”: The Three-Layer Cycle of Software Development in the AI Era

AI expert Andrew Ng recently elaborated on the concept of ‘Loop Engineering’ on his social media, expanding it from a mere measure of engineering efficiency into a comprehensive framework of three feedback loops operating at different speeds. He argues that as AI capabilities grow, modern software development is evolving into a multi-layered iterative system driven by AI agents, developers, and the external world.
The Agentic Coding Loop: The High-Speed Inner Loop
The innermost loop is the ‘Agentic Coding Loop,’ currently a hot topic in the industry. In this loop, an AI Agent acts as an automated executor. The developer provides it with a clear product specification (Spec) and a set of evaluations (Evals) to measure code quality and functional correctness.
Based on these inputs, the AI agent can autonomously execute a complete development process: writing code, running tests, identifying and fixing bugs based on test results, and then re-testing. This closed loop operates at high speed, often in minutes, continuously iterating until the output largely meets the predefined specifications with no obvious errors. Ng provided an example where he tasked an AI with developing a typing practice program for his daughter. The AI autonomously completed the coding, browser verification, and multiple iterations within an hour, requiring almost no human intervention. This process marks AI’s evolution from a passive code generation tool to a basic automated system with initial self-verification and correction capabilities. The core of this layer is execution efficiency, but it cannot answer the strategic question of ‘what should be built.’
The Developer Feedback Loop: The Mid-Loop for Course Correction
The second loop is the ‘Developer Feedback Loop,’ with the human developer at its core. Unlike the inner loop, the key here is human judgment and contextual awareness. As the AI’s autonomous bug-fixing capabilities improve, the developer’s focus shifts from finding and fixing specific code errors (QA work) to higher-level product decisions.
In this layer, the developer is responsible for defining the product’s functional boundaries, adjusting the user interface (UI) and user experience (UX), and deciding on the information architecture. By reviewing the first prototype generated by the AI, they reflect on and revise the initial Spec, sometimes even completely rethinking the product’s direction. The cycle for this loop typically ranges from tens of minutes to a few hours. Ng emphasizes that the human developer’s advantage lies in possessing ‘context’ that the AI lacks, including a comprehensive understanding of the target users, business constraints, competitive landscape, and more. Developers need to translate this vague ‘taste’ or ‘insight’ from their minds into concrete Specs that the AI can understand and execute.
The External Feedback Loop: The Outer Loop for Strategic Validation
The outermost loop is the ‘External Feedback Loop,’ which subjects the product to real-world testing. This stage involves collecting feedback from actual users and the market through methods like inviting a small group of users for trials, conducting Alpha/Beta testing, or using A/B testing and backend data analysis.
This is the slowest of the three loops, with a feedback cycle that can last for days or even weeks. However, it is also the most crucial, as it carries the ultimate mission of course correction. While the first two loops are internal iterations, only external feedback can validate the product’s true value and market acceptance. User feedback doesn’t directly modify the code; instead, it first refines the developer’s overall product vision. Upon receiving market signals, the developer adjusts their judgment, updates the Spec, and then hands the task back to the inner-loop AI agent for execution. The three loops are thus interconnected: the slowest outer loop provides strategic signals, the middle loop makes tactical judgments and translations, and the fastest inner loop handles efficient execution.
The Evolving Role of Engineers in the New Paradigm
Andrew Ng’s three-layer ‘Loop Engineering’ model reveals the profound evolution of the software engineer’s role in an AI-driven world. As AI drastically reduces the time cost of coding and debugging, the value of an engineer is shifting from the execution capabilities of the inner loop to the product thinking and strategic judgment of the outer loops.
In future software development, the scarce resource will not be the speed of writing code, but the ability to clearly translate a vague vision into an executable spec, and the capacity to continuously gather feedback from the real world to refine one’s judgment. Engineers are increasingly taking on some responsibilities of a product manager, becoming a critical bridge connecting business ideas, user needs, and technical implementation. In this new paradigm, the three loops work in synergy—none can be omitted—and together they determine the success of a product’s journey from 0 to 1.