# Epistemic Code Critic

> Stop your AI from nodding "Great idea!" to broken fixes. Forces a 4-stage falsification check and maps every downstream file that will break (blast_radius.py) before a single line of code is edited.

Epistemic Code Critic is a paid AI agent skill on Agensi by Scrimal, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7.99 (one-time purchase)
- Creator: [Scrimal](https://www.agensi.io/creators/scrimal)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Version: 1.1.1
- Last updated: 2026-12-02
- Security: scan passed (2026-12-02); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/epistemic-code-critic
- Tags: code-review, prompt-engineering, ai-agents, critical-thinking, architecture, anti-sycophancy, safety, bayesian

## About this skill

You ask your AI: *"Should we bump the auth timeout to 60s to fix the 500 errors?"*
Your AI smiles and says: *"Great idea! Let's update the config."*
Ten minutes later, worker threads are deadlocked, 6 downstream services are failing, and you spend your evening reverting a "fix" that never addressed the real bug.

AI coding agents are trained to be agreeable—not right. **Epistemic Code Critic** is the senior engineer in the room who stops the agent before it touches your codebase, disproves bad assumptions, and runs a static dependency scan (`scripts/blast_radius.py`) to show every file in your repo that will break if you make that edit.

### What Happens Before Any Risky Edit
* **Kills "Yes-Man" Fixes:** Automatically challenges symptom-patching prompts (blind retries, timeout bumps, `try/except: pass`) instead of rubber-stamping them.
* **Proves It Wrong First (Popperian Gate):** Forces the agent to state what evidence would *disprove* your hypothesis and check logs/code *before* writing a patch—and logs dead ends so future sessions never repeat them.
* **Shows the Real Blast Radius (`blast_radius.py`):** Scans Python, JS/TS, Go, and Rust imports across your repo in milliseconds to count every direct and transitive consumer (`LOW` → `CRITICAL`), so you never break 6 files while fixing 1.
* **Hard Stop on Irreversible Actions:** Blocks schema migrations, force-pushes, and release tags whenever evidence falls below the `0.70` confidence threshold.
* **Zero Noise on Trivial Edits:** Triggers full 4-gate scrutiny on refactors, auth/security code, and debugging loops while staying completely out of your way on typo or doc fixes.

### What's Inside
1. `SKILL.md` — Risk-tiered 4-gate review protocol (`Premise Audit`, `Falsification`, `Blast Radius`, `Reversibility Gate`).
2. `scripts/blast_radius.py` — Zero-dependency static consumer & impact scanner for Python, JS/TS, Go, and Rust (`exit 0` safe, `1` high, `2` critical).
3. `references/review_protocol.md` — Confidence scoring rubric (`0.0–1.0`), irreversibility checklist, and a `SPINE-Memory` `dead_end` node template.

## Requires

- Python 3.10+
- Git

Zero external dependencies or network requests. The 4-gate epistemic protocol works standalone in any chat or IDE; the included blast_radius.py scanner runs locally using standard library modules only.

## Known limitations

Static dependency scanning relies on regex import and path matching rather than full compiler AST resolution, and ignores files over 512 KB or inside vendor/build directories.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Epistemic Code Critic skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does the Epistemic Code Critic prevent my AI agent from making 'yes-man' errors?

This skill prevents 'AI sycophancy' by forcing the agent to mathematically validate its reasoning using Bayesian logic and attempt to disprove its own solution before applying it. It ensures your agent doesn't just agree with your mistakes or apply shallow patches to deep architectural issues.

### Which AI agents and coding environments are compatible with this skill?

It is designed to work with any major AI coding environment, including Claude Code, Cursor, Windsurf, and pi. It is language-agnostic and excels in complex environments involving CI/CD, database schemas, and large-scale refactors.

### Will this protocol slow down my workflow for every single minor code change?

The skill functions as a logic layer that intercepts non-trivial requests; it automatically skips low-stakes tasks like typo fixes or simple documentation updates to ensure your development velocity isn't hindered for trivial changes.

### What is included in the purchase and will I receive updates?

You receive SKILL.md (the 4-gate epistemic review protocol), scripts/blast_radius.py (a zero-dependency static dependency and impact analyzer across Python, JS/TS, Go, and Rust with exit codes 0/1/2), references/review_protocol.md, and references/spine_patch.md for logging falsified paths as dead_end nodes. All future updates to the skill are included at no extra cost.

### Does this skill require specific permissions or access to my codebase?

It only needs read access to the source files you ask it to review and terminal access when running the local blast_radius.py scanner. It makes zero network requests and never sends your code to external servers; if evidence falls below the 0.7 confidence threshold, it halts execution rather than guessing.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
