AI-powered static codebase analysis, architecture visualization, and intelligent refactoring.
ONGISA is a developer tool that analyzes entire software projects, maps their structure and dependencies, detects architectural problems, and uses AI to explain issues and suggest safe refactoring strategies.
Instead of manually tracing hundreds of files and imports, ONGISA gives developers a clear picture of how their codebase is structured, how its components depend on each other, where architectural problems exist, and how those problems can be improved.
ONGISA combines static code analysis, dependency mapping, architecture visualization, and AI-powered code understanding into one platform.
You can point ONGISA at a project and discover:
- 📁 Project and directory structure
- 🔗 File and module dependencies
- 📦 Import relationships
- 🔍 Functions, classes, and symbols
- 📊 File and code complexity metrics
- 🗑️ Potentially unused or disconnected modules
- 🔄 Circular dependencies
- 🏢 Overly large or complex "God Modules"
⚠️ Architectural smells and structural problems- 🤖 AI explanations of detected issues
- 🔧 AI-generated refactoring suggestions
The goal is simple:
Give developers an X-ray of their entire codebase.
ONGISA follows a pipeline that turns a source code repository into an understandable architectural model.
PROJECT
│
▼
┌─────────────────┐
│ ONGISA CORE │
└────────┬────────┘
│
▼
┌─────────────────┐
│ ANALYZE │
│ │
│ Files │
│ Functions │
│ Classes │
│ Imports │
│ Dependencies │
│ Metrics │
└────────┬────────┘
│
┌────────┴────────┐
▼ ▼
DEPENDENCY GRAPH ARCHITECTURE
ANALYSIS
│ │
└────────┬────────┘
▼
┌──────────────┐
│ WEB DASHBOARD│
└──────┬───────┘
│
▼
┌───────────┐
│ AI │
│ + RAG │
└─────┬─────┘
│
▼
REFACTOR PLAN
│
▼
PROPOSED CHANGES
ONGISA analyzes source files and extracts structural information from the project.
Depending on the supported language, it can identify:
- Files
- Directories
- Functions
- Classes
- Methods
- Imports
- Exports
- Module relationships
- Symbol relationships
- File metrics
For example:
src/
├── auth/
│ ├── login.ts
│ └── register.ts
│
├── users/
│ └── userService.ts
│
├── payments/
│ ├── payment.ts
│ └── stripe.ts
│
└── database/
└── database.ts
ONGISA doesn't just see these as files.
It builds a structural representation of the project and understands relationships such as:
login.ts
│
└──→ userService.ts
│
└──→ database.ts
payment.ts
│
└──→ stripe.ts
│
└──→ database.ts
One of ONGISA's core capabilities is turning imports and relationships into a dependency graph.
For example:
app.ts
/ \
▼ ▼
auth.ts users.ts
│ │
└────┬────┘
▼
database.ts
This allows developers to quickly understand:
- Which files depend on a particular module
- Which modules have many dependents
- Which modules are isolated
- Where dependencies are concentrated
- Where circular dependencies exist
- How changes to one module may affect others
The generated graph can also be exported as a standalone payload such as:
graph.json
Large projects often develop structural problems that aren't immediately obvious.
ONGISA attempts to automatically identify these problems.
A God Module is a file or module that has accumulated too many responsibilities.
For example:
UserManager.ts
├── Authentication
├── Database operations
├── Email notifications
├── Payment processing
├── Validation
└── User management
ONGISA can flag this module based on structural metrics such as:
- File size
- Number of symbols
- Number of responsibilities
- Import count
- Dependency relationships
- Structural complexity
Example:
🔴 God Module Detected
File:
src/services/UserManager.ts
Metrics:
2,800 lines
67 functions
32 imports
18 classes
Recommendation:
Consider separating authentication,
database access, notifications,
and user management.
ONGISA can detect dependency cycles such as:
A → B
↑ ↓
└── C
Or:
auth.ts
↓
users.ts
↓
database.ts
↓
auth.ts
These relationships can make software harder to maintain, test, and modify.
ONGISA can identify modules that appear disconnected from the main application graph.
For example:
Application
│
├── auth.ts
├── users.ts
├── payments.ts
└── database.ts
legacyPayments.ts
If legacyPayments.ts has no meaningful connections to the application, ONGISA can flag it for investigation.
ONGISA uses AI to provide a higher-level understanding of the analyzed project.
Instead of sending an entire codebase blindly to an LLM, ONGISA first analyzes the repository and retrieves the most relevant information.
This allows AI requests to be grounded in:
- Relevant source files
- Symbols
- Imports
- Dependency relationships
- Architectural diagnostics
- Project structure
- Previously indexed code
ONGISA can index project code into a local vector store and use Retrieval-Augmented Generation (RAG) to answer questions about the codebase.
Developers can ask questions such as:
Why does payments.ts depend on database.ts?
Where is UserService being used?
Which modules depend on authentication?
Why is this module considered a God Module?
What would happen if I changed database.ts?
Where should this functionality be moved?
Are there circular dependencies in the project?
Instead of searching through thousands of lines manually, ONGISA retrieves the relevant context and provides it to the AI.
ONGISA can also use the analysis results to create refactoring plans.
For example, you might ask:
Refactor UserManager.ts so that authentication,
database access, and notifications are separated.
ONGISA can analyze the existing architecture and propose a structure such as:
Before:
UserManager.ts
├── Authentication
├── Database
├── Notifications
└── User Management
After:
auth/
└── AuthService.ts
users/
├── UserService.ts
└── UserRepository.ts
notifications/
└── EmailService.ts
The goal is not simply to generate code.
ONGISA should understand which existing files are affected and how their dependencies need to change.
Refactoring operations are designed around a dry-run workflow, allowing developers to inspect proposed changes before applying them.
ONGISA provides a command-line interface for developers who prefer working directly from the terminal.
forge analyzeAnalyzes the project and generates structural information and dependency data.
forge chatStarts an AI-powered conversation with the indexed codebase.
Example:
> Which files depend on database.py?
> Why is UserManager.py considered complex?
> Show me potential architectural problems.
forge refactorRuns an AI-assisted refactoring workflow based on analyzer diagnostics and developer instructions.
ONGISA also provides a web-based architecture dashboard.
The dashboard is designed to make large codebases easier to understand visually.
- Interactive dependency graphs
- File filtering
- Language filtering
- Minimum file-size filtering
- Symbol-count filtering
- Custom path filtering
- Architectural smell visualization
- Dependency exploration
- Codebase statistics
- AI-assisted refactoring
- Refactoring previews
Example workflow:
Open Project
↓
Analyze Codebase
↓
View Architecture
↓
Find Problems
↓
Inspect Dependencies
↓
Ask AI
↓
Generate Refactoring Plan
↓
Review Changes
ONGISA uses a modular monorepo architecture.
ONGISA/
│
├── packages/
│ │
│ ├── forge-core/
│ │ ├── schemas/
│ │ ├── models/
│ │ └── repository/
│ │
│ ├── forge-analyzer/
│ │ ├── parsers/
│ │ ├── analysis/
│ │ ├── metrics/
│ │ └── graph/
│ │
│ ├── forge-ai/
│ │ ├── embeddings/
│ │ ├── retrieval/
│ │ ├── vector_store/
│ │ └── gemini/
│ │
│ └── forge-refactor/
│ ├── planning/
│ ├── transformations/
│ └── jobs/
│
├── CLI/
│ └── forge-cli/
│
├── apps/
│ └── forge-web/
│
├── tests/
│
└── README.md
Provides shared models and infrastructure used across ONGISA.
Responsibilities include:
- Common schemas
- AST metadata models
- Repository models
- Analysis result structures
- Repository cloning utilities
- Shared interfaces
The static analysis engine.
Responsibilities include:
- Source parsing
- AST analysis
- Function extraction
- Class extraction
- Import analysis
- Dependency tracking
- File metrics
- Structural diagnostics
- Dependency graph generation
This is the primary source of architectural intelligence in ONGISA.
The AI intelligence layer.
Responsibilities include:
- Code indexing
- Embeddings
- Vector storage
- Retrieval
- Context construction
- Gemini integration
- AI codebase chat
- Architecture explanations
The refactoring engine.
Responsibilities include:
- Refactoring job management
- Analyzer diagnostic integration
- AI refactoring prompts
- Transformation planning
- Dry-run changes
- Proposed file modifications
The developer-facing terminal interface.
Provides commands such as:
forge analyze
forge chat
forge refactorThe CLI uses terminal-friendly output to make analysis results easy to read.
The web dashboard.
Built with Next.js, it provides a visual interface for:
- Exploring the project architecture
- Viewing dependency graphs
- Filtering modules
- Inspecting architectural smells
- Interacting with the AI
- Running refactoring workflows
A typical ONGISA workflow looks like this:
Local Repository
│
▼
ONGISA
Source Code
↓
Parser
↓
AST
↓
Symbols + Imports + Metrics
Files
↓
Imports
↓
Dependencies
↓
Graph
Graph + Metrics
↓
Architectural Analysis
↓
God Modules
Circular Dependencies
Orphan Modules
Other Structural Issues
Developer Question
↓
Relevant Code Retrieval
↓
Architecture Context
↓
Gemini
↓
AI Explanation
Developer Request
↓
Analyzer Diagnostics
↓
AI Refactoring Plan
↓
Proposed Changes
↓
Developer Review
↓
Apply Changes
ONGISA is built around a combination of modern developer tooling and AI technologies.
- Python
- AST / source-code parsing
- Static analysis
- Dependency graph construction
- Code metrics
- Google Gemini
- Retrieval-Augmented Generation (RAG)
- Embeddings
- Local vector storage
- Context-aware code retrieval
- Python
- Typer
- Rich
- Next.js
- React
- TypeScript
- Modern web visualization technologies
- Monorepo
- Modular packages
- Shared schemas
- CLI + Web interfaces
As software projects grow, understanding the architecture becomes increasingly difficult.
A project may contain:
10 files
↓
50 files
↓
500 files
↓
5,000+ files
At that point, developers can struggle to answer basic questions:
- What depends on this file?
- Where is this function used?
- Why is this module so large?
- Which files are safe to modify?
- Are there circular dependencies?
- Is this code still being used?
- Where should this functionality live?
- What will break if I change this module?
- How should this part of the system be refactored?
ONGISA aims to answer these questions automatically.
Traditional code analysis tools are good at identifying individual problems.
AI coding assistants are good at generating and explaining code.
ONGISA combines both approaches.
STATIC ANALYSIS
+
DEPENDENCY GRAPH
+
ARCHITECTURE ANALYSIS
+
RAG
+
GENERATIVE AI
=
CODEBASE INTELLIGENCE
The analyzer provides facts about the codebase.
The AI provides interpretation and recommendations.
Together, they provide developers with a higher-level understanding of their software architecture.
ONGISA is currently under active development.
- Project structure
- Core schemas
- Repository analysis foundation
- Dependency analysis
- Symbol extraction
- CLI foundation
- AI integration foundation
- RAG architecture
- Web dashboard foundation
- Expand language support
- Improve architectural smell detection
- Improve dependency graph visualization
- Expand AI codebase reasoning
- Advanced refactoring transformations
- Safer automated code modifications
- Test coverage expansion
- Production-ready repository ingestion
ONGISA is intended to evolve into a complete codebase intelligence platform.
- Multi-language parsing
- Improved AST analysis
- Better symbol extraction
- Advanced dependency tracking
- More code metrics
- More architectural smell detectors
- Dependency risk scoring
- Module coupling analysis
- Change-impact analysis
- Architecture health scoring
- Improved RAG retrieval
- Architecture-aware AI prompts
- Codebase reasoning
- Natural-language architecture exploration
- Better refactoring recommendations
- Multi-file refactoring
- Dependency-aware transformations
- Refactoring previews
- Patch generation
- Safe rollback
- Automated tests after refactoring
- GitHub repository integration
- Repository history analysis
- Pull request architecture analysis
- CI/CD integration
- Team dashboards
- Architecture health monitoring
ONGISA is built around a few important principles.
AI should understand the architecture before suggesting modifications.
The system should gather structural information before asking an LLM to reason about the project.
Developers should understand why a change is being recommended.
Refactoring should favor previews, dry runs, and developer approval rather than blindly modifying production code.
ONGISA is intended to assist developers, not replace their judgment.
Clone the repository:
git clone <repository-url>
cd ONGISAInstall dependencies according to the package configuration.
Then run the CLI:
forge analyzeStart an AI codebase session:
forge chatRun the refactoring workflow:
forge refactorSetup instructions will be expanded as the project reaches a stable release.
ONGISA is designed to work with software repositories rather than being limited to a single hosting provider.
Potential repository sources include:
Local Project
│
├── Git Repository
│
├── GitHub Repository
│
└── Uploaded Project
│
▼
ONGISA
GitHub integration is planned as part of the platform roadmap.
Contributions are welcome.
If you want to contribute:
- Fork the repository.
- Create a feature branch.
- Make your changes.
- Add or update tests where appropriate.
- Run the project checks.
- Open a pull request.
Example:
git checkout -b feature/my-featureThis project is currently under development.
License information will be added before the first public release.
ONGISA aims to make large software systems easier to understand.
The long-term vision is simple:
Give every developer an architectural map of their codebase and an intelligent assistant that understands how the pieces fit together.
Instead of spending hours manually tracing files, imports, dependencies, and architectural problems, developers should be able to ask:
"What is wrong with my architecture?"
"Why is this module so complicated?"
"What depends on this file?"
"What can I safely change?"
"How should I refactor this?"
"What will be affected if I change this?"
And ONGISA should be able to answer using actual structural knowledge of the codebase, not just guesses from raw source code.
Analyze. Understand. Visualize. Refactor.
Your codebase has an architecture. ONGISA makes it visible.