Wish-Based Programming for AI Agents: Rebuilding a Racing Game from a Single Prompt

    This article explores wish-based programming, an approach where you describe intent first and let an AI agent produce a runnable minimum loop before refining it through feedback. Using a racing game as the case study, it shows how to turn vague wishes into verifiable acceptance criteria, why per-task cost and first-pass success rate matter more than benchmark scores when evaluating model updates, and four engineering practices—context layering, minimal tool orchestration, observability, and cost control—that keep agents delivering reliably. Readers will learn a practical workflow for moving from one sentence to a working, arcade-style game.

    1. Why Wish-Based Programming Is Worth a Serious Try

    In the past, collaborating with models usually meant writing a requirements document, drafting a technical plan, and then breaking the work into tasks one by one. This flow is efficient when requirements are clear, but during exploration it slows you down: before the document is finished, the idea has already changed three times.

    So-called “wish-based programming” does not mean abandoning engineering constraints. Instead, it moves intent description to the front, lets the agent first produce a runnable minimum loop, and then has a human converge toward the desired form through multiple rounds of feedback.

    Its value comes down to three points. First, it compresses the feedback cycle from days to minutes. Second, it gives unstructured requirements—for example, “the handling should feel like an old-school arcade racer”—a chance to be quickly made concrete. Third, it forces us to write acceptance criteria clearly, because a vague wish only yields a vague result.

    2. Observing Model Capability Changes: From Benchmarks to Real Task Cost

    A model version update can be roughly gauged from public leaderboards, but they are only a reference. What matters more is which task types the capability gains land on: terminal command execution, tool-call orchestration, automated workflow progression, and end-to-end solving of programming problems. Together, these capabilities determine how an agent performs on long-horizon tasks.

    A performance-cost Pareto improvement means that, with the unit price unchanged, completing the same task consumes fewer tokens and fewer interaction rounds, so the real bill goes down. For an agent, a single task often involves many model requests, tool calls, and retry loops, and any wasted output is amplified into time and money. Therefore, when evaluating a new version, it is better to use “cost per task” and “first-pass success rate” instead of context length or leaderboard scores alone.

    3. Rebuilding the Racing Game: Starting from One Sentence

    The setup is simple: an intelligent coding environment that supports tool calls and file read/write, accessing the model through a standard interface, with no proprietary plugins required.

    The first wish was a single sentence:

    1. Make a racing game: drivable, with a track and a timer, supporting a switch between driver view and chase view.

    The result was a runnable minimum version: home page, track, timer, and dual-view switching were all present, but the visual style was rough and lacked a sense of speed, collision feedback, and sound effects. This shows there is a huge gap between “it runs” and “it looks like that game,” and the cause of the gap is not that the model cannot write code, but that the wish lacked decidable acceptance items.

    4. The Second Wish: Breaking Aesthetics into Executable Constraints

    The second time, instead of saying “make it look better,” I broke aesthetics into verifiable metrics:

    1. Improve on the existing version, and it must satisfy:
    2. 1) The track includes at least one straight, one curve, and one slope; curves have guardrails and shoulders;
    3. 2) When speed exceeds a threshold, add camera shake and edge blur, and show the speedometer as both a number and a bar;
    4. 3) After a collision, the car slows down and flashes for 0.5 seconds, and the timer does not reset;
    5. 4) In chase view, rear wheel tracks and exhaust particles are visible;
    6. 5) All assets use procedural geometry and synthesized sound effects, with no external assets introduced.

    The key this round was not a longer prompt, but replacing subjective words with checkable conditions. Based on this, the agent restructured the rendering loop and physics parameters, and the visuals immediately gained an “arcade feel.” The lesson: the convergence speed of wish-based programming depends on how many decidable rules you translate “I like it” into.

    5. Four Engineering Practices for Stable Agent Delivery

    1. Layer the context. Put project structure, coding conventions, and performance red lines in long-term context; put this round’s acceptance checklist in short-term instructions; and feed error logs back as tool results to avoid the model guessing.
    2. Minimize tool orchestration. Open only three kinds of tools—read file, write file, and run tests—to reduce overreach and noise; automatically run a build at the end of each round, and roll back on failure.
    3. Observability first. Have the agent build frame rate, draw call count, and average time logs into the code, so a human only needs to look at three metrics to judge whether optimization is working.
    4. Cost control. Set a maximum number of loops and a token budget per round; when exceeded, force output of “current blocker + next-step plan” to avoid silent idling.

    A sample acceptance script can be organized like this:

    1. check:
    2. - build success
    3. - fps_avg >= 55
    4. - view_switch works (driver <-> chase)
    5. - collision reduces speed and keeps timer

    6. Common Issues and Troubleshooting Order

    If the visuals stutter, first look at draw calls and per-frame allocations, then at the physics step frequency. If view switching behaves abnormally, check whether camera interpolation carries over across frames. If the timer is inaccurate, confirm whether the time source is affected by pause and collision. If the style still falls short, keep breaking “feel” into four categories of parameters: geometry, lighting, particles, and sound. The recommended troubleshooting order is fixed: runnability → metrics → interaction → aesthetics, to avoid discussing details on a version that does not even run.

    7. Conclusion

    Wish-based programming is not mysticism; it turns “writing documents” into “writing acceptance criteria.” When you are willing to break a wish into decidable conditions and constrain the agent with metrics and logs, the model upgrades from a “code completion tool” to a “deliverable engineering partner.” Next time, pick a small game you have been thinking about, open with one sentence, and close with five rules.