codetwin

CodeTwin

CodeTwin helps developers understand a repository by presenting its code graphically, without requiring them to read every file or line of code.

Language

Code Visualization: A graphical representation of the software contained in a repository, inspired by UML. Avoid: Documentation generation, architecture governance

Repository: The codebase that CodeTwin examines and visualizes. Avoid: Project, workspace

Repository Overview: The first visualization, showing the repository’s major components and the dependencies between them. Avoid: Full code graph, class dump

Detail View: A focused visualization reached from the overview that exposes finer-grained code structure and relationships. Avoid: Overview, raw source listing

Code Model: The language-neutral representation of a repository’s software elements and relationships. Avoid: Markdown, diagram, language AST

Visualization Set: The canonical user-facing Markdown artifact containing a repository overview and linked detail views. Avoid: Code Model, single diagram, HTML application

Relationships

Dogfooding

CodeTwin’s own repository is the first real input used to evaluate the tool. As CodeTwin improves, its visualizations should make the repository itself easier to understand.

The feedback loop is: analyze CodeTwin → inspect its overview and detail views → identify missing or misleading information → improve the tool → regenerate the visualizations. The output must reflect the current implementation as the repository changes.

The first overview and detail target is drafted in docs/DOGFOOD_TARGET.md. Rust package inventory and linked package views are implemented through inspect and visualize; module dependencies and final crate boundaries remain future design work.

Example dialogue

Developer: “I do not want to read every file in this Repository just to understand its structure.” Domain expert: “Start with its Repository Overview, then open a Detail View for the component you want to investigate.”

Flagged ambiguities