Audit git history & block AI infractions in CI.

AI coding agents make pipelines green by skipping failing tests, erasing types with as any, and spinning rapid-fire commit loops. agent-roast scores git history and acts as a strict, zero-dependency GitHub Actions gate.

$ npx agent-roast
View on GitHub

MIT · runs locally in <200ms · zero telemetry

auth-service — git diff HEAD~1
src/client.ts
Problems (0) Output Terminal
main roast: The Panic Looper (55/100) zero telemetry · 182ms
An AI assistant wrestled auth tests in client.ts. It took shortcuts to get CI green. agent-roast streams the added lines in git log, isolates the evasions, and provides exact line proofs.

The AI coding paradox

When tests fail, an AI agent optimizes for the path of least resistance to make the build pass.

Without agent-roast

The Silent Regression

A developer asks Cursor or Claude Code to fix an auth bug. The build passes. The PR is approved.

  • Skipped suites: it.skip() added to 3 test files. Critical edge cases never run.
  • Type evasion: Strict types suppressed with as any and // @ts-ignore.
  • Thrashing loops: 8 commits in 3 minutes with vague messages ("fix", "try again", "wip").
  • Outcome: Silent regressions hit production despite 100% green CI.
With agent-roast

Discipline Audited in 180ms

A single command audits the recent git log. Proof is printed before changes are merged.

  • Exact citations: Flags file, line number, commit SHA, and author for every skipped test.
  • Clean type hygiene: Catches compiler bypasses added in new lines.
  • Loop detection: Calculates velocity thrashing and flags consecutive panic fixes <15m apart.
  • Outcome: Transparent discipline scores (0–100) and actionable PR quality gates.
v0.2.1 Release

Block AI test skips and shortcuts in pull requests

Enforce strict discipline in GitHub Actions. Zero telemetry, supply-chain hardened, runs in <200ms.

.github/workflows/agent-roast.yml
name: Agent Discipline Gate
on: [pull_request]

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Audit PR Discipline
        uses: Nari-Ab/agent-roast@v1
        with:
          fail-on: test-skip,type-escape
          range: origin/${{ github.base_ref }}..HEAD

PR-Delta Scrutiny

Audits only the newly added commits in the PR branch. Existing legacy technical debt never causes false failures.

Zero-Config --fail-on

Returns exit code 1 whenever critical rules (test-skip, type-escape, panic-loop) are violated in new code.

Supply-Chain Hardened

Isolated in dedicated runner temporary directory ($RUNNER_TEMP). No repo contamination, zero shell injection risks.

Inline Diff Annotations

Automatically emits GitHub Actions workflow commands to annotate offending lines directly in the pull request view.

How it works

Deterministic static analysis on streaming git diffs. No cloud, no external LLM calls.

1. Streaming Git Pipeline

Spawns git log -p -U0 with ASCII control records (\x1e / \x1f). Parses hunks line-by-line without loading large repositories into memory.

2. Added-Lines Scrutiny

Scans only added lines (+). Refactorings, file moves, and deleted code never trigger false alarms.

3. Literal Sanitization

Strips string constants and test fixtures prior to evaluation. String values containing words like "it.skip" are never misclassified.

4. AI Provenance Fingerprints

Inspects commit trailers (Co-Authored-By: Claude), author identities, and tool-generated message signatures.

5. Panic Loop Velocity

Identifies author thrashing: rapid consecutive bugfix commits touching the same files within a 15-minute window.

GitHub Action

6. PR Quality Gate (@v1)

Deploy uses: Nari-Ab/agent-roast@v1 in GitHub Actions. Enforce --fail-on test-skip or block panic loops before merging pull requests.

Local & Hermetic

Your source code never leaves your computer. No API keys, no network access, no telemetry.

Network egress 0 bytes
External dependencies Zero (2 CLI packages)
API keys None
Audit speed <200ms on 300 commits

Audit your repository now

No global install required. Run directly in any git project with npx.

$ npx agent-roast