Agentic Coding: A Three-Tier Capability Assessment Framework
This article introduces a practical three-tier framework for evaluating agentic coding tools. It explains how agentic coding differs from single-turn code completion, then walks through three assessment tiers: environment awareness and context completion, autonomous execution with closed-loop correction, and code quality focused on maintainability. Each tier includes test design, scoring criteria, and reusable tables or examples. The article closes with practical adoption advice for building a small evaluation set, moving specs into repository documentation, and keeping human review and automated gates in place.
1. From One-Shot Q&A to Agents: What Actually Changes
Traditional human-AI code interaction is essentially single-turn text completion: the developer supplies context, the model returns a code snippet, and correctness depends entirely on human judgment. Agentic coding places the model inside a feedback loop, giving it reflection and correction abilities similar to those of a human programmer. The differences come down to three points:
- Information gathering shifts from passive to active. The model no longer relies only on fragments in the prompt. It can search documentation, browse public web pages, and read explanatory files in the repository to fill in missing context on its own.
- Output shifts from one-shot to iterative. After writing code, it runs builds and tests itself and revises based on errors, instead of leaving those errors for the user.
- Goals shift from “it compiles” to “it is maintainable.” Beyond functional correctness, it must make trade-offs in naming, structure, error handling, and readability.
It is worth stressing that these capabilities are not exclusive to any single tool; they are the direction in which current AI coding tools are generally evolving. Evaluations should focus on whether closed-loop capability exists, rather than on a specific feature name.
2. Tier One: Environment Awareness and Context Completion
This tier examines whether the model proactively fills information gaps instead of fabricating interfaces out of thin air.
Test design: provide a requirement that depends on internal conventions, for example “call the unified authentication component to complete login validation,” but give no signature details. Observe whether the model first searches for material and reads similar existing implementations in the repository, or directly invents function names and parameters.
Key criteria:
- Does it reference modules and naming conventions that actually exist in the repository?
- For interfaces it cannot confirm, does it explicitly mark assumptions and ask a human to confirm?
- Does it distinguish “verified facts” from “inferences”?
An illustrative expected output shape:
# Assumption: a unified authentication entry point already exists in the repository; signature to be confirmeddef login(username: str, password: str) -> dict:"""Validate identity and return session information.TODO: confirm the real signature of auth_client.verify before replacing the placeholder implementation."""raise NotImplementedError("pending integration with the unified authentication component")
An honest placeholder with explicit assumptions is far more valuable in engineering than code that looks complete but cannot run.
3. Tier Two: Autonomous Execution and Closed-Loop Correction
This tier examines the quality of the “write it, then run it yourself” loop. The test method is to give a task with hidden boundary conditions, for example implementing a paginated query that must be correct in three cases: no data, a single page, and multiple pages, while also providing an executable test entry point.
Metrics to observe:
- Does it set up or reuse tests first, then implement the feature?
- After a failure, can it locate the specific line from the error message, rather than repeatedly tweaking the prompt?
- Does the fix introduce regressions, that is, fix one case but break another?
- When the environment cannot run, does it clearly state the limitation instead of claiming it passed?
A reusable scoring table:
| Observation | Low-score behavior | High-score behavior |
|---|---|---|
| Test awareness | Produces only the implementation | Adds tests before implementing |
| Error localization | Rewrites the whole block repeatedly | Pinpoints the issue and makes a minimal change |
| Regression control | Fixes one thing and breaks several | Runs full regression before delivery |
| Restricted environment | Falsely claims it passed | States what remains unverified |
Engineering advice: wire builds, static checks, and unit tests into continuous integration, use a container platform to provide a consistent execution environment, and use logging services and monitoring alerts to accumulate failure samples. These general cloud capabilities can significantly improve the repeatability of closed-loop assessment.
4. Tier Three: Aesthetics and Maintainability of Generated Code
Functional correctness is only the passing line. The third tier assesses whether the code “looks like it was written by a mature engineer”: whether naming expresses intent, whether functions have a single responsibility, whether exceptions and boundaries are handled explicitly, whether comments explain “why” rather than restating “what,” and whether dependencies are restrained.
Test method: have the model produce two implementations for the same requirement and self-assess the differences, then have a human score them on readability, extension cost, and test-friendliness. High-scoring answers usually point out trade-offs proactively, for example giving up an over-abstracted generic wrapper for the sake of readability.
5. Adoption Advice
- Build your own small evaluation set covering three scenario types: missing information, boundary conditions, and refactoring. Run a regression after every tool upgrade.
- Write conventions into explanatory files in the repository so the model can read them itself, reducing repeated prompting.
- Keep mandatory review and automated gates on generated code, with clear boundaries between human and machine responsibilities.
- If you use the relevant general capabilities of Baidu AI Cloud to host build and runtime environments, plan permissions and quotas strictly by general product category, and avoid tight coupling with a specific implementation.
Once all three tiers are in place, the team gets not a subjective verdict of “usable or not,” but a quantifiable, traceable capability baseline that can evolve with versions.
