mubeeeel
- 2 Devlogs
- 11 Total hours
NeuroSift - Privacy-First Local Semantic Code Engine & AST Knowledge Graph
NeuroSift - Privacy-First Local Semantic Code Engine & AST Knowledge Graph
Building NeuroSift: Edge-First AST Engine, Hybrid Code Intelligence & 3D Knowledge GraphJust wrapped up building and open-sourcing NeuroSift — a local, privacy-first semantic code search daemon and interactive 3D dependency visualizer.When navigating large codebases, traditional string search is too noisy, and sending proprietary code to third-party cloud LLMs creates latency and privacy risks. NeuroSift solves this completely on-device.What NeuroSift does under the hood:Static AST & Complexity Auditing: Traverses Python abstract syntax trees to compute Cyclomatic Complexity and Halstead metrics while detecting code smells in real time.Knowledge Graph & Blast Radius: Builds directed dependency graphs mapping function calls, module imports, and inheritance trees to instantly calculate downstream impact across the codebase.Hybrid Search (Dense + BM25): Combines 384-dimensional vector embeddings with an exact-token BM25 lexical engine using Reciprocal Rank Fusion (RRF) for sub-15ms code retrieval.Dual Interface (TUI & WebGL 3D Visualizer): Features a terminal dashboard and a browser-based D3/WebGL force-directed visualizer with code previews and live telemetry.Zero Cloud Dependency: Runs 100% locally with 286+ unit tests passing cleanly.
Just wrapped up an intensive 8-hour engineering block building NeuroSift — a local, privacy-first semantic code search engine and dependency graph visualizer.Here is the breakdown of what got built and validated across Hours 1 through 8:Hours 1–2 (AST Parsing & Knowledge Graph): Built a static analysis engine with Python’s ast module (ast_extractor.py) to extract function/class definitions, calculate Cyclomatic Complexity & Halstead metrics, and flag code smells. Implemented builder.py to construct directed dependency graphs, identify caller-callee hierarchies, detect circular cycles, and calculate downstream impact “blast radius”.Hours 3–4 (Semantic Chunking & Local Vector Store): Created chunker.py to slice code by semantic function/class boundaries while injecting parameter signatures and docstring preambles. Developed embedder.py with SHA-256 disk caching and built an in-memory NumPy vector database with Cosine Similarity ranking.Hours 5–6 (BM25 Lexical & Terminal TUI): Built an exact-token BM25 sparse index and unified it with dense vectors via Reciprocal Rank Fusion (RRF). Developed a styled Rich terminal TUI with real-time complexity health badges, interactive search loops, and ASCII blast-radius dependency trees.Hours 7–8 (Daemon & Interactive Web Visualizer): Deployed a local REST/WebSocket daemon with FastAPI (and fallback standard library server) and connected it to a full-viewport D3.js force-directed visualizer, code preview drawer, and live telemetry stream.Stats: 286/286 unit tests passing in ~4.2s. 133 chunks indexed across the engine.