umlforge_reverse_engineer
Analyze any codebase from a GitHub URL or pasted code to generate UML class, sequence, and state diagrams with architectural insights.
Instructions
Analyse an existing codebase and produce UML class, sequence, and state diagrams.
USE THIS WHEN:
You have a GitHub URL and want to understand what the code does
You want to audit a codebase for architectural problems
You need diagrams of code that already exists (your own or a public repo)
You want an Architectural Intelligence Report on any codebase
NOT FOR:
Designing a new system from scratch → use umlforge_stakeholder_arch
Updating diagrams after a sprint → use umlforge_living_docs
Documenting database schema → use umlforge_erd_schema
Mapping how services call each other → use umlforge_api_sequence
Produces:
Class diagram: entities, attributes, relationships, multiplicities
Sequence diagram: primary execution flow or dominant use case
State diagram: entity lifecycle (if stateful entities are detected)
Architectural smell flags: god classes, circular deps, anemic models
(report_mode=True) Architectural Intelligence Report: system overview, key findings, modernisation roadmap, health scores (A–F)
Provide EITHER github_url OR codebase — not both.
Args: github_url: Public GitHub URL. Accepted formats: github.com/owner/repo github.com/owner/repo/tree/branch/path/to/dir github.com/owner/repo/blob/branch/path/to/file.py codebase: Paste code directly when you have files in context or the repo is private. max_nodes: Max classes/components per diagram (default 20). report_mode: True → also produce an Architectural Intelligence Report. Pro/Team/Enterprise only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| codebase | No | ||
| max_nodes | No | ||
| github_url | No | ||
| report_mode | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |