How to Choose AI Coding Tools: A Complete Evaluation Through an E-Commerce Site Build

    AI coding tools have moved from line-level completion to autonomous task execution, and the questions that matter for tool selection have shifted with them. This article uses building an e-commerce site from scratch as a real-world test task to walk through a full evaluation. It covers how to design a "minimal but complete" task with explicit constraints and acceptance criteria, a scoring framework, and six recurring problems that surfaced in testing—from fast generation with low completeness to inconsistent detail handling and form validation. It also examines the engineering risks of AI-generated code (hallucinated APIs, dependency and security risks, and testing gaps), offers role-based recommendations for individual developers, teams, and larger organizations, and argues that the smartest approach is to measure candidates against the same requirements and the same standards rather than debating which tool is "strongest."

    1. From “Completing Code” to “Executing Tasks”: The Selection Logic Is Changing

    By 2026, intelligent coding tools in China had gone through roughly three generations. The first focused on line-level and function-level code completion; the second introduced conversational Q&A and cross-file edits; the third added autonomous execution—breaking down tasks, reading and writing files, running commands, and iterating on fixes based on errors. Developers began working by “handing the requirement to the tool.”

    The ecosystem around these tools was also shifting:

    • Most tools exist as editor plugins, standalone IDEs, or cloud-based development environments;
    • Some offer a privacy mode that switches the underlying model, and some support connecting third-party models;
    • Several cloud providers folded intelligent coding capabilities into their cloud R&D systems.

    On the surface, the gap between products appeared to be narrowing. But the core selection question shifted with it—from “who writes code better” to three more pragmatic questions:

    1. Can it understand a complete requirement?
    2. Can it deliver a maintainable project?
    3. Can it keep working under controllable, compliant conditions?

    A common mistake is to copy the conclusion of “which tool is best.” A more reliable approach is to pick a real task close to your own business, evaluate candidate tools against the same requirements, and score them on a shared set of dimensions. This article uses “building an e-commerce site from 0 to 1” as the example and breaks down the full evaluation process.

    2. Task Design: A “Minimal but Complete” E-Commerce Site

    For the evaluation to be meaningful, the task can’t be just “make a store page.” It needs to cover a full business loop:

    Page Core Features Evaluation Focus
    Product detail Product info, specs, stock, buy now, add to cart Information completeness, error-state handling
    Checkout / order Shipping address, item list, coupon, amount calculation Form validation, calculation accuracy
    Payment success Order number, amount, payment time, order entry State display, navigation
    Registration Account, password, captcha, agreement checkbox Validation rules, error messages
    User center – overview Order summary, coupon and balance overview, common entries Information architecture, layout
    User center – orders Order list, status filters, detail view Pagination, filtering, empty states
    User center – wallet (coupons/cards) Coupon/card list, availability, redemption status State modeling, boundary handling
    User center – settings Profile, password, notification preferences Form linkage, save feedback

    2.1 The “Implicit Constraints” You Must Write Into the Requirement

    If the requirement stops at a page list, the output usually “runs” but rarely reaches a deliverable level. These constraints should be written into the task description up front:

    • Visual spec: Treat design variables—primary color, neutrals, radius, spacing—as authoritative; don’t improvise a color scheme;
    • Responsive: On narrow screens, the cart and checkout info should sit against the bottom of the page without covering inputs or buttons;
    • Accessibility: Text-to-background contrast should meet AA (body text at least 4.5:1, large text at least 3:1); form controls should have associated labels, and validation errors should have explicit messages;
    • Code standards: Separate styles from logic, make shared components reusable, and forbid hardcoding sample data inside page components.

    The requirement description is best structured as “Background + Goals + Page list + Constraints + Acceptance criteria + Definition of done”:

    1. Background: Build an e-commerce site from scratch as the engineering foundation for connecting real services later.
    2. Goals: Complete the full loop from browsing a product to viewing an order, across 8 pages.
    3. Constraints:
    4. 1. Visuals follow the given design variables; do not add new color schemes;
    5. 2. On narrow screens (≤ 480px), buttons do not overflow and text does not overlap;
    6. 3. All forms go through a unified validation rule set, with error messages placed next to each field;
    7. 4. Sample data lives in a dedicated directory; pages must not reference it directly;
    8. 5. Page skeletons use semantic tags, and interactive elements are keyboard-operable.
    9. Acceptance criteria:
    10. 1. The three main flows—registration, ordering, and payment success—all work end to end;
    11. 2. No console errors, and static checks report zero warnings;
    12. 3. Cart and coupon amount calculations match manual calculation.
    13. Definition of done:
    14. 1. Code passes static checks and the build;
    15. 2. Automated tests cover at least validation logic and amount calculation;
    16. 3. Output a list of known issues and a note on how to connect real APIs later.

    2.2 Scoring Framework

    You can score the evaluation across these dimensions: requirement understanding 15%, generated code quality 20%, engineering completeness 20%, frontend and visual detail 15%, interaction and controllability 10%, error correction and stability 10%, security and compliance 10%.

    3. Six Recurring Problems in Testing

    After running the same requirement through multiple rounds, the outputs from different tools differed markedly. Some completed the main flows in a single task; others errored on the first run and needed several rounds of fixes before anything visible appeared. The problems clustered into six areas.

    3.1 Fast generation ≠ high completeness

    The fastest results often included the full shopping flow and basic form validation, but every product image was a placeholder, and the detail page showed only a name, a price, and a one-line description. Speed measures generation efficiency; completeness measures how well the requirement is covered.

    How to improve: Put the acceptance criteria into the requirement up front; check the output against the checklist item by item when the task ends; and have the tool fill in missing items on its own.

    3.2 Inconsistent detail completeness

    Some outputs had more thorough form validation and richer product details; others showed white text on white buttons, broken narrow-screen layouts, or inconsistent color styles. The deeper problem was inconsistency in detail:

    • One page handled the loading state, another didn’t;
    • One place did decimal math on amounts, another used integer cents.

    These differences are essentially the model inconsistently filling in “implicit conventions.”

    How to improve: Establish a unified spec and pass it explicitly.

    1. /* styles/tokens.css — Design variables: colors, spacing, and radius all come from here */
    2. :root {
    3. --color-primary: #1A73E8;
    4. --color-primary-hover: #1557B0;
    5. --color-on-primary: #FFFFFF; /* Text color on the primary button */
    6. --color-text: #1F2329;
    7. --color-text-muted: #646A73;
    8. --color-bg: #FFFFFF;
    9. --color-border: #DEE0E3;
    10. --radius-md: 8px;
    11. --space-2: 8px;
    12. --space-4: 16px;
    13. }
    14. .btn-primary {
    15. background: var(--color-primary);
    16. color: var(--color-on-primary);
    17. border-radius: var(--radius-md);
    18. padding: var(--space-2) var(--space-4);
    19. }
    20. .btn-primary:hover { background: var(--color-primary-hover); }
    1. <!-- Quantity stepper: the disabled state has clear visual feedback and meets contrast requirements -->
    2. <button type="button" class="qty-btn" aria-label="Decrease quantity" disabled>−</button>
    3. <span class="qty-value" aria-live="polite">1</span>
    4. <button type="button" class="qty-btn" aria-label="Increase quantity">+</button>

    3.3 Form validation: not just “does it validate,” but “does it validate correctly”

    Basic required-field validation was almost always generated; the gap showed up in boundaries and experience:

    • Are password rules explicit (length, character types)?
    • Are email and phone-number formats covered?
    • Does the coupon amount match the total, and can an order be placed when stock is zero?
    • On error, does it preserve entered content, focus the first invalid field, and can a screen reader read the error message?
    1. <label for="email">Email</label>
    2. <input id="email" name="email" type="email"
    3. aria-describedby="email-error" aria-invalid="false" />
    4. <p id="email-error" class="field-error" role="alert" hidden></p>
    1. // validators.js — Pure-function validation rules, with no UI framework dependency, testable on their own
    2. export const rules = {
    3. email: (v) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v) || 'Invalid email format',
    4. password: (v) =>
    5. (v.length >= 8 && /[A-Za-z]/.test(v) && /\d/.test(v)) || 'Password must be at least 8 characters and include letters and numbers',
    6. required: (v) => (String(v ?? '').trim() !== '' ? true : 'This field is required'),
    7. };
    8. export function validate(form, schema) {
    9. const errors = {};
    10. for (const [field, chain] of Object.entries(schema)) {
    11. for (const rule of chain) {
    12. const result = rules[rule](form[field]);
    13. if (result !== true) { errors[field] = result; break; }
    14. }
    15. }
    16. return errors;
    17. }
    18. // The schema decouples validation rules from the UI: the same rules serve both the registration and settings pages
    19. export const registerSchema = {
    20. email: ['required', 'email'],
    21. password: ['required', 'password'],
    22. };

    Listen for the submit event on the form’s root node: call preventDefault() to block the default submission, and once validation passes, write per-field error messages, set aria-invalid, and remove the hidden attribute on error items, while moving focus to the first invalid field.

    3.4 Images, details, and architecture: running is the baseline, maintainable is the goal

    Another common output had a simple project structure with styles separated from logic, but suffered from two problems.

    One was “skeleton-ization”:

    • Every image was a placeholder;
    • The product detail had only a few fields, missing specs, stock, shipping, and after-sales info.

    The other was “simplified architecture”:

    • Sample data was written directly into page components;
    • Once real APIs were connected, every page had to be rewritten.

    For the coupling between sample data and pages, you can funnel data access into a dedicated service layer so pages depend only on that layer:

    1. shop/
    2. ├── pages/ # Pages: product detail, checkout, payment success, registration, user center
    3. ├── components/ # Shared components: buttons, form fields, product cards, order items
    4. ├── services/
    5. │ ├── api.js # Single data entry point; an env switch decides the data source
    6. │ ├── http.js # Fetch-based request wrapper (timeout, unified error structure)
    7. │ └── mocks/ # Sample data: products.js, orders.js, coupons.js
    8. ├── validators.js # Pure-function validation rules
    9. ├── styles/tokens.css # Design variables
    10. └── tests/ # Unit tests for validation logic, amount calculation, etc.
    1. // services/api.js — Pages only import { getProduct }; sample data and the real API switch with one flag
    2. import { products as mockProducts, orders as mockOrders } from './mocks/index.js';
    3. import http from './http.js';
    4. const USE_MOCK = false;
    5. export const getProduct = (id) =>
    6. USE_MOCK
    7. ? Promise.resolve(mockProducts.find((p) => p.id === id))
    8. : http.get(`/products/${id}`);

    Always calculate amounts as integer cents, which fundamentally avoids floating-point errors:

    1. // pricing.js — Amounts are computed as integer cents and only formatted at display time
    2. export function calcPayable(items, coupon) {
    3. const goodsTotal = items.reduce((sum, it) => sum + it.priceCents * it.qty, 0);
    4. const freight = goodsTotal >= 9900 ? 0 : 1000; // Free shipping over 99 yuan; otherwise 10 yuan
    5. const discount = coupon ? Math.min(coupon.amountCents, goodsTotal) : 0;
    6. return { goodsTotal, freight, discount, payable: goodsTotal + freight - discount };
    7. }
    8. export const formatCNY = (cents) => (cents / 100).toFixed(2);

    3.5 Interaction modes: trade-offs between execution styles

    The evaluation encountered different interaction modes, which fall into two broad categories.

    One is “task-based execution” (such as Craft mode): after the developer describes the overall goal, the tool creates and modifies multiple files in sequence. It suits clearly bounded tasks like building a project from scratch, but the large volume of output demands strong review ability.

    The other is “autonomous/automated execution” (such as Auto mode): the tool plans and iterates with less intervention, and tries to fix errors on its own when it hits them. It’s more efficient, but it also raises the bar for permission boundaries and rollback safety.

    Neither is strictly better; the choice depends on how deterministic the task is, how sensitive the project is, and how much control the team needs over the process. It’s reasonable for some developers to be wary of fully automatic execution. Before adopting a tool, an organization should at least clarify:

    • The code scope and network permissions the tool can access;
    • Whether high-risk operations like building, installing dependencies, and deploying require human confirmation;
    • Whether code can be committed to the main branch automatically;
    • Where code and prompts flow, how long they’re retained, and whether they’re used for model training.

    Developers’ expectations for a friendlier interface are also rising; some tools try to reduce the cold “command-line feel” through personified avatars and more natural interaction. Whether the experience design is thoughtful should also be part of the evaluation.

    3.6 Multi-agent and multi-tool collaboration: align the “context” first

    When a tool supports multiple agents running in parallel, or a team switches between different tools, new problems appear: it’s unclear which agent to choose among several options, output styles differ across tools, and the same requirement gets re-explained repeatedly.

    The direction is to persist project context as files that any tool can read directly:

    • Convention files (such as AGENTS.md, CLAUDE.md) describe the tech stack, directory conventions, and commit conventions;
    • Static-check and formatting rules in the project config act as the single source of truth for code style;
    • Interface contracts define request and response structures, and sample data is generated to match the contract.
    1. # Project Conventions (for AI coding tools to read)
    2. ## Tech conventions
    3. - Separate styles from logic; colors and spacing always reference variables in styles/tokens.css;
    4. - Pages must not reference sample data directly; everything goes through services/api.js;
    5. - Amounts always use integer cents.
    6. ## Definition of done
    7. - Static checks and the build pass;
    8. - New or modified validation logic and amount calculations have corresponding tests;
    9. - The task ends with a list of changed files and known issues.

    The principle for choosing agents is “give tasks with clear boundaries that can be verified independently to sub-agents; let the main flow own cross-module design.” All output ultimately comes back to the same static-check, test, and code-review pipeline for validation.

    4. Engineering Risks of AI-Generated Code and How to Handle Them

    4.1 Capability hallucination and dependency risk

    A model may generate non-existent properties, deprecated APIs, or patterns incompatible with the project’s current version. Meanwhile, a newly added third-party dependency may be unmaintained or carry an incompatible license.

    Response:

    • State framework and dependency version constraints in the convention file;
    • Check maintenance status and license before adding a dependency;
    • The build and tests will surface most problems right away.

    4.2 Security risk

    Common risks include hardcoding keys and tokens into frontend code, logging user privacy data, and endpoints missing permission checks. This is especially true in enterprise settings—a certain class of vulnerability has long ranked near the top of web security risk lists, and the root cause is precisely access-control flaws.

    Response: Write security requirements into the task (for example, “any write operation must verify login state and resource ownership”) and add a security-check item to code review. Payment callback signature verification, amounts authoritative on the server side, and login-state and permission checks must all be implemented on the server.

    4.3 Quality and testing

    Generated code often “looks fine” while its boundaries go untested. At minimum, you should include:

    • Unit tests: covering pure logic like validation rules and amount calculation;
    • Critical-path tests: register → order → payment success → view order;
    • Static checks and formatting: run automatically before commits or in the CI pipeline.

    5. Selection Advice by Role

    • Individual developers: Try tools on your own real project; focus on requirement understanding and error-correction ability, and commit in small steps;
    • Small and mid-sized teams: Prefer tools that connect smoothly with your existing R&D process and code-hosting platform, whose rules are configurable, and unify your convention files;
    • Mid-to-large enterprises: Security and compliance are prerequisites. Whether data is used for model training, whether private or dedicated-cloud deployment is possible, and whether unified identity authentication and audit capabilities can be integrated all need to be part of the evaluation. Cloud providers in China are also continuously improving the connection between intelligent coding tools and cloud development environments—for example, Baidu AI Cloud offers related capabilities around enterprise-grade data security and compliance. Enterprises should validate against their own environment.

    Looking at the trend, intelligent coding tools are moving from “generating code” toward “completing projects,” and plain code completion will gradually become a baseline capability. Context engineering, how faithfully a tool follows engineering conventions, and security and compliance will become the key differentiators.

    6. Conclusion

    A complete business scenario like building an e-commerce site is the best “litmus test” for intelligent coding tools: it exposes gaps in requirement understanding, code quality, engineering completeness, frontend detail, error correction, and security compliance all at once. When choosing a tool, rather than arguing over “who’s stronger,” it’s better to measure with the same requirement and the same set of standards.

    For enterprises, a practical adoption path is “unified evaluation, small-scale pilots, convention-building, and security first.” Intelligent coding tools won’t replace engineers’ judgment—they free up more energy from repetitive work so people can focus on architecture, experience, and the business itself.