Bevel-Software/code-to-knowledge-graph ? reverse-engineered prompt

Reverse engineered prompt

Build me a Kotlin JVM library that can take a source code project and turn it into a rich, queryable knowledge graph.

I want it to scan a codebase, discover files while respecting ignore rules, use VS Code language servers where possible to understand the code, and extract things like classes, functions, references, and relationships between them. It should support updating the graph when files change, and it should also include some basic code similarity detection so I can spot related code.

Make the library easy to use from another Java or Kotlin app, with a simple parser API and a graph object I can inspect programmatically. If it helps, include a small example or demo of analyzing a folder and printing node and connection counts. Please add tests for the main behavior and keep the project structured so it could later power tooling like visualization, documentation, or AI assisted code analysis. Look up current docs online if you need to.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab