Planning-First Coding: Cost and Boundaries of a Prototype Test with AI Models
This article examines how AI coding models perform when given a project with clear acceptance criteria, breaking the process into three phases: planning, implementation, and visual polish. Using a spreadsheet prototype as the test case, it evaluates the quality of model-generated design documents, the practical cost of iterative development, and the limits of what a small-scale test can prove. The findings offer pragmatic takeaways for engineering teams, including versioned planning documents, automated module-level tests, budget layering, and tracking rework costs.
Planning-First Coding: Cost and Boundaries of a Prototype Test with AI Models
What This Article Can and Cannot Prove
Recent demonstrations of AI coding models often create the impression that a full application can be generated from a single sentence. This article addresses a more specific question: in a project with well-defined acceptance criteria, how well do AI models handle the planning, implementation, and visual polish phases — and what does it cost?
The test described here is deliberately small in scope, covering only the core functionality of a spreadsheet prototype. The conclusions it supports are therefore limited: models can produce structurally coherent planning documents, but this does not mean they are ready to support medium or large projects. Verifying that claim would require significantly larger test tasks.
Why a Spreadsheet?
Spreadsheets are well-suited for this type of test for three reasons.
First, functionality can be introduced incrementally. A natural progression is to start with cell editing, then add formula evaluation, and finally handle reference-chain propagation along with row and column insertion and deletion. Second, results can be objectively verified. Whether a formula produces the correct computed value has a definitive answer — there is no room for aesthetic disagreement. Third, known pitfalls are well documented. Issues such as formula dependency ordering, dirty-flag propagation, and circular references have historically caused defects in numerous open-source implementations.
One caveat: the codebase of a commercial office suite is far larger than a prototype. The quality of a prototype only reflects how well the model handles problems at this scale; it cannot be used as direct evidence of how the model would perform on a large engineering project.
Planning Phase: What the Model Produced
The first step of the test was to ask the model to produce a complete plan, covering module breakdown, data structures, formula parser selection, and rendering strategy. The output proposed topological sorting to manage evaluation order across dependent cells and a dirty-flag mechanism for cascading updates. The model also included circular reference detection and error propagation rules, such as how to handle division by zero and references to empty cells.
These design decisions were directionally correct and covered edge cases that beginners often overlook. However, a planning document is a design artifact, not a verified result. When manually reviewing such documents, the following points should be checked item by item:
- When topological sorting encounters a circular dependency, does the detection logic activate, and what error is returned?
- Does the dirty flag propagate only to affected cells, avoiding a full-table recompute?
- When empty cells participate in summation, averaging, or direct reference, does the result match the design spec?
- What features are missing from the document — for example, formatting, copy-paste, and undo/redo?
This test did not track how many times manual corrections were needed, so no reliable completion rate for the planning document can be reported.
Execution Phase: Why Cost Is Hard to Estimate
The execution phase followed a rhythm of “complete one module, run verification, then proceed to the next.” After completing the formula engine, cell interaction, and basic interface, the API cost for the two main tasks was already approaching the credit allowance of a subscription plan. This is a rough observation. The test did not record the number of calls, input/output token counts, unit pricing, or timing, so it is not possible to convert this observation into a precise dollar figure.
High costs typically stem from several compounding factors. Each call may reload prior context. Models generate extra output during reasoning steps, tool invocations, and self-corrections. Large monolithic prompts tend to produce duplicated generations and rework. When these factors stack, the actual expense usually exceeds the intuitive estimate from single-turn interactions.
To determine whether the cost is justified, at minimum the following four categories should be tracked separately: planning, execution, verification, and rework. Only with per-category statistics does it become visible which segment consumes the most resources.
Visual Polish: What the Model Can Achieve
The final phase of the test asked the model to generate, using pure code, a scene render with a particular artistic style, followed by further visual adjustments. The model was able to translate abstract descriptions such as “atmosphere” and “light-shadow layering” into concrete parameters — for example, light source direction, tone range, and gradient levels — and generate code accordingly.
Visual acceptance criteria are inherently subjective, and this article offers no quality judgment. Additionally, some demonstration cases circulating in the community lack traceable sources, model versions, and reproduction conditions, so they were not used as reference points here.
Engineering Practices You Can Apply Directly
First, save the planning output as a versioned Markdown file and treat it as the working basis for subsequent execution. Each execution step should reference only the relevant module fragment. This approach limits context bloat and reduces the risk of requirements drifting across multi-turn conversations.
Second, prepare automated tests for every module. Formula results have standard answers; whether a test passes or fails is an objective signal, far more reliable than the model’s own claim that a bug has been fixed.
Third, establish a layered budget. Allocate budget to core logic first. UI refinement and decorative features should receive remaining budget and be cut first when funds run low.
Fourth, record rework systematically. Each rework round should note its cause, the modules involved, and an approximate token count. These records become valuable input for the next round of planning.
What This Test Did Not Cover
This test did not compare multiple models or versions, did not measure latency, and did not benchmark the time and cost of building the same modules manually. Furthermore, separating planning from execution is not always economical. For small changes of a dozen lines, multi-round planning and document maintenance may take longer than simply making the edit directly.
The conclusions of this article are therefore conditional. Planning capability deserves continued observation, cost concerns require data to be properly characterized, and the scope of applicability has yet to be expanded.
