Wish-Driven Programming with LLMs: A Practical Guide for AI Agents
This article explains wish-driven programming, an intent-first development approach powered by large language models and AI agents. It covers why the paradigm is maturing now, which capabilities and metrics matter when evaluating models for agentic tasks, and how to build a playable prototype from a single natural-language prompt. You will also find five engineering practices for improving success rates, plus common pitfalls and boundaries to watch.
1. From Writing Requirements to Stating Intent: Why the Paradigm Matures Now
In traditional development, requirement documents, API designs, data models, and test cases form a long chain. Most human effort goes into translating ideas into machine-executable details. Over the past two years, agents with tool-calling and long-horizon execution capabilities have matured, making it possible to describe a goal in natural language and let an agent break down the steps, write code, run verification, and iterate on fixes. The industry calls this intent-centric, verification-closed-loop approach Wish-Driven Programming.
The core is not the exaggerated narrative of “generating a system from a single sentence.” Instead, it shifts developers from line-by-line implementers to goal definers and result reviewers. Developers need to provide three things: clear acceptance criteria, necessary constraint boundaries, and an automatically runnable verification environment. The agent searches for an implementation path within those constraints.
It is worth emphasizing that the feasibility of this paradigm rests on three foundational capabilities: first, stable structured output and code generation; second, tool-use capabilities such as terminal operations, file reading and writing, dependency installation, and test execution; third, planning and self-correction capabilities oriented toward automated tasks. Without any one of these, so-called “wishing” degrades into an unrunnable draft.
2. What to Look at When Evaluating Capabilities: From Benchmarks to Real Task Cost
Model leaderboards are only a reference. What is truly informative is which dimensions show noticeable changes. When terminal-operation, automated-task, and coding-problem benchmarks improve together, it usually means the model has been specifically optimized for performance in an agent harness, rather than merely improving text generation quality.
More noteworthy is the Pareto improvement in performance and cost: with the per-token price unchanged, reducing ineffective output, compressing redundant reasoning, and shortening tool-call rounds lowers the total tokens consumed to complete the same task. For agent applications, this matters far more than leaderboard rankings.
The reason lies in the changing task structure. A single agent task often involves dozens of model requests, dozens of tool calls, and multiple loops, so costs stack multiplicatively. Any redundancy that looks tiny in a single turn is amplified into significant time and cost overhead in long-horizon tasks. Therefore, when evaluating an agent solution, it is recommended to record four metrics at the same time: task success rate, average number of interaction rounds, total token consumption, and end-to-end latency.
3. Practical Walkthrough: Building a Playable Prototype from One Intent
The example below uses a classic scenario: using a single natural-language intent to have an agent produce a racing game prototype with a track, timing, and multiple camera views. The whole process writes no requirement document and provides only the goal and acceptance criteria.
Step one, state the intent directly:
Build a racing mini-game: drivable, with a track and timing,support switching between a driver view and a rear view, keyboard controls, and a stable frame rate.
The first output usually “looks good”: the home page works, the core gameplay takes shape, and the view can be switched. But after deeper testing, typical problems surface, and these problems become the input for subsequent iterations.
Step two, turn experience problems into an acceptance-ready defect list:
- Physics and controls: over-sensitive steering, no speed decay, no collision feedback;
- Track and boundaries: the car can drive off the track, no lap or checkpoint detection;
- Timing logic: the timer does not reset correctly when crossing the line, and does not freeze when paused;
- Camera system: camera jitter at the moment of switching, near-plane clipping;
- Performance: frame rate drops as the number of entities grows, rendered objects are not reused.
Step three, adopt an iterative rhythm of “small commits, verifiable at each step.” Each round solves only one category of problem and requires the agent to add self-tests at the same time:
Fix only the collision and track boundary issues:1) When the car goes out of bounds, revert to the last valid position and reduce speed;2) Add lap and checkpoint detection; a lap does not count if checkpoints are not passed;3) Add runnable automated tests covering both out-of-bounds and lap-counting cases;4) Do not modify the camera or timing modules.
Step four, establish a verification loop. Have the agent run the build and tests itself before submitting; if it fails, it reads the error logs and continues fixing until everything passes. This step is the dividing line that turns “generation” into “delivery.”
4. Five Engineering Practices to Improve the Hit Rate of Wishing
Layer the intent. Break a “one-sentence wish” into three parts: a goal layer, a constraint layer, and an acceptance layer. The goal layer describes the experience, the constraint layer limits the tech stack and the scope that must not be changed, and the acceptance layer provides automatically verifiable conditions.
Minimize context. Feed only the files and logs relevant to the current task, and avoid stuffing in the entire repository. The cleaner the context, the less likely the model is to “accidentally break” unrelated modules.
Put executable constraints first. Replace vague descriptions with hard constraints such as “do not modify a certain module” and “keep existing interface signatures unchanged,” which can significantly reduce regression defects.
Automate verification. The build, static checks, and unit and end-to-end tests should be runnable with a single command. Wish-driven programming without automated verification is essentially still manual acceptance.
Make cost observable. Record the rounds, tokens, and latency of each iteration to identify redundant reasoning and meaningless retries. If you need elastic compute and a unified gateway, you can use a container platform to host the runtime environment, a message queue to decouple long-running tasks, and logging and monitoring with alerting to track the cost of each iteration; object storage can be used to store build artifacts and version snapshots. These are all general cloud product categories, and you can choose based on your own infrastructure.
5. Common Pitfalls and Boundaries
First, treating wishing as “no design needed.” The vaguer the intent, the more rework, and the higher the total cost. Second, skipping the verification loop. An agent’s self-correction depends on real feedback signals; without tests, it is like driving with your eyes closed. Third, pursuing something big and complete all at once. In the prototype stage, prioritize getting the main path working, then gradually improve robustness. Fourth, ignoring security and compliance boundaries. When installing external dependencies, accessing the network, or writing data, execute in an isolated environment with least privilege.
6. Conclusion
The value of wish-driven programming lies not in replacing engineering discipline, but in handing the “search cost of implementation details” to the agent while leaving “goal definition and quality control” to developers. As terminal operations, tool execution, and automated planning capabilities continue to improve, and task-level token costs are optimized at the same time, this paradigm will move from demos to daily work. What truly determines output quality is still whether you can provide clear goals, explicit constraints, and reliable verification.
