How to Choose an AI Coding Tool: A Hands-On Test of Building a Full E-Commerce Site
This article presents a practical, task-based framework for evaluating AI coding tools. Rather than relying on feature lists, the author tested multiple tools against the same brief: building a complete 10-page shopping site in React from scratch. The article explains the test design, a seven-dimension scoring rubric, and the recurring problems that showed up across different tool types—from broken responsive layouts and inline styles to inconsistent visuals and failed parallel generation. It then offers a five-step engineering approach to make AI output usable: defining data contracts first, locking visuals with design tokens, splitting prompts into stages, using build checks as acceptance gates, and coordinating multi-agent work through a single source of truth. The piece closes with selection advice by use case and a reminder that AI coding tools amplify whatever discipline—or lack of it—the team already has.
1. The Selection Problem: From Code Completion to Delivery
By 2026, AI coding tools have moved beyond single-line autocomplete into “intelligent coding partners” that can interpret natural-language requirements, plan work on their own, and produce finished code. For developers, the real question is no longer “is there a tool available?” Vendors both inside and outside China now offer AI coding products that can be accessed directly, and they fall into three broad categories:
- AI-native IDEs: Deeply integrate chat, generation, refactoring, and debugging directly into the editor.
- Conversational coding assistants: Focus on Q&A and code-snippet output, leaving the developer to integrate the results into a project.
- Task-execution agents: Break a goal into sub-tasks autonomously, support parallel multi-agent or “chat plus execution” modes, and can make changes across multiple files.
So the question becomes “which one should I use?” Feature descriptions are highly similar, and trial periods are short. What really separates tools is not “whether they can generate code” but “whether they can generate code that runs, stays maintainable, and passes acceptance on the first try.”
This article does not recommend any single product. Instead, it offers a reusable evaluation method built on task-driven, side-by-side testing: give every tool the same requirements document and the same acceptance criteria, then assess each one’s ability to deliver a complete project from zero to one.
2. Test Task Design: Why “Build an E-Commerce Site from Scratch”
The test task was to build a shopping site from scratch in React with 10 pages:
- Home (product listing page)
- Product detail page
- Product purchase page
- Purchase-success page
- User login page
- User registration page
- User center – overview
- User center – orders
- User center – wallet (coupons/vouchers)
- User center – settings
This task was chosen for three reasons:
- Broad coverage: It touches information architecture, routing, form validation, cart and order states, login sessions, balances, and coupons—business elements that expose a tool’s real strength in complex business modeling.
- High consistency demand: All 10 pages share one layout, one component set, and one visual language, so any style drift gets amplified during a full review.
- Objective acceptance criteria: Whether the project starts, whether errors appear, whether the flow closes end to end, and whether narrow screens render correctly can all be judged directly, without relying on subjective impressions.
Every tool received the same requirements document and the same prompt, which mainly checked three things:
- Whether the tool clarified that the UI targets mobile or desktop and handled responsive adaptation;
- Whether the tool required a consistent visual standard across the whole site;
- Whether the tool required the generated code to be run and checked.
The brief only specified “what to build,” not “how to build it,” so each tool’s autonomous architecture decisions could be observed.
3. Evaluation Dimensions and Scorecard
To make the results comparable across tools, the evaluation uses seven dimensions, each scored from 0 to 5 and then combined by weight:
| Dimension | Key observations | Suggested weight |
|---|---|---|
| Environment & usability | Direct access from China, Chinese-language interaction quality, no-upload option, pricing model | 10% |
| Task completion | First-pass run rate, number of errors, rounds needed to fix | 25% |
| UI completeness & consistency | Responsive adaptation, site-wide color consistency, text contrast, image assets | 15% |
| Code quality | Separation of styles and logic, type completeness, exception handling, mock-data coupling | 15% |
| Architecture maintainability | Directory structure, data-layer abstraction, component reuse, use of hooks and context | 20% |
| Execution efficiency | Generation and fix speed, controllability of multi-mode/multi-agent scheduling | 10% |
| Privacy & collaboration | No code upload, permission control, team collaboration, integration with enterprise R&D workflows | 5% |
Weights can be adjusted to the scenario. When validating an idea quickly, “execution efficiency” matters more; for a production project built for long-term maintenance, “architecture maintainability” should carry more weight.
Note that the observations below summarize common patterns across different types of tools in task-level generation. They are not evaluations of any single product.
4. Typical Problems Found in Testing
4.1 Category 1: Instruction-Driven Generation Mode
This mode has the model produce a complete project directly from the task description, usually generating all 10 pages in one pass.
Strengths:
- Low interaction barrier: The interface prompts are friendly and require no learning of complex mode switching.
- Smooth workflow: Server responses are timely, with no noticeable lag during long tasks.
Weaknesses:
- The result leans toward narrow screens, with only basic responsive handling; form pages such as login and registration break their layout on wide screens;
- The purchase flow is complete and basic form validation is in place, but images are almost all placeholders and the product detail page carries too little information;
- The whole site uses a single shade of blue as its primary color—usable, but not attractive;
- Styles and logic are reasonably separated, but the project architecture is too flat, with mock data written directly into business code.
4.2 Category 2: Chat-Plus-Execution Mode
This mode borrows the interaction habits of mainstream AI editors and completes tasks through a “chat plus execution” approach. Its strength is complete form validation across the site and richer product detail content. The weaknesses are equally clear:
- The first-pass project starts but throws errors; it takes several rounds of fixing to see a working result;
- It is not mobile-adaptive; on some buttons the text and background are both white and nearly invisible, and the color scheme lacks a unified design;
- Styles are separated in principle but not placed in dedicated files—they are inlined into the pages;
- Directories such as hooks and context are scaffolded, but their contents are basically empty shells.
These tools typically iterate fast, offer a friendlier free quota, and are beginning to introduce paid acceleration options. But generation speed is slow, and the cost of waiting on long tasks is high.
4.3 Category 3: Multi-Agent / Automation Mode
This mode dispatches the task to multiple agents working in parallel, or offers a “deep execution” option. It suits coarse-grained requirements, but engineering controllability becomes more critical:
- Speed-first mode: Generates quickly, but the project structure is chaotic; it created a same-named directory inside an existing directory, and the final project failed to start;
- Deep-execution mode: The project runs, but leaves many errors unresolved after several fix attempts, forcing abandonment.
This shows that the more autonomous decision-making AI takes on, the more you need explicit structural constraints and acceptance mechanisms.
5. Root-Cause Analysis: Five Common Flaws in Generative Coding
Grouping these observations at the engineering level yields five recurring problems:
- Context loss causes style drift: As the number of dialogue rounds and generated files grows, early-agreed design standards and responsive strategies get diluted, and later pages each “improvise.”
- Token-style templating yields cheap consistency: A single primary color site-wide, all-placeholder images, and thin detail pages show the model choosing the lowest-cost templated approach—satisfying “it works” rather than “it works well.”
- “Runs” does not mean “correct”: Styles and logic mixed in the same file, mock data written straight into business code, plus empty-shell hooks and context, show the model prioritizing syntactic and structural completeness over whether the business data flow is truly wired up.
- Local fixes trigger regressions: Without a unified build and type check as a closed loop, each round only makes “point patches”—old problems linger, new ones appear, and fixing falls into a cycle.
- Parallel generation lacks a “single source of truth”: When multiple agents write at once, there is no directory-ownership convention or serial merge mechanism, producing nested same-named directories and overwrite conflicts.
6. Engineering Practice: A Five-Step Method to Make AI Output Usable
6.1 Contract First: Define the “Standard Answer” Up Front
Before letting AI write any page, define the data contract. The code below shows the interface definitions and the mock data layer:
// types/index.ts: Global data contracts, serving as the "source of truth" for promptsexport interface Product {id: string;title: string;priceCents: number; // Store money in cents to avoid floating-point errorscover: string;stock: number;tags: string[];}export interface Order {id: string;userId: string;items: { productId: string; quantity: number }[];amountCents: number;status: 'pending' | 'paid' | 'shipped' | 'closed';createdAt: string;}export interface Coupon {id: string;name: string;type: 'discount' | 'shipping';value: number;expiresAt: string;}// api/index.ts: Pages depend only on interfaces, unaware of the data sourceexport interface ProductApi {list(params: { page: number; size: number }): Promise<{ items: Product[]; total: number }>;detail(id: string): Promise<Product>;}// mocks/productApi.ts: Inject a mock implementation during development, swap for a real one at integration timeimport type { ProductApi } from '../api';import { products } from './products';export const mockProductApi: ProductApi = {async list({ page, size }) {const start = (page - 1) * size;return { items: products.slice(start, start + size), total: products.length };},async detail(id) {const found = products.find(p => p.id === id);if (!found) throw new Error(`Product not found: ${id}`);return found;},};
This directly avoids mock-data coupling and also preserves a switch point for connecting a real backend later.
6.2 Standard Constraints: Lock Visuals with Design Tokens
Consolidate colors, spacing, radii, and font sizes into design tokens, and require in the prompt that AI only reference variables and never hardcode color values:
/* styles/tokens.css */:root {--color-bg: #f5f7fb;--color-surface: #ffffff;--color-text: #1f2937; /* Body text, ~14:1 contrast with surface */--color-text-muted: #6b7280; /* Secondary text, ~4.8:1 */--color-primary: #2563eb;--color-on-primary: #ffffff; /* Text on primary color, ~5.2:1 */--color-danger: #dc2626;--radius-md: 8px;--space-1: 4px;--space-2: 8px;--space-3: 16px;--space-4: 24px;}/* Switch themes under a dark background without touching any business component */[data-theme='dark'] {--color-bg: #111827;--color-surface: #1f2937;--color-text: #f9fafb;--color-text-muted: #9ca3af;}
Defining button text color separately via --color-on-primary avoids the “white-on-white text” problem. It is also advisable to keep body-text contrast at 4.5:1 or higher and to accommodate color-blind users by not conveying state through color alone.
6.3 Layered Prompting: Lock the Architecture in Stages
A single long prompt often trades one thing for another. It can be split into three rounds:
Round 1 (define the skeleton):
You are a senior front-end engineer. Build a shopping site using React + TypeScript + Vite. Constraints:
- Target form: mobile-first, minimum supported width 320px; enable a two-column grid at ≥768px;
- Organize code strictly by this directory layout:
src/api (interface definitions and mock implementations), src/components (shared components), src/features (business modules: cart/auth/order/wallet), src/pages (pages), src/styles (design tokens), src/types (type definitions);- First output the directory structure, data contracts, routing table, and state-management plan; write code only after confirmation;
- Order state machine flow: pending → paid → shipped → completed; once cancelled, it cannot transition further;
- Represent all money in cents; every async request must have loading, empty, and error states.
Round 2 (implement pages): Implement page by page in the order home → detail → purchase → payment-success → login/registration → the four user-center sub-pages, focusing on only the current page each round.
Round 3 (unify and polish): Do a site-wide pass over color, spacing, contrast, and empty states, and fill in exception handling.
6.4 Acceptance Gates: Let the Build Tool Be the “Judge”
When the tool supports running commands, write the acceptance criteria as commands rather than judging by feel:
npm run typecheck && npm run lint && npm run build
At the same time, agree on a “fix protocol” to avoid endless loops:
- Each round of fixes may only touch files related to the error;
- After fixing, a full rebuild is mandatory;
- If new errors still appear for two consecutive rounds, stop fixing and bring in manual review.
6.5 Convergent Fixing and Multi-Agent Collaboration Standards
- Convergent fixing: Paste the raw build log back into the chat and require AI to locate the root cause before changing code—no “just make it run first.”
- Multi-agent collaboration:
- First, have a single agent freeze the directory structure and interface definitions, i.e., the “single source of truth”;
- Then assign tasks by page or module, defining each agent’s file-write scope;
- Perform merges serially, and run a full build immediately after each merge to prevent nested directories and mutual overwrites.
7. Enterprise Adoption: From Personal Tool to Team Infrastructure
Individual trial use and team-scale adoption are two different logics. For enterprise scenarios, focus on four points:
- Data security: Enable no-code-upload mode, evaluate the tool’s data retention and training-use policies, and validate sensitive projects in isolated environments.
- Workflow integration: Prefer solutions that connect with code hosting, code review, and continuous-integration pipelines, so AI output goes through review and testing like any ordinary commit.
- Unified standards: Distill this article’s directory conventions, design tokens, and prompt templates into team standard files that all members can reuse.
- Capability building: You can build on Baidu AI Cloud’s large-model services, combined with knowledge-base retrieval and agent-orchestration capabilities, to turn team coding standards and business knowledge into a dedicated intelligent coding assistant. General cloud capabilities such as object storage, logging, monitoring and alerting, and container platforms can be used to host tool execution and observe generation quality.
For organizations that need to move AI-assisted programming from “individual trial” to “team-level R&D infrastructure,” Baidu AI Cloud’s large-model services—along with general capabilities like knowledge-base retrieval and agent orchestration—can serve as an optional technical foundation for building a dedicated intelligent coding assistant.
8. Selection Advice and Conclusion
Drawing on this evaluation, selection can be considered by use case:
- Personal rapid validation: Value interaction friendliness and response speed;
- Business-team daily development: Value code quality, architecture maintainability, and multi-round fixing ability;
- Multi-person collaboration and large enterprises: Value data security, privacy options, permissions, and workflow integration;
- Large/complex projects: Multi-agent mode must be paired with a “single source of truth” and serial-merge standards, otherwise the probability of structural conflicts rises significantly.
Finally, it is important to be clear about the capability boundaries of AI coding tools: they are good at quickly producing a runnable first draft, but architecture decisions, boundary conditions, and acceptance standards remain in the developer’s hands. Rather than agonizing over “which tool is the strongest,” it is better to build your own evaluation tasks and acceptance checklist, make decisions with repeatable standards, and then use engineering standards to constrain AI output.
In essence, an AI coding tool is an amplifier: with clear standards, it amplifies efficiency; without standards, it amplifies chaos.
