u/InfinriDev

Why Vector RAG fails for AI coding agents at scale (And how I used a Neo4j graph to fix it)

Why Vector RAG fails for AI coding agents at scale (And how I used a Neo4j graph to fix it)

Everyone is treating AI coding memory as a 'week one' problem where you just dump a CLAUDE.md file into the context. That breaks down the second you hit thousands of conflicting enterprise rules. Progressive disclosure still eats up thousands of tokens.

I wanted to move the matching-decision completely OUT of the agent. I forced an LLM to help me build a tool called Writ. It sits on top of Claude Code and uses a 5-stage hybrid retrieval pipeline (BM25 + local ONNX vectors + Neo4j graph traversals) to return context rules in 0.55ms while cutting token bloat by 726x.

The best part? It uses actual local bash terminal hooks to strip away the AI's write permissions until a valid plan and test skeletons are approved. No more AI agents lying or hallucinating dependencies. It's fully open-source and local-first.

Check out the architecture and let me know if the graph-traversal logic makes sense: https://github.com/infinri/Writ

u/InfinriDev — 5 days ago

Save your tokens on Claude Code

If you use Claude code you could use my harness, instead of using skill.md files or md files in general I built a rag for my harness and use a graph database to store my skills and rules, this prevents context stuffing as the AI gets only what it needs, I use bash scripts on hooks that auto run on terminal layer this way the AI doesn't have an option to be lazy or lie.

Bonus since bash scripts run on terminal layer (before disk write) when something fails or breaks it puts a hard block on the AI and send the relevant info along with the block. This helps prevent AI making useless reads on your project saving a shit ton on tokens going back and forth trying to fix a solution.

reddit.com
u/InfinriDev — 7 days ago
▲ 46 r/Magento+6 crossposts

Built a tool that enforces Magento coding standards automatically during AI-assisted development

I work with Magento daily and started using Claude Code for development.

The problem: the AI doesn't know your codebase conventions unless you tell it, and even when you tell it, it doesn't reliably follow them.

So I built Writ, a rule retrieval and enforcement layer for Claude Code. Here's what it does for Magento work specifically:

It detects you're in a Magento project (sees composer.json, detects the framework) and automatically surfaces the right rules for what you're editing. Working on a plugin? It pulls in Plugin/Observer pattern rules, dependency injection rules, and the relevant security rules. Writing a controller? SQL injection prevention and input validation rules show up automatically.

The rules live in a knowledge graph with explicit relationships, so when one rule fires, related rules (dependencies, supplements, conflicts) come with it. Static skill files can't do this.

It also enforces workflow discipline. In work mode, Claude can't write production code until you've approved a plan and test skeletons. This sounds annoying until you realize how many times the AI rewrites your module without thinking through the approach first.

Ships with rules covering security (injection, auth, validation, crypto), clean code, SOLID, architecture patterns, testing, error handling, performance, and API design. All cross-language, works for the PHP backend and the JS/TS frontend in the same session.

Writ repo: https://github.com/infinri/Writ

u/InfinriDev — 12 days ago