Skip to content
Back to projects
Apr 07, 2026
2 min read

PR Reviewer Daemon

Autonomous AI code reviewer that ran on my machine: polled GitHub for PRs, gathered context from multiple sources, and posted inline review comments.

Archived November 2026. I retired this project; the write-up stays as a record of what I built.

I got tired of context-switching to review PRs. So I built a daemon that does it automatically.

What it does

Ran on my Mac as a background service. During business hours, it polled GitHub for open PRs, gathered context from five sources (codebase, work items, team chat, database schemas, git history), ran a multi-step AI review chain, and posted inline comments on the exact file and line.

Not a toy linter — it checked requirement coverage, security (OWASP), data integrity, and even triaged existing Copilot suggestions.

How it works

  1. Discovery — GitHub Search API finds open PRs. Optionally monitors a Teams chat for PR links.
  2. Triage — Skips drafts, bot PRs, and anything it already reviewed (tracked in SQLite).
  3. Context — Pulls the PR diff, linked work item + discussion, local codebase, DB schema, and recent git history.
  4. Review — Four-stage AI chain: requirement check → code review (10 categories) → deep dive on risky findings → Copilot comment triage.
  5. Post — Inline GitHub comments on specific lines, thread replies, and a summary with a verdict.

Graceful degradation

If Teams tokens expired, it skipped chat monitoring. If the database was down, it skipped schema checks. If the AI rate-limited, it backed off and retried. Each piece was optional — the core GitHub → AI → comment loop always worked.

Stack

  • TypeScript + Node.js
  • Azure OpenAI (GPT-4o)
  • GitHub REST API (Octokit)
  • SQLite for review state
  • node-cron for scheduling
  • launchd / Docker for deployment