Projects/AI Automation Pipeline
AI Automation Pipeline

CodeGate

A fully automated multi-agent AI code review system that triggers on every GitHub Pull Request, runs four specialist AI agents (Security, Quality, Testing, Docs) plus an Orchestrator AI, and delivers a PASS / WARN / BLOCK decision with inline PR comments in under 10 seconds — zero human intervention required.

<10 seconds end-to-end

Review Time

5 (4 specialist + 1 orchestrator)

AI Agents

$0 /month (free API tiers)

Operating Cost

lockcodegate.n8n-pipeline.app
codegate.n8n-pipeline.app screenshot 1

Overview

CodeGate is a fully automated, multi-agent AI code review pipeline built inside n8n. Every time a Pull Request is opened or updated on GitHub, CodeGate wakes up automatically, dispatches the diff to four specialist AI agents — Security, Quality, Testing, and Docs — then sends all four reports to a fifth Orchestrator AI that merges duplicate findings, sorts by severity, computes a PASS / WARN / BLOCK decision, and posts the result back to the PR with inline comments and a commit status check — all within 6–10 seconds, zero human intervention required.

Technical Architecture

The complete pipeline runs in under 10 seconds from GitHub webhook receipt to commit status posted — fast enough that the developer sees the result before they've finished reading the PR description they just wrote.

hexagon

GitHub Webhook Trigger

PR opened / synchronize / reopened

hexagon

Validate & Extract

Rejects drafts, bots, non-PR events

hexagon

Process Diff

Filter noise, format diff, docs-only short-circuit

hexagon

Build Agent Prompts

Creates 4 specialist items from one diff

hexagon

AI Agent Reviews

Groq primary · Gemini fallback · runs 4×

hexagon

AI Orchestrator

Merges findings · scores · writes summary

hexagon

GitHub API Actions

PR comment · inline review · commit status · label

hexagon

Slack Alert

Fires on BLOCK decisions only

4-Specialist Agent System

Security agent hunts for hardcoded secrets, injection flaws, and weak crypto. Quality agent checks logic errors and edge cases. Testing agent flags missing unit tests. Docs agent verifies docstrings and changelog entries. Each agent's system prompt explicitly forbids it from commenting outside its domain — eliminating duplicate findings before the Orchestrator even runs.

N8NGROQ LLAMA 3.3 70BGEMINI 1.5 FLASHJAVASCRIPT

Dual-AI Failover Architecture

Groq (llama-3.3-70b-versatile) is the primary inference provider — fast, free, and capable. The n8n HTTP Request node is configured with `onError: continueErrorOutput`, which routes any Groq failure silently to Gemini 1.5 Flash. This means the pipeline has two independent AI providers and never returns an empty review.

GROQGOOGLE GEMININ8N ERROR PATH

GitHub API Integration

Four sequential GitHub REST API v3 calls complete the loop: POST /issues/{pr}/comments (summary), POST /pulls/{pr}/reviews (inline line comments), POST /statuses/{sha} (✅/❌ check that blocks or allows the merge button), and POST /issues/{pr}/labels (ai-reviewed / needs-changes / security-flag).

GITHUB REST API v3COMMIT STATUSPR REVIEWLABELS

Decision & Scoring Logic

BLOCK: any critical finding, or 2+ high findings. WARN: 1 high finding, or 3+ medium findings. PASS: only low/info findings or none. Score (0–100) is AI-computed by the Orchestrator based on severity and count. BLOCK triggers a Slack incoming webhook alert to the team channel.

PASS / WARN / BLOCK0-100 SCORESLACK WEBHOOK

Performance Benchmarks

REVIEW TIME

<10 seconds

AI AGENTS

5 total

GITHUB API CALLS

4 per PR

OPERATING COST

$0 / month

Results & Impact

link

Zero-Cost CI Gate

Runs entirely on free API tiers (Groq + Gemini + n8n Cloud) — $0/month operating cost while delivering production-grade automated code review on every PR.

link

5-Agent Review Coverage

Security vulnerabilities, logic errors, missing tests, and outdated documentation are all flagged in a single sub-10-second pipeline run — four specialist perspectives plus one orchestrator.

link

Native GitHub Integration

PR summary comments, inline line-level code annotations, commit status checks (blocking merge on BLOCK), and automatic label assignment — all via the GitHub REST API.

Code review in 10 seconds. Four specialists. Zero cost.