Agentic Coding and Frontend Aesthetics in Chinese LLMs: A Three-Tier Evaluation

    This article proposes a three-tier evaluation method for Chinese LLMs used in agentic coding and frontend generation. Tier one examines single components and page fragments against design tokens, state coverage, responsiveness, and accessibility. Tier two moves to multi-file projects and focuses on contracts, type consistency, dependency control, error handling, and tests. Tier three evaluates an end-to-end agent loop in a sandbox, including tool use, log-driven debugging, minimal patches, regression checks, budgets, and review gates. The article also translates frontend aesthetics into observable constraints and recommends design tokens, contract-first workflows, dependency whitelists, test gates, sandbox execution, audit logs, and human review. It concludes that Chinese LLMs can provide production-assistance value inside controlled engineering processes, and that their real ceiling depends more on evaluation design, constraints, and governance than on a single generation.

    Agentic Coding and Frontend Aesthetics in Chinese LLMs: A Three-Tier Evaluation

    As agentic coding moves from concept to engineering practice, evaluating a Chinese LLM should not focus only on whether code from a single Q&A turn runs. The more important question is whether the model can plan, execute, verify, and repair within tool feedback, and whether it can reliably produce frontend interfaces that meet design specifications, cover complete states, and remain maintainable. This article uses two main lines—code generation and frontend aesthetics—to design a three-tier progressive test method and to offer reusable constraints, gates, and governance recommendations.

    1. Evaluation Framework: Why Three Tiers Are Necessary

    Traditional code evaluation often stops at a one-shot model of “give a prompt, generate code, review manually.” This approach easily overestimates model capability. Single-file code can achieve decent results through local pattern matching, but once the work enters a multi-file project, a real runtime environment, and interactive states, problems quickly surface. Examples include cross-file type inconsistency, missing error handling, incorrect dependency assumptions, bypassed tests, and interfaces that have only a static appearance but lack loading and empty states.

    Evaluation therefore needs to move from “text generation” to an “engineering loop.” The first tier examines the generation quality and design fidelity of single components and page fragments. The second tier examines contract consistency, abstraction quality, and maintainability in multi-file projects. The third tier examines the model’s agentic ability to call tools in a sandbox, read logs, locate errors, make minimal fixes, and verify regressions. The three tiers answer three questions: can it write, can it organize code into a system, and can it self-correct through feedback?

    2. Capability Profile: Observable Metrics for Agentic Coding and Frontend Aesthetics

    The core of agentic coding is not “code completion.” It is a closed loop that includes task decomposition, context retrieval, tool calls, execution feedback, self-correction, and delivery notes. During evaluation, observe whether the model first clarifies constraints and acceptance criteria; whether it breaks the task into verifiable steps; whether it locates errors from logs instead of rewriting blindly; whether it controls the scope of changes; and whether it explains assumptions, risks, and uncovered scenarios at delivery.

    Frontend aesthetics should also not remain a subjective judgment of whether something “looks good.” It should be broken into executable metrics: whether the layout hierarchy is clear, spacing rhythm is consistent, color contrast is readable, the component state matrix is complete, responsive breakpoints are reasonable, keyboard focus and semantic structure are usable, empty and error states are friendly, and micro-interactions are restrained. Only by writing these metrics into prompts and acceptance checklists can “aesthetics” become reproducible engineering constraints.

    3. Tier 1: Single Components and Page Fragments—From Generation to Fidelity

    The first tier uses typical page fragments, such as a data card list with filtering, sorting, pagination, and state switching. Acceptance points include semantic structure, style organization, state boundaries, responsiveness, and accessibility. Models can usually generate a complete structure quickly, but common problems are also concentrated: hard-coded colors and spacing, missing empty states, incomplete loading and error states, crowded layouts on narrow screens, and interactive elements without focus styles.

    A more effective approach is “design tokens first.” In the prompt, first provide spacing, radius, color, and font-size hierarchy, then ask the model to output the component. Require the state matrix to cover normal, loading, empty, error, and disabled states. Illustrative pseudocode is below:

    1. // Pseudocode: component generation constraints with design tokens first
    2. tokens = {
    3. spacing: [4, 8, 12, 16, 24],
    4. radius: { sm: 4, md: 8 },
    5. color: { primary: "var(--brand)", danger: "var(--danger)" }
    6. }
    7. function DataCard(item) {
    8. // Must cover: loading / empty / error / normal / disabled
    9. // Single column on narrow screens, two columns on wide screens; heading hierarchy must not skip levels
    10. // Interactive elements must have keyboard focus and readable labels
    11. // Do not hard-code colors or spacing; reference tokens only
    12. }

    The conclusion for this tier is that, with explicit design tokens and a state checklist, Chinese LLMs can stably produce component-level code that is usable and design-conscious. Without constraints, however, models tend to generate static pages that look visually complete but are fragile in engineering terms. The key in the first tier is therefore not to pursue one-shot perfection, but to use checklists to turn subjective aesthetics into acceptance conditions.

    4. Tier 2: Multi-File Projects—From Fragment Correctness to System Consistency

    The second tier enters multi-file engineering: implement a frontend module with permission checks, form validation, API layer abstraction, error handling, and basic tests. Acceptance points include directory structure, type definitions, API contracts, error boundaries, state management boundaries, and test coverage. At this point, differences in model capability are amplified: can it define contracts before implementation? Can it keep naming consistent across files? Can it avoid over-engineering? Can it stay restrained in dependency choices?

    A recommended process is “contract first, implementation second, regression third.” First ask the model to output API contracts and error-code conventions, then generate the implementation, and require all network requests to go through a unified wrapper. An illustrative contract is below:

    1. // Pseudocode: unified result and query contract
    2. type Result<T> =
    3. | { ok: true; data: T }
    4. | { ok: false; code: string; message: string }
    5. interface Query {
    6. page: number;
    7. size: number;
    8. keyword?: string;
    9. }

    Common risks in multi-file scenarios include inventing dependencies or versions that do not exist, cross-file type inconsistency, error handling that covers only success paths, test cases that verify only happy paths, and too many abstraction layers that increase reading cost. Governance should include a dependency whitelist, required type-check passes, required error-path tests, a minimal-change principle, and delivery notes listing assumptions and uncovered scenarios. The conclusion for the second tier is that Chinese LLMs have multi-file organization capability, but production usability depends on whether engineering constraints are specific enough. The clearer the constraints, the higher the system consistency.

    5. Tier 3: End-to-End Agent Loop—From Writing to Fixing

    The third tier is an end-to-end task: from requirement description to runnable example, the model needs to execute in an isolated environment, read logs, locate errors, submit a minimal patch, and verify regressions. The acceptance point is not whether the final code looks elegant, but whether the repair process is controllable: whether it locates issues from logs, avoids large-scale rewrites, does not modify tests to hide problems, converges within the maximum number of rounds, and outputs a reviewable diff description.

    An agent loop must set budgets and gates: maximum rounds, maximum changes per round, prohibition on modifying test assertions, manual confirmation for critical paths, diff review, and test gates. An illustrative loop is below:

    1. for round in 1..maxRounds:
    2. plan = model.plan(task, context)
    3. patch = model.generatePatch(plan)
    4. result = sandbox.applyAndRun(patch)
    5. if result.failed:
    6. context += result.logs
    7. continue
    8. if tests.pass() and review.diff(patch).safe:
    9. return patch
    10. else:
    11. context += review.comments

    This tier best demonstrates the value of agentic coding: the model can self-correct through error feedback and reduce the case of “throwing garbled output back to the developer.” But the risks are also obvious: infinite loops, masking errors, excessive modification, and dependency environment drift. End-to-end capability must therefore be used under sandboxing, log services, monitoring and alerting, and permission control. On cloud platforms such as Baidu AI Cloud, general cloud capabilities such as container platforms, log services, and monitoring and alerting can host isolated evaluation environments and form an auditable loop.

    6. The Ceiling of Frontend Aesthetics: Turning Subjective Feelings into Executable Constraints

    To improve frontend aesthetics reliably, adjectives such as “more beautiful” are not enough. More effective prompts should include design tokens, layout grids, component state matrices, responsive breakpoints, accessibility requirements, and micro-interaction boundaries. Ask the model to output design notes first and code second; require every page to include empty, loading, error, and narrow-screen layouts; require color contrast and focus styles to be verifiable. The ceiling of aesthetics is often not that the model “cannot draw,” but that incomplete constraints lead to missing states, confused hierarchy, and uncontrolled spacing.

    7. Engineering Adoption: Evaluation, Sandboxing, and Gates

    For adoption, establish a fixed evaluation set: keep regression samples for three task types—component fidelity, multi-file engineering, and end-to-end repair. All generated code should enter a sandbox for execution, with logs and diffs traceable. Dependencies should use a whitelist, tests should serve as gates, and critical changes should be manually reviewed. Set maximum rounds and cost limits for the agent loop. Delivery notes must include assumptions, risks, and uncovered scenarios. Only by embedding model capability into the engineering process can “can generate” become “deliverable.”

    8. Conclusion: Adoption Judgment from the Three Tiers

    The judgment from the three-tier test is clear: single components and page fragments can be efficiently assisted after explicit design tokens; multi-file projects need contract-first workflows, dependency whitelists, and test gates; end-to-end agent loops have self-repair value but must be placed under sandboxing, budgets, and human review. For developers, Chinese LLMs are no longer just “usable” code tools. They are collaborative partners with production-assistance value in controlled engineering processes. The real ceiling does not depend on a single generation, but on evaluation methods, constraint design, and governance capability.