Segun Olumbe

ai governance · mcp

aiglare

Finds where model output hits a user or a side effect (payments, email, writes) without guardrails. Maps to SOC 2, EU AI Act, NIST AI RMF, and OWASP LLM Top 10. Lint, Markdown evidence, or an HTML report for auditors. Red fails the build. Official MCP server on the registry.

  • Node.js
  • JavaScript (ESM)
  • TypeScript compiler
  • MCP over stdio
  • GitHub Actions

Problem

Most AI incidents are not model failures. They are governance failures: the model's output went straight to a user or an irreversible action with nothing in between. aiglare makes those paths visible, and lets you block the worst of them in CI.

Constraints

  • Static analysis only. It never calls a model and never runs your code.
  • It works on any JavaScript or TypeScript repository with no rules to write.
  • The CI gate has to be adoptable: it fails only on a red surface that feeds a side effect.
  • It is a linter, not a verifier. Its output is surfaces to review, not violations.

Architecture

One pass over the source finds every call to a model, works out where the output goes, and scores what stands in between.

  1. Discovery

    • Provider registry14 providers, from OpenAI and Anthropic to Bedrock, Ollama, and the Vercel AI SDK, plus raw HTTP calls to known inference hosts.
    • ScannerBuilt on the TypeScript compiler. Finds each place the code calls a model.
  2. Classification

    • SinkWhere the output goes: user-facing, side-effectful, or internal.
    • GuardrailsFive dimensions: confidence handling, a fallback path, output validation, a human in the loop, and error isolation.
    • SeverityRed when output reaches a user or a side effect with no guardrails, amber for partial cover, green when they are there.
  3. Compliance mapping

    • ControlsEach finding mapped to named controls in SOC 2, the EU AI Act, NIST AI RMF, and the OWASP LLM Top 10.
  4. Out

    • ReportsTerminal, JSON, lint format, a Markdown evidence document, or an HTML report for an auditor.
    • CI gateFails the build on a red, side-effectful surface.
    • MCP serverThe same audit for an agent, with the control violations attached.

Key decisions

  1. Static analysis before anything runs

    Instead of runtime validators on every call

    Runtime guardrail libraries check each output as it happens, but only where someone has wired them in. aiglare finds the surfaces that have no guardrail at all. It tells you where one is missing; a runtime validator is how you add it.

  2. AI knowledge built in

    Instead of general lint rules you write yourself

    A general rule engine leaves you to write and maintain the rules. aiglare ships the provider registry, the sink classification, and the five guardrail dimensions.

  3. Failing only on red side effects

    Instead of failing on every finding

    The dangerous case is a model that triggers an irreversible action with no confirmation. Gating on that alone makes it safe to adopt without drowning a team in warnings.

  4. Calling it a linter

    Instead of calling it a verifier

    It produces false positives, because a guardrail two calls away can be missed, and false negatives, because a confidence variable that gates nothing still reads as present. The README says both.

What broke, and the fix

  1. Bedrock was being detected by accident.

    Cause
    A host matcher happened to find the Bedrock runtime name inside the import string. That also meant wiring files that never call a model were reported as AI surfaces.
    Fix
    Imports are now matched by package, on purpose, and left out of host matching.

Outcome

  • Published on npm and the MCP Registry, with a one-week pilot runbook for trying it on a real codebase.
  • 14 providers, five guardrail dimensions, and four frameworks mapped.
  • 48 tests, all passing.
  • It is the AI governance check inside gate.