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.
Step 2: Discovering Modules
Swimm will automatically scan through your repository using static analysis to discover modules, components, and key areas of your codebase.
Step 3: Analysis Complete
Once the analysis is complete, you'll see a confirmation that your repository has been successfully analyzed.
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.
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.
Step 6: Module Actions
Each module provides several options to help you understand and document the code:
| Action | Description |
|---|---|
| Explain | AI 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. |
| Overview | AI generates a brief explanation of the functionality based on the static analysis. |
| Diagram | Creates a code-coupled dependencies diagram based on the static analysis of the module. |
| Code | Opens the relevant code file for the module. |
Step 7: Generate Module Explanation
Select the Explain option. AI will process Swimm's static analysis to generate a comprehensive explanation for the 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.
Module Explanation Flow
See the entire module explanation workflow in action:
This document is automatically kept up to date using Swimm.