Beyond Benchmarks to Delivery: Engineering Practices for AI Agents Building Full-Stack Applications
The industry tends to evaluate coding AI agents through third-party leaderboards, but those scores measure performance on standardized problems rather than whether a model can turn a business requirement into a runnable system. This article sets benchmark scores aside and focuses on a single question: after handing a requirement to an agent, what can it actually produce, and what must engineers fill in? It presents a five-layer delivery framework, a prompt-engineering method that converts subjective aesthetics into verifiable constraints, frontend generation that balances visual density against performance budgets, backend generation that addresses concurrency and consistency, a three-layer acceptance process, and the engineering checklist required before going live—arguing that generated code should move from "worth a screenshot" to "worth going live."
For a while now, the industry has evaluated coding agents largely through third-party leaderboards: composite knowledge-and-reasoning benchmarks, repository-level software engineering benchmarks, command-line terminal task benchmarks, and composite rankings from independent evaluation platforms. Each produces a number from a different angle. These numbers have value, but they answer the question “how well does the model perform on standardized problems,” not “can the model turn a business requirement into a running system.” When open-source models’ capabilities rapidly converge into the same band, the gaps between leaderboards often land within single-digit percentage points, while the gap in real engineering can be the distance between “can be demoed” and “can go live.”
This article deliberately avoids scores and focuses on just one thing: after handing a requirement to an agent, what can it actually produce, and what must engineers fill in.
1. Evaluation framework: from “how pretty is the output” to “can it be delivered”
From an engineering perspective, a single delivery can be broken into at least five independently assessable layers:
- Requirement understanding: Does it capture the business constraints (capacity limits, time windows, role permissions), rather than just the nouns?
- Structural completeness: Is there a real frontend with pages, routing, data models, and server-side logic, rather than hardcoded static displays?
- Logical correctness: Do the core business rules hold under concurrency, exceptions, and retries?
- Verifiability: Can the functionality be covered by automated tests, and can failures be localized?
- Evolvability: When switching industry, theme, or color scheme, is the change “editing content” or “editing code”?
Benchmarks mainly cover parts of layers 2 and 3, and they do so as fixed question banks; layers 1, 4, and 5 can almost only be exposed through real engineering. This is also why “the demo is stunning” often does not equal “acceptance passes.”
2. Engineering the prompt: turning subjective aesthetics into verifiable constraints
The ambiguity of natural-language descriptions is a main cause of irreproducible generation results. Words like “premium,” “refined,” and “immersive” produce completely different implementations across different runs. A workable approach is to treat the prompt as a mini requirements document that always contains five sections:
[Role & audience] Official site of a premium travel service for high-net-worth clients; most visitors are non-technical users[Business goal] Complete cabin selection and submit a booking; the main conversion path is no more than 3 steps[Features & data contract] Flight, cabin layout, seat, passenger, order; max 6 seats per flight[Visual constraints] Full-screen hero visual + key parameter panel; monospace font for data; primary color + one accent color; breakpoints 375/768/1280[Acceptance criteria] Seat count matches availability; auto-lock when full; duplicate submissions produce no duplicate orders; seat selection completable via keyboard
The key is sections four and five: every aesthetic requirement must be reducible to an assertable check item. For example, “a breathing-like online status indicator” can become “the hero animation must stop when prefers-reduced-motion is active”; “premium feel” can become an 8-step type scale, spacing on multiples of 4, and contrast that meets an accessibility baseline.
It is advisable to provide the data contract up front and let the generation process revolve around it:
{"flight": { "id": "FL-2049", "departsAt": "T-03:00", "capacity": 6 },"seatMap": [{ "seatNo": "01A", "row": 1, "col": "A", "class": "panorama", "status": "available" }],"booking": { "seats": ["01A"], "passengers": [{ "name": "", "documentNo": "" }] }}
Contract-first yields two direct benefits: clear frontend-backend boundaries in the generated code, and the contract itself can be turned directly into API validation test cases.
3. Frontend generation: balancing visual density and performance budget
High-end brand sites commonly use full-screen hero visuals, scroll-driven storytelling, and refined typography. Agents can generate all of these, but engineering constraints are needed to push them back into a production-ready range.
The hero-visual degradation chain. A full-screen video background looks best, at the cost of hero payload and mobile data. A sensible approach is to prepare three tiers of fallback: load a compressed short-loop video first; when it is unavailable or in data-saver mode, fall back to a first-frame poster image; then fall back to a static gradient plus copy. The video should have a preload strategy and a fallback for autoplay failures, and the core hero copy must remain readable before visual assets are ready.
Scroll-driven timeline storytelling. Break the flight sequence into stages (preparation, ascent, high-g load, weightlessness, reentry, recovery), each with a key number (duration, g-force multiple, altitude) and a visual anchor. Key implementation points: scroll progress should drive only a limited number of style changes, and avoid layout thrashing and repaints inside the scroll callback; prefer compositor-friendly transforms and opacity for animations, and use an intersection observer to start and stop off-screen animations.
Interactive seat map. The seat map should be rendered with vector graphics (SVG, a W3C standard format, is sufficient), where each seat is a focusable node with a state machine:
| State | Visual | Interaction |
|---|---|---|
| Available | Outline + primary color | Focusable, clickable |
| Selected | Fill + accent color | Can be deselected |
| Occupied | Low-contrast gray | Skipped, not focusable |
| Contention failed | Brief shake + prompt | Auto-refresh availability |
What must be filled in is keyboard accessibility and screen-reader semantics: arrow keys move between rows and columns, Enter toggles selection, and the screen reader announces the seat number and price. This part is often overlooked in generated output, yet it is a hard requirement for accessibility acceptance.
Design tokens and multi-theme migration. Extract the palette, type scale, spacing scale, and font stack (sans-serif for body text, serif for the brand name and headings, monospace for the parameter panel) into a set of token variables. This way, the same page structure can move from “orbital travel” to “deep-sea research institute” or “high-end fragrance” simply by swapping tokens and content: switching industries should be a config change, not a code change. This is a practical signal for judging the evolvability of generated output.
4. Backend generation: making “it runs” land on concurrency and consistency
Seat booking is the module most easily fudged during the demo phase and most prone to breaking in production. The core risk is overselling: two requests selecting the last seat at the same time.
The correct order is: constrain the data first, handle the flow second, and add idempotency last.
1) Back it with database constraints. Seat uniqueness within a flight should be guaranteed by a unique index, and the seat-count ceiling should be guaranteed by the structure itself—“the number of seat records equals capacity”—rather than counting them in the application layer:
-- Seats map one-to-one with a flight; duplicate inserts fail immediatelyCREATE UNIQUE INDEX uk_seat_flight_no ON seat(flight_id, seat_no);-- Pre-allocation: conditional update + affected-row check, naturally avoids oversellingUPDATE seatSET status = 'held', version = version + 1WHERE flight_id = :fidAND seat_no = :seat_noAND status = 'available'AND version = :ver;-- Capacity self-check: sold + held must not exceed the flight's capacitySELECT COUNT(*) FILTER (WHERE status IN ('held','sold')) AS takenFROM seat WHERE flight_id = :fid;
A conditional update is better than “read then write,” because it compresses contention to a single row and a single atomic operation; zero affected rows means the seat grab failed, so you go straight to retry or show “this seat is locked.”
2) Use transactions to define the consistency boundary. Pre-allocation, order creation, and cart clearing should complete within the same transaction; pre-allocations carry an expiry time, and a scheduled task reclaims held records that time out unpaid. Payment callbacks and business orders advance through a state machine; directly overwriting the status field is forbidden.
3) Use an idempotency key to eliminate duplicate orders. Double-clicks, frontend timeout retries, and gateway retries all bring duplicate requests:
def submit_booking(req, idempotency_key):# The idempotency key is generated by the client and submitted with the requestif existing := order_repo.find_by_key(idempotency_key):return existing # Return the first result directlyresult = booking_service.reserve(req) # Internally includes pre-allocation + order transactionorder_repo.save(key=idempotency_key, order_id=result.id)return result
The order table should build a unique index on the idempotency key as the last line of defense, so duplicate writes fail at the database layer rather than “looking successful” at the application layer.
5. Turning generation results into trusted deliverables: three-layer acceptance
Code produced by an agent should be treated as “a candidate pull request awaiting review,” not a final draft. A workable acceptance process has three layers:
- Static layer: type checking, lint rules, accessibility scanning, dependency version pinning.
- Contract layer: schema validation of request and response parameters; exhaustive enumeration of state transitions (available → selected → locked → paid → cancelled → released), where illegal transitions must raise an error.
- End-to-end layer: the happy path (select seat → place order → pay → issue ticket), the exception paths (payment timeout, seat snatched, network retry), and concurrency cases—use a concurrency tool to fire N requests simultaneously at the last 1 seat, and assert that the success count is always exactly 1.
The value of this three-layer acceptance is that it replaces “I think it’s well written” with “there are 47 assertions here, all passing.” Failed cases should be fed back into the prompt and the test set to form a closed loop—this is also the only reliable path for letting an agent’s output quality rise with each iteration.
6. Engineering steps that must be completed before going live
A demo environment can run on a single process; a production environment cannot. The checklist to fill in is roughly:
- Resource layering: put static assets in object storage behind a CDN, deploy backend services as containers, and use read-write splitting or a cache layer to absorb high-frequency reads like seat availability.
- Security: booking endpoints must be authenticated; sensitive fields (document information, contact details) should be collected minimally and stored encrypted, and plaintext must never be printed in logs; apply rate limiting and risk control to ordering and ticket-validation endpoints to prevent scripted seat-scraping.
- Observability: core business metrics include seat-selection conversion rate, seat-availability query hit rate, seat-grab failure rate, and order-endpoint latency percentiles, combined with log services and monitoring/alerting to form a jump path from metrics to logs. In public cloud environments such as Baidu AI Cloud, these capabilities are usually provided by general-purpose components, so you do not need to implement them yourself.
- Capacity and cost: clarify seat-row lock contention under peak concurrency, and add a seat-availability cache with a sensible invalidation strategy for hot flights.
- Compliance and copy: cancellation and change rules, privacy policy, invoices, and customer-service entry points—these are both legal requirements and part of conversion.
7. Conclusion
Evaluation scores measure the “capability ceiling on standardized problems”; engineering delivery measures the “reliability floor under constraints.” When we discuss the value of a coding agent, a more informative question than “how many points did it beat its competitor by” is: given a business description, can it produce data contracts with clear boundaries, correct concurrency control, assertable acceptance test cases, and a structure where switching industries requires replacing config rather than rewriting code?
Fix this methodology in place—contract-first, constraints as a safety net, idempotency at the close, three-layer acceptance, and the go-live checklist—and the output of generative tools will change from “worth a screenshot” to “worth going live.”
