HomeReadTools deskWrit: Local Knowledge Graph and Bash Hooks for AI Coding Agents
Tools·Jun 3, 2026

Writ: Local Knowledge Graph and Bash Hooks for AI Coding Agents

This review examines Writ, an open-source enforcement layer for AI coding agents. It focuses on its local knowledge graph, hybrid RAG pipeline, and bash hook system for ensuring compliance with…

This review examines Writ, an open-source enforcement layer for AI coding agents. It focuses on its local knowledge graph, hybrid RAG pipeline, and bash hook system for ensuring compliance with coding standards.

TL;DR

Best for: Indie founders and small teams requiring strict, local-first enforcement of coding standards and architectural rules for AI-powered development, especially when using local LLMs or privacy-sensitive codebases. Skip if: You need a fully managed, cloud-native solution for AI agent orchestration or lack the technical expertise to configure and maintain a local knowledge graph and bash hooks. Bottom line: Writ offers a novel, local-first approach to ensure AI coding agents adhere to defined rules through a hybrid RAG architecture and process-level enforcement, preventing non-compliant code from being executed.

METHODOLOGY

This v0 review draws on the founder's published claims on Reddit and the technical details available in the associated GitHub repository. Independent benchmarks are pending. We will re-test Writ when claims diverge from observed behavior or significant new versions are released.

  • Tool Name + Version + Date Observed: Writ (version unspecified, based on infinri/Writ GitHub repository), observed 2026-05-28.
  • Source Signal URL: https://www.reddit.com/r/LocalLLaMA/comments/1tq6sd0/i_built_an_enforcement_layer_for_ai_coding_agents/
  • What's Covered in This Review: The founder's claims regarding Writ's architecture, specifically its local Neo4j knowledge graph, five-stage hybrid RAG pipeline, and bash hook enforcement mechanism. We also cover the technical stack (Tantivy, hnswlib, ONNX runtime for all-MiniLM-L6-v2 embeddings) and its stated provider independence for the retrieval engine.
  • What's NOT Covered: Independent performance benchmarks, long-term workflow integration, ease of maintenance for complex rule sets, or edge case behavior with various coding agents beyond the currently wired Claude Code system. We have not performed hands-on testing.

WHAT IT DOES

Writ aims to solve two core problems with AI coding agents: context overload from irrelevant rules and a lack of enforcement for compliance. It achieves this through a two-pronged architecture: a local knowledge layer and a process-level enforcement layer.

Local Knowledge Graph for Context Management

Writ stores coding rules, skills, techniques, antipatterns, and playbooks as nodes within a Neo4j knowledge graph. These nodes are connected by typed relationships, allowing for structured representation of complex coding standards. This layer is designed to manage and retrieve only the most relevant information for a given task, preventing the agent's context window from being filled with extraneous data.

Hybrid RAG Pipeline for Relevant Retrieval

The system employs a five-stage retrieval pipeline to fetch relevant information from the knowledge graph. This pipeline combines BM25 for keyword search (over Tantivy), vector similarity search (over HNSW with a local ONNX embedding model using all-MiniLM-L6-v2), and graph traversal. The results are then fused using reciprocal rank fusion, and a context budget manager prunes the final selection. All retrieval operations run locally, eliminating external API calls and enabling fast inference without a dedicated GPU.

Bash Hook Enforcement for Compliance

An enforcement layer, consisting of 30 bash hook scripts, intercepts tool calls made by the AI agent before execution. These scripts act as hard blocks at the process level, not merely as prompt instructions. For example, an agent cannot write code without an approved plan, cannot skip tests, and cannot claim

Sources · how we verified
  1. I built an enforcement layer for AI coding agents using a local knowledge graph and hybrid RAG
  2. infinri/Writ

Every claim ties to a primary source. See our methodology.

Reported by the Riley desk on Founderr Pulse’s Tools beat. Every factual claim is tied to a primary source and linked; anything that can’t be stood up doesn’t run. Founderr (RIKHATH LLC) is the accountable publisher and corrects in place. How we work · About · File a correction.
R
Riley

The Riley desk covers tools — what founders are building with, switching to, and abandoning. Every claim is sourced and linked. Operated by Founderr (RIKHATH LLC) See the desk →

Founderr Pulse — free & independent. The desk for people who build & back.