Wish-Driven Programming Tested: Capabilities and Limits of LLM Code Generation

    This article examines wish-driven programming, where developers describe a complete feature in natural language and ask a large language model to generate the project. It explains which parts of this workflow can rely on model output, which parts need human review, and how to run a reproducible test using clear acceptance criteria, comparison metrics, and a security checklist.

    Introduction: From Completion to Describing Requirements

    Early AI coding tools mainly provided code completion, predicting one line or one function at a time. In the past two years, more developers have tried a different approach: describing a complete feature in natural language and asking a model to output a project skeleton, module code, and configuration files. Some in the community call this practice “wish-driven programming.”

    This approach has practical value, but its results depend heavily on the task type, how the request is written, and the verification that follows. This article explains which steps can rely on a model, which steps still need human review, and offers a reproducible testing method.

    What Model Version Changes Can Tell You

    Under the same model name, the service provider may adjust the model version or inference configuration. Some API responses include fields such as system_fingerprint, which identify the backend configuration version. A change in this field only shows that the version identifier has changed. By itself, it does not prove that the parameter structure, training data, or fine-tuning strategy has changed.

    When you evaluate the effect of a model upgrade, record the model name, call date, request parameters, and returned version identifier. Then repeat testing with the same set of tasks. Conclusions drawn only from field changes or personal impressions are unreliable.

    Case Study: A Reproducible Small Game Prototype

    The following case illustrates the testing method. It is a controlled demonstration task, and its results do not represent all scenarios.

    Record the following information for your test environment:

    • Model: name, version, and call date
    • 3D engine: for example, Three.js, with the exact version number
    • Runtime: Node.js version, and browser and browser version
    • Dependencies: the packages listed in package.json and the install command, for example npm install three
    • Acceptance criteria: see below

    Example prompt:

    1. Role: You are a front-end engineer familiar with Three.js.
    2. Task: Build a first-person browser scene using Three.js r160 (replace this with the version you actually use).
    3. Requirements:
    4. 1. The scene includes a flat ground plane, a lake area (a flat plane is sufficient), and a simple building with four walls.
    5. 2. Implement WASD movement, mouse look controls, space bar jumping, and basic gravity.
    6. 3. Place two cubes inside the building that the player can push, using simple bounding-box collision detection.
    7. Output:
    8. - Project directory structure
    9. - Complete code for each file
    10. - Startup command and browser URL
    11. Do not use any third-party libraries that are not listed here.

    Acceptance criteria:

    1. After you install the dependencies as described in the output, the project starts locally with no console errors.
    2. Manually verify five operations one by one: movement, view control, jumping, gravity, and pushing cubes. Record pass or fail for each.
    3. Calculate the share of lines changed by hand out of the total lines of code. Use this ratio as a quantitative measure of how much manual completion the output needs.

    In this kind of task, the generated code usually provides a runnable skeleton and basic logic. Common problems include collision checks that are too coarse, camera controls that interfere with jump logic, and some API names that do not match the chosen version. The specific issues depend on your own test results.

    Comparison with Traditional AI Coding Tools

    When you compare tools, use the same basis for each one. The table below lists several key dimensions.

    Dimension Inline completion tools Conversational assistants Full-project generation (LLMs)
    Context scope Current file and nearby code Conversation content, possibly with attached files Requirement description, possibly spanning multiple files
    Output granularity Single line to single function Function to module Directory structure and multiple files
    Level of human involvement Low, accepted segment by segment Medium, requires pasting and debugging High, requires full review and integration testing
    Main verification method Compilation and unit tests Manual execution Startup tests, feature checklists, security scanning

    You can compare results using these metrics: compilation pass rate, first-run success rate, number of manually changed lines, number of acceptance items passed, and time to completion. Comparisons only mean something when you use the same task set and the same reviewer.

    How Developers Can Use Generated Code

    1. Write prompts as verifiable requirements. Specify the tech stack and versions, directory structure, boundary conditions, performance requirements, and acceptance items. The more specific the requirements, the easier it is to judge whether the output is acceptable.
    2. Put generated code into an automated pipeline. Put the code under version control, build it in an isolated environment, and run unit tests and static checks. You can feed run logs and error messages back to the model for the next round of changes, but you must retest after every change.
    3. Complete a security review before deployment. Generated code most often fails in dependencies, network requests, and key configuration.

    Security checklist:

    • Dependencies: Confirm that every package name exists, check version numbers, and run a dependency vulnerability scan. Models may suggest package names that do not exist or outdated versions.
    • Secrets: Never put API keys, passwords, or tokens in the code. Read them from environment variables or a key management service.
    • Network requests: Check the target domains, confirm that TLS certificate verification is enabled, and check whether user input is filtered.
    • Licenses: Confirm that the libraries you add and the generated code are compatible with your project’s license.
    • Pre-deployment verification: Run the full application once in a staging environment, and confirm that the logs contain no sensitive information.

    Frequently Asked Questions

    How do you verify generated code?
    First compile or start the code. Then test it against the requirement list item by item, and finally perform a code review and security scan. Passing a startup test alone does not show that the features work correctly.

    What are the common failure modes?

    • The code calls functions that do not exist or interfaces that are deprecated.
    • Variable names or file paths are inconsistent across files.
    • The code covers only the normal flow and lacks error handling and boundary checks.
    • Examples hardcode configuration values or keys.

    How do you estimate cost and latency?
    Record the input and output token counts, response time, and retry count for each task, then convert them into cost. Retries are often overlooked, but they are part of the actual cost and should be counted separately.

    Which tasks suit model-generated code?
    Boilerplate code, project scaffolding, draft unit tests, and data format conversion are well suited to models. For core business rules, concurrency control, financial calculations, and security logic, developers should lead the work, with the model providing only assistance.

    Conclusion

    Large models can reduce the time spent writing some boilerplate code. The actual benefit depends on task complexity, model version, the quality of the requirement description, and the review process. Teams can start with a small test using fixed tasks, record the results, and then decide how far to expand their use.