Skip to main content

Codebase explanations

Swimm Explore helps you understand unfamiliar code by analyzing your repository structure, discovering modules and components, and using AI to generate comprehensive artifacts based on that analysis.

Getting Started

Step 1: Analyze Your Repository

In your Swimm IDE plugin, click on the Analyze Repo button to start the exploration process. Swimm will begin analyzing your codebase structure.

Analyze repository

Step 2: Discovering Modules

Swimm will automatically scan through your repository using static analysis to discover modules, components, and key areas of your codebase.

Discovering modules

Step 3: Analysis Complete

Once the analysis is complete, you'll see a confirmation that your repository has been successfully analyzed.

Analysis completed successfully

Step 4: View Discovered Modules

Browse through the modules and components that Swimm has discovered in your codebase. Each module represents a logical grouping of functionality.

Modules discovered

Step 5: Expand a Module

Click on any module to expand it and see the details, files, components, and the call tree showing where it's used within your codebase.

Expand a module

Step 6: Module Actions

Each module provides several options to help you understand and document the code:

ActionDescription
ExplainAI generates a thorough explanation based on static analysis of the program, including module flow, functionality, dependencies, and code complexity. Includes an overview diagram, technical explanations, and extracted business rules.
OverviewAI generates a brief explanation of the functionality based on the static analysis.
DiagramCreates a code-coupled dependencies diagram based on the static analysis of the module.
CodeOpens the relevant code file for the module.

Module options

Step 7: Generate Module Explanation

Select the Explain option. AI will process Swimm's static analysis to generate a comprehensive explanation for the module.

Explain module

Step 8: Explore and Save Documentation

Review the generated documentation which includes technical explanations, business rules, code-coupled diagrams, and flow documentation. You can edit, refine, and save it as a Swimm doc for your team to use.

Documentation generated

Module Explanation Flow

See the entire module explanation workflow in action:

Complete module explanation process

This document is automatically kept up to date using Swimm.