generate_architecture_blueprint
Generate system architecture documentation with Mermaid component diagrams, layer boundaries, and module hierarchies from codebase AST analysis, creating ARCHITECTURE.md for onboarding or RFC review.
Instructions
Generates a complete system architectural specification (ARCHITECTURE.md) with auto-generated Mermaid component topology diagrams, layer boundaries, and module hierarchies, distinguishing from 'enforce_architecture_rules' and 'analyze_code_dependencies' by producing comprehensive system architecture documentation rather than verifying boundary rules or tracing call chains.
Parameters:
project_root(str, optional, default='.'): Root directory of the repository to analyze (default: current directory).use_ai(bool, optional, default=False): When True, uses configured AI provider to synthesize deep narrative; when False (default), runs 100% offline AST analysis.model(str, optional, default=''): Optional model identifier override when use_ai is True.
Behavior:
Read-only: Returns formatted Markdown text without writing files to disk.
Idempotent: Deterministic AST topology diagram generation when use_ai=False.
100% Offline by default: Runs local AST analysis; optionally uses configured AI model when use_ai=True.
Auth & Rate Limits: Zero credentials required for default offline mode; completes in <1s.
Error Handling: Falls back to offline AST structural mapping if remote AI model synthesis is unreachable.
Usage Guidelines:
When to use: Create or update system architecture documentation and visual Mermaid flow diagrams for onboarding or RFC review.
When NOT to use: Do not use for checking rule compliance against defined boundaries (use 'enforce_architecture_rules' instead); do not use for raw dependency listings or call chain traces (use 'analyze_code_dependencies' instead).
Returns: Comprehensive Markdown document with live Mermaid diagrams, layer classifications, and component interfaces.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model identifier override when use_ai is True. | |
| use_ai | No | When True, uses configured AI provider to synthesize deep narrative; when False (default), runs 100% offline AST analysis. | |
| project_root | No | Root directory of the repository to analyze (default: current directory). | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |