Architecture Your Developers Are Writing Architecture Docs Nobody Reads. Try This Instead.

Your Developers Are Writing Architecture Docs Nobody Reads. Try This Instead.

FlowSquad generates High-Level and Low-Level Design documents directly from your codebase and requirements โ€” always up to date, never out of sync with the actual implementation.

April 1, 2026 · 7 min read · Software ArchitectsEngineering VPs
TL;DR

Why Do Static Docs Become Stale Immediately?

The incentive structure of architecture documentation is fundamentally broken. Writing docs is a large, upfront, unrewarded investment. The person best qualified to write them โ€” the architect or tech lead who built the system โ€” has the least free time. And the reward for writing good docs comes to future team members, not to the person who wrote them.

The result is predictable: docs get written once, at the point of maximum motivation (usually post-project retrospective or onboarding a new hire), and then progressively diverge from reality as the codebase evolves. The divergence compounds:

A study of 200 enterprise software teams found that 73% of developers report that architecture documentation is rarely or never accurate relative to the current implementation. Despite this, teams continue to invest in documentation sprints, ADR (Architecture Decision Record) processes, and Confluence hierarchies that are out of date before they're published.

The root problem: Docs are written about code. Code changes faster than docs. The only way to solve this is to generate docs from code โ€” not the other way around.

How Does FlowSquad's Design Generation Work? (2-Step Flow)

FlowSquad's HLD and LLD generation follows a two-step flow that mirrors how a senior architect would actually document a system โ€” first understanding the big picture, then drilling into component-level detail.

Step 1 โ€” Codebase Analysis and Context Building

FlowSquad uses its VectorDB index to perform a structural analysis of the codebase:

Step 2 โ€” Document Generation

Based on the structural analysis, FlowSquad generates the design document via the configured LLM with the analysis as context. The generation is grounded in the actual codebase โ€” not invented architecture that may not reflect reality. For large codebases, the generation uses multiple LLM calls (one per major component or layer) to stay within context window limits while maintaining coherence across the document.

What Is the Difference Between HLD and LLD in FlowSquad?

DimensionHLD (High-Level Design)LLD (Low-Level Design)
AudienceEngineering VPs, architects, onboarding developers, non-technical stakeholdersTech leads, senior developers working in specific components
ScopeEntire system or serviceIndividual component, module, or feature
ContentSystem purpose, major components, data flows, external integrations, tech stackClass/module structure, API contracts, database schemas, algorithm descriptions, sequence diagrams
Generation time3โ€“8 minutes1โ€“3 minutes per component
Regeneration triggerMajor architectural changes, quarterly refreshOn PR review for affected components
Export formatsConfluence page, Markdown, PDFConfluence page, Markdown, inline Jira story attachment

HLD and LLD generation can be triggered independently. Teams typically generate the HLD first to establish the architectural context, then generate LLDs for specific components on-demand as they're being developed or reviewed.

How Do You Export Designs Directly to Confluence?

FlowSquad's Confluence integration provides a one-click export from the generated design document to a new or existing Confluence page. The export:

Keeping docs current: FlowSquad's GitHub integration can trigger LLD regeneration automatically when a PR is merged that significantly modifies a documented component. The regenerated LLD is pushed as a Confluence page update, keeping the documentation current without manual intervention.

What Does a Generated HLD Actually Look Like?

Below is an excerpt from a FlowSquad-generated HLD for a Node.js + PostgreSQL e-commerce API:

E-Commerce API โ€” High-Level Design

Generated by FlowSquad on 2026-03-19 ยท Commit: a3f92bc ยท 23,400 lines analysed

System Overview

A RESTful API built with Express.js (Node.js 20) backed by PostgreSQL 15, deployed on AWS ECS. The system handles product catalogue management, order lifecycle, user authentication, and payment processing via Stripe. External integrations: Stripe (payments), SendGrid (transactional email), Redis (session store + rate limiting), and AWS S3 (product image storage).

Major Components
Data Flow: Order Creation

