Exploring “Graphify”: Could AI Help Us Understand Large Codebases?

Mashiane

Expert
Licensed User
Longtime User
Yello!

I recently came across the idea of graphifying a codebase, and I thought it would be an interesting topic for the AI sub-forum. Below is the B4XDaisyUIKit graph in graphify

1787174192603.png


At first, I assumed “Graphify” was the name of a specific AI product. It turns out the term is also used more generally to describe the process of turning a codebase, documents, or other information into a graph of relationships.

For example, instead of looking at a project like this:


Project
├── Main.bas
├── B4XDaisyButton.bas
├── B4XDaisyCard.bas
├── B4XDaisyAnimation.bas
└── ...

You could represent the relationships between the parts of the project:

1787174558910.png


The interesting part is where AI comes into the picture.

Traditional code analysis tools can usually identify explicit relationships such as:

  • Which classes call other classes
  • Which files depend on other files
  • Function and method calls
  • Imports and references
  • Inheritance relationships
An AI-assisted graph could potentially go further and identify semantic relationships.

For example:

These components all follow the same implementation pattern.
Or:

This animation class is used by several unrelated UI components.
Or even:

These example projects demonstrate these specific components, but some components have no corresponding examples or documentation.
That immediately made me think about larger B4X projects.

Imagine graphifying a project and being able to explore it visually:

1787174681522.png


Then being able to ask questions such as:

  • What depends on this class?
  • If I change this method, what parts of the project could be affected?
  • Show me everything related to animations.
  • Which classes are central to the project?
  • Which components appear to be isolated or unused?
  • Which examples demonstrate this component?
  • Which components have documentation but no example?
  • Which components have code and examples but are missing AI skills?
For those of us experimenting with AI coding agents, I think this could become particularly useful.

One of the challenges with a large codebase is that an AI agent may be able to search the files, but it does not necessarily have a persistent understanding of the architecture and relationships between everything.

A graph could potentially provide another layer of context.

Instead of only giving an AI agent a collection of files, you could conceptually give it a map like this:

1787174713158.png



This could also be useful for maintaining AI skills generated from an existing codebase.

For example, you could potentially validate whether: Component source → Example code → Documentation → AI Skill are all connected and consistent.

If one of those pieces is missing, the graph might make the gap immediately visible. I'm still exploring this area, and I would be interested to hear whether anyone here is already using code graphs, knowledge graphs, GraphRAG, or AI-assisted repository mapping.

In particular, I would be interested in tools that can:
  1. Graphify only a selected folder rather than an entire repository.
  2. Understand languages that are not necessarily mainstream.
  3. Allow natural-language queries against the graph.
  4. Help an AI coding agent understand a project's architecture.
  5. Identify dependencies and the potential impact of changes.
  6. Connect source code with examples, documentation, and AI skills.
I think there may be something quite useful here, especially for larger B4X projects and for projects where we want AI agents to understand not just individual files, but how the entire system fits together.

Has anyone experimented with anything along these lines?

#SharingTheGoodness
 
Top