silviomeireles@home:~$

Document First: Empowering Development with LLMs

The Document First approach has gained prominence in software development, especially with the growing adoption of large language models (LLMs), such as GitHub Copilot. By prioritizing documentation before implementation, this methodology promotes clarity, alignment and efficiency in software projects.


What is the Document First approach?

The Document First approach consists of creating detailed and structured documentation before starting coding. This includes API specifications, data models, use cases and other artifacts that clearly define system requirements and expected behaviors. This practice facilitates communication between teams and serves as a basis for LLM-driven development.


Differences between Document First and the Waterfall model

Although both approaches emphasize documentation, they differ in several important aspects:

Aspect Document First Waterfall Model
Flexibility High; allows continuous adjustments Low; changes are difficult after start
Focus Contracts and interfaces (e.g., APIs) Complete development process
Iterativeness Iterative; documentation and code evolve together Sequential; each phase depends on the previous
Application Collaborative and integrated projects Projects with fixed scope and stable requirements

The Document First approach offers greater adaptability, allowing teams to adjust requirements and functionalities as needed. The waterfall model follows a rigid sequence of phases.


Benefits of the Document First approach with LLMs

Integrating the Document First approach with the use of LLMs brings several advantages:

  • Precise code generation: LLMs can generate code aligned with documented specifications.
  • Parallel development: Teams can work simultaneously on different parts of the system based on common documentation.
  • Rework reduction: Clarity in requirements decreases the need for later reviews and corrections.
  • Ease of maintenance: Updated documentation serves as a reference for future modifications and integrations.

This synergy between documentation and LLMs optimizes the development process, resulting in more robust software aligned with user needs.


Essential documents in the Document First approach

To effectively implement the Document First approach, the following documents are recommended:

  • API Specifications: Detail endpoints, methods, parameters and data formats.
  • Data Models: Data structure and relationships (JSON Schema, ERD, UML).
  • Use Cases: Narratives that describe user interactions with the system.
  • Flow Diagrams (or BPMN): Visual representations of business processes.
  • Test Specifications: Scenarios for validating expected behavior.
  • Technical Documentation: Architecture, design decisions, deploy, infrastructure, etc.

These documents guide development and strengthen collaboration between technical and non-technical teams.


Conclusion

The Document First approach represents an evolution in software development practices. It promotes clarity, alignment and efficiency from the start of the project, being especially powerful when combined with LLM-based code copilots.

Adopting this methodology requires discipline in documentation and constant updating, but the long-term benefits — such as productivity, quality and team communication — amply compensate for the initial effort.


Published on April 17, 2025.