How to Evaluate AI Coding Capabilities in the Era of Large Language Models: From Snippet Completion to Intent-Level Generation
After staying skeptical about AI coding tools for years, the author revisited them and found that a single natural-language prompt can now produce a complete, runnable project. This article frames that shift as a technical question: can large language models turn one sentence into structured, working code, and how should that ability be evaluated? It explains the move from context-based code completion to intent-level generation, breaks down a Minesweeper example across domain modeling, data structures, algorithms, interaction, state management, and presentation, and outlines where human developers must still take over, such as private business logic, implicit constraints, cross-system contracts, and long-term evolution. It also offers reusable practices for requirements, prompt structure, layered generation, test-based verification, and engineering handoff, plus advice on resetting the division of labor between humans and AI in teams.
Introduction: Why Revisiting AI Coding After Six Months Was a Wake-Up Call
After more than a decade in the software industry and contributing to books about AI-assisted programming, I have remained conservative about this technology. For the past two years, I have repeatedly made the same point: AI will not let lazy developers coast. It amplifies the capabilities of people who can design, stay patient, and understand engineering. The reason is straightforward. Early mainstream large models often produced code with severe hallucinations, incomplete logic, and missing details. To ship a complete feature, developers still had to break down modules, refine requirements, and review code line by line. Reworking a simple function a dozen times was normal.
That experience led many people to stop seriously using AI coding tools for six months or longer, leaving them with a fixed impression: these tools can only help with fragments, syntax lookups, and small bug fixes. They cannot produce a mature, deployable project. But once the technology crosses a certain threshold, a single casual request is enough to overturn that conclusion. This article is not about any specific product. Instead, it abstracts the experience into a general technical question: Can a large language model turn a natural-language requirement into complete, well-structured, runnable project code, and how can that capability be evaluated scientifically?
1. The Real Leap: From Snippet Completion to Intent-Level Generation
Traditional code completion is essentially context prediction. The input is the surrounding code in the current file, and the output is the next few lines. Its ceiling is determined by local context, so it is naturally unsuited for system-level tasks.
Intent-level generation works differently. The input is a business-oriented description, and the model must handle requirement understanding, architecture selection, data structure definition, interaction logic design, and code organization on its own. This requires structured knowledge across files and modules from training, as well as long-range consistency within a single generation.
To judge whether a generation reaches “production-grade” quality, look at four dimensions:
- Completeness: The feature forms a closed loop with no missing critical branches.
- Consistency with conventions: Naming, layering, and comments follow engineering norms.
- Runnability: Dependencies are self-contained, and the project starts without manual fixes.
- Internal consistency: Global state and naming do not contradict each other.
2. Case Review: The Technical Chain Behind “Build a Minesweeper Game”
In the original experience, the user wrote no requirements document, broke down no modules, and performed no system design. They entered a single sentence that anyone could say. The generated result covered the classic board layout, random mine placement, left- and right-click interactions, flag marking, empty-area expansion, win/loss detection, timer tracking, and a reset function.
Breaking it down, the model completed at least six layers of work:
- Domain modeling: Recognizing Minesweeper as a grid-based state machine with three cell states: unrevealed, revealed, and flagged.
- Data structure design: Using a 2D array for cells and a separate structure for game state, timing, and remaining mines.
- Algorithm implementation: Placing mines after the first click to guarantee a safe start, and using breadth-first search for chain expansion of empty areas.
- Interaction layer: Separating left- and right-click semantics, with long press or shortcuts as additional marking options.
- State management: Handling boundary conditions for win/loss detection and timer start/stop.
- Presentation layer: Layout, styling, and feedback animations.
The core logic looks like this:
// Place mines after the first click to guarantee a safe startfunction placeMines(grid, safeRow, safeCol, total) {let placed = 0;while (placed < total) {const r = Math.floor(Math.random() * grid.length);const c = Math.floor(Math.random() * grid[0].length);if (grid[r][c].mine || (r === safeRow && c === safeCol)) continue;grid[r][c].mine = true;placed++;}}// Chain expansion of empty areasfunction reveal(grid, row, col) {const queue = [[row, col]];while (queue.length) {const [r, c] = queue.shift();const cell = grid[r][c];if (cell.revealed || cell.flagged) continue;cell.revealed = true;if (cell.adjacent === 0) {forEachNeighbor(grid, r, c, (nr, nc) => {if (!grid[nr][nc].revealed) queue.push([nr, nc]);});}}}
The reason this code came out right on the first try is that Minesweeper is a classic problem with dense coverage in training data. The model has stable priors for its constraints: the grid, neighbor counting, and flood expansion. This suggests that generation quality depends heavily on how densely a task appears in the corpus and how clearly its constraints are defined, rather than on whether the model “knows how to program.”
3. Knowing the Limits: Scenarios That Still Need Human Backup
Treating a single case as a general capability is the most common evaluation mistake. The following scenarios still require experienced developers to lead:
- Private domain logic: Internal settlement rules, compliance checks, and industry-specific definitions are unknown to the model.
- Implicit constraints: Performance budgets, memory limits, concurrency levels, and offline deployment requirements.
- Cross-system contracts: Existing interface protocols, data migration order, and canary release and rollback strategies.
- Long-term evolution: Maintainability, extension points, and a path for paying down technical debt.
A more accurate conclusion is that AI has driven the cost of going “from zero to runnable” extremely low. The cost of going “from runnable to maintainable and production-ready” has not disappeared. It has shifted from writing code to doing design and verification.
4. Reusable Practices: Turning Occasional Impressiveness into Stable Output
1) Requirement expression: Start with one sentence, converge with three. First describe the goal in natural language, then add three constraints: runtime environment, data scale, and interaction habits. This significantly reduces rework.
2) Prompt structure: role + goal + constraints + acceptance criteria.
Goal: Build a command-line todo listConstraints: single file, no third-party dependencies, local data persistenceAcceptance: supports create, read, update, delete, and filtering by status; readable messages for invalid input
3) Layered generation: skeleton first, then implementation, then polish. Generating a complete project in one shot is suitable for prototypes. For production code, proceed in the order of interface definition → core logic → presentation layer → tests, confirming each layer before moving on.
4) Verification loop: turn acceptance criteria into executable tests. Having the model produce unit tests and boundary cases at the same time is one of the most effective ways to suppress hallucinations.
5) Engineering handoff. After the prototype is validated, bring in version control, continuous integration, logging services, and monitoring and alerting to form a deliverable that can be operated and maintained.
5. Advice for Teams: Redrawing the Human-AI Division of Labor
- Shift the developer’s focus from writing implementations to defining boundaries, setting standards, and conducting reviews.
- Add one item to code review: check whether boundary conditions and exception branches in generated code are actually covered.
- Build a shared library of prompt templates and acceptance checklists to turn individual experience into organizational assets.
- Keep the engineering habit of treating generated results as untrusted by default and accepting them only after verification.
Conclusion
A minimal requirement producing thousands of lines of runnable code shows that large language models have crossed the “usable” threshold and entered a stage of being “useful but requiring control.” What truly determines output is not how powerful the model is, but whether the user can structure vague intent. The stronger the tool, the more valuable engineering judgment becomes. This matches the view I have held for ten years, except that its urgency is far higher today.
