Guardrails & review

ci-gatekeeper-bot-jev

@NemanjaManic1Shellupdated 2026-09-19runnable

GitHub Action that uses Jev (TypeSafe AI via Vercel AI Gateway) to cheaply triage pull requests before expensive LLM/human review

NemanjaManic/ci-gatekeeper-bot-jev

Where it calls Jev

// `experimental_evaluate` (typed decisions), since FR-006's secondary

src/fallback-review.ts:3

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from src/jev.ts:31

  1. should_reviewtrue/false

    Does this pull request need a human or LLM code review at all, or is it trivial

  2. riskchoice

    How risky is this change, based on the diff content and changed files?

    • cosmeticDocs, comments, formatting, or other non-functional changes.
    • moderateOrdinary code changes with limited blast radius.
    • blockingTouches authentication, database migrations, CI/CD configuration, or other sensitive surface area.
  3. routechoice

    Given the risk above, how should this PR be routed?

    • auto-approveSafe to merge without further review.
    • human-reviewA human should review this before it is merged.
    • blockThis must not be merged until a human explicitly approves it.
  4. touches_secretstrue/false

    Does the diff contain content that looks like an API key, password, or other credential?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    should_review: { type: 'boolean', instructions: 'Does this pull request need a human or LLM code review at all, or is it trivial' },
    risk: { type: 'choice', instructions: 'How risky is this change, based on the diff content and changed files?',
      criteria: { cosmetic: 'Docs, comments, formatting, or other non-functional changes.', moderate: 'Ordinary code changes with limited blast radius.', blocking: 'Touches authentication, database migrations, CI/CD configuration, or other sensitive surface area.' } },
    route: { type: 'choice', instructions: 'Given the risk above, how should this PR be routed?',
      criteria: { auto-approve: 'Safe to merge without further review.', human-review: 'A human should review this before it is merged.', block: 'This must not be merged until a human explicitly approves it.' } },
    touches_secrets: { type: 'boolean', instructions: 'Does the diff contain content that looks like an API key, password, or other credential?' },
  },
});

Other projects in this category