Document-Driven Development for Evolving Multimodal Models

    As multimodal foundation models evolve, development efficiency depends on more than code generation quality. This article explains how to separate planning from execution, use project documents as external memory, and apply a Trace–Distill–Prune workflow to preserve evidence and keep documentation useful. It also covers task templates, model routing, quota management, and practical metrics for building a repeatable, verifiable development process.

    Discussions about new multimodal foundation models often focus on response speed, code generation quality, long-context processing, and quota consumption. For developers, however, the more useful question is not simply whether a model is better than its predecessor, but where it belongs in the development workflow.

    Treating a new model only as a faster code generator can create two problems. First, expensive models may spend their quotas on low-value, repetitive work. Second, requirements, decisions, and verification evidence may remain scattered across conversations. When context is compressed or truncated—or a task moves to another session—that information becomes difficult to recover.

    A more useful evaluation framework has three layers:

    • Core capabilities: Multimodal understanding, long-context processing, structured output, and instruction following.
    • Engineering fit: Suitability for planning, task decomposition, execution, verification, and documentation updates.
    • Cost governance: Quota budgets, task classification, retry limits, and reuse of previous results.

    Model improvements translate into delivery efficiency only when those capabilities become part of a repeatable engineering process.

    1. Separate Planning from Execution

    Progress across model generations is not uniform. Some generations improve substantially in understanding and planning; others are more reliable at execution and code generation. Developers should not assume that the newest model is the best choice for every stage.

    Instead, classify work by its requirements:

    • Planning tasks: Clarifying requirements, comparing approaches, defining module boundaries, identifying risks, and designing acceptance criteria. These tasks demand reasoning, context integration, and structured communication, making them suitable for more capable, higher-cost models.
    • Execution tasks: Modifying code according to an agreed plan, adding tests, organizing logs, and preparing change summaries. These tasks prioritize stability, control, and verifiability. Lower-cost execution models or rule-based processes may be sufficient.
    • Governance tasks: Summarizing documents, removing duplicate content, recording decisions, and compiling metrics. These should be standardized with templates wherever possible to limit unnecessary variation.

    Using a stronger model for planning and a more consistent model for execution is a form of model routing. Separating these roles reduces the quota spent on mechanical work and makes implementation results easier to inspect.

    Quota management should be built into the workflow. Each task needs a budget ceiling, a retry limit, and acceptance criteria. When a task fails, diagnose the failure before running it again rather than allowing open-ended retries.

    2. Externalize Context Through Project Documents

    One of the main risks of conversational development is leaving critical information inside the conversation. Context compression may cause a model to lose earlier constraints. In collaborative work, a new contributor may also struggle to reconstruct why a decision was made.

    Document-driven development addresses this through externalized context: requirements, designs, decisions, issues, and verification results live in project documents rather than only in chat. Each task begins by reading those documents and ends by updating them.

    Use a layered documentation structure instead of placing everything in one large file:

    1. project/
    2. docs/
    3. requirements.md # Requirements and acceptance criteria
    4. design.md # Design and key implementation details
    5. tasks.md # Task list and status
    6. decisions.md # Decisions and trade-offs
    7. changelog.md # Changes and verification results
    8. retros/ # Retrospectives and lessons learned

    Each document should have a clear purpose:

    • Requirements: What needs to be built, why it matters, and how it will be accepted.
    • Design: How the solution works and where its boundaries lie.
    • Task list: What has been completed and what remains.
    • Decision records: Why one approach was chosen over another.
    • Change log: What changed and how it was verified.

    Update timing should also be explicit. Read the relevant documents before starting a task, record important trade-offs during execution, and write back implementation details, issues, and verification results at completion.

    This reduces dependence on conversational memory. A task can continue after a session change, a model switch, or a handoff to another developer because its working context remains in the repository.

    Documentation is not simply an administrative burden. It is reusable external memory.

    3. Apply the TDP Workflow: Trace, Distill, Prune

    The Trace–Distill–Prune workflow, or TDP, provides a closed loop for maintaining useful project knowledge.

    Trace: Preserve Execution Evidence

    Record the task background, input documents, execution steps, relevant logs, test results, and failure causes.

    A trace should not be an exhaustive activity diary. Its purpose is to retain evidence that supports verification.

    Distill: Extract Stable Conclusions

    Move reusable patterns, constraints, decisions, and acceptance methods from individual task records into design documents, decision records, or project rules.

    This prevents the team from having to rediscover the same conclusions for every task.

    Prune: Remove Stale and Redundant Content

    Remove superseded proposals, duplicate descriptions, unsupported speculation, and irrelevant temporary documents. Keep the active documentation current and usable.

    The process can be represented as pseudocode:

    1. for task in backlog:
    2. trace = collect(task.context, execution_log, verification_result)
    3. distilled = distill(trace, stable_patterns, decisions)
    4. docs = merge(docs, distilled)
    5. docs = prune(docs, expired, duplicate, unverified)

    The value of TDP lies in the closed loop:

    • Without Trace, conclusions lack evidence.
    • Without Distill, experience does not become reusable knowledge.
    • Without Prune, documentation becomes another source of context clutter.

    Document-first practices often fail not because teams do not write enough, but because they record without distilling and add content without cleaning it up.

    Schedule pruning regularly—for example, at the end of each iteration. Check whether obsolete requirements have been closed, overlapping designs have been merged, unverified conclusions have been labeled, and temporary documents have been archived.

    4. Make Documentation Updates a Default Task Step

    Document-driven development should not depend on a model remembering to update the documentation. Prompt templates and rule files should make reading, execution, and write-back explicit parts of the task.

    A general task prompt might look like this:

    1. First, read the sections relevant to the target module in:
    2. docs/requirements.md, docs/design.md, and docs/tasks.md.
    3. Goal: Iterate on the target feature.
    4. Constraints:
    5. - Preserve compatibility with existing interfaces.
    6. - Do not introduce dependencies that have not been approved.
    7. - If verification fails, record the cause before proceeding.
    8. After execution:
    9. 1. Update docs/design.md with implementation details.
    10. 2. Append key trade-offs to docs/decisions.md.
    11. 3. Add new or changed requirements to docs/requirements.md.
    12. 4. Record verification results and outstanding issues in docs/changelog.md.
    13. 5. Remove temporary, duplicate content created during this task.

    A rule file can further define document naming, required fields, update timing, and acceptance requirements:

    1. Documentation rules:
    2. - Before starting a task, read the requirements, design,
    3. task list, and decision records.
    4. - At task completion, update the design, decision records,
    5. and change log.
    6. - Every decision must include background, options,
    7. trade-offs, and impact.
    8. - Every change must include scope, verification method,
    9. and remaining risks.
    10. - Review duplicate and outdated content weekly.

    With this structure, prompts rely on stable documentation entry points rather than increasingly long conversations. The model produces not only code, but also engineering assets that another developer can use.

    The key habit is not writing longer prompts. It is ensuring that every task has documented inputs and documented outputs.

    5. Build a Multistage Workflow with Cost Controls

    Once model roles are separated, orchestration should move beyond a single conversation into a multistage pipeline:

    Requirements clarification → Planning → Task decomposition → Execution → Verification → Documentation updates

    A more capable model can develop the plan and acceptance criteria. An execution model can implement the documented tasks. Tests, static checks, and manual spot checks can verify the result. The final stage records the outcome in project documentation.

    For complex projects, reserve the planning model for critical decision points and route repetitive execution to a lower-cost tier.

    Cost governance should cover four areas:

    Task Classification

    Classify tasks by their scope of impact, uncertainty, and verification cost. Assign model tiers and budgets accordingly.

    Quota Budgets

    Set a call budget and retry limit for each task. If a task exceeds its allocation, pause and diagnose the problem before continuing.

    Result Reuse

    Preserve stable solutions, templates, and rule files so that future tasks do not require the same reasoning from scratch.

    Failure Management

    Record failure causes to prevent repeated mistakes from consuming additional quota.

    The faster models evolve, the more important it becomes to avoid building workflows around a particular product’s temporary characteristics. Base the process on transferable capabilities: structured documents, explicit acceptance criteria, traceable decisions, and replaceable model routing.

    This allows the workflow to adapt as models change.

    6. Start Small and Measure the Process

    Begin with a module that has clear boundaries and manageable verification costs. Establish the document structure and prompt templates, then run the TDP loop.

    Useful metrics include:

    • Task rework rate.
    • Documentation freshness.
    • Decision traceability rate.
    • Quota consumption per task.
    • First-pass verification rate.
    • Closure rate for outstanding issues.

    These metrics can reveal different process failures. If documents remain unchanged for long periods, write-back rules are not being followed. If quota consumption stays high without a reduction in rework, task classification or model routing may be unsuitable. If documentation grows without restraint, pruning is missing.

    Documentation must not become a box-checking exercise. Its purpose is to support handoffs and verification, not to maximize page count.

    Key conclusions should have supporting evidence. Unverified statements should be clearly labeled. Outdated material should be reviewed and removed regularly. Tasks involving security, permissions, or data compliance should retain human review; an automated documentation update is not a substitute for final judgment.

    Conclusion

    Rapid progress in multimodal foundation models matters, but the more important engineering challenge is turning those capabilities into a repeatable development process.

    Use documentation as external memory. Apply Trace–Distill–Prune to preserve evidence, extract reusable knowledge, and remove clutter. Separate planning from execution, and use quota budgets and acceptance criteria to define operational boundaries.

    This approach turns stronger model capabilities into more reliable delivery. It does not depend on the context of a single conversation or the behavior of one product. It depends on clear documents, verifiable results, and disciplined maintenance.