Autonomous AI agent that enforces your Markdown rules on every commit.Write rules in plain English → Stage your code → The Gatekeeper auto-patches violations before you push. 🧩 The ProblemTeams invest heavily in documenting their engineering standards — architecture decisions, security guardrails, coding conventions — in files like Agentic Gatekeeper fixes this. It reads your Markdown rules, cross-references them against your staged code, and auto-patches violations before you commit — turning your docs from passive suggestions into actively enforced policy. ⚡ See It In Action
📐 Where to Put Your Rules
Targeting Specific Files (Rule Globs)Restrict any rule to specific files using YAML Frontmatter:
🔍 Validate Rules — Audit Your Rules Before EnforcingNot sure if your rules are specific enough? Run
The Gatekeeper sends each rule to the AI for a semantic audit and returns:
This lets you iteratively tighten vague rules until they are fully enforceable — before they ever touch production code. 🔄 Remote Rules — Enforce Standards Across Your Entire Org
Sync shared engineering standards from a central GitHub repository so every developer on your team validates against the exact same rules — no manual file copying.
Rules are cached by SHA, stored in a Git-ignored
✨ Key Features
🚫 Ignoring Files
|
| Provider | Description | Required Setting |
|---|---|---|
| Native IDE (Default) | Built-in Copilot or Gemini. Zero setup. | None |
| Anthropic | Claude models (e.g., claude-4.5-sonnet). Highest reasoning. |
Anthropic API Key |
| OpenAI | GPT models (e.g., gpt-5.2). Fast and consistent. |
OpenAI API Key |
| Google Gemini | Gemini models (e.g., gemini-3-pro). Huge context windows. |
Gemini API Key |
| OpenRouter | Universal bridge to DeepSeek, Llama, Grok, and hundreds more. | OpenRouter API Key |
| Custom (Local) | Ollama, LM Studio, or any OpenAI-compatible local server. | Custom Base URL |
Local Models (Ollama / LM Studio)
- Custom Base URL: e.g.,
http://localhost:11434/v1 - Custom Model: e.g.,
llama3orqwen2.5-coder - Custom API Key: Usually
lm-studioorollama
OpenRouter Headers
- OpenRouter Referer: Your project's URL.
- OpenRouter Title: Your app's display name.
❓ FAQ
Does this send my code to an external server?
Only if you configure an external AI provider (Anthropic, OpenAI, etc.). The default Native IDE mode routes through your existing Copilot or Gemini session. Selecting Custom (Ollama/Local) keeps everything fully offline on your machine.
Why did the Gatekeeper skip or ignore my file?
Check these in order:
.gatekeeperignore— Works exactly like.gitignore. Drop this file in your workspace root to exclude specific paths from AI analysis.- Rule globs — If your rules have
globs:frontmatter, only matching files are analyzed. - Built-in exclusions —
node_modules,dist,build,vendor,.next,venv, and other standard dependency/build directories are automatically skipped out of the box so you rarely need a custom ignore file. - Cache — If the file and rules haven't changed since the last run, results are cached. Clear it via the Source Control overflow menu → Agentic Gatekeeper: Clear Analysis Cache.

Can I use this without GitHub Copilot?
Yes. Configure any supported provider — Anthropic, OpenAI, Google Gemini, OpenRouter, or a fully local model via Ollama or LM Studio. Copilot is just the zero-config default.
Does it work with monorepos?
Yes. Use directory-scoped rules (*-gatekeeper.md) and globs: frontmatter to target specific packages or directories within your monorepo.
What happens when I update my rules?
The cache automatically invalidates. It tracks both file content and rule versions, so any change to your Markdown rules triggers a fresh re-analysis on the next run — no manual cache clearing needed.
Can the AI accidentally destroy my file?
The Patcher has built-in safety checks. If the AI produces a rewrite that suspiciously reduces the file size (a sign of truncation or hallucination), the patch is rejected and your original file is preserved untouched. Additionally, because the extension natively patches your local workspace files, you can always perform a git diff to inspect and verify every single line of code before you commit.
Changelog
See CHANGELOG.md for a complete history of updates and releases.
License
This project is licensed under the MIT License with Dedicated Attribution Clause. See the LICENSE.txt file for details.






