Hook by infinri · 162 stars
Hybrid RAG rule retrieval and workflow enforcement for Claude Code. A five-stage pipeline (BM25 + vector + graph traversal + two-pass ranking) retrieves the right coding rules for each task in under 1ms from a Neo4j knowledge graph,. 726x context reduction vs loading a full rulebook at 10K rules. A mode and gate state machine enforces workflow discipline at the tool-call boundary: - writes are blocked until plans and tests are approved. - Ships with 276 rules across 12 domains (Security, Clean Code, DRY, SOLID, Architecture, Testing, Error Handling, Performance, Scaling, API Design, Process, Documentation). - AI agents can propose new rules through a structural gate; frequency-driven graduation and human review control what stays.
/plugin install writ@claude-community