AI Coding Tool Selection: Using a 10-Page E-commerce Build as the Benchmark
This article explains why building a full storefront from an empty directory is a far better test of AI coding agents than trivial snippets, breaks evaluation into six scoreable dimensions, and shows how to turn a vague request into an executable spec. It covers common failure modes and their root causes, provides a delivery checklist that goes beyond "it runs," and offers selection advice for individual developers and teams, with a clear conclusion: runnability, maintainability, and testability are the only valid yardsticks.
1. Why “Building from Zero to One” Is the Real Test of an AI Coding Tool
When evaluating AI coding agents, the most commonly misused test prompts are “write a sorting function” or “explain this code.” These tasks have clear boundaries and very short context, so they reveal almost nothing about how a tool performs in real engineering work. A genuinely discriminating task is to ask the tool to deliver, in a single pass inside an empty directory, an e-commerce front end with ten pages: product detail, checkout, purchase success, login, registration, a user-center dashboard, orders, wallet and coupon wallet, settings, plus global navigation and cart state.
This kind of task stresses four capabilities at once: maintaining consistency over a long context, planning structure across files, producing code that actually runs, and converging quickly across multiple repair rounds. If any one of them fails, the result stays at the “looks about right” stage.
2. Evaluation Dimensions: Turning Subjective Impressions into Decidable Items
Break the evaluation into six scoreable dimensions so that vague conclusions like “the UI looks nice” do not dominate the selection decision:
- Task completion: Are all pages present, are routes reachable, and does the main flow (browse → order → payment success → view order) close the loop?
- Visual and interaction consistency: Are design tokens unified, and are there basic defects such as white text on a white background, no mobile responsiveness, or broken login/registration layouts?
- Runnability: Does the first generation start up, how many console errors appear, and how many rounds are needed to fix them?
- Code quality: Are styles separated from logic, do directories such as hooks and context exist as empty shells, and is mock data hard-coded and coupled into components?
- Project structure: Is the directory hierarchy sound, and do same-named nested folders appear that break the build?
- Responsiveness and cost: Generation speed, stalls, and whether free quotas or paid acceleration are necessary.
3. Prompt Design: Turning “Build Me a Shopping Site” into an Executable Spec
Vague prompts are the main source of failure. A reusable pattern is to state the role and the deliverable boundary first, then the page list and acceptance criteria:
Role: senior front-end engineer.Deliverable: a React + TypeScript single-page application that starts locally with one command.Page list (10): detail, checkout, purchase success, login, registration,user center (dashboard / orders / wallet & coupons / settings).Constraints:1. Use unified design tokens; no low-contrast schemes such as white text on white;2. Keep styles and logic in separate files; no large blocks of inline styles inside components;3. Keep mock data in a dedicated mock layer, injected through service interfaces;4. Every form has required-field, format, and length validation with error messages;5. Use a shared placeholder image component; no scattered hard-coded links;6. On delivery, include the startup command and a list of known issues.
The last item matters most: asking the tool to self-report known issues significantly reduces the number of later “blind repair” rounds.
4. Typical Failure Modes and Root Causes
- Placeholders everywhere, thin detail page content: models tend to satisfy structural completeness first and sacrifice content density. The remedy is to provide field-level data structures in the prompt.
- Color and contrast out of control: without design-token constraints, styles are improvised by the model. Explicitly require CSS variables and a semantic color palette.
- Same-named nested directories, project will not run: this is a defect in file-write path planning and needs a fixed directory tree in the prompt.
- Empty hooks/context shells: structure is reserved but not implemented, which shows generation stopped at “scaffolding imagination.” Require that key state (cart, login state) must be actually implemented.
- Coupled mock data: the data layer and the view layer are not separated, so wiring up a real API later requires a rewrite. Abstracting a service layer avoids this.
5. Acceptance Checklist: Upgrading “It Runs” to “It Is Deliverable”
[ ] Dependencies install and the app starts with zero errors; no errors in the console[ ] All 10 page routes are reachable, with no dead links[ ] The main flow passes end to end once[ ] No horizontal scrolling or layout breakage at 375px mobile width[ ] Form validation covers required / format / length, with visible error messages[ ] Styles, logic, and data are separated into three layers[ ] No same-named nested directories; the directory tree matches the spec[ ] Key state management is really implemented, not an empty shell
6. Selection Advice and Adoption Path
For individual developers, prioritize first-pass runnability and convergence across repair rounds. For teams, also evaluate codebase indexing, privacy mode, permissions and auditing, and whether private deployment is supported. On the engineering side, feed generated output into the existing pipeline: unified code standards and static checks, logging services with monitoring and alerting, static assets hosted on object storage, and release through a container platform. General cloud capabilities (for example, object storage, container platforms, logging services, and monitoring/alerting offerings from Baidu AI Cloud) can serve as the hosting layer for delivery rather than as the object of evaluation itself.
The conclusion is clear: when choosing an AI coding tool in 2026, do not stop at visual polish and marketing language. Use runnable, maintainable, testable as the only yardstick. Set a ten-page e-commerce task as the baseline, write the prompt as a spec and the acceptance criteria as a checklist, and the gaps between tools will surface naturally within three repair rounds.
