Agentic Gatekeeper – Auto-patch your code to enforce Markdown rules
AI-powered pre-commit hook enforces your Markdown rules, but linters and husky already exist.
The Agentic Gatekeeper is a localized, autonomous AI Agent that acts as a strict pre-commit hook inside VS Code. Before you commit, the Gatekeeper reads your staged diffs, deeply cross-references them against your documented Markdown rules, and natively Auto-Patches your code to enforce 100% compliance.
AI pre-commit hook that auto-patches logic errors against CONTRIBUTING.md rules—solves real drift but needs Windows support.
Engineering teams using LLM code generation and custom architecture guidelines
Conventional pre-commit hooks (pre-commit.com) · Linters (ESLint, Pylint) + custom rules
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!
AI-powered pre-commit hook enforces your Markdown rules, but linters and husky already exist.
Hook guard stops Claude from bypassing commit rules when confirming changes.
Pre-commit hook that matches email local-parts across domains to keep git logs clean.
Blocks commits with undocumented code, but doc rot is solved elsewhere (Cursor, GitHub Copilot, type stubs).
Task cards actually contain live terminals (xterm.js) and the app will create a git worktree + tmux/zellij session when you make a task — move it to DONE and it cleans up. The hook-driven auto-moves for Claude/Codex agents cut out manual status checking, but this is an ops-y, niche tool (Node 22+, Docker, tmux/zellij) aimed squarely at people running local agent fleets.
Tree-sitter AST parsing auto-approves safe commands for AI agents.