POST /api/orders โ†’ OrderController โ†’ CartService (validate) โ†’ InventoryService (reserve) โ†’ PaymentService (charge Stripe) โ†’ OrderRepository (persist) โ†’ NotificationService (email) โ†’ Response 201

This excerpt represents approximately 15% of a typical full HLD. The complete document includes a tech stack summary table, external integration descriptions, security architecture notes, deployment topology, and known architectural constraints โ€” all generated from the actual codebase in under 8 minutes.

Teams report that FlowSquad-generated HLDs are directly usable in architecture reviews, saving tech leads 3โ€“5 days of documentation work before each review cycle. Engineering VPs who previously had no reliable way to understand the current state of the system use the weekly regenerated HLD as their system status report.

# FlowSquad design generation configuration
design:
  hld:
    enabled: true
    output_format: "markdown"         # or "confluence"
    include_architecture_diagram: true # generates mermaid diagram
    regenerate_trigger: "manual"       # or "on_major_change"
    sections:
      - "system_overview"
      - "major_components"
      - "data_flows"
      - "external_integrations"
      - "security_architecture"
      - "deployment_topology"
      - "known_constraints"
  lld:
    enabled: true
    output_format: "confluence"
    scope: "component"                # one LLD per component directory
    include_sequence_diagrams: true
    regenerate_trigger: "on_pr_merge"  # auto-regenerate on merge
    confluence:
      space_key: "ENG"
      parent_page_id: "12345678"
      label: "lld-auto-generated"

Frequently Asked Questions

How accurate is the generated HLD when the codebase has significant undocumented complexity?

FlowSquad's HLD generation is grounded in what's actually in the codebase โ€” it doesn't invent architecture that isn't there. For codebases with poor internal documentation (minimal docstrings, no inline comments), the generated HLD will accurately reflect the structural relationships between modules but may describe component purposes in generic terms where intent is unclear from code alone. Teams can improve HLD quality by adding minimal module-level docstrings or by providing a brief (1โ€“3 sentence) description of each major component in the FlowSquad project configuration.

Can FlowSquad generate design docs for new features before they're built?

Yes. FlowSquad's design generation supports a "forward design" mode where you provide a requirement (from the refinement workflow) and FlowSquad generates a proposed LLD for how the feature should be implemented, given the existing codebase architecture. The forward design uses AskProduct to find the most relevant existing patterns and proposes an implementation approach consistent with your existing conventions. This is particularly useful for architecture review โ€” you review and approve the LLD before development begins.

How does Confluence export handle versioning โ€” does it overwrite previous docs?

By default, FlowSquad creates a new Confluence page version on each export โ€” Confluence's native versioning preserves all previous versions, and you can compare any two versions side by side. FlowSquad tags each version with the git commit hash at generation time, making it easy to correlate doc versions with codebase states. You can optionally configure FlowSquad to create a new page (rather than a new version) on each generation, for teams that prefer a complete archive of design snapshots.

What LLM is used for design generation โ€” and does quality differ between models?

FlowSquad uses the LLM configured for your project (OpenAI GPT-4 Turbo, Claude 3.5 Sonnet, or a local Ollama model). GPT-4 Turbo and Claude 3.5 Sonnet produce the highest-quality HLDs โ€” particularly for prose sections and architectural insight. Local models (Llama 3.1 70B) produce good structural output but may require more post-generation editing for the narrative sections. We recommend using a cloud model for HLD generation even in hybrid deployments where routine queries use local models.

Can generated LLDs include sequence diagrams automatically?

Yes. When include_sequence_diagrams: true is configured, FlowSquad generates Mermaid sequence diagrams for the key flows in each LLD component. The diagrams are inferred from the code's call graph โ€” FlowSquad traces function call sequences from entry points through the component's public API to understand the interaction order. Sequence diagrams are embedded as Mermaid code blocks in Confluence (rendered natively by the Mermaid plugin) or as Markdown code blocks for other export targets. For complex components, FlowSquad generates 3โ€“5 sequence diagrams covering the most common flows.