Wish-Driven Programming in Practice: Rebuilding a Racing Game and Optimizing Agent Costs
This article explores wish-driven programming, where developers describe desired outcomes and constraints while an AI coding agent handles design, code generation, execution, and iteration. Using an arcade-style racing game rebuild as a case study, it shows what a single-sentence prompt can and cannot achieve, which capability dimensions matter more than benchmark scores, and how Pareto improvements in performance and cost make long-horizon agent workflows practical. You will find a three-layer requirement structure, an executable acceptance checklist, context and tool orchestration practices, and transferable recommendations for budgets, observability, and automation.
1. From a One-Sentence Request to a Runnable Prototype
Discussion of “wish-driven programming” has been heating up across the industry. The term is not just a slogan. It describes a collaboration model in which developers state only the expected result, and an AI coding tool with terminal access, tool execution, and automated orchestration handles solution design, code generation, runtime verification, and iterative fixes on its own. The core shift is that human input moves up from “implementation steps” to “goals and constraints,” while the machine absorbs most of the intermediate work.
To test the practical boundaries of this paradigm, I picked a task that was both fun and technically substantial: rebuilding an arcade-style racing game. The runtime was an execution framework specifically optimized for AI coding scenarios — effectively a harness, meaning the outer program responsible for context assembly, tool dispatch, loop control, and result validation. Model capability came through a general-purpose large model API. To be clear, this article is not a review of any specific product; it abstracts the process into a reusable methodology.
1.1 First Attempt: Purely “Wishing”
For the first attempt I did almost no preparation — no requirements document, no technology selection, just one sentence:
Build a racing game: drivable car, a track, timing, and a switch between driver view and rear view.
The result was instructive. The landing page looked reasonably polished, and once in the game the core loop was basically closed: the car was controllable, the track existed, timing worked, and both views could be switched. But visual style, material detail, sense of speed, and scene richness still fell well short of a mature racing game.
Two things became clear. First, the model already has strong autonomous capability at the “functional skeleton” level. Second, anything involving aesthetic judgment, performance tradeoffs, and detail density still requires humans to supply clearer constraints and acceptance criteria. Wish-driven programming does not mean “wishing without constraints”; it means “writing the constraints down clearly.”
2. Which Capability Dimensions Actually Matter
When evaluating updates of this kind, benchmark scores are only a reference. What carries real information is which dimensions have made a leap. When metrics related to terminal operation, tool execution, and automated tasks improve, it usually means the model has gotten stronger in the following areas:
- Command construction and error recovery: it can self-correct based on error output instead of repeatedly emitting the same failing command;
- File and project structure understanding: it knows where code belongs, how to organize modules, and how to wire in dependencies;
- Long-horizon stability: it keeps the goal from drifting across many loop iterations, reducing wasted output and duplicated work;
- Verification awareness: it proactively runs the program, checks logs, takes screenshots or reads output, and closes the loop with facts rather than “I think it works.”
Together these point to one conclusion: the quality of collaboration between the model and the execution harness is becoming the key variable that determines real-world experience. The model is responsible for “thinking it through,” and the framework is responsible for “running it reliably.” The better the two match, the higher the task completion rate.
3. The Real Focus: Pareto Improvement in Performance and Cost
More important than benchmark scores is the Pareto improvement in performance and cost. It means that with unit price unchanged, real usage cost drops by reducing the tokens consumed per task, shortening interaction rounds, and cutting wasted output. In other words, the price is not slashed; the wasteful parts are removed.
This matters especially for agent applications. A long-horizon task is rarely “one request, one response.” It is made up of a large number of model requests, tool calls, and loop iterations. People often overlook this overhead unconsciously, until tasks get longer and chains get more complex, at which point cost and latency surface all at once.
The engineering levers for Pareto improvement typically include:
- Context compression and retrieval: put only the information the current step truly needs into context, and fetch the rest on demand through retrieval;
- Layered planning: produce a coarse-grained plan first, then refine it stage by stage, avoiding a single overly long plan that forces rework;
- Minimizing tool calls: batch similar operations and reduce fragmented loops of “read one file — think one step — read another file”;
- Early failure stop and retry budgets: set caps and exit conditions for loops to prevent spinning in place;
- Result caching and reuse: cache verified build artifacts and test conclusions to avoid repeated computation.
# Pseudocode: task loop with budget and early stopbudget = {"max_steps": 40, "max_retries": 2, "max_tokens": 120000}plan = coarse_plan(goal) # coarse-grained planfor stage in plan.stages:ctx = retrieve(stage) # retrieve context on demandresult = act_with_tools(stage, ctx)if not verify(result):result = retry(result, budget["max_retries"])if budget_exhausted(budget):return summarize_progress() # stop early and reportreturn finalize()
4. Layered Requirements for the Racing Game: Turning Wishes into Verifiable Engineering Language
To make the second attempt closer to expectations, I broke the one sentence into three layers: experience, functional, and non-functional. This is also the dividing line that determines whether wish-driven programming produces reliably.
- Experience layer: arcade style, strong sense of speed, neon color palette, collision feedback, nitro boost;
- Functional layer: vehicle physics, track generation, lap counting and timing, view switching, pause and restart;
- Non-functional layer: stable frame rate, configurable assets, clear code structure, extensibility to multiple tracks.
The acceptance criteria also need to be executable, for example:
Acceptance checklist (example)1. Enter a drivable state within 3 seconds of launch;2. Complete at least 1 lap within 60 seconds, with timing and best result displayed correctly;3. View switching is smooth, and control direction stays consistent after switching;4. Speed decays reasonably after a collision, with no clipping through geometry and no freeze;5. Key parameters (car speed, gravity, track width) are centralized in a configuration file.
Once constraints are written this way, the model’s autonomy is no longer wasted on guessing but invested in implementation and optimization.
5. Context and Tool Orchestration: The Invisible Engineering That Decides Success
During the rebuild, what actually raised quality was not “a longer prompt” but more sensible context and tool orchestration:
- Directory first: have the tools establish a clear project structure, then fill in file by file, avoiding single-file bloat;
- Incremental verification: run the program after each subsystem is complete, letting errors drive corrections;
- Visual self-check: for graphics tasks, verify through runtime results or screenshot descriptions rather than inferring from code alone;
- Change isolation: split physics, rendering, input, and UI into separate modules to reduce mutual impact.
This approach is two sides of the same coin as the Pareto improvement above: the clearer the structure, the fewer tokens spent on retrieval and localization; the earlier the verification, the less rework and the fewer total rounds.
6. Transferable Practical Recommendations
- Structure the “wish” into a three-part format of goal, constraints, and acceptance criteria to reduce model guessing;
- Set step, retry, and token budgets for long-horizon tasks to avoid wasted loops;
- Prioritize observability, using logging services and monitoring alerts to locate the failing stage;
- Store versions of complex artifacts in object storage for easy rollback and comparison;
- Hand repetitive verification to automated pipelines, keeping human effort focused on aesthetics and tradeoffs;
- When assessing capability, look at dimension leaps and the cost curve rather than a single benchmark score.
7. Conclusion
The value of wish-driven programming lies not in “generating everything from one sentence” but in freeing human energy from tedious implementation and directing it toward goal definition, experience judgment, and quality control. When models keep improving at terminal operation, tool execution, and automated tasks, and when performance-cost Pareto improvements come along with that, agent applications finally gain the economics needed for long-horizon deployment. Write the constraints clearly first, then let the tools run — that is the most practical conclusion I took from this racing game rebuild.
