Independent AI projects

Independent AI Engineering / Case study

PRISM — AI PR Review Agent

An evidence-grounded GitHub pull request reviewer that separates model hypotheses from backend-validated findings and keeps publication under human control.

Public demo · private live AI

Anyone can explore the synthetic demo. Live GitHub ingestion and AI review require private owner authentication.

Engineering result

Three independently validated findings from real synthetic inference, plus an honest empty result from one real public-PR inference.

In this project
PRISM review workspace showing a labeled synthetic pull request demonstration
Synthetic demonstration from the project repository. This deterministic workspace screenshot is not a live AI acceptance result. Screenshot source ↗

Overview

Built independently to explore a narrow, verifiable review agent rather than an unrestricted automated reviewer. The public workspace demonstrates review navigation and evidence; the separate live AI panel requires private owner access.

My contribution

I independently built the review workspace, read-only GitHub ingestion, pinned evidence preparation, native Gemma adapter, backend finding validation, authenticated approval/copy flow, tests, and production deployment.

The problem

A plausible review comment is not proof of a code defect. A useful AI reviewer needs trustworthy source context, findings tied to actual added lines, explicit coverage limits, and a human decision before suggestions leave the application.

Architecture

React on Vercel serves a public deterministic demo. Authenticated Node Functions retrieve bounded public GitHub evidence, pin it to source SHAs, and prepare a compact package. A private Cloudflare Worker relays one native Workers AI / Gemma inference. The model proposes supported kind/path/line hypotheses; Node independently checks exact added lines and supported AST predicates, then constructs canonical findings. A counter-only SQLite Durable Object coordinates admission, quotas, and replay protection. Human approval unlocks manual-copy Markdown, never GitHub publishing.

Simplified workflow · PRISM — AI PR Review Agent
  1. 01Public PR → authenticated Node ingestion
  2. 02Pinned source evidence · bounded context
  3. 03One native Workers AI / Gemma proposal
  4. 04Node · added-line and AST validation
  5. 05Human approval → manual-copy Markdown

Production AI flow. The public synthetic demo uses deterministic fixtures without live GitHub requests or inference.

Technical decisions

  • Prepare trusted source evidence before inference. Browser-computed findings never become backend evidence, and the model cannot choose arbitrary retrieval targets.
  • Use one native Gemma proposal call, then validate supported hypotheses in Node. Empty model proposals remain empty instead of promoting deterministic matches into AI findings.
  • Support three conservative JS/TS risk categories: global NaN comparisons, recognized HTTPS Agent certificate-verification opt-outs, and recognized jsonwebtoken.verify expiration opt-outs. Uncertain bindings do not establish findings.
  • Keep ingestion and AST validation on Node after ingestion exceeded Workers Free CPU limits. Retain Cloudflare for the private native AI relay and a counter-only Durable Object.
  • Keep canonical drafts in bounded, short-lived server memory. Expired or evicted drafts fail closed; approval cannot substitute browser-authored findings.
  • Require explicit human approval before copying selected suggestions. The system has no GitHub write capability or automatic publication.

Limitations and trade-offs

  • Only public GitHub PRs, supported predicates, and bounded source context are assessed. Partial coverage and zero findings are not a security clearance.
  • Live AI requires private owner authentication; public visitors have access to the synthetic demo, not unrestricted inference.
  • Shared free AI allocation and GitHub originating-IP quotas can be exhausted. Admission controls do not reserve either upstream allowance.
  • Ephemeral drafts may expire or be evicted. A successful acceptance example does not establish general model accuracy or broad defect detection.

Security, performance, and reliability

  • Same-origin authenticated inference endpoints use an HttpOnly signed owner session. No owner access code or relay credential is embedded in the public frontend.
  • Strict GitHub URL validation, fixed retrieval destinations, public-visibility checks, fork-aware pinned sources, and snapshot verification constrain untrusted input and source drift.
  • Bounded requests, evidence, deadlines and model output combine with shared atomic quota admission and replay controls. These controls do not guarantee account-wide availability.
  • Independent exact-line and AST checks construct the final supported findings; assistant prose does not become an unchecked review comment.
  • Approval and copy operate on the canonical server draft. No GitHub writes, automatic comments, or automatic publication are available.

Testing and verification

  • Real synthetic native inference selected three hypotheses; the trusted Node backend independently validated all three findings.
  • A real public-PR acceptance completed with one inference and eight GitHub GETs, honestly returning no supported findings. This does not prove the PR was defect-free.
  • Production HTTPS, branding, desktop/mobile layout, authentication, protected endpoints, approval and clipboard content were verified.
  • The final HTTPS approval/copy test used an explicitly labeled backend-validated synthetic replay. It made no new model calls and is separate from the earlier real-model acceptance.

Results

Production-deployed review with separate public demonstration and owner-authenticated live AI. Supported evidence is checked independently before a suggestion can be approved.

  • Three independently validated findings from real synthetic inference, plus an honest empty result from one real public-PR inference.
  • A production public demo with owner-authenticated live review, evidence inspection, and human-approved manual-copy suggestions.

What I learned

  • The model can propose where to investigate, while trusted code owns the evidence and final supported claim.
  • An empty result and an explicit coverage limit are useful outcomes when the evidence does not support a finding.

Technology and links

React · TypeScript · Node.js · Vercel Hobby · Cloudflare Workers AI · Gemma · Durable Objects · GitHub REST API · AST validation

Related work

Have a similar engineering challenge?

Let’s discuss the product, the constraints, and where I can contribute.

Get in touch