Replicating Complex Software with LLMs: A Practical Method from Planning to Implementation
Benchmarks are convenient, but they rarely reflect how large language models perform in real engineering scenarios. This article presents a more practical evaluation approach: asking an LLM to replicate a well-known, highly complex piece of software—such as a spreadsheet—and explains a two-stage collaboration model that separates planning from implementation, along with cost-control strategies and reusable best practices for document-driven AI development.
Why “Replicating Classic Software” Is a Good Capability Test
Benchmark scores are convenient for evaluating an LLM’s coding ability, but they poorly reflect real-world engineering scenarios. A more effective approach is to have the model attempt to replicate a widely known, highly complex piece of classic software—a spreadsheet, for example.
A spreadsheet looks simple, but it covers several hard engineering problems:
- Cell model: references, relative vs. absolute addressing, range selection;
- Formula engine: expression parsing, dependency graph construction, circular reference detection, lazy recalculation;
- Rendering layer: virtual scrolling, frozen rows and columns, selection and edit-state switching;
- Persistence: file I/O, undo/redo stacks.
It is widely believed that mature commercial software of this kind contains millions or even tens of millions of lines of code. Producing a “demonstrable, logically consistent” prototype does not approach that complexity, but it is enough to probe the model’s real capabilities in architecture design and long-chain task execution. Notably, “simple spreadsheet” tasks remained a bottleneck for open-source models for a long time and were only reliably solved recently—evidence that the difficulty is far from trivial.
A Two-Stage Collaboration Model: Separating Planning from Implementation
Asking a model to produce the final product from a single prompt usually leads to a rough design and frequent rework later. An approach that better matches real production logic is to split planning and implementation into two roles and two stages:
Stage 1: A strong planning model generates a planning document. Have the model first analyze the target software’s module breakdown, technology choices, dependencies, and implementation order, then persist the results as a local Markdown document. The value of this approach:
- The planning document becomes a versionable, human-reviewable asset;
- The implementation stage can reference it repeatedly, avoiding context drift;
- When something goes wrong, you can tell whether it is a “planning problem” or an “execution problem,” making iteration easier.
Stage 2: An execution model codes step by step according to the document. Each session executes only one task unit from the document, then checks the result against the acceptance criteria before moving to the next. This “document-driven development” naturally fits a cost-control mindset: expensive reasoning capacity is spent only on planning and key decisions, while mechanical coding is delegated to more cost-effective options.
A typical planning prompt skeleton looks like this:
You are a senior software architect. Produce a planning document for the goal "web-based spreadsheet prototype":1. Technology stack choices and rationale (language, UI framework, state management)2. Module breakdown: cell model / formula engine / rendering layer / file I/O / shortcut system3. Interface sketches for each module (function-signature level, no implementation)4. Task breakdown: 15–30 independently verifiable tasks listed in dependency order5. Acceptance criteria and regression test points for each taskDo not output any implementation code at this stage.
Cost Control: Subscription Quotas and Budget Estimation
Calling a top-tier model directly on pay-per-token pricing to replicate a reasonably complete prototype can easily reach hundreds of dollars—not friendly for individual experimentation. A common alternative is to access models indirectly through subscription plans offered by AI coding tools: a fixed monthly fee buys a quota of credits that you spend inside a local editor.
Two practical lessons stand out:
- Estimate your credit budget upfront: during the planning stage, estimate total call volume and allocate credits roughly as “20% planning, 60% implementation, 20% debugging and refactoring” to avoid running dry mid-project;
- Control task granularity: handle only one task unit per session, saving code and documents when the task finishes, so that long-session context growth doesn’t burn through credits quickly.
Compliance also matters: when using subscription services, follow their terms of service and avoid abnormally high-frequency usage that could trigger account suspension. This is one reason many teams prefer official subscription channels over gray-market alternatives.
Beyond Replication: Applying the Method to More Complex Scenarios
A spreadsheet tests the ability to replicate “structured software,” while other tasks test performance on generative and spatial tasks. For example, some practitioners have asked models to generate a complete in-game level scene through code: decomposing the scene art into procedurally generated geometry, lighting, color grading, and camera scripts. A planning model first produces a scene design document (including the color palette, object layout coordinate system, and atmosphere definitions), and an execution model then implements the rendering code segment by segment, iterating on visual quality.
The value of such tasks is that they test not the copying of known structures, but the model’s ability to abstractly describe a “target effect” and iterate visually over multiple rounds—a dimension where differences in planning quality are easiest to observe.
Reusable Practices
The method can be distilled into four general principles:
- Document before code: planning output must be saved as a local file and serve as the single source of truth;
- Small commits, per-item acceptance: test and record results immediately after each task unit;
- Role separation: use the strongest reasoning model for planning and the most cost-effective channel for execution;
- Closed-loop budgeting: allocate credits by stage, reserving at least 20% for debugging surprises.
Conclusion
The evaluation of LLM coding ability is shifting from “benchmark races” to “real engineering validation.” By replicating classic software prototypes and adopting a collaboration model that separates planning from implementation, developers can probe the boundaries of model capability at a controlled cost while also building a reusable AI-assisted development workflow for everyday projects. When the quality of the planning document becomes the decisive factor, what we are really evaluating is the model’s true differentiator: the ability to turn a vague goal into an executable engineering plan.
