# AI Code Silent Regression & PR Integrity Auditor

> Catch the sneaky bugs AI coding agents slip past green builds—weakened tests, silent catch blocks, phantom imports, breaking signatures, and AST clones—with an offline HTML Workbench, SARIF 2.1.0, and deterministic CI gates.

AI Code Silent Regression & PR Integrity Auditor is a paid AI agent skill on Agensi by kkbeingbusy, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [kkbeingbusy](https://www.agensi.io/creators/kkbeingbusy)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Version: 1.0
- Last updated: 2026-11-29
- Security: scan passed (2026-11-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/ai-code-silent-regression-pr-integrity-auditor
- Tags: code-review, testing, security, python, typescript, static-analysis, pr-review, ai-code-audit

## About this skill

**Your AI coding agent made the build green. Did it actually fix the bug—or quietly weaken your tests, swallow exceptions, and ship a phantom import?**

**AI Code Silent Regression & PR Integrity Auditor** is a deterministic, zero-dependency static-analysis firewall built specifically for the AI-assisted engineering era. Powered solely by the **Python 3.8+ standard library** (no `pip install`, no Node runtime, no external API keys, 100% offline and strictly read-only), it compares Base vs. Head across **Python (`ast` + `tokenize`)** and **JavaScript / TypeScript / JSX / TSX (dedicated state-machine lexer + structural parser)** to expose subtle regressions traditional linters miss.

### Why Engineers Trust It Over Generic Linters & Prompt Reviews

- **Strictly Diff-Scoped — Zero Legacy Noise**: Evaluates only changed files, changed symbols, and changed lines while comparing full Base vs. Head semantics. Never blames untouched legacy code.
- **18 Precision Integrity Rules Across 5 Pillars**:
  1. **Test Integrity (`AI-TEST-01`–`05`)**: Catches deleted or diluted assertions (`==` downgraded to `is not None` / `toBeDefined()`), tautologies (`assert True`, `expect(true).toBe(true)`), silent `.skip` / `xit` without issue refs, mock-only self-confirming tests, and substantial public logic edits shipped with zero test updates.
  2. **Error Handling & Control Flow (`AI-ERR-01`–`04`)**: Flags silent `except: pass`, empty `catch {}`, `.catch(() => null)`, bare `except:` and exception-widening regressions, unreachable dead code after `return`/`raise`/`throw`, and deceptive hardcoded fallback returns (`{'status': 'ok'}`, `[]`).
  3. **Symbols, Imports & API Contracts (`AI-SYM-01`–`04`)**: Detects hallucinated/undeclared packages and broken relative imports (cross-checking `pyproject.toml`, `requirements*.txt`, `package.json`, `tsconfig.json` path aliases, stdlib, and Node built-ins), orphaned private helpers, breaking public parameter/return-shape regressions, and unused new imports.
  4. **Clones & Complexity Spikes (`AI-BLOAT-01`–`03`)**: Identifies copy-pasted near-duplicate functions via variable-normalized AST/token hashing, McCabe cyclomatic complexity and deep nesting spikes (keeping `elif`/`else if` flat), and verbose stdlib re-implementations.
  5. **Type-Safety & Hygiene (`AI-SEC-01`–`02`)**: Catches untargeted `@ts-ignore`, `@ts-nocheck`, `as any`, `: any`, bare `# type: ignore`, whole-file `eslint-disable`, plus leftover `breakpoint()`, `debugger;`, production `console.log`, and unfinished `NotImplementedError` / `TODO` stubs.
- **Built-In False-Positive Guards & Inline Ignores**: Isolates string literals from comments via real tokenizers, honors targeted `# type: ignore[code]` and `@ts-expect-error <reason>`, skips optional `try/ImportError` blocks and `if TYPE_CHECKING:`, and supports `# ai-pr-ignore: <RULE_ID>` / `// ai-pr-ignore: <RULE_ID>` plus `.ai-pr-integrity.json` project policies.
- **6 Comparison Scopes & 5 Output Formats**: Audit `--working`, `--staged`, `--base main...HEAD`, `--base A --head B`, `--dirs`, or `--files`. Export Terminal summaries, **JSON**, **SARIF 2.1.0**, copy-ready **Markdown PR Review Comments**, and a **Single-File Offline Interactive HTML Workbench** (0–100 score gauge, severity/category filters, side-by-side Base vs. Head evidence, review checkboxes, Dark/Light mode, Copy Markdown, Print/PDF).
- **Deterministic Scoring & CI Exit Gates**: Per-rule deduction caps prevent single-file noise from distorting scores; configurable `--fail-on critical|high|medium|low|none` returns clean CI exit codes (`0` pass/warn, `1` blocked, `2` error) and surfaces `summary.analysis_complete` so parse failures never masquerade as a clean 100/100 score.

## Requires

- Python 3.8+
- Optional: Git
- Optional: Modern web browser

Runs 100% offline on Windows, macOS, and Linux with zero pip or npm dependencies. Git is only required for --working, --staged, and --base/--head modes.

## Known limitations

Supports Python and JavaScript/TypeScript/JSX/TSX; other file extensions are skipped cleanly and listed in skipped_files. JS/TS uses a zero-dependency state-machine structural parser rather than the full TypeScript compiler type-checker.

## 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 AI Code Silent Regression & PR Integrity Auditor 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 this skill differ from standard linters or just asking an LLM to review my code?

AI PR Integrity uses structural AST (Abstract Syntax Tree) analysis to detect logical regressions, like weakened test assertions or phantom imports, which standard linters and generic LLM prompts often miss. It ensures that AI-generated code doesn't silently degrade your codebase's stability or test coverage.

### Which programming languages and environments is this skill compatible with?

This skill is designed for any AI agent with filesystem access and supports Python (3.8+), JavaScript, TypeScript, JSX, and TSX files. It integrates directly with Git repositories to audit staged changes, specific commits, or entire directory snapshots.

### What specific assets are included in this purchase?

You will receive the core auditing engine, pre-configured hooks for Git, and templates for generating reports in JSON, SARIF, HTML, and Markdown formats. It also includes the necessary configuration files to integrate the skill into your existing CI/CD pipelines or pre-commit workflows.

### What are the technical requirements for installing and running this skill?

Setup is straightforward: once the skill is added to your agent's toolkit, you simply point it at a repository or git ref range using the provided flags. It requires Python 3.8+ on the host machine to perform the structural parsing and lexical analysis.

### Are there any known limitations I should be aware of before purchasing?

The skill is highly effective at catching structural and logical flaws, but it is currently limited to Python and JS/TS ecosystems. It relies on successful code parsing, so files with significant syntax errors may result in incomplete integrity scores.

---

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.
