Wish-Based Programming in Practice: A Technical Breakdown of Rebuilding a Racing Game
This article explores wish-based programming, a paradigm where developers describe the desired experience instead of writing detailed requirements, and examines why it is becoming viable as models improve at terminal operation, automation, and task planning. Using a racing game rebuild as the case study, it walks through the iteration from a one-line wish to verifiable acceptance criteria, analyzes recurring defects such as state management confusion and missing boundary handling, and summarizes a reusable four-layer workflow. It also explains why agent cost depends on total tokens per completed task rather than per-request pricing, and lists observable metrics for evaluating an agent framework. Readers will learn how to define goals, write acceptance conditions, and set architectural constraints when delegating long-chain tasks to AI agents.
1. From Writing Detailed Requirements to Stating a Wish
Over the past two years, the default way developers collaborate with large language models has been to write requirements in detail: how interfaces are defined, how data structures are organized, and how boundary conditions are handled all need to be spelled out in the prompt. In essence, this compresses the design work that humans used to do into text and feeds it to the model. Wish-based programming, by contrast, means developers describe only the expected final experience and hand the choice of implementation path back to the model and the agent framework.
This paradigm works only if three capabilities are in place on the model side: stable operation of the terminal and file system, self-recovery across long chains of tool calls, and the planning ability to break a vague natural-language goal into an executable task sequence. In recent model releases, terminal benchmarks, automation task benchmarks, and coding benchmarks tend to rise together. That is not a coincidence but the projection of the same underlying capability onto different evaluation surfaces. Put differently, wish-based programming moves from demo to usable only when models get stronger on the execution and automation dimension.
2. Which Signals in Capability Evolution Matter
Benchmark scores are only a reference. What is actually informative is which dimensions have been lifted significantly. When terminal-operation and automation-flow metrics improve markedly, models usually become more reliable in these scenarios:
- Multi-step command orchestration: running build, dependency installation, and static checks in sequence, then reading error output and self-correcting on failure;
- Environment awareness: understanding directory structures, configuration files, and logs instead of relying on humans to feed context piece by piece;
- Long-horizon task retention: still remembering the original goal after dozens of tool calls, avoiding goal drift.
Correspondingly, gains in coding problem solving show up in the efficiency of building a runnable skeleton from scratch, not merely in completing a single function. This is exactly what a task like rebuilding a small game tests: it simultaneously challenges scaffold generation, the rendering loop, input handling, and state management.
3. The Overlooked Cost Item: One Task Is Not One Request
An agent’s cost structure is completely different from a chat scenario. Behind a single user request are multiple model inferences, dozens of tool calls, several failed retries, and result verification stacked together. With the per-token price unchanged, what really determines the bill is the total tokens consumed to complete a single task.
This is why the industry talks about a Pareto improvement of performance and cost: instead of cutting prices, unit task cost is reduced by cutting ineffective output, compressing useless loops, and terminating meaningless exploration early. For developers, this means that when evaluating an agent framework, beyond whether it can get the job done, you also need to look at how many detours it takes. Observable metrics include average interaction turns, the number of times the same file is read repeatedly, the retry rate of failed commands, and the time from requirement to the first runnable version.
4. Practice: Rebuilding a Racing Game from One Wish
The experiment used a coding execution framework optimized for agent scenarios, with the model called through the official API. The whole process deliberately skipped a requirements document and preset no technical solution.
The first round provided a single sentence:
Build a racing game: drivable, with a track and a timer, supporting a driver's view and a rear view toggle.
The result had the landing page and basic gameplay in place: the car could move, the track existed, the timer worked, and the view could be switched. But once actual play began, problems surfaced quickly. This is also the easiest pitfall in wish-based programming: there is a huge gap between “looks right” and “plays right.”
5. Breaking the Wish into Verifiable Acceptance Criteria
The second round added no implementation details but added observable acceptance standards, the most cost-effective move for raising the success rate:
- Physics and handling: acceleration, braking, and steering must have inertia; speed decays after releasing the accelerator instead of stopping instantly;
- Track constraints: the car must be limited or slowed when crossing the boundary and must not pass through walls;
- View correctness: in the rear view the car model must appear on screen, and the driver’s view must rotate with the car’s heading;
- Timing and state: start, pause, and restart are three clear states, and the timer freezes while paused;
- Performance floor: the frame rate does not fall below a given threshold on integrated graphics.
A sample acceptance description can be written in a structured form so the model can check itself:
Acceptance checklist:- [ ] Speed changes continuously between 0 and the upper limit, with no jumps- [ ] Boundary detection takes effect within 1 frame after being triggered- [ ] View switching does not lose the car reference- [ ] The timer value stays constant while paused
6. Typical Defects During Iteration and Their Causes
The problems that recurred during the rebuild almost all fall into four categories:
- Confused state management: view, timer, and input are scattered across multiple variables and overwrite each other when switching;
- Misunderstanding of coordinate systems: the model tends to drive world coordinates directly with screen coordinates, distorting steering feel;
- Missing boundary conditions: only “normal driving” is implemented, with no handling for collisions, boundary crossing, or extreme input;
- Resource lifecycle: resetting the game does not clear the previous round’s timers and event listeners, causing speed to stack up.
The corresponding strategy is not to patch items one by one but to require the model to output a module breakdown first and then verify module by module. Combining the wish with architectural constraints raises the success rate noticeably.
7. A Reusable Methodology
Abstracted from this practice, the reliable wish-based programming workflow can be summarized in four steps:
- Wish layer: describe only the experience goals and key interactions, without specifying a tech stack;
- Acceptance layer: translate experience goals into conditions that can be checked automatically or semi-automatically;
- Constraint layer: give the non-negotiable bottom lines, such as performance thresholds, compatibility ranges, and code organization;
- Closed-loop layer: let the agent run, self-check, and self-correct, with humans stepping in only when acceptance fails.
General cloud capabilities can engineer this workflow: object storage keeps the artifacts of each iteration, a message queue chains task distribution, a container platform provides an isolated and reproducible execution environment, and logging and monitoring with alerting collect turns, elapsed time, and failure rates. The general infrastructure categories that Baidu AI Cloud offers for this kind of agent engineering scenario can serve as a reference for implementation.
8. Conclusion
Wish-based programming is not about letting the model think for you; it moves human effort up from implementation details to goal definition and acceptance design. Progress in the terminal and automation dimensions makes long-chain tasks entrustable for the first time, and the focus of cost optimization shifts from unit price to total consumption per task. What really determines the quality of a rebuild is not how nicely the wish is phrased, but how clearly the acceptance criteria are written.
