Document-Driven Development Practices for Rapidly Iterating Multimodal LLMs
This article introduces TDP (Trace, Distill, Prune), a document-driven workflow for AI-assisted software development as multimodal large language models iterate quickly. It explains why storing project memory in conversation context is unreliable, and how persistent documents, periodic distillation, and pruning address that problem. It also covers splitting work between planning models and execution models to manage quota costs.
1. Faster Model Iteration: How Developers Should Respond
Over the past year, multimodal large language models have evolved at a striking pace. From general-purpose chat models to a new generation of foundation models that handle million-token long contexts and support multimodal understanding and code generation, leading industry vendors have released a generational update roughly every few months. This progress is not linear. It follows a “spiral” pattern: different versions within the same generation emphasize different capabilities, such as reasoning, execution, and planning, while generational shifts bring qualitative leaps.
For developers, this pace creates two practical problems:
- Quota and cost pressure. Flagship models are expensive to call, and a single complex task can consume a large share of a quota. Using the strongest model for everything is therefore not economical. A better approach is to let high-tier models handle planning and architecture decisions, and let execution-oriented models handle concrete coding work.
- Lagging capability awareness. Many developers still use new models with the habits they developed for the previous generation. They do not take advantage of the new strengths in long-context processing and task decomposition.
This leads to a key insight: models will keep changing, but the working methodology that lives outside the model is a developer’s long-term asset. The following section introduces a document-driven workflow that has proven effective in practice.
2. The Root Cause: The “Context Dilemma” in AI-Assisted Programming
Early on, many developers ran into similar problems when using AI for coding:
- Models tend to generate large amounts of documentation but “write without maintaining,” so outdated and duplicated files gradually pile up in the project;
- Conversation context is limited, so on long tasks, key decisions made early on can be lost partway through;
- Context compression drops details, causing the model to “forget” constraints that were previously agreed on.
The underlying issue is that project memory is entrusted to the conversation context, which is volatile and not fully controllable. The solution is to move all important context and memory outside the conversation, and use documents as the only persistent carrier.
3. The TDP Workflow: Trace → Distill → Prune
After extended practice, a three-stage, document-driven methodology can be summarized. It is called TDP for short.
1. Trace
At the start of every task, instead of asking the model to write code right away, ask it to do the following:
“Read the local documents related to a given module first, then iterate on a certain feature. When done, write the implementation process, key decisions, and encountered issues back to the corresponding documents, and update the requirements document at the same time.”
The core of this step is documentation first. Conclusions from planning are recorded in documents before execution begins, and each step during execution is written back as well. The document becomes the task’s “black box flight recorder.”
2. Distill
As tasks accumulate, documents grow bloated and redundant. Periodically, ask the model to summarize them: merge repeated content, extract stable design conclusions, and elevate process descriptions into standards. Custom specification files and reusable prompt templates can standardize this distillation step.
3. Prune
After distillation, remove outdated process documents. Keep only the currently valid architecture descriptions, requirement lists, and decision records. Pruning keeps the document set’s signal-to-noise ratio high and prevents the model from reading stale information in the next task and behaving incorrectly as a result.
4. Why This Process Works
The biggest advantage of TDP is that it fully decouples the work from conversation context:
- All memory lives in documents, so a new session can be started at any time without losing state;
- Context compression is less of a concern, because key information is already persisted;
- Documents naturally serve as the basis for team collaboration and code review;
- High-tier models only need to step in during planning, reading documents and producing a plan, while execution goes to lower-cost models. This planning-execution separation pattern significantly reduces quota consumption.
A typical task prompt skeleton looks like this:
1. Read the documents under docs/ related to [module name];2. Implement [feature description] as required;3. After completion, append design decisions, changes,and known issues to the relevant documents,and update the requirements list.
5. Recommendations for Developers
- Don’t chase new models without a sound basis. After a new model launches, validate its capability boundaries with small tasks before deciding where it fits in your workflow;
- Use models in layers. Use strong models for planning and review, and execution models for coding, to control costs;
- Establish documentation standards early. Even for small projects, keep the discipline of recording the plan in documents first and writing back after execution;
- Distill and prune regularly. Treat document maintenance as part of code maintenance.
Conclusion
We cannot control how fast models iterate, but the methodology we build is entirely in our hands. The document-driven TDP workflow turns AI programming from hit-or-miss conversation into a traceable engineering process, which reflects the core competitiveness developers need in the era of large models. In enterprise deployments, this approach can be extended into team-level AI engineering standards by combining general cloud capabilities such as object storage, log services, and monitoring and alerting.
