Wish-Based Programming with Higher Reasoning Tiers: A Practical Guide

    This article explains wish-based programming, where developers describe a verifiable goal and let a model handle implementation and self-checking. It covers prompt structure, how to match reasoning tiers to task difficulty and cost, how to build a regression benchmark instead of relying on public leaderboards, and how to integrate the workflow into CI with quality gates and rollback controls.

    1. What a Version Bump Can Signal: A Pareto Improvement

    A model update that changes only the version number while improving capability, reducing latency, and lowering cost per task is what engineering calls a Pareto improvement: no metric gets worse, and users no longer have to trade quality for expense. For developers, the real question is not the benchmark score itself, but whether the improvement reproduces reliably in their own codebase and pipeline.

    Keep in mind that public leaderboards reflect performance on a specific distribution of problems, and different leaderboards measure different capabilities: some focus on repository-level bug fixing, some on terminal command orchestration, and some on long-context understanding. Leading on one does not mean leading on all. Treating a leaderboard as the sole selection criterion often leads to mismatched expectations on real production tasks.

    2. What Wish-Based Programming Is

    Wish-based programming means the developer states only the goal and constraints, while the model closes the loop on locating the code, making changes, running them, and self-checking. It is not “generate an entire system from one sentence.” Instead, you hand the model a verifiable intent and keep acceptance criteria in human hands. It works only when three conditions hold: the intent can be described, the result can be verified, and the change can be rolled back.

    A reusable prompt skeleton (illustrative):

    1. Goal: <one sentence describing the user-visible outcome>
    2. Scope: <directories/files allowed to change; parts explicitly off-limits>
    3. Constraints: <dependency versions, coding standards, compatibility requirements>
    4. Acceptance: <test commands that must pass and their expected output>
    5. On failure: if two attempts still fail, output a root-cause analysis and a minimal reproduction; do not expand the change further

    The critical section is Acceptance. A wish without executable acceptance criteria is just a vague verbal requirement; the model can only guess, and regression risk rises accordingly.

    3. Trading Off Reasoning Tiers and Task Cost

    Most platforms split reasoning into several tiers: lower tiers respond fast and cost little, suiting format conversion, comment completion, and small single-file edits; higher tiers allow longer chains of thought and more tool calls, suiting cross-file refactoring and hard-to-diagnose defects. Cost rises quickly with the tier, so allocating tiers per task is more economical than running everything at the highest tier.

    A simplified cost estimation model:

    1. cost per task ≈ (input tokens × price_in + output tokens × price_out) × average attempts + fixed tool-call overhead

    There are three optimization directions: compress context (feed only relevant files and failure logs), reduce the number of rounds (clear acceptance criteria cut repeated trial and error), and route tiers by difficulty. Only when cost per task drops while success rate rises is it a genuine improvement in value.

    4. Observable Evaluation: From Leaderboards to Your Own Regression Set

    Leaderboards are for initial screening only; the final decision rests on a self-built regression set. Pick 50–200 real tasks from historical tickets, covering four categories: bug fixes, dependency upgrades, script orchestration, and performance optimization. Fix the acceptance commands so the evaluation pipeline can run repeatedly.

    1. # Illustrative: task-level regression evaluation
    2. cases = load_cases("regress/tasks.jsonl") # each entry has prompt, verify command, timeout
    3. for c in cases:
    4. r = run_agent(c.prompt, tier=c.tier, timeout=c.timeout)
    5. ok = run_cmd(c.verify) == 0 # pass/fail based on the verify command exit code
    6. report.append({"id": c.id, "pass": ok, "cost": r.cost, "steps": r.steps})
    7. print(summary(report)) # success rate, average cost, average steps, timeout rate

    Four core metrics: task success rate, average cost per task, average interaction steps, and timeout and rollback rate. Watching only success rate hides expense; watching only cost sacrifices quality. They must be observed in pairs.

    5. Engineering Integration: Plugging Wishes into Your Existing Pipeline

    In CI, the model can act as an “optional implementer” while the pipeline acts as the judge: the model submits changes, and tests plus static checks decide whether they merge. Combined with branch isolation, a change summary, and a rollback switch, the risk of automated code changes stays controllable.

    On Baidu AI Cloud, this kind of architecture is typically carried by a few general-purpose capabilities: a container platform runs stateless executors, object storage holds task artifacts and logs, a message queue handles task distribution and rate limiting, and logging plus monitoring and alerting cover cost and failure-rate observation. On the model service side, you only need to expose a unified inference interface, with tier and budget passed in as parameters.

    1. # Illustrative: task routing and budget control
    2. router:
    3. - match: "single file/format/comments"
    4. tier: low
    5. max_cost: 0.2
    6. - match: "cross-file refactor/hard defect"
    7. tier: high
    8. max_cost: 3.0
    9. guard:
    10. max_steps: 12
    11. require_verify: true
    12. rollback_on_fail: true

    6. Common Anti-Patterns and Quality Gates

    Anti-patterns include: changing too many files in one wish; merging without an acceptance command; pasting entire failure logs and bloating the context; ignoring dependency and coding-standard constraints; and skipping human review of model output. The matching gate checklist is: a change-scope allowlist, tests that must pass, static checks, locked dependencies, and a change summary with owner sign-off.

    7. Conclusion

    A small version-number change can improve capability, latency, and cost at the same time, but whether that benefit materializes depends on the engineering around it. Write the intent clearly, define acceptance as commands, allocate tiers by difficulty, and bake the regression set into the pipeline. That is when wish-based programming moves from demo to daily production.