Generating AI Documentation
Use Archflow's AI to create architecture documentation from your diagrams
This guide walks you through generating comprehensive architecture documentation using Archflow's AI documentation system.
Prerequisites
Before generating documentation, ensure your project has:
- At least a few systems with descriptions
- Connections between systems with labels and technology details
- Optionally: workflows, deployments, and Arc42 profiles for richer output
The more context you provide, the better the AI documentation will be.
Step-by-Step Guide
1. Open the Documentation Tab
Navigate to a diagram view and click the Documentation tab (the fourth tab, with a file icon). This opens the documentation workspace where you can generate, edit, and publish documentation.
2. Start Generation
Click Generate Documentation to open the generation modal. The modal has three tabs:
Tab 1: Content Type
Choose what to generate:
- Full Overview --- Complete architecture documentation
- Section --- Generate content for a specific section only
Tab 2: Customize
Configure the generation parameters:
| Parameter | Options | Effect |
|---|---|---|
| Audience | Developers, Architects, Executives | Adjusts technical depth and language |
| Technical Level | 1-10 slider | Controls detail depth (1 = high-level, 10 = deep technical) |
| Business Metrics | On/Off toggle | Includes business value and metrics |
| Visual References | On/Off toggle | Embeds deployment diagrams and images as  |
| Focus Areas | Multi-select | Prioritizes specific aspects |
Focus areas include:
- Performance & Scalability
- Integration Patterns
- Security & Compliance
- Data Architecture
- DevOps & Deployment
- And more
Tab 3: Generate
Review your settings and click Generate. The AI analyzes your architecture and produces structured documentation.
3. Review the Output
Generated documentation includes structured sections:
- Executive summary
- System architecture overview
- Integration and data flow descriptions
- Infrastructure and deployment details
- Business process documentation
4. Edit and Refine
Click any section to open the markdown editor:
- Modify AI-generated content
- Add project-specific details
- Fix any inaccuracies
- Add images from the image gallery (upload PNG, JPEG, WebP, or GIF up to 5MB)
You can also regenerate individual sections without affecting others.
5. Select Supporting Content
Choose which workflows and deployments to include in the documentation:
- Open the Workflows tab on the diagram view to select relevant business processes using checkboxes
- Open the Infrastructure tab to choose deployment views --- AI recommends deployments based on coverage (≥80% coverage priority) and production environments
- Selections are saved per diagram view with 1-second debounced auto-save
6. Publish
When your documentation is ready:
- Click Publish from the Documentation tab
- A shareable link with a guest access token is generated
- Share the link with stakeholders
- Recipients see a read-only, themed view of your documentation
Tips for Better Output
Add Descriptions Everywhere
The AI uses system descriptions, connection labels, and workflow details as input. Descriptive names and labels lead to better documentation.
Use Arc42 Profiles
Adding Arc42 profiles to key systems provides business context that significantly improves the AI's understanding of your architecture's purpose. The AI draws from 6 industry pattern libraries for domain-specific language.
Include Visual Context
Enable visual references to embed deployment diagrams and uploaded images directly in the documentation as markdown images.
Iterate
Documentation generation works best iteratively:
- Generate an initial overview
- Review and identify gaps
- Add more detail to your architecture
- Regenerate specific sections
- Hand-edit for final polish
Use Archie
Ask Archie to analyze your architecture before generating documentation. Archie can identify gaps, suggest improvements to descriptions, and help you understand what the AI will work with.
Publishing and Sharing
Published documentation includes:
- Your project's custom theme (both preset and TweakCN themes)
- Responsive layout for all devices
- Table of contents navigation
- All selected workflows and deployments
- Embedded images and diagrams
- Print-optimized layout for PDF export
See Sharing Documentation for the full sharing workflow.