DEV Community

Cover image for Building Live Code Knowledge Graph: AST Layer Is Coming Alive
Jenil Savani
Jenil Savani

Posted on

Building Live Code Knowledge Graph: AST Layer Is Coming Alive

Today I worked on one of the core pieces of Secrin: turning code into a living, connected knowledge graph. The heart of this system is the AST layer—the part that reads a file, understands its structure, and converts it into meaningful relationships.

I made a few important improvements:

The parser now extracts functions, classes, variables, and imports with much better accuracy.

Each of these pieces is mapped into graph nodes in real time, so the system can answer questions like “where is this used?” almost instantly.

I added early support for linking function calls, which means the graph is finally starting to look like a real map of how the code works behind the scenes.

Updates happen only when a file changes, which keeps everything fast and lightweight.

These changes may look small from the outside, but they unlock the core experience I want: a tool that understands your code the moment you write it and can explain any part of it like a teammate who never forgets anything.

Next up: connecting commit history so the graph can answer the “why” behind each change.

Secrin is slowly turning into the engineering brain I always wished I had. Excited for the next jump.

Top comments (0)