01
Dev.to Kotlin
作者:Fidelity Chauke
發布:04-12 09:04
Why I'm Building a Codebase Knowledge Graph, and Why I Chose Kotlin
I'm learning AI by building a Codebase Knowledge Graph that explicitly maps connections between code, tickets, design docs and production monitors so those relationships become queryable and traversable.
重點摘要
A knowledge graph links code, tickets, docs and monitors across the tech stack
Kotlin chosen for type safety, coroutines and JVM ecosystem advantages
Koog, Neo4j, Qdrant and Gemini form the project's core stack
The author is building an open-source Codebase Knowledge Graph to explicitly map how code, tickets, design specs and production monitoring relate across an entire tech stack, so engineers can query and traverse those connections instead of stitching them together manually. They chose Kotlin because it’s their primary language, letting them focus on AI concepts without learning a new syntax, and because Kotlin offers type safety, coroutine-based concurrency, easy access to JVM clients, and Kotlin Multiplatform for shared models. The stack includes Koog (JetBrains’ Kotlin-native agent and RAG framework), Ktor, Gemini for LLMs and embeddings, Neo4j as the graph database, Qdrant for vector search, and Tree-sitter to parse source code. The project (Ntivo) is open source, early-stage and instructional: the goal is to prototype a practical system that helps surface cross-repository impacts, speed feature planning, and reduce unexpected side effects.
为何我要构建代码知识图谱,以及为何选择 Kotlin
我通过构建一个将代码、工单、设计文档与生产监控明确连结起来的知识图谱来学习 AI,使这些关系可查询、可遍历。
重點摘要
把代码、工单、设计与监控连成可查询的图谱
选 Kotlin 因其型别安全、协程及 JVM 生态优势
以 Koog、Neo4j、Qdrant 和 Gemini 作为核心栈
作者正在开发一个开源的代码知识图谱,旨在把跨后端、前端、移动端以及设计与监控之间的隐性关联显性化,让工程师通过单一查询获得函数、相关 Jira 工单、决策文档和生产监控的完整脉络,免去在多个工具间拼凑信息的麻烦。作者选择 Kotlin 开发:熟悉的语言可让他专注 AI 概念;Kotlin 提供类型安全、协程以处理大量等待,并能直接使用成熟的 JVM 客户端与 Kotlin Multiplatform 共享数据模型。技术栈包含 JetBrains 的 Koog(代理与 RAG 框架)、Ktor、Google Gemini(LLM 与嵌入)、Neo4j(图数据库)、Qdrant(向量库)和 Tree-sitter(代码解析)。项目 Ntivo 已开源且处于早期可运行状态。
為何我要建置程式碼知識圖譜,以及為何選擇 Kotlin
我透過建構一個能把程式碼、工單、設計文件與生產監控明確連結起來的知識圖譜,來學習 AI 並讓這些關係可查詢、可遍歷。
重點摘要
將程式碼、工單、設計與監控連成可查詢的圖譜
選 Kotlin 以利型別安全、協程與 JVM 生態整合
採用 Koog、Neo4j、Qdrant 與 Gemini 作為核心技術
作者正在開發一個開源的程式碼知識圖譜,目的是把跨後端、前端、行動端與設計與監控之間的隱性關聯明確化,工程師可透過單一查詢取得函式、相關 Jira 工單、決策文件和生產監控等完整脈絡,省去在多個工具間拼湊資訊的時間。作者選擇以 Kotlin 開發,因為熟悉語言能專注學習 AI 概念;Kotlin 提供型別安全、協程以處理大量等待,以及可直接使用成熟 JVM 用戶端的優勢。技術棧包含 JetBrains 的 Koog(支援代理與 RAG)、Ktor、Google Gemini(LLM 與嵌入)、Neo4j(圖資料庫)、Qdrant(向量搜尋)和 Tree-sitter(程式碼解析)。專案 Ntivo 自開源起即為學習與探索用途,目前仍在早期但可運行。