惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
人人都是产品经理
人人都是产品经理
U
Unit 42
B
Blog RSS Feed
博客园 - 【当耐特】
T
Tailwind CSS Blog
V
V2EX
S
SegmentFault 最新的问题
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
量子位
aimingoo的专栏
aimingoo的专栏
Stack Overflow Blog
Stack Overflow Blog
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
P
Proofpoint News Feed
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Stop Re-explaining Your Codebase to AI — Give It Permanen...
Milenko Mitrovic · 2026-06-19 · via DEV Community

Milenko Mitrovic

I Built a Local Knowledge Graph That Tells AI Agents "What Breaks If I Change This?"

Every time I start a new AI coding session, the same thing happens: I re-explain my architecture, my conventions, my service dependencies. The AI doesn't remember. It doesn't know that store.py is imported by 8 other modules, that Milenko owns the auth service, or that postgres is a single point of failure.

So I built Knowledge Master — a local knowledge graph that gives AI agents permanent memory of your codebase.

What makes it different from "just another RAG"

Most RAG tools embed your code into vectors and return "similar chunks." That's fancy grep. It doesn't understand relationships.

Knowledge Master builds an actual graph:

Repo → USES_TECH → Python, FastAPI, Docker
Repo → DEFINES_SERVICE → auth-service → DEPENDS_ON → postgres
Person → AUTHORED → Document → IMPORTS → Document
Function → DEFINED_IN → File → IN_REPO → Repo

This lets it answer questions that flat search can't:

"What breaks if I change this?"

$ km blast-radius store.py
💥 Blast radius: store.py
├── Definite impact
│   ├── 📄 cli.py (IMPORTS)
│   ├── 📄 server.py (IMPORTS)
│   ├── 📄 web.py (IMPORTS)
│   ├── 📄 api.py (IMPORTS)
│   └── 📄 connectors.py (IMPORTS)
├── Likely affected
│   └── ⚙️ falkordb (Service, owns affected file)
└── Possibly affected
    └── 👤 User
![ ](https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/mk0kohpdg09euf0ibazz.png) (Person, AUTHORED affected file)

This uses real static analysis — Python AST, tree-sitter for TypeScript/Go/Rust/Java/C# — to trace actual import dependencies. Not text similarity.

"Is it safe to touch this?"

$ km safe-to-change auth/service.py
Risk: RISKY
├── Blast radius: 12 entities
├── Test coverage: yes (3 test files)
└── Affected: api.py, gateway.py, user-service...

Combines blast radius + test coverage detection into a risk score: safe / risky / dangerous.

"Who owns this code?"

$ km who-owns src/payments/stripe.py
Owner: Alex (weight: 0.85)

Git blame weighted by recency — recent changes count more than ancient history.

How it works

Your repos
    ↓ km index
┌─────────────────────────────┐
│  FalkorDB (Graph + Vector)  │
│                             │
│  Nodes: Repo, Document,    │
│  Person, Service, Tech,    │
│  Function, Convention      │
│                             │
│  Edges: IMPORTS, DEPENDS_ON,│
│  AUTHORED, OWNS, USES_TECH │
│                             │
│  + Vector embeddings for    │
│    semantic search          │
└─────────────────────────────┘
    ↓ MCP protocol
Your AI agent (Claude, Cursor, Copilot, Kiro)

Everything runs locally:

  • FalkorDB — graph database with built-in vector search (single Docker container)
  • Ollama — local embeddings (nomic-embed-text, 274MB)
  • Tree-sitter — structural code parsing for 7 languages
  • No cloud, no API keys, no data leaves your machine

7 Languages supported

Language Static Analysis
Python AST import graph, function/class extraction
TypeScript/JS tree-sitter imports, exports
Go tree-sitter imports, exported functions/types
Rust tree-sitter use/mod, pub items
Java tree-sitter imports, public classes/methods
C# tree-sitter using directives, public members
Terraform Module dependencies, resource/variable extraction

MCP Server — AI agents use it directly

Knowledge Master exposes 8 tools via the Model Context Protocol:

Tool What the AI agent can do
search Semantic search with re-ranking
blast_radius "What breaks if I change X?"
safe_to_change Risk assessment
who_owns File ownership
check_conventions "Does this follow our patterns?"
index_repo Add a new repo
index_directory Add docs
get_status Knowledge base stats

Setup for any AI tool is one command:

km setup cursor    # or claude, kiro, copilot, amazonq

Try it

pipx install knowledge-master
km start
km index ~/your-project
km search "how does authentication work"
km blast-radius auth/service.py
km safe-to-change auth/service.py
km serve  # web UI with graph visualization

Links


I'd love feedback — especially on:

  • What languages/frameworks should be prioritized next?
  • Would you prefer deeper call-graph analysis or more connectors (Slack, Jira)?
  • Is the MCP integration the right bet, or would a VS Code extension be more useful?

MIT licensed, open source, built for developers who are tired of re-explaining their codebase to AI.