Show HN: Agentic Gatekeeper – AI pre-commit hook to auto-patch logic errors

Hey HN,

I built Agentic Gatekeeper, a headless pre-commit hook baked into the VS Code Source Control panel that autonomously patches code before you commit it.

The Problem: Whether I'm writing code manually or letting LLMs (Cursor/Copilot) generate it, keeping logic strictly in pace with local project rules (like CONTRIBUTING.md or custom architecture guidelines) is tedious. Standard linters catch syntax, but they don't catch business logic or state "You must use the Fetch wrapper for API calls in this folder".

How it works: When you stage files and trigger the hook, the extension spins up a parallel execution engine using the latest frontier models (Claude 4.6, DeepSeek V4, or local Ollama). It parses your workspace for local routing rules (e.g., .gatekeeper/*.md), evaluates the raw Git diffs, and utilizes the native VS Code WorkspaceEdit API to instantly auto-patch the logic errors directly in your editor.

It basically turns plain-English markdown into strict compiler rules that the IDE enforces before a bad commit is made.

The biggest challenge was handling multi-file concurrency and preventing race conditions when evaluating massive diffs, so I implemented a batched validation loop with explicit rollback safety checks. It natively supports OpenRouter so you can hot-swap models.

It's completely open-source. I'd love for you to try breaking it on a messy branch or poke around the multi-provider abstraction layer in the repo.

VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=revanthp... GitHub: https://github.com/revanthpobala/agentic-gatekeeper

Would love your technical feedback on the prompt orchestration or the VS Code API integration!


Comments URL: https://news.ycombinator.com/item?id=47106754

Points: 1

# Comments: 0